Class: QgsProcessingParameterWidgetContext¶
-
class
qgis.gui.
QgsProcessingParameterWidgetContext
¶ Bases:
sip.wrapper
Constructor for QgsProcessingParameterWidgetContext.
QgsProcessingParameterWidgetContext(QgsProcessingParameterWidgetContext)
Contains settings which reflect the context in which a Processing parameter 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.
New in version 3.4: Enums
Methods
Returns the map canvas associated with the widget.
Returns the model which the parameter widget is associated with.
Returns the child algorithm ID within the model which the parameter widget is associated with.
Returns the project associated with the widget.
Sets the map
canvas
associated with the widget.Sets the
model
which the parameter widget is associated with.Sets the child algorithm
id
within the model which the parameter widget is associated with.Sets the
project
associated with the widget.Signals
Attributes
-
mapCanvas
(self) → QgsMapCanvas¶ Returns the map canvas associated with the widget.
See also
-
model
(self) → QgsProcessingModelAlgorithm¶ Returns the model which the parameter widget is associated with.
See also
See also
-
modelChildAlgorithmId
(self) → str¶ Returns the child algorithm ID within the model which the parameter widget is associated with.
See also
See also
-
project
(self) → QgsProject¶ Returns the project associated with the widget.
See also
-
setMapCanvas
(self, canvas: QgsMapCanvas)¶ Sets the map
canvas
associated with the widget. This allows the widget to retrieve the current map scale and other properties from the canvas.See also
-
setModel
(self, model: QgsProcessingModelAlgorithm)¶ Sets the
model
which the parameter widget is associated with.See also
See also
-
setModelChildAlgorithmId
(self, id: str)¶ Sets the child algorithm
id
within the model which the parameter widget is associated with.See also
See also
-