From 458cc9d49f929cfd4826c9e5c8a83ec90fd7efa0 Mon Sep 17 00:00:00 2001 From: nils Date: Sat, 1 Jan 2011 17:47:22 +0000 Subject: moved open,save,saveas and print slots to textedit-class git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@416 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- textedit.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'textedit.h') diff --git a/textedit.h b/textedit.h index 5688c71..06fd3ba 100644 --- a/textedit.h +++ b/textedit.h @@ -3,21 +3,37 @@ #include -class QtGui; -class QApplication; +#include +#include +#include +#include +#include +#include + class QWidget; +class QString; class TextEdit : public QPlainTextEdit { Q_OBJECT public: TextEdit(QWidget *parent=0); - -private: - bool isKey(QString key); + void setCurrentFile(const QString &fileName); + void loadFile(const QString &fileName); + bool maybeSave(); public slots: void quote(); + bool save(); + bool saveAs(); + void open(); + void print(); + +private: + bool isKey(QString key); + bool saveFile(const QString &fileName); + QString strippedName(const QString &fullFileName); + QString curFile; protected: void dragEnterEvent(QDragEnterEvent *event); -- cgit v1.2.3