diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2013-12-29 21:25:35 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2013-12-29 21:25:35 (GMT) |
commit | f0e077269467ea38f54d517f4daea5c014a27df9 (patch) | |
tree | e80a5b791ca876673991bd55db95abac95b313c3 /src/highlighter.h | |
parent | 6938ae2dfde578e3980d077adefb86a4bdbd9df1 (diff) |
enable disabling of syntax highlighter, add highlighter for dark backgrounds
Diffstat (limited to 'src/highlighter.h')
-rw-r--r-- | src/highlighter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/highlighter.h b/src/highlighter.h index b4ffae8..10f9b0a 100644 --- a/src/highlighter.h +++ b/src/highlighter.h @@ -10,11 +10,12 @@ class Highlighter : public QSyntaxHighlighter public: enum state_e {NORMAL=-1,QUOTE,COMMENT}; QHash<QString, QTextCharFormat> tokenFormats; - QTextCharFormat errorFormat, commentFormat, quoteFormat, numberFormat; + QTextCharFormat errorFormat; Highlighter(QTextDocument *parent); void highlightBlock(const QString &text); void highlightError(int error_pos); void unhighlightLastError(); + void assignFormatsToTokens(const QString &); private: QTextBlock lastErrorBlock; int errorPos; |