Class: QgsProcessingBatchAlgorithmDialogBase

Base class for processing batch algorithm dialogs.

Note

This is not considered stable API and may change in future QGIS versions.

Added in version 3.26.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProcessingBatchAlgorithmDialogBase

Base classes

QgsProcessingAlgorithmDialogBase

Base class for processing algorithm dialogs.

QDialog

QWidget

QObject

QPaintDevice

QgsProcessingParametersGenerator

An interface for objects which can create sets of parameter values for processing algorithms.

QgsProcessingContextGenerator

An interface for objects which can create Processing contexts.

Methods

createContext

Creates a new Processing context.

createSummaryTable

Creates a summary table of the results of a batch execution.

execute

Starts the batch execution, where the parameters list dictates the parameters for each component step of the batch.

handleAlgorithmResults

Called when the dialog should handle the results of an algorithm, e.g. by loading layers into the current project.

loadHtmlResults

Populates the HTML results dialog as a result of a successful algorithm execution.

runAsSingle

Will be called when the "Run as Single" button is clicked.

class qgis.gui.QgsProcessingBatchAlgorithmDialogBase[source]

Bases: QgsProcessingAlgorithmDialogBase

__init__(parent: QWidget | None = None, flags: Qt.WindowFlags | Qt.WindowType = Qt.WindowFlags())

Constructor for QgsProcessingBatchAlgorithmDialogBase.

Parameters:
  • parent (Optional[QWidget] = None)

  • flags (Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())

createContext(self, feedback: QgsProcessingFeedback | None) QgsProcessingContext | None[source]

Creates a new Processing context.

(Each step in the batch processing will use a new Processing context)

Parameters:

feedback (Optional[QgsProcessingFeedback])

Return type:

Optional[QgsProcessingContext]

createSummaryTable(self, results: Iterable[Dict[str, Any]], errors: Iterable[Dict[str, Any]])[source]

Creates a summary table of the results of a batch execution.

Parameters:
  • results (Iterable[Dict[str, Any]])

  • errors (Iterable[Dict[str, Any]])

execute(self, parameters: Iterable[Dict[str, Any]])[source]

Starts the batch execution, where the parameters list dictates the parameters for each component step of the batch.

Parameters:

parameters (Iterable[Dict[str, Any]])

handleAlgorithmResults(self, algorithm: QgsProcessingAlgorithm | None, context: QgsProcessingContext, feedback: QgsProcessingFeedback | None, parameters: Dict[str, Any])[source]

Called when the dialog should handle the results of an algorithm, e.g. by loading layers into the current project.

Parameters:
loadHtmlResults(self, results: Dict[str, Any], index: int)[source]

Populates the HTML results dialog as a result of a successful algorithm execution.

Parameters:
  • results (Dict[str, Any])

  • index (int)

runAsSingle(self)[source]

Will be called when the “Run as Single” button is clicked.