aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-28 20:48:41 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-29 09:33:01 -0800
commitae56119a9a617fd4e0f940cf31de6a2cc6f7cda0 (patch)
treeaf971c02116dcc05be48ef818f1175b181bafc9e /qt-ui
parent775b4f702acce9aa1acad1406164a7c55c1876fb (diff)
downloadsubsurface-ae56119a9a617fd4e0f940cf31de6a2cc6f7cda0.tar.gz
Make the calculated ceiling be preferences aware
This patch only adds preference-awareness for the ceiling. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp7
-rw-r--r--qt-ui/profile/diveprofileitem.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 23c41a708..d72a83834 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -438,6 +438,13 @@ void DiveReportedCeiling::modelDataChanged()
setBrush(pat);
}
+void DiveCalculatedCeiling::preferencesChanged()
+{
+ QSettings s;
+ s.beginGroup("TecDetails");
+ setVisible(s.value("calcceiling").toBool());
+}
+
void DiveReportedCeiling::preferencesChanged()
{
QSettings s;
diff --git a/qt-ui/profile/diveprofileitem.h b/qt-ui/profile/diveprofileitem.h
index 5c35bf7a2..41bb05329 100644
--- a/qt-ui/profile/diveprofileitem.h
+++ b/qt-ui/profile/diveprofileitem.h
@@ -92,6 +92,7 @@ class DiveCalculatedCeiling : public AbstractProfilePolygonItem{
public:
virtual void modelDataChanged();
virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ virtual void preferencesChanged();
};
class DiveReportedCeiling : public AbstractProfilePolygonItem{