diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/MainWindow.h | 4 | ||||
-rw-r--r-- | src/editor.h | 12 | ||||
-rw-r--r-- | src/highlighter.cc | 1 | ||||
-rw-r--r-- | src/highlighter.h | 4 |
4 files changed, 16 insertions, 5 deletions
diff --git a/src/MainWindow.h b/src/MainWindow.h index 7623789..9eb1748 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -88,10 +88,6 @@ private slots: void actionReload(); private slots: - void editIndent(); - void editUnindent(); - void editComment(); - void editUncomment(); void pasteViewportTranslation(); void pasteViewportRotation(); void hideEditor(); 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); } diff --git a/src/highlighter.cc b/src/highlighter.cc index 1123d1b..aa21e38 100644 --- a/src/highlighter.cc +++ b/src/highlighter.cc @@ -25,6 +25,7 @@ #include "highlighter.h" #include "openscad.h" // extern int parser_error_pos; + #ifdef _QCODE_EDIT_ Highlighter::Highlighter(QDocument *parent) #else diff --git a/src/highlighter.h b/src/highlighter.h index aeb2972..1bd54d2 100644 --- a/src/highlighter.h +++ b/src/highlighter.h @@ -3,6 +3,10 @@ #include <QSyntaxHighlighter> +#ifdef _QCODE_EDIT_ +#include "qdocument.h" +#endif + class Highlighter : public QSyntaxHighlighter { public: |