diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-01-28 20:48:41 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-29 09:33:01 -0800 |
commit | ae56119a9a617fd4e0f940cf31de6a2cc6f7cda0 (patch) | |
tree | af971c02116dcc05be48ef818f1175b181bafc9e | |
parent | 775b4f702acce9aa1acad1406164a7c55c1876fb (diff) | |
download | subsurface-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>
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 7 | ||||
-rw-r--r-- | qt-ui/profile/diveprofileitem.h | 1 |
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{ |