18#ifndef QGSPROXYPROGRESSTASK_H
19#define QGSPROXYPROGRESSTASK_H
24#include <QWaitCondition>
81 QWaitCondition mNotFinishedWaitCondition;
82 QMutex mNotFinishedMutex;
83 bool mAlreadyFinished =
false;
A QgsTask shell which proxies progress reports.
QgsProxyProgressTask(const QgsProxyProgressTask &other)=delete
void setProxyProgress(double progress)
Sets the progress (from 0 to 100) for the proxied operation.
void finalize(bool result)
Finalizes the task, with the specified result.
void canceled()
Emitted when the task is canceled.
QgsProxyProgressTask & operator=(const QgsProxyProgressTask &other)=delete
QgsProxyProgressTask(const QString &description, bool canCancel=false)
Constructor for QgsProxyProgressTask, with the specified description.
QgsScopedProxyProgressTask & operator=(const QgsScopedProxyProgressTask &other)=delete
QgsScopedProxyProgressTask(const QgsScopedProxyProgressTask &other)=delete
QgsScopedProxyProgressTask(const QString &description)
Constructor for QgsScopedProxyProgressTask, with the specified description.
double progress() const
Returns the task's progress (between 0.0 and 100.0).
virtual bool run()=0
Performs the task's operation.
virtual void cancel()
Notifies the task that it should terminate.
QgsTask(const QString &description=QString(), QgsTask::Flags flags=AllFlags)
Constructor for QgsTask.
QString description() const
Returns the task's description.
void setProgress(double progress)
Sets the task's current progress.
bool canCancel() const
Returns true if the task can be canceled.