Class: QgsProcessingLayerOutputDestinationWidget

A widget which allows users to select the destination path for an output style Processing parameter.

Note

Not stable API

Added in version 3.14.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProcessingLayerOutputDestinationWidget

Base classes

QWidget

QObject

QPaintDevice

Methods

addOpenAfterRunningOption

Adds the "Open output file after running" option to the widget.

openAfterRunning

Returns True if the widget has the "Open output file after running" option checked.

outputIsSkipped

Returns True if the output is set to be skipped.

registerProcessingParametersGenerator

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

setContext

Sets the processing context in which this widget is being shown.

setValue

Sets the value to show in the widget.

setWidgetContext

Sets the context in which the 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.

value

Returns the widgets current value.

Signals

destinationChanged

Emitted whenever the destination value is changed in the widget.

skipOutputChanged

Emitted whenever the "skip output" option is toggled in the widget.

class qgis.gui.QgsProcessingLayerOutputDestinationWidget[source]

Bases: QWidget

__init__(parameter: QgsProcessingDestinationParameter | None, defaultSelection: bool, parent: QWidget | None = None)

Constructor for QgsProcessingLayerOutputDestinationWidget, associated with the specified parameter.

Parameters:
addOpenAfterRunningOption(self)[source]

Adds the “Open output file after running” option to the widget.

signal destinationChanged[source]

Emitted whenever the destination value is changed in the widget.

openAfterRunning(self) bool[source]

Returns True if the widget has the “Open output file after running” option checked.

Return type:

bool

outputIsSkipped(self) bool[source]

Returns True if the output is set to be skipped.

Return type:

bool

registerProcessingParametersGenerator(self, generator: QgsProcessingParametersGenerator | None)[source]

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

Added in version 3.14.

Parameters:

generator (Optional[QgsProcessingParametersGenerator])

setContext(self, context: QgsProcessingContext | None)[source]

Sets the processing context in which this widget is being shown.

Parameters:

context (Optional[QgsProcessingContext])

setValue(self, value: Any)[source]

Sets the value to show in the widget.

Parameters:

value (Any)

setWidgetContext(self, context: QgsProcessingParameterWidgetContext)[source]

Sets the context in which the 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.

Parameters:

context (QgsProcessingParameterWidgetContext)

signal skipOutputChanged(skipped: bool)[source]

Emitted whenever the “skip output” option is toggled in the widget.

Parameters:

skipped (bool)

value(self) Any[source]

Returns the widgets current value.

Return type:

Any