summaryrefslogtreecommitdiffstats
path: root/utils/wpseditor/gui/src/qsyntaxer.h
blob: b85651cf69d00c3d5f92dd4cb216648a6ebe14e8 (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