QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
28 const QMutexLocker lock( &mNotFinishedMutex );
29 mAlreadyFinished =
true;
32 mNotFinishedWaitCondition.wakeAll();
37 mNotFinishedMutex.lock();
38 if ( !mAlreadyFinished )
40 mNotFinishedWaitCondition.wait( &mNotFinishedMutex );
42 mNotFinishedMutex.unlock();
49 QMetaObject::invokeMethod(
this,
"setProgress", Qt::AutoConnection, Q_ARG(
double,
progress ) );
bool run() override
Performs the task's operation.
QgsProxyProgressTask(const QString &description, bool canCancel=false)
Constructor for QgsProxyProgressTask, with the specified description.
A QgsTask shell which proxies progress reports.
long addTask(QgsTask *task, int priority=0)
Adds a task to the manager.
virtual void cancel()
Notifies the task that it should terminate.
~QgsScopedProxyProgressTask()
static QgsTaskManager * taskManager()
Returns the application's task manager, used for managing application wide background task handling.
void canceled()
Emitted when the task is canceled.
void cancel() override
Notifies the task that it should terminate.
void setProgress(double progress)
Sets the progress (from 0 to 100) for the proxied operation.
QgsScopedProxyProgressTask(const QString &description)
Constructor for QgsScopedProxyProgressTask, with the specified description.
void finalize(bool result)
Finalizes the task, with the specified result.
void setProxyProgress(double progress)
Sets the progress (from 0 to 100) for the proxied operation.
double progress() const
Returns the task's progress (between 0.0 and 100.0)
Abstract base class for long running background tasks. Tasks can be controlled directly,...