21 #include "qgis_core.h"
66 if (
static_cast< int >( mProgress * 10 ) !=
static_cast< int >( progress * 10 ) )
67 emit progressChanged( progress );
109 bool mCanceled =
false;
111 double mProgress = 0.0;
Base class for feedback objects to be used for cancellation of something running in a worker thread.
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.
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.