30 #include <QSyntaxHighlighter> 36 HighlightingRule(
const QString &patternStr,
int n,
const QTextCharFormat &matchingFormat)
38 originalRuleStr = patternStr;
39 pattern = QRegExp(patternStr);
41 format = matchingFormat;
43 QString originalRuleStr;
46 QTextCharFormat format;
56 void highlightBlock(
const QString &text);
59 QStringList operators;
62 QHash<QString, QTextCharFormat> basicStyles;
64 void initializeRules();
67 bool matchMultiline(
const QString &text,
const QRegExp &delimiter,
const int inState,
const QTextCharFormat &style);
68 const QTextCharFormat getTextCharFormat(
const QString &colorName,
const QString &style = QString());
70 QList<HighlightingRule> rules;
71 QRegExp triSingleQuote;
72 QRegExp triDoubleQuote;
Container to describe a highlighting rule. Based on a regular expression, a relevant match # and the ...
Implementation of highlighting for Python code.