aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveprofileitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 2ffc7ec02..51d6a3f79 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -221,6 +221,7 @@ DiveHeartrateItem::DiveHeartrateItem()
pen.setCosmetic(true);
pen.setWidth(1);
setPen(pen);
+ visible = true;
}
void DiveHeartrateItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
@@ -297,6 +298,27 @@ void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
painter->drawPolyline(polygon());
}
+void DiveHeartrateItem::preferencesChanged()
+{
+ QSettings s;
+ s.beginGroup("TecDetails");
+ setVisible(s.value(visibilityKey).toBool());
+ if (s.value(visibilityKey).toBool())
+ visible = true;
+ else
+ visible = false;
+}
+
+void DiveHeartrateItem::setVisibilitySettingsKey(const QString &key)
+{
+ visibilityKey = key;
+}
+
+bool DiveHeartrateItem::isVisible()
+{
+ return visible == true;
+}
+
DiveTemperatureItem::DiveTemperatureItem()
{
QPen pen;