Class: QgsProcessingBatchAlgorithmDialogBase¶
- class qgis.gui.QgsProcessingBatchAlgorithmDialogBase¶
Bases:
QgsProcessingAlgorithmDialogBase
Base class for processing batch algorithm dialogs.
Note
This is not considered stable API and may change in future QGIS versions.
New in version 3.26.
QgsProcessingBatchAlgorithmDialogBase(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()) Constructor for QgsProcessingBatchAlgorithmDialogBase.
Methods
- param successful:
Applies any defined overrides for Processing context settings to the specified
context
.Blocks run and changeParameters buttons and parameters tab while the algorithm is running.
Returns the dialog's button box.
Returns the dialog's cancel button.
Returns the dialog's change parameters button.
Clears any current progress from the dialog.
Creates a new Processing context.
Creates a summary table of the results of a batch execution.
Starts the batch execution, where the
parameters
list dictates the parameters for each component step of the batch.Called when the algorithm has finished executing.
Formats an input
string
for display in the log tab.Called when the dialog should handle the results of an algorithm, e.g.
Hides the short help panel.
- rtype:
bool
Populates the HTML results dialog as a result of a successful algorithm execution.
Returns the dialog's message bar.
Resets the dialog's gui, ready for another algorithm execution.
Called when the dialog's algorithm should be run.
Will be called when the "Run as Single" button is clicked.
Returns the dialog's run button.
Sets the current
task
running in the dialog.Sets whether the algorithm was executed through the dialog.
Sets whether the algorithm was executed through the dialog (no matter the result).
Displays an info
message
in the dialog's log.Sets the algorithm results.
Returns the dialog's tab widget.
Sets visibility for mutually exclusive buttons Run and Change Parameters.
- actionEvent(self, QActionEvent)¶
- algExecuted(self, successful: bool, results: Dict[str, Any])¶
- Parameters:
successful (bool) –
results (Dict[str) –
- applyContextOverrides(self, context: QgsProcessingContext)¶
Applies any defined overrides for Processing context settings to the specified
context
.This allows the dialog to override default Processing settings for an individual algorithm execution.
New in version 3.32.
- blockAdditionalControlsWhileRunning(self)¶
- blockControlsWhileRunning(self)¶
Blocks run and changeParameters buttons and parameters tab while the algorithm is running.
- buttonBox(self) QDialogButtonBox ¶
Returns the dialog’s button box.
- cancelButton(self) QPushButton ¶
Returns the dialog’s cancel button.
- changeEvent(self, QEvent)¶
- changeParametersButton(self) QPushButton ¶
Returns the dialog’s change parameters button.
- childEvent(self, QChildEvent)¶
- clearProgress(self)¶
Clears any current progress from the dialog.
- closeEvent(self, e: QCloseEvent)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- createContext(self, feedback: QgsProcessingFeedback) QgsProcessingContext ¶
Creates a new Processing context.
(Each step in the batch processing will use a new Processing context)
- Parameters:
feedback (QgsProcessingFeedback) –
- Return type:
- createSummaryTable(self, results: Iterable[Dict[str, Any]], errors: Iterable[Dict[str, Any]])¶
Creates a summary table of the results of a batch execution.
- Parameters:
results (Iterable[Dict[str) –
errors (Iterable[Dict[str) –
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- dropEvent(self, QDropEvent)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) bool ¶
- eventFilter(self, QObject, QEvent) bool ¶
- execute(self, parameters: Iterable[Dict[str, Any]])¶
Starts the batch execution, where the
parameters
list dictates the parameters for each component step of the batch.- Parameters:
parameters (Iterable[Dict[str) –
- finished(self, successful: bool, result: Dict[str, Any], context: QgsProcessingContext, feedback: QgsProcessingFeedback)¶
Called when the algorithm has finished executing.
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, bool) bool ¶
- focusOutEvent(self, QFocusEvent)¶
- focusPreviousChild(self) bool ¶
- formatStringForLog(string: str) str ¶
Formats an input
string
for display in the log tab.New in version 3.0.1.
- handleAlgorithmResults(self, algorithm: QgsProcessingAlgorithm, context: QgsProcessingContext, feedback: QgsProcessingFeedback, parameters: Dict[str, Any])¶
Called when the dialog should handle the results of an algorithm, e.g. by loading layers into the current project.
- Parameters:
algorithm (QgsProcessingAlgorithm) –
context (QgsProcessingContext) –
feedback (QgsProcessingFeedback) –
parameters (Dict[str) –
- hideEvent(self, QHideEvent)¶
- hideShortHelp(self)¶
Hides the short help panel.
- initPainter(self, QPainter)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isFinalized(self) bool ¶
- Return type:
bool
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- loadHtmlResults(self, results: Dict[str, Any], index: int)¶
Populates the HTML results dialog as a result of a successful algorithm execution.
- Parameters:
results (Dict[str) –
index (int) –
- messageBar(self) QgsMessageBar ¶
Returns the dialog’s message bar.
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, QMouseEvent)¶
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) int ¶
- resetAdditionalGui(self)¶
- resetGui(self)¶
Resets the dialog’s gui, ready for another algorithm execution.
- resizeEvent(self, QResizeEvent)¶
- runAlgorithm(self)¶
Called when the dialog’s algorithm should be run. Must be overridden by subclasses.
- runAsSingle(self)¶
Will be called when the “Run as Single” button is clicked.
- runButton(self) QPushButton ¶
Returns the dialog’s run button.
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setCurrentTask(self, task: QgsProcessingAlgRunnerTask)¶
Sets the current
task
running in the dialog. The task will automatically be started by the dialog. Ownership oftask
is transferred to the dialog.
- setExecuted(self, executed: bool)¶
Sets whether the algorithm was executed through the dialog.
See also
wasExecuted()
See also
- setExecutedAnyResult(self, executedAnyResult: bool)¶
Sets whether the algorithm was executed through the dialog (no matter the result).
- setInfo(self, message: str, isError: bool = False, escapeHtml: bool = True, isWarning: bool = False)¶
Displays an info
message
in the dialog’s log.
- setResults(self, results: Dict[str, Any])¶
Sets the algorithm results.
See also
results()
See also
- showEvent(self, QShowEvent)¶
- tabWidget(self) QTabWidget ¶
Returns the dialog’s tab widget.
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- updateRunButtonVisibility(self)¶
Sets visibility for mutually exclusive buttons Run and Change Parameters.
- wheelEvent(self, QWheelEvent)¶