tasks: added elapsed/remaining time displays for all tasks
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <QProgressBar>
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "widget/taskview/elapsedcounterwidget.h"
|
||||
|
||||
OLIVE_NAMESPACE_ENTER
|
||||
|
||||
@@ -51,6 +52,8 @@ protected:
|
||||
private:
|
||||
QProgressBar* bar_;
|
||||
|
||||
ElapsedCounterWidget* elapsed_timer_lbl_;
|
||||
|
||||
};
|
||||
|
||||
OLIVE_NAMESPACE_EXIT
|
||||
|
||||
Reference in New Issue
Block a user