From 7206143f863fa03a578efe7ecb95d1cfa4752824 Mon Sep 17 00:00:00 2001 From: nils Date: Mon, 17 Jan 2011 21:39:54 +0000 Subject: added quitdialog with checklist for documents to save, but there has to be some handling for the saving git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@439 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- textedit.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'textedit.h') diff --git a/textedit.h b/textedit.h index 39ed9e9..3a66175 100644 --- a/textedit.h +++ b/textedit.h @@ -40,11 +40,13 @@ class TextEdit : public QWidget { Q_OBJECT public: - TextEdit(); + TextEdit(QString iconPath); void loadFile(const QString &fileName); bool maybeSaveAnyTab(); bool maybeSaveCurrentTab(); QPlainTextEdit* curTextPage(); + int getUnsavedDocumentsNumber(); + QHash unsavedDocuments(); public slots: void quote(); @@ -60,11 +62,13 @@ public slots: private: QString strippedName(const QString &fullFileName); - int countPage; - QTabWidget *tabWidget; bool maybeSaveFile(); EditorPage *curPage(); void setCursorPosition(); + QString mIconPath; + int countPage; + QTabWidget *tabWidget; + bool saveTab(int i); private slots: void removeTab(int index); -- cgit v1.2.3