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