AvogadroLibs 1.98.1
|
The Rule class stores a syntax highlighting rule as a set of QRegExp patterns and a text format.
#include <generichighlighter.h>
Public Member Functions | |
void | addPattern (const QRegExp ®exp) |
void | setFormat (const QTextCharFormat &format) |
void | apply (const QString &text, GenericHighlighter &highlighter) |
void addPattern | ( | const QRegExp & | regexp | ) |
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.