diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-01-01 23:53:51 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-01-01 23:53:51 +0000 |
commit | 6ce7b92a92cc6785a2d155bb25024ffbd15958ae (patch) | |
tree | 688ed2b0c3e2160e2ab414fb436caa12f56c2d70 /textedit.h | |
parent | added GPL to textedit-files (diff) | |
download | gpg4usb-6ce7b92a92cc6785a2d155bb25024ffbd15958ae.tar.gz gpg4usb-6ce7b92a92cc6785a2d155bb25024ffbd15958ae.zip |
added tabs to editor, but VERY buggy till now
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@418 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'textedit.h')
-rw-r--r-- | textedit.h | 28 |
1 files changed, 24 insertions, 4 deletions
@@ -30,35 +30,55 @@ #include <QFileInfo> #include <QApplication> #include <QFile> +#include "editorpage.h" class QWidget; class QString; +class QTabWidget; -class TextEdit : public QPlainTextEdit +class TextEdit : public QWidget { Q_OBJECT public: - TextEdit(QWidget *parent=0); + TextEdit(); void setCurrentFile(const QString &fileName); void loadFile(const QString &fileName); bool maybeSave(); + QPlainTextEdit* curTextPage(); public slots: void quote(); - bool save(); + void save(); bool saveAs(); void open(); void print(); private: bool isKey(QString key); - bool saveFile(const QString &fileName); QString strippedName(const QString &fullFileName); QString curFile; + int countPage; + QTabWidget *tabWidget; + bool maybeSaveFile(); + EditorPage *curPage(); + void setCursorPosition(); + +private slots: + void removeTab(int index); + void cut(); + void copy(); + void paste(); + void undo(); + void redo(); + void selectAll(); protected: void dragEnterEvent(QDragEnterEvent *event); void dropEvent(QDropEvent* event); + void newFile(); + bool saveFile(const QString &fileName); + bool closeFile(); + }; #endif // TEXTEDIT |