Gui::PythonSyntaxHighlighter Class Reference
Syntax highlighter for Python. More...
#include <PythonEditor.h>
Public Member Functions | |
void | highlightBlock (const QString &text) |
Detects all kinds of text to highlight them in the correct color. More... | |
PythonSyntaxHighlighter (QObject *parent) | |
Constructs a Python syntax highlighter. More... | |
virtual | ~PythonSyntaxHighlighter () |
Destroys this object. More... | |
Public Member Functions inherited from Gui::SyntaxHighlighter | |
QColor | color (const QString &type) |
int | maximumUserState () const |
void | setColor (const QString &type, const QColor &col) |
Sets the color col to the paragraph type type. More... | |
SyntaxHighlighter (QObject *parent) | |
Constructs a syntax highlighter. More... | |
virtual | ~SyntaxHighlighter () |
Destroys this object. More... | |
Additional Inherited Members | |
Protected Types inherited from Gui::SyntaxHighlighter | |
enum | TColor { Text = 0, Comment = 1, BlockComment = 2, Number = 3, String = 4, Keyword = 5, Classname = 6, Defname = 7, Operator = 8, Output = 9, Error = 10 } |
Protected Member Functions inherited from Gui::SyntaxHighlighter | |
QColor | colorByType (TColor type) |
virtual void | colorChanged (const QString &type, const QColor &col) |
Detailed Description
Syntax highlighter for Python.
Constructor & Destructor Documentation
◆ PythonSyntaxHighlighter()
PythonSyntaxHighlighter::PythonSyntaxHighlighter | ( | QObject * | parent | ) |
Constructs a Python syntax highlighter.
◆ ~PythonSyntaxHighlighter()
|
virtual |
Destroys this object.
Member Function Documentation
◆ highlightBlock()
void PythonSyntaxHighlighter::highlightBlock | ( | const QString & | text | ) |
Detects all kinds of text to highlight them in the correct color.
References Gui::SyntaxHighlighter::BlockComment, Gui::SyntaxHighlighter::Classname, Gui::SyntaxHighlighter::colorByType(), Gui::SyntaxHighlighter::Comment, Gui::SyntaxHighlighter::Defname, Gui::SyntaxHighlighter::Keyword, Gui::PythonSyntaxHighlighterP::keywords, Gui::SyntaxHighlighter::maximumUserState(), Gui::SyntaxHighlighter::Number, Gui::SyntaxHighlighter::Operator, Gui::SyntaxHighlighter::String, and Gui::SyntaxHighlighter::Text.
Referenced by Gui::PythonConsoleHighlighter::highlightBlock().
The documentation for this class was generated from the following files:
- src/Gui/PythonEditor.h
- src/Gui/PythonEditor.cpp