summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/SettingsObjectWrapper.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2018-02-05 15:58:25 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-02-10 10:26:34 +0100
commit920aa613c9a422d3f232b355524db7f5a7f0342f (patch)
tree9d6d68a4e77dff06b078adc99b85987022deaf16 /core/subsurface-qt/SettingsObjectWrapper.cpp
parentf9f1630d5c040344b7f8dbaf02348ec5f2b4c7dd (diff)
downloadsubsurface-920aa613c9a422d3f232b355524db7f5a7f0342f.tar.gz
Add a preference to turn on ICD warnings
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.cpp')
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index 7dff976fb..54b03aaf9 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -423,6 +423,11 @@ bool TechnicalDetailsSettings::showAverageDepth() const
return prefs.show_average_depth;
}
+bool TechnicalDetailsSettings::showIcd() const
+{
+ return prefs.show_icd;
+}
+
bool TechnicalDetailsSettings::mod() const
{
return prefs.mod;
@@ -718,6 +723,17 @@ void TechnicalDetailsSettings::setShowAverageDepth(bool value)
emit showAverageDepthChanged(value);
}
+void TechnicalDetailsSettings::setShowIcd(bool value)
+{
+ if (value == prefs.show_icd)
+ return;
+ QSettings s;
+ s.beginGroup(group);
+ s.setValue("show_icd", value);
+ prefs.show_icd = value;
+ emit showIcdChanged(value);
+}
+
FacebookSettings::FacebookSettings(QObject *parent) :
QObject(parent),
group(QStringLiteral("WebApps")),