21 #include "qgis_core.h"
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.
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.
void processedCountChanged(unsigned long long processedCount)
Emitted when the feedback object reports a change in the number of processed objects.
double progress() const SIP_HOLDGIL
Returns the current progress reported by the feedback object.
void cancel()
Tells the internal routines that the current operation should be canceled. This should be run by the ...
bool isCanceled() const SIP_HOLDGIL
Tells whether the operation has been canceled already.
void setProgress(double progress)
Sets the current progress for the feedback object.
unsigned long long processedCount() const SIP_HOLDGIL
Returns the current processed objects count reported by the feedback object.