AvogadroLibs 1.100.0
Loading...
Searching...
No Matches
GenericHighlighter::Rule Class Reference

The Rule class stores a syntax highlighting rule as a set of QRegularExpression patterns and a text format.

#include <generichighlighter.h>

Public Member Functions

void addPattern (const QRegularExpression &regexp)
 
void setFormat (const QTextCharFormat &format)
 
void apply (const QString &text, GenericHighlighter &highlighter)
 

Member Function Documentation

◆ addPattern()

void addPattern ( const QRegularExpression & regexp)

Add the pattern regexp to this Rule.

◆ setFormat()

void setFormat ( const QTextCharFormat & format)

Set this Rule's text format.

◆ apply()

void apply ( const QString & text,
GenericHighlighter & highlighter )

Apply this rule to the string of text, updating the highlighter if any matches are found.


The documentation for this class was generated from the following file: