aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/pref.h1
-rw-r--r--core/settings/qPrefGeneral.cpp3
-rw-r--r--core/settings/qPrefGeneral.h7
-rw-r--r--desktop-widgets/preferences/preferences_defaults.cpp2
-rw-r--r--desktop-widgets/preferences/preferences_defaults.ui16
5 files changed, 29 insertions, 0 deletions
diff --git a/core/pref.h b/core/pref.h
index f7af35415..b02d9df99 100644
--- a/core/pref.h
+++ b/core/pref.h
@@ -119,6 +119,7 @@ struct preferences {
bool use_default_file;
bool filterFullTextNotes; // mobile only - include notes information in full text searh
bool filterCaseSensitive; // mobile only - make fltering case sensitive
+ bool extraEnvironmentalDefault;
// ********** Geocoding **********
geocoding_prefs_t geocoding;
diff --git a/core/settings/qPrefGeneral.cpp b/core/settings/qPrefGeneral.cpp
index c0e8026fe..a04198d7a 100644
--- a/core/settings/qPrefGeneral.cpp
+++ b/core/settings/qPrefGeneral.cpp
@@ -38,6 +38,7 @@ void qPrefGeneral::loadSync(bool doSync)
disk_use_default_file(doSync);
disk_filterFullTextNotes(doSync);
disk_filterCaseSensitive(doSync);
+ disk_extraEnvironmentalDefault(doSync);
if (!doSync) {
load_diveshareExport_uid();
@@ -93,6 +94,8 @@ HANDLE_PREFERENCE_INT(General, "o2consumption", o2consumption);
HANDLE_PREFERENCE_INT(General, "pscr_ratio", pscr_ratio);
+HANDLE_PREFERENCE_BOOL(General, "extraEnvironmentalDefault", extraEnvironmentalDefault);
+
HANDLE_PREFERENCE_BOOL(General, "use_default_file", use_default_file);
HANDLE_PROP_QSTRING(General, "diveshareExport/uid", diveshareExport_uid);
diff --git a/core/settings/qPrefGeneral.h b/core/settings/qPrefGeneral.h
index 2d0bde937..ec264203b 100644
--- a/core/settings/qPrefGeneral.h
+++ b/core/settings/qPrefGeneral.h
@@ -22,6 +22,8 @@ class qPrefGeneral : public QObject {
Q_PROPERTY(bool diveshareExport_private READ diveshareExport_private WRITE set_diveshareExport_private NOTIFY diveshareExport_privateChanged);
Q_PROPERTY(bool filterFullTextNotes READ filterFullTextNotes WRITE set_filterFullTextNotes NOTIFY filterFullTextNotesChanged)
Q_PROPERTY(bool filterCaseSensitive READ filterCaseSensitive WRITE set_filterCaseSensitive NOTIFY filterCaseSensitiveChanged)
+ Q_PROPERTY(bool extraEnvironmentalDefault READ extraEnvironmentalDefault WRITE set_extraEnvironmentalDefault NOTIFY extraEnvironmentalDefaultChanged);
+
public:
qPrefGeneral(QObject *parent = NULL);
@@ -48,6 +50,7 @@ public:
static bool diveshareExport_private() { return st_diveshareExport_private; }
static bool filterFullTextNotes() { return prefs.filterFullTextNotes; }
static bool filterCaseSensitive() { return prefs.filterCaseSensitive; }
+ static bool extraEnvironmentalDefault() { return prefs.extraEnvironmentalDefault; }
public slots:
static void set_auto_recalculate_thumbnails(bool value);
@@ -65,6 +68,7 @@ public slots:
static void set_diveshareExport_private(bool value);
static void set_filterFullTextNotes(bool value);
static void set_filterCaseSensitive(bool value);
+ static void set_extraEnvironmentalDefault(bool value);
signals:
void auto_recalculate_thumbnailsChanged(bool value);
@@ -81,7 +85,9 @@ signals:
void diveshareExport_uidChanged(const QString& value);
void diveshareExport_privateChanged(bool value);
void filterFullTextNotesChanged(bool value);
+ void salinityEditDefaultChanged(bool value);
void filterCaseSensitiveChanged(bool value);
+ void extraEnvironmentalDefaultChanged(bool value);
private:
static void disk_auto_recalculate_thumbnails(bool doSync);
@@ -97,6 +103,7 @@ private:
static void disk_use_default_file(bool doSync);
static void disk_filterFullTextNotes(bool doSync);
static void disk_filterCaseSensitive(bool doSync);
+ static void disk_extraEnvironmentalDefault(bool doSync);
// class variables are load only
static void load_diveshareExport_uid();
diff --git a/desktop-widgets/preferences/preferences_defaults.cpp b/desktop-widgets/preferences/preferences_defaults.cpp
index c11927af8..f439b0702 100644
--- a/desktop-widgets/preferences/preferences_defaults.cpp
+++ b/desktop-widgets/preferences/preferences_defaults.cpp
@@ -138,6 +138,7 @@ void PreferencesDefaults::refreshSettings()
ui->extractVideoThumbnails->setChecked(qPrefGeneral::extract_video_thumbnails());
ui->videoThumbnailPosition->setValue(qPrefGeneral::extract_video_thumbnails_position());
ui->ffmpegExecutable->setText(qPrefGeneral::ffmpeg_executable());
+ ui->extraEnvironmentalDefault->setChecked(prefs.extraEnvironmentalDefault);
}
void PreferencesDefaults::syncSettings()
@@ -160,4 +161,5 @@ void PreferencesDefaults::syncSettings()
qPrefDisplay::set_font_size(ui->fontsize->value());
qPrefDisplay::set_display_invalid_dives(ui->displayinvalid->isChecked());
qPrefDisplay::set_animation_speed(ui->velocitySlider->value());
+ qPrefGeneral::set_extraEnvironmentalDefault(ui->extraEnvironmentalDefault->isChecked());
}
diff --git a/desktop-widgets/preferences/preferences_defaults.ui b/desktop-widgets/preferences/preferences_defaults.ui
index 7fcd53a36..b1538f33d 100644
--- a/desktop-widgets/preferences/preferences_defaults.ui
+++ b/desktop-widgets/preferences/preferences_defaults.ui
@@ -306,6 +306,22 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="groupBox_extra_star_widgets">
+ <property name="title">
+ <string>Environmental parameters in Information tab</string>
+ </property>
+ <layout class="QHBoxLayout" name="extraWidgetLayout">
+ <item>
+ <widget class="QCheckBox" name="extraEnvironmentalDefault">
+ <property name="text">
+ <string>Show extended range of environmental paramaters</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>