added possiblity to keep the progress widget

- the Nokia Qt SDK UpdateInfo plugin progress should stay in the
    progress view till the user clicks on it
  - now the futureprogress knows the difference between:
    KeepOnFinishTillUserInteraction and KeepOnFinish

Reviewed-by: con
This commit is contained in:
Tim Jenssen
2010-10-15 17:22:45 +02:00
parent 3051fd4c98
commit 4af1d09535
4 changed files with 47 additions and 14 deletions

View File

@@ -69,7 +69,11 @@ FutureProgress *ProgressView::addTask(const QFuture<void> &future,
m_layout->insertWidget(0, progress);
m_taskList.append(progress);
progress->setType(type);
progress->setKeepOnFinish(flags & ProgressManager::KeepOnFinish);
if (flags.testFlag(ProgressManager::KeepOnFinish)) {
progress->setKeepOnFinish(FutureProgress::KeepOnFinishTillUserInteraction);
} else {
progress->setKeepOnFinish(FutureProgress::DontKeepOnFinish);
}
connect(progress, SIGNAL(removeMe()), this, SLOT(slotRemoveTask()));
return progress;
}