blob: 893eac61a6cda0038cb9ff5e81a01c54d034323c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#ifndef QSYNTAXER_H
#define QSYNTAXER_H
//
#include <QSyntaxHighlighter>
class QTextCharFormat;
class QSyntaxer : public QSyntaxHighlighter {
Q_OBJECT
struct HighlightingRule {
QRegExp pattern;
QTextCharFormat format;
};
QMap<int,HighlightingRule> hrules;
public:
QSyntaxer(QTextDocument *parent = 0);
protected:
void highlightBlock(const QString &text);
};
#endif
|