27 #include <QSyntaxHighlighter>
33 HighlightingRule(
const QString& patternStr,
int n,
const QTextCharFormat& matchingFormat)
36 pattern = QRegularExpression(patternStr);
69 bool matchMultiline(
const QString& text,
const QRegularExpression& delimiter,
const int inState,
const QTextCharFormat& style);
70 const QTextCharFormat
getTextCharFormat(
const QString& colorName,
const QString& style = QString());
Container to describe a highlighting rule. Based on a regular expression, a relevant match # and the ...
HighlightingRule(const QString &patternStr, int n, const QTextCharFormat &matchingFormat)
QRegularExpression pattern
Implementation of highlighting for Python code.
void highlightBlock(const QString &text)
QRegularExpression triDoubleQuote
const QTextCharFormat getTextCharFormat(const QString &colorName, const QString &style=QString())
PythonSyntaxHighlighter(QObject *parent)
QRegularExpression triSingleQuote
QHash< QString, QTextCharFormat > basicStyles
bool matchMultiline(const QString &text, const QRegularExpression &delimiter, const int inState, const QTextCharFormat &style)
Highlighst multi-line strings, returns true if after processing we are still within the multi-line se...
QList< HighlightingRule > rules
PythonSyntaxHighlighter(QTextDocument *parent)