QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | List of all members
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. 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...
 

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 35 of file qgscodeeditorcolorschemeregistry.h.

Constructor & Destructor Documentation

◆ QgsCodeEditorColorSchemeRegistry()

QgsCodeEditorColorSchemeRegistry::QgsCodeEditorColorSchemeRegistry ( )

Constructor for a color scheme registry.

Definition at line 19 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 145 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 154 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 168 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 163 of file qgscodeeditorcolorschemeregistry.cpp.


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