tasks: added elapsed/remaining time displays for all tasks

This commit is contained in:
itsmattkc
2020-05-24 18:10:08 +10:00
parent 4c4bcb0989
commit 4f21a930dd
10 changed files with 210 additions and 12 deletions
+6
View File
@@ -46,6 +46,9 @@ ProgressDialog::ProgressDialog(const QString& message, const QString& title, QWi
bar_->setMaximum(100);
layout->addWidget(bar_);
elapsed_timer_lbl_ = new ElapsedCounterWidget();
layout->addWidget(elapsed_timer_lbl_);
QHBoxLayout* cancel_layout = new QHBoxLayout();
layout->addLayout(cancel_layout);
cancel_layout->setMargin(0);
@@ -63,6 +66,8 @@ void ProgressDialog::showEvent(QShowEvent *e)
{
QDialog::showEvent(e);
elapsed_timer_lbl_->Start();
#ifdef Q_OS_WINDOWS
Core::instance()->main_window()->SetTaskbarButtonState(TBPF_NORMAL);
#endif
@@ -82,6 +87,7 @@ void ProgressDialog::SetProgress(double value)
int percent = qRound(100.0 * value);
bar_->setValue(percent);
elapsed_timer_lbl_->SetProgress(value);
#ifdef Q_OS_WINDOWS
Core::instance()->main_window()->SetTaskbarButtonProgress(percent, 100);