summaryrefslogtreecommitdiffstats
path: root/profile-widget/diveprofileitem.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2016-01-25 17:20:18 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-25 13:04:21 -0800
commit2d3f7f0a902f63992a7b5ea5207583adb168439d (patch)
tree3fd29f05ebb3e409182d9f19eebdbd4c8f16a9c9 /profile-widget/diveprofileitem.cpp
parent2d9613956618105030611f7c785d7dbdd5c5c672 (diff)
downloadsubsurface-2d3f7f0a902f63992a7b5ea5207583adb168439d.tar.gz
More Profile Itens on the new Settings
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget/diveprofileitem.cpp')
-rw-r--r--profile-widget/diveprofileitem.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index f567801ce..e46adca18 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -784,6 +784,8 @@ DiveCalculatedCeiling::DiveCalculatedCeiling(ProfileWidget2 *widget) :
profileWidget(widget),
is3mIncrement(false)
{
+ connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::dcceilingChanged, this, &DiveCalculatedCeiling::setVisible);
+ setVisible(prefs.calcceiling);
settingsChanged();
}
@@ -835,7 +837,7 @@ void DiveCalculatedTissue::setVisible(bool visible)
void DiveCalculatedTissue::settingsChanged()
{
- setVisible(prefs.calcalltissues && prefs.calcceiling);
+ DiveCalculatedCeiling::setVisible(prefs.calcalltissues && prefs.calcceiling);
}
void DiveReportedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
@@ -879,12 +881,6 @@ void DiveCalculatedCeiling::settingsChanged()
recalc();
}
is3mIncrement = prefs.calcceiling3m;
- setVisible(prefs.calcceiling);
-}
-
-void DiveReportedCeiling::settingsChanged()
-{
- setVisible(prefs.dcceiling);
}
void DiveReportedCeiling::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
@@ -956,18 +952,6 @@ PartialPressureGasItem::PartialPressureGasItem() :
{
}
-void PartialPressureGasItem::settingsChanged()
-{
- QSettings s;
- s.beginGroup("TecDetails");
- setVisible(s.value(visibilityKey).toBool());
-}
-
-void PartialPressureGasItem::setVisibilitySettingsKey(const QString &key)
-{
- visibilityKey = key;
-}
-
void PartialPressureGasItem::setColors(const QColor &normal, const QColor &alert)
{
normalColor = normal;