QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Defines a color scheme for use in QgsCodeEditor widgets. More...
#include <qgscodeeditorcolorscheme.h>
Public Member Functions | |
QgsCodeEditorColorScheme (const QString &id=QString(), const QString &name=QString()) | |
Constructor for QgsCodeEditorColorScheme. More... | |
QColor | color (ColorRole role) const |
Returns the color to use in the editor for the specified role. More... | |
QString | id () const |
Returns the ID of the color scheme, which is a unique, non-translated identifier for the scheme. More... | |
QString | name () const |
Returns the name of the color scheme, which is the translated, user-visible name of the scheme. More... | |
void | setColor (ColorRole role, const QColor &color) |
Sets the color to use in the editor for the specified role. More... | |
void | setColors (const QMap< ColorRole, QColor > &colors) |
Sets all colors for the scheme. More... | |
Defines a color scheme for use in QgsCodeEditor widgets.
Definition at line 30 of file qgscodeeditorcolorscheme.h.
|
strong |
Color roles.
Definition at line 37 of file qgscodeeditorcolorscheme.h.
QgsCodeEditorColorScheme::QgsCodeEditorColorScheme | ( | const QString & | id = QString() , |
const QString & | name = QString() |
||
) |
Constructor for QgsCodeEditorColorScheme.
The id argument must be set to a unique, non-translated identifier for the color scheme.
The name argument must be set to a translated, user-visible descriptive name of the scheme.
Definition at line 18 of file qgscodeeditorcolorscheme.cpp.
QColor QgsCodeEditorColorScheme::color | ( | QgsCodeEditorColorScheme::ColorRole | role | ) | const |
Returns the color to use in the editor for the specified role.
Definition at line 25 of file qgscodeeditorcolorscheme.cpp.
|
inline |
Returns the ID of the color scheme, which is a unique, non-translated identifier for the scheme.
Definition at line 89 of file qgscodeeditorcolorscheme.h.
|
inline |
Returns the name of the color scheme, which is the translated, user-visible name of the scheme.
Definition at line 94 of file qgscodeeditorcolorscheme.h.
void QgsCodeEditorColorScheme::setColor | ( | QgsCodeEditorColorScheme::ColorRole | role, |
const QColor & | color | ||
) |
Sets the color to use in the editor for the specified role.
Definition at line 30 of file qgscodeeditorcolorscheme.cpp.
void QgsCodeEditorColorScheme::setColors | ( | const QMap< ColorRole, QColor > & | colors | ) |
Sets all colors for the scheme.
Definition at line 35 of file qgscodeeditorcolorscheme.cpp.