blob: ea3e2c5af54d3ea22f76adead0de6e83cbddf486 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef SKINHIGHLIGHTER_H
#define SKINHIGHLIGHTER_H
#include <QSyntaxHighlighter>
#include <QPlainTextEdit>
#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
|