QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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.
 
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 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 151 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 160 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 174 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 169 of file qgscodeeditorcolorschemeregistry.cpp.


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