#include <PythonSyntaxHighlighter.h>
Public Member Functions | |
PythonSyntaxHighlighter (ScriptEdit *parent) | |
Static Public Member Functions | |
static QStringList | keywordsList () |
Protected Member Functions | |
void | highlightBlock (const QString &text) |
Parentheses matching code taken from Qt Quarterly Issue 31 · Q3 2009. | |
Private Attributes | |
QTextCharFormat | classFormat |
QTextCharFormat | keywordFormat |
QVector< HighlightingRule > | pythonHighlightingRules |
Static Private Attributes | |
static const QStringList | d_keywords |
PythonSyntaxHighlighter::PythonSyntaxHighlighter | ( | ScriptEdit * | parent | ) |
References ScriptingEnv::application(), classFormat, ApplicationWindow::d_class_highlight_color, ApplicationWindow::d_keyword_highlight_color, d_keywords, SyntaxHighlighter::HighlightingRule::format, keywordFormat, SyntaxHighlighter::HighlightingRule::pattern, pythonHighlightingRules, and scripted::scriptingEnv().
void PythonSyntaxHighlighter::highlightBlock | ( | const QString & | text | ) | [protected] |
Parentheses matching code taken from Qt Quarterly Issue 31 · Q3 2009.
Reimplemented from SyntaxHighlighter.
References SyntaxHighlighter::commentFormat, SyntaxHighlighter::HighlightingRule::format, SyntaxHighlighter::HighlightingRule::pattern, and pythonHighlightingRules.
static QStringList PythonSyntaxHighlighter::keywordsList | ( | ) | [inline, static] |
References d_keywords.
Referenced by ApplicationWindow::initCompleter().
QTextCharFormat PythonSyntaxHighlighter::classFormat [private] |
Referenced by PythonSyntaxHighlighter().
const QStringList PythonSyntaxHighlighter::d_keywords [static, private] |
QStringList() << "and" << "assert" << "break" << "class" << "continue" << "def" << "del" << "elif" << "else" << "except" << "exec" << "finally" << "for" << "from" << "global" << "if" << "import" << "in" << "is" << "lambda" << "not" << "or" << "pass" << "print" << "raise" << "return" << "try" << "while"
Referenced by keywordsList(), and PythonSyntaxHighlighter().
QTextCharFormat PythonSyntaxHighlighter::keywordFormat [private] |
Referenced by PythonSyntaxHighlighter().
QVector<HighlightingRule> PythonSyntaxHighlighter::pythonHighlightingRules [private] |
Referenced by highlightBlock(), and PythonSyntaxHighlighter().