summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-04-03 03:05:20 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-04-03 03:05:20 (GMT)
commit8aad5e448fd9b4563fa2e9e1d69cdb64017370d8 (patch)
tree60d4efc52a55a8859ba46b6f6ffe8dfc76ebeecd
parentb699cbd8596db1c24cf60d4d7fe4b3a025420a19 (diff)
Fixed compile error and added zoomIn/zoomOut slots
git-svn-id: http://svn.clifford.at/openscad/trunk@503 b57f626f-c46c-0410-a088-ec61d464b74c
-rw-r--r--src/MainWindow.h4
-rw-r--r--src/editor.h12
-rw-r--r--src/highlighter.cc1
-rw-r--r--src/highlighter.h4
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:
contact: Jan Huwald // Impressum