mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-22 19:42:40 -05:00
* Order is important in highlighting rules! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18403 a1c6a512-1295-4272-9138-f99709370657
21 lines
408 B
C++
21 lines
408 B
C++
#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
|