|
AvogadroLibs 1.103.0
|
The GenericHighlighter class provides a regexp-based programmable syntax highlighter.
#include <generichighlighter.h>
Classes | |
| class | Rule |
| The Rule class stores a syntax highlighting rule as a set of QRegularExpression patterns and a text format. More... | |
Public Member Functions | |
| GenericHighlighter (QObject *parent_=nullptr) | |
| GenericHighlighter (const GenericHighlighter &other) | |
| GenericHighlighter & | operator= (GenericHighlighter other) |
| GenericHighlighter & | operator+= (const GenericHighlighter &other) |
| Rule & | addRule () |
| int | ruleCount () const |
| Rule & | rule (int idx) |
| const Rule & | rule (int idx) const |
| QList< Rule > | rules () const |
Protected Member Functions | |
| void | highlightBlock (const QString &text) override |
|
explicit |
Construct a highlighter with an empty rule set.
| GenericHighlighter | ( | const GenericHighlighter & | other | ) |
Construct a new highlighter using the rule set of other.
| GenericHighlighter & operator= | ( | GenericHighlighter | other | ) |
Replace this highlighter's rule set with that of other.
| GenericHighlighter & operator+= | ( | const GenericHighlighter & | other | ) |
Concatenate other's rule set with this highlighter's rule set.
| Rule & addRule | ( | ) |
Add a new rule to this highlighter, returning a reference to the new rule.
| int ruleCount | ( | ) | const |
| Rule & rule | ( | int | idx | ) |
| const Rule & rule | ( | int | idx | ) | const |
| QList< Rule > rules | ( | ) | const |