diff --git a/src/MainWindow.h b/src/MainWindow.h index 7623789a..9eb17486 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 115801de..6cc7913c 100644 --- a/src/editor.h +++ b/src/editor.h @@ -1,3 +1,7 @@ +#include +#include +#include + #ifdef _QCODE_EDIT_ #include 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 1123d1b1..aa21e38d 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 aeb29721..1bd54d2c 100644 --- a/src/highlighter.h +++ b/src/highlighter.h @@ -3,6 +3,10 @@ #include +#ifdef _QCODE_EDIT_ +#include "qdocument.h" +#endif + class Highlighter : public QSyntaxHighlighter { public: