tasks now emit floats rather than integers

Simplifies code for tasks.
This commit is contained in:
itsmattkc
2020-05-19 02:44:38 +10:00
parent b9cd83eff1
commit cb383d760b
10 changed files with 28 additions and 11 deletions
+6 -1
View File
@@ -72,10 +72,15 @@ void MainStatusBar::UpdateStatus()
}
bar_->setVisible(true);
connect(t, &Task::ProgressChanged, bar_, &QProgressBar::setValue);
connect(t, &Task::ProgressChanged, this, &MainStatusBar::SetProgressBarValue);
}
}
void MainStatusBar::SetProgressBarValue(double d)
{
bar_->setValue(qRound(100.0 * d));
}
void MainStatusBar::mouseDoubleClickEvent(QMouseEvent* e)
{
QStatusBar::mouseDoubleClickEvent(e);
+2
View File
@@ -48,6 +48,8 @@ protected:
private slots:
void UpdateStatus();
void SetProgressBarValue(double d);
private:
TaskManager* manager_;