21 : mChildSteps( childAlgorithmCount )
22 , mFeedback( feedback )
31 mFeedback->
setProgress( 100.0 * static_cast< double >( mCurrentStep ) / mChildSteps );
64 void QgsProcessingMultiStepFeedback::updateOverallProgress(
double progress )
66 double baseProgress = 100.0 *
static_cast< double >( mCurrentStep ) / mChildSteps;
67 double currentAlgorithmProgress = progress / mChildSteps;
68 mFeedback->
setProgress( baseProgress + currentAlgorithmProgress );
Base class for providing feedback from a processing algorithm.
void cancel()
Tells the internal routines that the current operation should be canceled. This should be run by the ...
void reportError(const QString &error, bool fatalError) override
Reports that the algorithm encountered an error while executing.
void pushConsoleInfo(const QString &info) override
Pushes a console feedback message from the algorithm.
void setProgress(double progress)
Sets the current progress for the feedback object.
void pushDebugInfo(const QString &info) override
Pushes an informational message containing debugging helpers from the algorithm.
void canceled()
Internal routines can connect to this signal if they use event loop.
void setCurrentStep(int step)
Sets the step which is being executed.
virtual void setProgressText(const QString &text)
Sets a progress report text string.
void setProgressText(const QString &text) override
Sets a progress report text string.
void pushCommandInfo(const QString &info) override
Pushes an informational message containing a command from the algorithm.
void progressChanged(double progress)
Emitted when the feedback object reports a progress change.
QgsProcessingMultiStepFeedback(int steps, QgsProcessingFeedback *feedback)
Constructor for QgsProcessingMultiStepFeedback, for a process with the specified number of steps...
double progress() const
Returns the current progress reported by the feedback object.
virtual void pushDebugInfo(const QString &info)
Pushes an informational message containing debugging helpers from the algorithm.
virtual void pushConsoleInfo(const QString &info)
Pushes a console feedback message from the algorithm.
virtual void pushCommandInfo(const QString &info)
Pushes an informational message containing a command from the algorithm.
void pushInfo(const QString &info) override
Pushes a general informational message from the algorithm.
virtual void reportError(const QString &error, bool fatalError=false)
Reports that the algorithm encountered an error while executing.
virtual void pushInfo(const QString &info)
Pushes a general informational message from the algorithm.