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.
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 |
- 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
scheme
to the registry.Returns
True
if the scheme was successfully added.- Parameters:
scheme (QgsCodeEditorColorScheme)
- Return type:
bool
- removeColorScheme(self, id: str | None) bool [source]¶
Removes the color scheme with matching
id
from the registry.Returns
True
if 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
id
does not exist then the default scheme will be returned instead.- Parameters:
id (Optional[str])
- Return type:
- schemes(self) List[str] [source]¶
Returns a list of the
QgsCodeEditorColorScheme.id()
values for all registered color schemes.- Return type:
List[str]