QGIS API Documentation 3.99.0-Master (a8882ad4560)
Loading...
Searching...
No Matches
QgsCodeEditorColorSchemeRegistry Class Reference

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.

Detailed Description

A registry of color schemes for use in QgsCodeEditor widgets.

QgsCodeEditorColorSchemeRegistry is not usually directly created, but rather accessed through QgsGui::codeEditorColorSchemeRegistry().

Since
QGIS 3.16

Definition at line 36 of file qgscodeeditorcolorschemeregistry.h.

Constructor & Destructor Documentation

◆ QgsCodeEditorColorSchemeRegistry()

QgsCodeEditorColorSchemeRegistry::QgsCodeEditorColorSchemeRegistry ( )

Constructor for a color scheme registry.

Definition at line 21 of file qgscodeeditorcolorschemeregistry.cpp.

Member Function Documentation

◆ addColorScheme()

bool QgsCodeEditorColorSchemeRegistry::addColorScheme ( const QgsCodeEditorColorScheme & scheme)

Adds a color scheme to the registry.

Returns true if the scheme was successfully added.

Definition at line 153 of file qgscodeeditorcolorschemeregistry.cpp.

◆ removeColorScheme()

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 162 of file qgscodeeditorcolorschemeregistry.cpp.

◆ scheme()

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 176 of file qgscodeeditorcolorschemeregistry.cpp.

◆ schemes()

QStringList QgsCodeEditorColorSchemeRegistry::schemes ( ) const

Returns a list of the QgsCodeEditorColorScheme::id() values for all registered color schemes.

Definition at line 171 of file qgscodeeditorcolorschemeregistry.cpp.


The documentation for this class was generated from the following files: