Avogadro::QtGui::GenericHighlighter#
-
class GenericHighlighter : public QSyntaxHighlighter#
The GenericHighlighter class provides a regexp-based programmable syntax highlighter.
Public Functions
-
explicit GenericHighlighter(QObject *parent_ = nullptr)#
Construct a highlighter with an empty rule set.
-
~GenericHighlighter() override#
-
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.
-
int ruleCount() const#
- Returns:
The number of rules in this highlighter.
Protected Functions
-
void highlightBlock(const QString &text) override#
Friends
-
inline friend void swap(GenericHighlighter &first, GenericHighlighter &second)#
-
class Rule#
The Rule class stores a syntax highlighting rule as a set of QRegularExpression patterns and a text format.
Public Functions
-
inline Rule()#
-
inline ~Rule()#
-
void apply(const QString &text, GenericHighlighter &highlighter)#
Apply this rule to the string of text, updating the highlighter if any matches are found.
-
inline Rule()#
-
explicit GenericHighlighter(QObject *parent_ = nullptr)#