QgsProcessingMultiStepFeedback class

Processing feedback object for multi-step operations.

A processing feedback object which proxies its calls to an underlying feedback object, but scales overall progress reports to account for a number of child steps which each report their own feedback.

Base classes

class QgsProcessingFeedback
Base class for providing feedback from a processing algorithm.

Constructors, destructors, conversion operators

QgsProcessingMultiStepFeedback(int steps, QgsProcessingFeedback* feedback)
Constructor for QgsProcessingMultiStepFeedback, for a process with the specified number of steps.

Public functions

void pushCommandInfo(const QString& info) override
Pushes an informational message containing a command from the algorithm.
void pushConsoleInfo(const QString& info) override
Pushes a console feedback message from the algorithm.
void pushDebugInfo(const QString& info) override
Pushes an informational message containing debugging helpers from the algorithm.
void pushInfo(const QString& info) override
Pushes a general informational message from the algorithm.
void reportError(const QString& error, bool fatalError) override
Reports that the algorithm encountered an error while executing.
void setCurrentStep(int step)
Sets the step which is being executed.
void setProgressText(const QString& text) override
Sets a progress report text string.

Function documentation

QgsProcessingMultiStepFeedback::QgsProcessingMultiStepFeedback(int steps, QgsProcessingFeedback* feedback)

Constructor for QgsProcessingMultiStepFeedback, for a process with the specified number of steps.

This feedback object will proxy calls to the specified feedback object.

void QgsProcessingMultiStepFeedback::pushCommandInfo(const QString& info) override

Pushes an informational message containing a command from the algorithm.

This is usually used to report commands which are executed in an external application or as subprocesses.

void QgsProcessingMultiStepFeedback::pushConsoleInfo(const QString& info) override

Pushes a console feedback message from the algorithm.

This is used to report the output from executing an external command or subprocess.

void QgsProcessingMultiStepFeedback::pushDebugInfo(const QString& info) override

Pushes an informational message containing debugging helpers from the algorithm.

void QgsProcessingMultiStepFeedback::pushInfo(const QString& info) override

Pushes a general informational message from the algorithm.

This can be used to report feedback which is neither a status report or an error, such as "Found 47 matching features".

void QgsProcessingMultiStepFeedback::reportError(const QString& error, bool fatalError) override

Reports that the algorithm encountered an error while executing.

If fatalError is true then the error prevented the algorithm from executing.

void QgsProcessingMultiStepFeedback::setCurrentStep(int step)

Sets the step which is being executed.

This is used to scale the current progress to account for progress through the overall process.

void QgsProcessingMultiStepFeedback::setProgressText(const QString& text) override

Sets a progress report text string.

This can be used in conjunction with setProgress() to provide detailed progress reports, such as "Transformed 4 of 5 layers".