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.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProcessingAlgorithmConfigurationWidget

Base classes

QWidget

QObject

QPaintDevice

QgsExpressionContextGenerator

Abstract interface for generating an expression context.

Methods

algorithm

Returns the algorithm instance associated with this widget.

configuration

Read the current configuration from this widget.

registerProcessingContextGenerator

Registers a Processing context generator class that will be used to retrieve a Processing context for the widget when required.

setAlgorithm

Sets the algorithm instance associated with the widget.

setConfiguration

Set the configuration which this widget should represent.

setWidgetContext

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.

widgetContext

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.

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

setAlgorithm()

Added in version 3.6.

Return type:

Optional[QgsProcessingAlgorithm]

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

algorithm()

Added in version 3.6.

Parameters:

algorithm (Optional[QgsProcessingAlgorithm])

setConfiguration(self, configuration: Dict[str, Any])[source]

Set the configuration which this widget should represent.

Parameters:

configuration (Dict[str, Any])

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

widgetContext()

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.

Added in version 3.6.

Return type:

QgsProcessingParameterWidgetContext