Avogadro::QtGui::GenericHighlighter::Rule#
-
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 addPattern(const QRegularExpression ®exp)
Add the pattern regexp to this Rule.
-
void setFormat(const QTextCharFormat &format)
Set this Rule’s text format.
-
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()