aboutsummaryrefslogtreecommitdiffstats
path: root/textedit.h
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-01 17:47:22 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-01-01 17:47:22 +0000
commit458cc9d49f929cfd4826c9e5c8a83ec90fd7efa0 (patch)
tree0de3f96f0cea53fd49e1e6f273ccb4992d785d62 /textedit.h
parentcomment out sign/verify for now (diff)
downloadgpg4usb-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.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/textedit.h b/textedit.h
index 5688c71..06fd3ba 100644
--- a/textedit.h
+++ b/textedit.h
@@ -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);