mirror of https://github.com/EspoTek/Labrador.git
Simplified scope range dialog
This commit is contained in:
parent
a098e6d7fb
commit
b62f221056
|
@ -2381,17 +2381,12 @@ void MainWindow::on_actionI2C_triggered(bool checked)
|
||||||
|
|
||||||
void MainWindow::on_actionShow_Range_Dialog_on_Main_Page_triggered(bool checked)
|
void MainWindow::on_actionShow_Range_Dialog_on_Main_Page_triggered(bool checked)
|
||||||
{
|
{
|
||||||
qDebug() << "on_actionShow_Range_Dialog_on_Main_Page_triggered" << checked;
|
|
||||||
if (checked)
|
|
||||||
{
|
|
||||||
#ifndef PLATFORM_ANDROID
|
#ifndef PLATFORM_ANDROID
|
||||||
settings->setValue("ShowRangeDialog", true);
|
if (scopeRangeSwitch == nullptr)
|
||||||
#endif
|
{
|
||||||
scopeRangeSwitch = new scopeRangeEnterDialog(nullptr, false, ui->controller_iso->display.topRange, ui->controller_iso->display.botRange, ui->controller_iso->display.window, ui->controller_iso->display.delay);
|
scopeRangeSwitch = new scopeRangeEnterDialog(nullptr, false, ui->controller_iso->display.topRange, ui->controller_iso->display.botRange, ui->controller_iso->display.window, ui->controller_iso->display.delay);
|
||||||
scopeRangeSwitch->setWindowFlags(Qt::Widget);
|
scopeRangeSwitch->setWindowFlags(Qt::Widget);
|
||||||
#ifndef PLATFORM_ANDROID
|
|
||||||
ui->verticalLayout_5->insertWidget(2, scopeRangeSwitch);
|
ui->verticalLayout_5->insertWidget(2, scopeRangeSwitch);
|
||||||
#endif
|
|
||||||
connect(scopeRangeSwitch, SIGNAL(yTopUpdated(double)), ui->controller_iso, SLOT(setTopRange(double)));
|
connect(scopeRangeSwitch, SIGNAL(yTopUpdated(double)), ui->controller_iso, SLOT(setTopRange(double)));
|
||||||
connect(scopeRangeSwitch, SIGNAL(yBotUpdated(double)), ui->controller_iso, SLOT(setBotRange(double)));
|
connect(scopeRangeSwitch, SIGNAL(yBotUpdated(double)), ui->controller_iso, SLOT(setBotRange(double)));
|
||||||
connect(scopeRangeSwitch, SIGNAL(windowUpdated(double)), ui->controller_iso, SLOT(setTimeWindow(double)));
|
connect(scopeRangeSwitch, SIGNAL(windowUpdated(double)), ui->controller_iso, SLOT(setTimeWindow(double)));
|
||||||
|
@ -2402,14 +2397,10 @@ void MainWindow::on_actionShow_Range_Dialog_on_Main_Page_triggered(bool checked)
|
||||||
connect(ui->controller_iso, SIGNAL(timeWindowUpdated(double)), scopeRangeSwitch, SLOT(windowChanged(double)));
|
connect(ui->controller_iso, SIGNAL(timeWindowUpdated(double)), scopeRangeSwitch, SLOT(windowChanged(double)));
|
||||||
connect(ui->controller_iso, SIGNAL(delayUpdated(double)), scopeRangeSwitch, SLOT(delayChanged(double)));
|
connect(ui->controller_iso, SIGNAL(delayUpdated(double)), scopeRangeSwitch, SLOT(delayChanged(double)));
|
||||||
}
|
}
|
||||||
else
|
qDebug() << "on_actionShow_Range_Dialog_on_Main_Page_triggered" << checked;
|
||||||
{
|
settings->setValue("ShowRangeDialog", checked);
|
||||||
#ifndef PLATFORM_ANDROID
|
scopeRangeSwitch->setVisible(checked);
|
||||||
settings->setValue("ShowRangeDialog", false);
|
|
||||||
#endif
|
#endif
|
||||||
delete scopeRangeSwitch;
|
|
||||||
scopeRangeSwitch = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::paused(bool enabled)
|
void MainWindow::paused(bool enabled)
|
||||||
|
|
Loading…
Reference in New Issue