summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp7
-rw-r--r--qt-ui/diveplanner.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index d0f208010..3661fab15 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -378,6 +378,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
ui.descRate->setValue(prefs.descrate / UNIT_FACTOR);
ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
ui.decopo2->setValue(prefs.decopo2 / 1000.0);
+ ui.backgasBreaks->setChecked(prefs.doo2breaks);
connect(ui.lastStop, SIGNAL(toggled(bool)), plannerModel, SLOT(setLastStop6m(bool)));
@@ -402,6 +403,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
connect(ui.decoStopSAC, SIGNAL(valueChanged(int)), this, SLOT(decoSacChanged(int)));
connect(ui.gfhigh, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFHigh(int)));
connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
+ connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
ui.bottomSAC->setValue(20);
ui.decoStopSAC->setValue(17);
@@ -475,6 +477,11 @@ void PlannerSettingsWidget::setDecoPo2(double po2)
prefs.decopo2 = (int) (po2 * 1000.0);
}
+void PlannerSettingsWidget::setBackgasBreaks(bool dobreaks)
+{
+ prefs.doo2breaks = dobreaks;
+}
+
void DivePlannerPointsModel::setPlanMode(Mode m)
{
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index f2ed4f582..d9173be6f 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -168,6 +168,7 @@ slots:
void setDescRate(int rate);
void setBottomPo2(double po2);
void setDecoPo2(double po2);
+ void setBackgasBreaks(bool dobreaks);
private:
Ui::plannerSettingsWidget ui;