diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-01-01 17:47:22 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2011-01-01 17:47:22 +0000 |
commit | 458cc9d49f929cfd4826c9e5c8a83ec90fd7efa0 (patch) | |
tree | 0de3f96f0cea53fd49e1e6f273ccb4992d785d62 /textedit.h | |
parent | comment out sign/verify for now (diff) | |
download | gpg4usb-458cc9d49f929cfd4826c9e5c8a83ec90fd7efa0.tar.gz gpg4usb-458cc9d49f929cfd4826c9e5c8a83ec90fd7efa0.zip |
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
Diffstat (limited to 'textedit.h')
-rw-r--r-- | textedit.h | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -3,21 +3,37 @@ #include <QPlainTextEdit> -class QtGui; -class QApplication; +#include <QtGui> +#include <QFileDialog> +#include <QMessageBox> +#include <QFileInfo> +#include <QApplication> +#include <QFile> + 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); |