diff options
Diffstat (limited to 'utils/themeeditor/skinhighlighter.h')
-rw-r--r-- | utils/themeeditor/skinhighlighter.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/utils/themeeditor/skinhighlighter.h b/utils/themeeditor/skinhighlighter.h new file mode 100644 index 0000000000..ea3e2c5af5 --- /dev/null +++ b/utils/themeeditor/skinhighlighter.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef SKINHIGHLIGHTER_H | ||
2 | #define SKINHIGHLIGHTER_H | ||
3 | |||
4 | #include <QSyntaxHighlighter> | ||
5 | #include <QPlainTextEdit> | ||
6 | |||
7 | #include "tag_table.h" | ||
8 | #include "symbols.h" | ||
9 | |||
10 | class SkinHighlighter : public QSyntaxHighlighter | ||
11 | { | ||
12 | Q_OBJECT | ||
13 | public: | ||
14 | /* | ||
15 | * font - The font used for all text | ||
16 | * normal - The normal text color | ||
17 | * escaped - The color for escaped characters | ||
18 | * tag - The color for tags and their delimiters | ||
19 | * conditional - The color for conditionals and their delimiters | ||
20 | * | ||
21 | */ | ||
22 | SkinHighlighter(QColor comment, QColor tag, QColor conditional, | ||
23 | QColor escaped, QTextDocument* doc); | ||
24 | virtual ~SkinHighlighter(); | ||
25 | |||
26 | void highlightBlock(const QString& text); | ||
27 | |||
28 | private: | ||
29 | QColor escaped; | ||
30 | QColor tag; | ||
31 | QColor conditional; | ||
32 | QColor comment; | ||
33 | |||
34 | }; | ||
35 | |||
36 | #endif // SKINHIGHLIGHTER_H | ||