Calculates afterglow from a value 0.0 to 1.0

which is the factor the screen will be after 1 second (provided it draws at the set FPS rate)
This commit is contained in:
Gitea
2019-09-17 22:06:55 +02:00
parent e6249131ff
commit 6c550abaaf
3 changed files with 16 additions and 7 deletions
+4 -3
View File
@@ -124,10 +124,11 @@ MainWindow::MainWindow(QWidget *parent) :
auto widget = new QWidget;
auto layout = new QFormLayout(widget);
{
auto input = new QSpinBox;
input->setRange(0, 255);
auto input = new QDoubleSpinBox;
input->setRange(0, 1.0);
input->setSingleStep(0.1);
input->setValue(m_ui->widget->afterglow());
connect(input, qOverload<int>(&QSpinBox::valueChanged), m_ui->widget, &OsciWidget::setAfterglow);
connect(input, qOverload<double>(&QDoubleSpinBox::valueChanged), m_ui->widget, &OsciWidget::setAfterglow);
layout->addRow(tr("Afterglow:"), input);
}
{