cache: reimplemented auto-caching

Implemented a smarter auto-cache that's context sensitive. Caching will
automatically pause when playback begins or values are being changed and resume
when inactive.
This commit is contained in:
itsmattkc
2020-05-24 15:20:35 +10:00
parent a26a3cbf21
commit 89ae6e026f
19 changed files with 180 additions and 14 deletions
+3 -2
View File
@@ -61,12 +61,13 @@ TaskViewItem::TaskViewItem(Task* task, QWidget *parent) :
// Connect to the task
connect(task_, &Task::ProgressChanged, this, &TaskViewItem::UpdateProgress);
connect(cancel_btn_, &QPushButton::clicked, task_, &Task::Cancel, Qt::DirectConnection);
connect(cancel_btn_, &QPushButton::clicked, this, [this] { emit TaskCancelled(task_); });
}
void TaskViewItem::Failed()
{
task_status_lbl_->setText(task_->GetError());
task_status_lbl_->setStyleSheet("color: red");
task_status_lbl_->setText(tr("Error: %1").arg(task_->GetError()));
}
void TaskViewItem::UpdateProgress(double d)