Theme Editor: Fixed some compiler warnings and a segfault. Got some basic text rende...
[kugel-rb.git] / utils / themeeditor / gui / skinhighlighter.h
blob4d5c68ba52d2662a709d48d7aeff3f08371e4c34
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2010 Robert Bieber
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef SKINHIGHLIGHTER_H
23 #define SKINHIGHLIGHTER_H
25 #include <QSyntaxHighlighter>
26 #include <QPlainTextEdit>
28 #include "tag_table.h"
29 #include "symbols.h"
31 class SkinHighlighter : public QSyntaxHighlighter
33 Q_OBJECT
34 public:
36 * font - The font used for all text
37 * normal - The normal text color
38 * escaped - The color for escaped characters
39 * tag - The color for tags and their delimiters
40 * conditional - The color for conditionals and their delimiters
43 SkinHighlighter(QTextDocument* doc);
44 virtual ~SkinHighlighter();
46 void highlightBlock(const QString& text);
48 public slots:
49 void loadSettings();
51 private:
52 QColor escaped;
53 QColor tag;
54 QColor conditional;
55 QColor comment;
59 #endif // SKINHIGHLIGHTER_H