summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-15 09:50:30 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-26 08:39:05 -0800
commitdf6f01a6f6767ee714fbf355b1e2260dfaa9f68f (patch)
treeac421ca8d27855495a518c6ed16475714715ad0e /desktop-widgets/diveplanner.cpp
parent87f680f5e7dd2f7567b9ec047152606194291b85 (diff)
downloadsubsurface-df6f01a6f6767ee714fbf355b1e2260dfaa9f68f.tar.gz
desktop-widgets: replace vars. qPrefDivePlanner -> plannerShared
change local setBailout to plannerShared and update connect. change signals to slots in plannerShared Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r--desktop-widgets/diveplanner.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index ac08cc14c..a8a05935a 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -450,7 +450,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
ui.decopo2->setValue(prefs.decopo2 / 1000.0);
ui.backgasBreaks->setChecked(prefs.doo2breaks);
- setBailout(false);
+ plannerShared::set_dobailout(false);
setBailoutVisibility(false);
ui.o2narcotic->setChecked(prefs.o2narcotic);
ui.drop_stone_mode->setChecked(prefs.drop_stone_mode);
@@ -497,7 +497,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
connect(ui.vpmb_conservatism, SIGNAL(valueChanged(int)), plannerModel, SLOT(setVpmbConservatism(int)));
connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
- connect(ui.bailout, SIGNAL(toggled(bool)), this, SLOT(setBailout(bool)));
+ connect(ui.bailout, SIGNAL(toggled(bool)), plannerShared::instance(), SLOT(set_bailout(bool)));
connect(ui.o2narcotic, SIGNAL(toggled(bool)), this, SLOT(setO2narcotic(bool)));
connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSwitchAtReqStop(bool)));
connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
@@ -652,12 +652,6 @@ void PlannerSettingsWidget::setBackgasBreaks(bool dobreaks)
plannerModel->emitDataChanged();
}
-void PlannerSettingsWidget::setBailout(bool dobailout)
-{
- qPrefDivePlanner::instance()->set_dobailout(dobailout);
- plannerModel->emitDataChanged();
-}
-
void PlannerSettingsWidget::setO2narcotic(bool o2narcotic)
{
qPrefDivePlanner::instance()->set_o2narcotic(o2narcotic);