27 QMutexLocker lock( &mNotFinishedMutex );
28 mAlreadyFinished =
true;
31 mNotFinishedWaitCondition.wakeAll();
36 mNotFinishedMutex.lock();
37 if ( !mAlreadyFinished )
39 mNotFinishedWaitCondition.wait( &mNotFinishedMutex );
41 mNotFinishedMutex.unlock();
48 QMetaObject::invokeMethod(
this,
"setProgress", Qt::AutoConnection, Q_ARG(
double, progress ) );
double progress() const
Returns the task's progress (between 0.0 and 100.0)
void setProxyProgress(double progress)
Sets the progress (from 0 to 100) for the proxied operation.
~QgsScopedProxyProgressTask()
static QgsTaskManager * taskManager()
Returns the application's task manager, used for managing application wide background task handling...
long addTask(QgsTask *task, int priority=0)
Adds a task to the manager.
Abstract base class for long running background tasks.
bool run() override
Performs the task's operation.
QString description() const
Returns the task's description.
void setProgress(double progress)
Sets the progress (from 0 to 100) for the proxied operation.
QgsProxyProgressTask(const QString &description)
Constructor for QgsProxyProgressTask, with the specified description.
QgsScopedProxyProgressTask(const QString &description)
Constructor for QgsScopedProxyProgressTask, with the specified description.
A QgsTask shell which proxies progress reports.
void finalize(bool result)
Finalizes the task, with the specified result.