Abstract Syntax highlighter. More...
#include <SyntaxHighlighter.h>
Public Member Functions | |
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... | |
Protected Types | |
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 | |
QColor | colorByType (TColor type) |
virtual void | colorChanged (const QString &type, const QColor &col) |
Detailed Description
Abstract Syntax highlighter.
Member Enumeration Documentation
◆ TColor
|
protected |
Constructor & Destructor Documentation
◆ SyntaxHighlighter()
SyntaxHighlighter::SyntaxHighlighter | ( | QObject * | parent | ) |
Constructs a syntax highlighter.
◆ ~SyntaxHighlighter()
|
virtual |
Destroys this object.
Member Function Documentation
◆ color()
QColor SyntaxHighlighter::color | ( | const QString & | type | ) |
References Gui::SyntaxHighlighterP::cBlockcomment, Gui::SyntaxHighlighterP::cClassName, Gui::SyntaxHighlighterP::cComment, Gui::SyntaxHighlighterP::cDefineName, Gui::SyntaxHighlighterP::cError, Gui::SyntaxHighlighterP::cKeyword, Gui::SyntaxHighlighterP::cLiteral, Gui::SyntaxHighlighterP::cNormalText, Gui::SyntaxHighlighterP::cNumber, Gui::SyntaxHighlighterP::cOperator, and Gui::SyntaxHighlighterP::cOutput.
Referenced by ArchSite.Compass::buildCoordinates(), Gui::PythonConsoleHighlighter::highlightBlock(), and setColor().
◆ colorByType()
|
protected |
References BlockComment, Gui::SyntaxHighlighterP::cBlockcomment, Gui::SyntaxHighlighterP::cClassName, Gui::SyntaxHighlighterP::cComment, Gui::SyntaxHighlighterP::cDefineName, Gui::SyntaxHighlighterP::cError, Gui::SyntaxHighlighterP::cKeyword, Classname, Gui::SyntaxHighlighterP::cLiteral, Gui::SyntaxHighlighterP::cNormalText, Gui::SyntaxHighlighterP::cNumber, Comment, Gui::SyntaxHighlighterP::cOperator, Gui::SyntaxHighlighterP::cOutput, Defname, Error, Keyword, Number, Operator, Output, String, and Text.
Referenced by RaytracingGui::PovrayHighlighter::highlightBlock(), FemGui::AbaqusHighlighter::highlightBlock(), and Gui::PythonSyntaxHighlighter::highlightBlock().
◆ colorChanged()
|
protectedvirtual |
Reimplemented in Gui::PythonConsoleHighlighter.
Referenced by setColor().
◆ maximumUserState()
int SyntaxHighlighter::maximumUserState | ( | ) | const |
◆ setColor()
void SyntaxHighlighter::setColor | ( | const QString & | type, |
const QColor & | col | ||
) |
Sets the color col to the paragraph type type.
This method is provided for convenience to specify the paragraph type by its name.
References Gui::SyntaxHighlighterP::cBlockcomment, Gui::SyntaxHighlighterP::cClassName, Gui::SyntaxHighlighterP::cComment, Gui::SyntaxHighlighterP::cDefineName, Gui::SyntaxHighlighterP::cError, Gui::SyntaxHighlighterP::cKeyword, Gui::SyntaxHighlighterP::cLiteral, Gui::SyntaxHighlighterP::cNormalText, Gui::SyntaxHighlighterP::cNumber, color(), colorChanged(), Gui::SyntaxHighlighterP::cOperator, and Gui::SyntaxHighlighterP::cOutput.
Referenced by Gui::Dialog::DlgSettingsEditorImp::loadSettings(), Gui::Dialog::DlgSettingsEditorImp::on_colorButton_changed(), Gui::TextEditor::OnChange(), and Gui::PythonConsole::OnChange().
The documentation for this class was generated from the following files:
- src/Gui/SyntaxHighlighter.h
- src/Gui/SyntaxHighlighter.cpp