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.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: createContext(), QgsProcessingParametersGenerator.createProcessingParameters(), createSummaryTable(), handleAlgorithmResults(), loadHtmlResults(), QgsProcessingContextGenerator.processingContext(), runAsSingle()

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.

Abstract Methods

createContext

Creates a new Processing context.

createSummaryTable

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

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.

Methods

execute

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

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())

abstract 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]

abstract 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]])

abstract 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:
abstract 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)

abstract runAsSingle(self)[source]

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