QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
A registry of color schemes for use in QgsCodeEditor widgets. More...
#include <qgscodeeditorcolorschemeregistry.h>
Public Member Functions | |
QgsCodeEditorColorSchemeRegistry () | |
Constructor for a color scheme registry. | |
bool | addColorScheme (const QgsCodeEditorColorScheme &scheme) |
Adds a color scheme to the registry. | |
bool | removeColorScheme (const QString &id) |
Removes the color scheme with matching id from the registry. | |
QgsCodeEditorColorScheme | scheme (const QString &id) const |
Returns the color scheme with matching id. | |
QStringList | schemes () const |
Returns a list of the QgsCodeEditorColorScheme::id() values for all registered color schemes. | |
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 148 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 157 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 171 of file qgscodeeditorcolorschemeregistry.cpp.
QStringList QgsCodeEditorColorSchemeRegistry::schemes | ( | ) | const |
Returns a list of the QgsCodeEditorColorScheme::id() values for all registered color schemes.
Definition at line 166 of file qgscodeeditorcolorschemeregistry.cpp.