![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
ColorScheme to be used by the PythonHighlighter & Editor. More...
#include <ColorScheme.h>
Public Types | |
| using | Vector = std::vector< ColorScheme > |
Public Member Functions | |
| const QString & | name () const |
| The name of the color scheme. More... | |
| QColor | backgroundColor () const |
| Color to be used as the background for the displayed text. More... | |
| QColor | foregroundColor () const |
| Color to be used for regular text. More... | |
| QColor | currentLineHighlightColor () const |
| Color to be used if a highlight of the current line is shown. More... | |
| const QTextCharFormat & | operator[] (PythonHighlighter::CodeElement e) const |
| Returns the format to be used for the given code element. More... | |
Static Public Member Functions | |
| static const Vector & | AvailableColorSchemes () |
| Returns the vector of available color schemes. More... | |
| static const ColorScheme * | ColorSchemeByName (const QString &name) |
| static ColorScheme | Default () |
| Default color scheme. More... | |
| static ColorScheme | Dracula () |
ColorScheme to be used by the PythonHighlighter & Editor.
Definition at line 13 of file ColorScheme.h.
| using ColorScheme::Vector = std::vector<ColorScheme> |
Definition at line 16 of file ColorScheme.h.
|
static |
Returns the vector of available color schemes.
Definition at line 113 of file ColorScheme.cpp.
References Default(), Dracula(), and s_AvailableColorSchemes.
Referenced by EditorSettings::setupUi().
| QColor ColorScheme::backgroundColor | ( | ) | const |
Color to be used as the background for the displayed text.
Definition at line 52 of file ColorScheme.cpp.
|
static |
Returns a ColorScheme that matches the given name. returns nullptr if the color scheme does not exists;
Definition at line 123 of file ColorScheme.cpp.
References name(), and s_AvailableColorSchemes.
Referenced by EditorSettings::loadFromSettings(), and EditorSettings::saveChanges().
| QColor ColorScheme::currentLineHighlightColor | ( | ) | const |
Color to be used if a highlight of the current line is shown.
Definition at line 57 of file ColorScheme.cpp.
|
static |
Default color scheme.
Definition at line 69 of file ColorScheme.cpp.
References ecvColor::black(), ecvColor::blue(), FormatHelper(), ecvColor::magenta(), ecvColor::red(), ecvColor::white(), and ecvColor::yellow().
Referenced by AvailableColorSchemes().
|
static |
Dracula color scheme https://draculatheme.com/
Definition at line 88 of file ColorScheme.cpp.
References FormatHelper(), and ecvColor::red().
Referenced by AvailableColorSchemes().
| QColor ColorScheme::foregroundColor | ( | ) | const |
Color to be used for regular text.
Definition at line 47 of file ColorScheme.cpp.
| const QString & ColorScheme::name | ( | ) | const |
The name of the color scheme.
Definition at line 107 of file ColorScheme.cpp.
Referenced by ColorSchemeByName(), EditorSettings::saveChanges(), EditorSettings::setFormValuesToCurrentValues(), and EditorSettings::setupUi().
| const QTextCharFormat & ColorScheme::operator[] | ( | PythonHighlighter::CodeElement | e | ) | const |
Returns the format to be used for the given code element.
Definition at line 62 of file ColorScheme.cpp.