66 if (
static_cast< int >( mProgress * 10 ) !=
static_cast< int >( progress * 10 ) )
67 emit progressChanged( progress );
101 mProcessedCount = processedCount;
102 emit processedCountChanged( processedCount );
142 bool mCanceled =
false;
144 double mProgress = 0.0;
145 unsigned long long mProcessedCount = 0;
Base class for feedback objects to be used for cancellation of something running in a worker thread.
bool isCanceled() const
Tells whether the operation has been canceled already.
void setProcessedCount(unsigned long long processedCount)
Sets the current processed objects count for the feedback object.
void progressChanged(double progress)
Emitted when the feedback object reports a progress change.
void canceled()
Internal routines can connect to this signal if they use event loop.
QgsFeedback(QObject *parent=nullptr)
Construct a feedback object.
unsigned long long processedCount() const
Returns the current processed objects count reported by the feedback object.
void processedCountChanged(unsigned long long processedCount)
Emitted when the feedback object reports a change in the number of processed objects.
void cancel()
Tells the internal routines that the current operation should be canceled. This should be run by the ...
void setProgress(double progress)
Sets the current progress for the feedback object.
double progress() const
Returns the current progress reported by the feedback object.