QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
A registry of color schemes for use in QgsCodeEditor widgets. More...
#include <qgscodeeditorcolorschemeregistry.h>
Public Member Functions | |
QgsCodeEditorColorSchemeRegistry () | |
Constructor for a color scheme registry. More... | |
bool | addColorScheme (const QgsCodeEditorColorScheme &scheme) |
Adds a color scheme to the registry. More... | |
bool | removeColorScheme (const QString &id) |
Removes the color scheme with matching id from the registry. More... | |
QgsCodeEditorColorScheme | scheme (const QString &id) const |
Returns the color scheme with matching id. More... | |
QStringList | schemes () const |
Returns a list of the QgsCodeEditorColorScheme::id() values for all registered color schemes. More... | |
A registry of color schemes for use in QgsCodeEditor widgets.
QgsCodeEditorColorSchemeRegistry is not usually directly created, but rather accessed through QgsGui::codeEditorColorSchemeRegistry().
Definition at line 35 of file qgscodeeditorcolorschemeregistry.h.
QgsCodeEditorColorSchemeRegistry::QgsCodeEditorColorSchemeRegistry | ( | ) |
Constructor for a color scheme registry.
Definition at line 19 of file qgscodeeditorcolorschemeregistry.cpp.
bool QgsCodeEditorColorSchemeRegistry::addColorScheme | ( | const QgsCodeEditorColorScheme & | scheme | ) |
Adds a color scheme to the registry.
Returns true
if the scheme was successfully added.
Definition at line 145 of file qgscodeeditorcolorschemeregistry.cpp.
bool QgsCodeEditorColorSchemeRegistry::removeColorScheme | ( | const QString & | id | ) |
Removes the color scheme with matching id from the registry.
Returns true
if scheme was found and removed.
Definition at line 154 of file qgscodeeditorcolorschemeregistry.cpp.
QgsCodeEditorColorScheme QgsCodeEditorColorSchemeRegistry::scheme | ( | const QString & | id | ) | const |
Returns the color scheme with matching id.
If the specified scheme id does not exist then the default scheme will be returned instead.
Definition at line 168 of file qgscodeeditorcolorschemeregistry.cpp.
QStringList QgsCodeEditorColorSchemeRegistry::schemes | ( | ) | const |
Returns a list of the QgsCodeEditorColorScheme::id() values for all registered color schemes.
Definition at line 163 of file qgscodeeditorcolorschemeregistry.cpp.