summaryrefslogtreecommitdiff
path: root/src/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.h')
-rw-r--r--src/editor.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/editor.h b/src/editor.h
index 115801d..6cc7913 100644
--- a/src/editor.h
+++ b/src/editor.h
@@ -1,3 +1,7 @@
+#include <QObject>
+#include <QString>
+#include <QWidget>
+
#ifdef _QCODE_EDIT_
#include <qeditor.h>
class Editor : public QEditor
@@ -6,11 +10,17 @@ class Editor : public QEditor
class Editor : public QTextEdit
#endif
{
+ Q_OBJECT
public:
#ifdef _QCODE_EDIT_
Editor(QWidget *parent) : QEditor(parent) {}
QString toPlainText() const { return text(); }
- void setPlainText(const QString& text) { setText(text); }
+ void setPlainText(const QString& text) { setText(text); }
+public slots:
+ //void zoomIn() { zoom(1); }
+ void zoomIn(int n = 1) { zoom(n); }
+ //void zoomOut() { zoom(-1); }
+ void zoomOut(int n = 1) { zoom(-n); }
#else
Editor(QWidget *parent) : QTextEdit(parent) {}
void setLineWrapping(bool on) { if(on) setWordWrapMode(QTextOption::WrapAnywhere); }
contact: Jan Huwald // Impressum