12345678910111213141516171819202122232425262728293031323334353637 |
- #ifndef SYNTAXHIGHLIGHTER_H
- #define SYNTAXHIGHLIGHTER_H
- #include <QSyntaxHighlighter>
- class SyntaxHighlighter :
- public QSyntaxHighlighter
- {
- Q_OBJECT
- public:
- SyntaxHighlighter(QTextDocument *parent = 0);
- protected:
- void highlightBlock(const QString &text) override;
- private:
-
-
- std::vector<QTextCharFormat> levelColor;
- QTextCharFormat comment;
- bool isBfChar(const QChar& c);
- };
- #endif
|