Class: QgsProcessingDefaultStyleRegistry¶
A registry for default styles to apply to layers generated by Processing.
QgsProcessingDefaultStyleRegistry is not usually directly
created, but rather accessed through
QgsApplication.processingRegistry()->:py:func:defaultStyleRegistry() <qgis.core.QgsProcessingDefaultStyleRegistry.defaultStyleRegistry>.
Added in version 4.4.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Constructor
Methods
Returns the QML path to the default style to use for the specified output from an algorithm, or an empty string if no default style should be loaded for the output. |
|
Loads all saved styles from the configuration file. |
|
Saves registered styles to the configuration file. |
|
Sets the default style for an output from an algorithm. |
- class qgis.core.QgsProcessingDefaultStyleRegistry[source]¶
Bases:
QObject- __init__(parent: QObject | None = None)¶
Constructor for QgsProcessingDefaultStyleRegistry.
QgsProcessingDefaultStyleRegistry is not usually directly created, but rather accessed through
QgsApplication.processingRegistry()->:py:func:~QgsProcessingDefaultStyleRegistry.defaultStyleRegistry.- Parameters:
parent (QObject|None = None)
- defaultStyleForOutput(self, algorithmId: str | None, outputName: str | None) str[source]¶
Returns the QML path to the default style to use for the specified output from an algorithm, or an empty string if no default style should be loaded for the output.
See also
- Parameters:
algorithmId (str|None)
outputName (str|None)
- Return type:
str
- setDefaultStyleForOutput(self, algorithmId: str | None, outputName: str | None, qmlPath: str | None)[source]¶
Sets the default style for an output from an algorithm.
Note
Calling this method does not automatically update the configuration file on disk. A separate call to
saveStyles()must be made.See also
- Parameters:
algorithmId (str|None)
outputName (str|None)
qmlPath (str|None)