mirror of https://github.com/vitalif/openscad
Fixed compile error and added zoomIn/zoomOut slots
git-svn-id: http://svn.clifford.at/openscad/trunk@503 b57f626f-c46c-0410-a088-ec61d464b74cstl_dim
parent
b699cbd859
commit
8aad5e448f
|
@ -88,10 +88,6 @@ private slots:
|
|||
void actionReload();
|
||||
|
||||
private slots:
|
||||
void editIndent();
|
||||
void editUnindent();
|
||||
void editComment();
|
||||
void editUncomment();
|
||||
void pasteViewportTranslation();
|
||||
void pasteViewportRotation();
|
||||
void hideEditor();
|
||||
|
|
12
src/editor.h
12
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); }
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "highlighter.h"
|
||||
#include "openscad.h" // extern int parser_error_pos;
|
||||
|
||||
#ifdef _QCODE_EDIT_
|
||||
Highlighter::Highlighter(QDocument *parent)
|
||||
#else
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
|
||||
#include <QSyntaxHighlighter>
|
||||
|
||||
#ifdef _QCODE_EDIT_
|
||||
#include "qdocument.h"
|
||||
#endif
|
||||
|
||||
class Highlighter : public QSyntaxHighlighter
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue