diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-03 07:38:59 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-03 07:38:59 +0000 |
commit | 6feac4a315574b9cc037a328018e6ba9398a77d5 (patch) | |
tree | dc72d398a354ee9bc01cc4cc3ae24bad857460c4 /utils/themeeditor/skinhighlighter.h | |
parent | 1dc7f490c91993a06b0de1988efece102353455f (diff) | |
download | rockbox-6feac4a315574b9cc037a328018e6ba9398a77d5.tar.gz rockbox-6feac4a315574b9cc037a328018e6ba9398a77d5.zip |
Theme Editor: Added syntax highlighting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26506 a1c6a512-1295-4272-9138-f99709370657
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 | ||