summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divecartesianaxis.cpp
diff options
context:
space:
mode:
authorGravatar Gehad Elrobey <gehadelrobey@gmail.com>2014-04-16 22:03:44 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-16 13:09:55 -0700
commit8380f096199d4da1e89789c9bd67974e550f2bf3 (patch)
tree3bfc0618202730a976a2b6df99f3cb4fd348be74 /qt-ui/profile/divecartesianaxis.cpp
parent4bd4c0110815a9c5a9c9c05fbd6bd987573b2904 (diff)
downloadsubsurface-8380f096199d4da1e89789c9bd67974e550f2bf3.tar.gz
Renaming the prefs struct members to be consistent with the QSettings.
-Renaming prefs members for consistency. -Changing references of QSettings to the prefs structure instead. -Removing unused functions in pref.h were left over from an old version. -Changing the data-type of bool members to short for consistency with other members. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divecartesianaxis.cpp')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index f5ba988e8..2729647f3 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -353,10 +353,7 @@ QColor DepthAxis::colorForValue(double value)
static bool isPPGraphEnabled()
{
- QSettings s;
-
- s.beginGroup("TecDetails");
- return s.value("phegraph").toBool() || s.value("po2graph").toBool() || s.value("pn2graph").toBool();
+ return prefs.pp_graphs.po2 || prefs.pp_graphs.pn2 || prefs.pp_graphs.phe;
}
DepthAxis::DepthAxis() : showWithPPGraph(false)
@@ -426,11 +423,9 @@ void PartialGasPressureAxis::setModel(DivePlotDataModel *m)
void PartialGasPressureAxis::preferencesChanged()
{
- QSettings s;
- s.beginGroup("TecDetails");
- bool showPhe = s.value("phegraph").toBool();
- bool showPn2 = s.value("pn2graph").toBool();
- bool showPo2 = s.value("po2graph").toBool();
+ bool showPhe = prefs.pp_graphs.phe;
+ bool showPn2 = prefs.pp_graphs.pn2;
+ bool showPo2 = prefs.pp_graphs.po2;
setVisible(showPhe || showPn2 || showPo2);
if (!model->rowCount())
return;