summaryrefslogtreecommitdiffstats
path: root/utils/wpseditor/gui/src/qsyntaxer.h
blob: 9cecd3e5ed1d39fddf3ea3deab85b1e7cdea218d (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<QString,HighlightingRule> hrules;
public:
    QSyntaxer(QTextDocument *parent = 0);

protected:
    void highlightBlock(const QString &text);
};
#endif