Class: QgsCodeEditorColorSchemeRegistry¶
A registry of color schemes for use in QgsCodeEditor
widgets.
QgsCodeEditorColorSchemeRegistry is not usually directly
created, but rather accessed through
QgsGui.codeEditorColorSchemeRegistry().
Added in version 3.16.
List of all members, including inherited members
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. |
|
for all registered color schemes. |
- class qgis.gui.QgsCodeEditorColorSchemeRegistry[source]¶
Bases:
object- __init__()
Constructor for a color scheme registry.
- __init__(a0: QgsCodeEditorColorSchemeRegistry)
- Parameters:
- addColorScheme(self, scheme: QgsCodeEditorColorScheme) bool[source]¶
Adds a color
schemeto the registry.Returns
Trueif the scheme was successfully added.- Parameters:
scheme (QgsCodeEditorColorScheme)
- Return type:
bool
- removeColorScheme(self, id: str | None) bool[source]¶
Removes the color scheme with matching
idfrom the registry.Returns
Trueif scheme was found and removed.- Parameters:
id (Optional[str])
- Return type:
bool
- scheme(self, id: str | None) QgsCodeEditorColorScheme[source]¶
Returns the color scheme with matching
id.If the specified scheme
iddoes not exist then the default scheme will be returned instead.- Parameters:
id (Optional[str])
- Return type: