38 #ifndef BORNAGAIN_GUI_VIEW_INFO_PYTHONSYNTAXHIGHLIGHTER_H
39 #define BORNAGAIN_GUI_VIEW_INFO_PYTHONSYNTAXHIGHLIGHTER_H
41 #include <QSyntaxHighlighter>
47 HighlightingRule(
const QString& patternStr,
int n,
const QTextCharFormat& matchingFormat)
80 bool matchMultiline(
const QString& text,
const QRegExp& delimiter,
int inState,
81 const QTextCharFormat& style);
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)
Implementation of highlighting for Python code.
PythonSyntaxHighlighter(QTextDocument *parent=nullptr)
void highlightBlock(const QString &text) override
QHash< QString, QTextCharFormat > basicStyles
bool matchMultiline(const QString &text, const QRegExp &delimiter, int inState, const QTextCharFormat &style)
Highlighst multi-line strings, returns true if after processing we are still within the.
QTextCharFormat getTextCharFormat(const QString &colorName, const QString &style="")
QList< HighlightingRule > rules