forked from len0rd/rockbox
WpsEditor: commit FS#9344 by Rostislav Chekan - multitarget support (only colour targets for now)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18399 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ca0de82cec
commit
254fa65c7b
26 changed files with 360 additions and 186 deletions
21
utils/wpseditor/gui/src/qsyntaxer.h
Normal file
21
utils/wpseditor/gui/src/qsyntaxer.h
Normal file
|
@ -0,0 +1,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
|
Loading…
Add table
Add a link
Reference in a new issue