Class: QgsProcessingAlgorithmConfigurationWidget¶
A configuration widget for processing algorithms allows providing additional configuration options directly on algorithm level, in addition to parameters.
Added in version 3.2.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: configuration()
, setConfiguration()
Class Hierarchy¶
Base classes¶
Abstract interface for generating an expression context. |
Abstract Methods
Read the current configuration from this widget. |
|
Set the configuration which this widget should represent. |
Methods
Returns the algorithm instance associated with this widget. |
|
Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required. |
|
Sets the algorithm instance associated with the widget. |
|
Returns the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgsProcessingAlgorithmConfigurationWidget. See the FAQ for more details.
Sets the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior. |
- class qgis.gui.QgsProcessingAlgorithmConfigurationWidget[source]¶
Bases:
QWidget
,QgsExpressionContextGenerator
- __init__(parent: QWidget | None = None)
Creates a new QgsProcessingAlgorithmConfigurationWidget
- Parameters:
parent (Optional[QWidget] = None)
- algorithm(self) QgsProcessingAlgorithm | None [source]¶
Returns the algorithm instance associated with this widget.
See also
Added in version 3.6.
- Return type:
Optional[QgsProcessingAlgorithm]
- abstract configuration(self) Dict[str, Any] [source]¶
Read the current configuration from this widget.
- Return type:
Dict[str, Any]
- registerProcessingContextGenerator(self, generator: QgsProcessingContextGenerator | None)[source]¶
Registers a Processing context
generator
class that will be used to retrieve a Processing context for the widget when required.Added in version 3.6.
- Parameters:
generator (Optional[QgsProcessingContextGenerator])
- setAlgorithm(self, algorithm: QgsProcessingAlgorithm | None)[source]¶
Sets the algorithm instance associated with the widget.
See also
Added in version 3.6.
- Parameters:
algorithm (Optional[QgsProcessingAlgorithm])
- abstract setConfiguration(self, configuration: Dict[str, Any])[source]¶
Set the configuration which this widget should represent.
- Parameters:
configuration (Dict[str, Any])
- virtual setWidgetContext(self, context: QgsProcessingParameterWidgetContext)[source]¶
Sets the
context
in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior.Subclasses should take care to call the base class method when reimplementing this method.
See also
Added in version 3.6.
- Parameters:
context (QgsProcessingParameterWidgetContext)
- widgetContext(self) QgsProcessingParameterWidgetContext ¶
Returns the context in which the Processing algorithm widget is shown, e.g., the parent model algorithm, a linked map canvas, and other relevant information which allows the widget to fine-tune its behavior.
See also
Added in version 3.6.
- Return type: