From 6feac4a315574b9cc037a328018e6ba9398a77d5 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Thu, 3 Jun 2010 07:38:59 +0000 Subject: Theme Editor: Added syntax highlighting git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26506 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/skinhighlighter.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 utils/themeeditor/skinhighlighter.h (limited to 'utils/themeeditor/skinhighlighter.h') 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 @@ +#ifndef SKINHIGHLIGHTER_H +#define SKINHIGHLIGHTER_H + +#include +#include + +#include "tag_table.h" +#include "symbols.h" + +class SkinHighlighter : public QSyntaxHighlighter +{ +Q_OBJECT +public: + /* + * font - The font used for all text + * normal - The normal text color + * escaped - The color for escaped characters + * tag - The color for tags and their delimiters + * conditional - The color for conditionals and their delimiters + * + */ + SkinHighlighter(QColor comment, QColor tag, QColor conditional, + QColor escaped, QTextDocument* doc); + virtual ~SkinHighlighter(); + + void highlightBlock(const QString& text); + +private: + QColor escaped; + QColor tag; + QColor conditional; + QColor comment; + +}; + +#endif // SKINHIGHLIGHTER_H -- cgit v1.2.3