tasks now emit floats rather than integers
Simplifies code for tasks.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -48,6 +48,8 @@ protected:
|
||||
private slots:
|
||||
void UpdateStatus();
|
||||
|
||||
void SetProgressBarValue(double d);
|
||||
|
||||
private:
|
||||
TaskManager* manager_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user