summaryrefslogtreecommitdiff
path: root/src/highlighter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/highlighter.h')
-rw-r--r--src/highlighter.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/highlighter.h b/src/highlighter.h
index 1bd54d2..a6e2dc3 100644
--- a/src/highlighter.h
+++ b/src/highlighter.h
@@ -3,18 +3,29 @@
#include <QSyntaxHighlighter>
-#ifdef _QCODE_EDIT_
-#include "qdocument.h"
-#endif
-
class Highlighter : public QSyntaxHighlighter
{
public:
-#ifdef _QCODE_EDIT_
- Highlighter(QDocument *parent);
-#else
- Highlighter(QTextDocument *parent);
-#endif
+ enum state_e {NORMAL=-1,QUOTE,COMMENT};
+ enum mode_e {NORMAL_MODE, ERROR_MODE};
+ mode_e mode;
+
+ QStringList operators;
+ QStringList KeyWords;
+ QStringList Primitives3D;
+ QStringList Primitives2D;
+ QStringList Transforms;
+ QStringList Imports;
+ QTextCharFormat ErrorStyle;
+ QTextCharFormat OperatorStyle;
+ QTextCharFormat CommentStyle;
+ QTextCharFormat QuoteStyle;
+ QTextCharFormat KeyWordStyle;
+ QTextCharFormat PrimitiveStyle3D;
+ QTextCharFormat PrimitiveStyle2D;
+ QTextCharFormat TransformStyle;
+ QTextCharFormat ImportStyle;
+ Highlighter(QTextDocument *parent, mode_e mode);
void highlightBlock(const QString &text);
};
contact: Jan Huwald // Impressum