Class: QgsCodeEditorColorSchemeRegistry¶
- class qgis.gui.QgsCodeEditorColorSchemeRegistry¶
Bases:
sip.wrapper
A registry of color schemes for use in
QgsCodeEditor
widgets.QgsCodeEditorColorSchemeRegistry
is not usually directly created, but rather accessed throughQgsGui.codeEditorColorSchemeRegistry()
.New in version 3.16.
QgsCodeEditorColorSchemeRegistry() Constructor for a color scheme registry.
QgsCodeEditorColorSchemeRegistry(
QgsCodeEditorColorSchemeRegistry
)Methods
Adds a color
scheme
to the registry.Removes the color scheme with matching
id
from the registry.Returns the color scheme with matching
id
.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
- schemes(self) List[str] ¶
Returns a list of the
QgsCodeEditorColorScheme.id()
values for all registered color schemes.- Return type
List[str]