mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
desktop-widgets: use set/get asc/desc rates in diveplannermodel
The spinboxes are already connected to diveplannermodel set_ functions, remove second connect to plannerShared. Change get functions to use diveplannermodel. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
851ab68aa2
commit
b1751ac0c6
1 changed files with 5 additions and 10 deletions
|
@ -489,11 +489,6 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
|||
connect(ui.buehlmann_deco, &QAbstractButton::clicked, [=] { disableDecoElements(BUEHLMANN); });
|
||||
connect(ui.vpmb_deco, &QAbstractButton::clicked, [=] { disableDecoElements(VPMB); });
|
||||
|
||||
connect(ui.ascRate75, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_ascrate75);
|
||||
connect(ui.ascRate50, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_ascrate50);
|
||||
connect(ui.descRate, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_descrate);
|
||||
connect(ui.ascRateStops, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_ascratestops);
|
||||
connect(ui.ascRateLast6m, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_ascratelast6m);
|
||||
connect(ui.sacfactor, QOverload<double>::of(&QDoubleSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_sacfactor);
|
||||
connect(ui.problemsolvingtime, QOverload<int>::of(&QSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_problemsolvingtime);
|
||||
connect(ui.bottompo2, QOverload<double>::of(&QDoubleSpinBox::valueChanged), plannerShared::instance(), &plannerShared::set_bottompo2);
|
||||
|
@ -521,11 +516,11 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
|||
|
||||
void PlannerSettingsWidget::updateUnitsUI()
|
||||
{
|
||||
ui.ascRate75->setValue(plannerShared::ascrate75());
|
||||
ui.ascRate50->setValue(plannerShared::ascrate50());
|
||||
ui.ascRateStops->setValue(plannerShared::ascratestops());
|
||||
ui.ascRateLast6m->setValue(plannerShared::ascratelast6m());
|
||||
ui.descRate->setValue(lrint(plannerShared::descrate()));
|
||||
ui.ascRate75->setValue(plannerModel->ascrate75Display());
|
||||
ui.ascRate50->setValue(plannerModel->ascrate50Display());
|
||||
ui.ascRateStops->setValue(plannerModel->ascratestopsDisplay());
|
||||
ui.ascRateLast6m->setValue(plannerModel->ascratelast6mDisplay());
|
||||
ui.descRate->setValue(lrint(plannerModel->descrateDisplay()));
|
||||
ui.bestmixEND->setValue(lrint(get_depth_units(prefs.bestmixend.mm, NULL, NULL)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue