Core: Add "canceled" signal to class FutureProgress.

This allows clients to get notified that the operation has been canceled
by the user without the need to create an additional QFutureWatcher
themselves.

Change-Id: I928f87eef98ce762d77dcc6962c082fe49f38f6e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Christian Kandeler
2012-05-12 17:25:37 +02:00
parent 3b723d3a9a
commit 69530f76aa
2 changed files with 7 additions and 0 deletions

View File

@@ -129,6 +129,11 @@ FutureProgressPrivate::FutureProgressPrivate(FutureProgress *q) :
progress indicator.
*/
/*!
\fn void FutureProgress::canceled()
Connect to this signal to get informed when the operation is canceled.
*/
/*!
\fn void FutureProgress::finished()
Another way to get informed when the task has finished.
@@ -157,6 +162,7 @@ FutureProgress::FutureProgress(QWidget *parent) :
connect(&d->m_watcher, SIGNAL(started()), this, SLOT(setStarted()));
connect(&d->m_watcher, SIGNAL(finished()), this, SLOT(setFinished()));
connect(&d->m_watcher, SIGNAL(canceled()), this, SIGNAL(canceled()));
connect(&d->m_watcher, SIGNAL(progressRangeChanged(int,int)), this, SLOT(setProgressRange(int,int)));
connect(&d->m_watcher, SIGNAL(progressValueChanged(int)), this, SLOT(setProgressValue(int)));
connect(&d->m_watcher, SIGNAL(progressTextChanged(QString)),

View File

@@ -77,6 +77,7 @@ public:
signals:
void clicked();
void finished();
void canceled();
void removeMe();
protected: