aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
authorGravatar Jan Darowski <jan.darowski@gmail.com>2015-08-15 15:16:51 +0200
committerGravatar Jan Darowski <jan.darowski@gmail.com>2015-08-15 15:16:51 +0200
commit6856e87689c554bfa7ac058451e030fecfe941f5 (patch)
treec3a7dad003dd705891af8e2a489579371f928d36 /qt-models/diveplannermodel.cpp
parentcad866013b6ea8f4bdabc3371b5d319209713fa7 (diff)
downloadsubsurface-6856e87689c554bfa7ac058451e030fecfe941f5.tar.gz
VPM-B: Add conservatism levels to the ui. Fix planner settings disabling.
Conservatism level can now be changed from gui, is saved in settings. Also way of disabling the planner settings in the ui was improved to support more deco models and be called at the widget creation. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index e82daba11..005061feb 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -397,6 +397,12 @@ void DivePlannerPointsModel::triggerGFLow()
}
}
+void DivePlannerPointsModel::setConservatism(int level)
+{
+ prefs.conservatism_level = level;
+ emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1));
+}
+
void DivePlannerPointsModel::setSurfacePressure(int pressure)
{
diveplan.surface_pressure = pressure;