ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/CommonLibs/jsonhighlighter/highlighter.h
(Generate patch)

Comparing s10k/CommonLibs/jsonhighlighter/highlighter.h (file contents):
Revision 1109 by s10k, Thu Oct 5 17:48:32 2017 UTC vs.
Revision 1110 by s10k, Sat Feb 16 17:24:18 2019 UTC

# Line 1 | Line 1
1 < #ifndef HIGHLIGHTER_H
2 < #define HIGHLIGHTER_H
3 <
4 < #include <QSyntaxHighlighter>
5 < #include <QTextCharFormat>
6 <
7 < // Downloaded from here:
8 < // https://github.com/isomoar/json-editor/blob/master/syntaxhighlightening/highlighter.cpp
9 <
10 < class Highlighter: public QSyntaxHighlighter
11 < {
12 < public:
13 <     Highlighter(QTextDocument *parent = 0);
14 < private:
15 <     struct HighlightingRule
16 <     {
17 <         QRegExp pattern;
18 <         QTextCharFormat format;
19 <     };
20 <     QVector<HighlightingRule> rules;
21 <
22 <
23 < protected:
24 <    void highlightBlock(const QString &text);
25 < };
26 <
27 < #endif // HIGHLIGHTER_H
1 > #ifndef HIGHLIGHTER_H
2 > #define HIGHLIGHTER_H
3 >
4 > #include <QSyntaxHighlighter>
5 > #include <QTextCharFormat>
6 >
7 > // Downloaded from here:
8 > // https://github.com/isomoar/json-editor/blob/master/syntaxhighlightening/highlighter.cpp
9 >
10 > class Highlighter: public QSyntaxHighlighter
11 > {
12 >        Q_OBJECT
13 > public:
14 >     Highlighter(QTextDocument *parent = 0);
15 > protected:
16 >     struct HighlightingRule
17 >     {
18 >         QRegExp pattern;
19 >         QTextCharFormat format;
20 >     };
21 >     QVector<HighlightingRule> rules;
22 >
23 >
24 > protected:
25 >    void highlightBlock(const QString &text);
26 > };
27 >
28 > #endif // HIGHLIGHTER_H

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)