Class: QgsCodeEditorColorSchemeRegistry

class qgis.gui.QgsCodeEditorColorSchemeRegistry

Bases: sip.wrapper

Constructor for a color scheme registry.

QgsCodeEditorColorSchemeRegistry(QgsCodeEditorColorSchemeRegistry)

A registry of color schemes for use in QgsCodeEditor widgets.

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

Methods

addColorScheme

Adds a color scheme to the registry.

removeColorScheme

Removes the color scheme with matching id from the registry.

scheme

Returns the color scheme with matching id.

schemes

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

addColorScheme(self, scheme: QgsCodeEditorColorScheme) → bool

Adds a color scheme to the registry.

Returns True if the scheme was successfully added.

Parameters

scheme (QgsCodeEditorColorScheme) –

Return type

bool

removeColorScheme(self, id: str) → bool

Removes the color scheme with matching id from the registry.

Returns True if scheme was found and removed.

Parameters

id (str) –

Return type

bool

scheme(self, id: str)QgsCodeEditorColorScheme

Returns the color scheme with matching id.

If the specified scheme id does not exist then the default scheme will be returned instead.

Parameters

id (str) –

Return type

QgsCodeEditorColorScheme

schemes(self) → List[str]

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

Return type

List[str]