aboutsummaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefGeneral.cpp
diff options
context:
space:
mode:
authorGravatar willemferguson <willemferguson@zoology.up.ac.za>2019-12-09 20:58:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-25 02:57:42 +0900
commitb6c3cdb20cbcb1654c83d555d278476f55d3d103 (patch)
tree67c566c81e286391f804660f7cd0017ada058902 /core/settings/qPrefGeneral.cpp
parentb24caa4e2db42d300e3806ca3d13ce72202a24d8 (diff)
downloadsubsurface-b6c3cdb20cbcb1654c83d555d278476f55d3d103.tar.gz
Preferences UI: add dive log tab
This adds a tab for dive log - related preferences. A suitable test programs is still required. Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/settings/qPrefGeneral.cpp')
-rw-r--r--core/settings/qPrefGeneral.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/core/settings/qPrefGeneral.cpp b/core/settings/qPrefGeneral.cpp
index e3d3e6e0a..25ed835f0 100644
--- a/core/settings/qPrefGeneral.cpp
+++ b/core/settings/qPrefGeneral.cpp
@@ -20,15 +20,11 @@ qPrefGeneral *qPrefGeneral::instance()
void qPrefGeneral::loadSync(bool doSync)
{
- disk_default_filename(doSync);
- disk_default_file_behavior(doSync);
disk_defaultsetpoint(doSync);
disk_o2consumption(doSync);
disk_pscr_ratio(doSync);
- disk_use_default_file(doSync);
disk_filterFullTextNotes(doSync);
disk_filterCaseSensitive(doSync);
- disk_extraEnvironmentalDefault(doSync);
if (!doSync) {
load_diveshareExport_uid();
@@ -36,48 +32,12 @@ void qPrefGeneral::loadSync(bool doSync)
}
}
-HANDLE_PREFERENCE_TXT(General, "default_filename", default_filename);
-
-
-void qPrefGeneral::set_default_file_behavior(enum def_file_behavior value)
-{
- if (value != prefs.default_file_behavior ||
- prefs.default_file_behavior != UNDEFINED_DEFAULT_FILE) {
-
- if (value == UNDEFINED_DEFAULT_FILE) {
- // undefined, so check if there's a filename set and
- // use that, otherwise go with no default file
- prefs.default_file_behavior = QString(prefs.default_filename).isEmpty() ? NO_DEFAULT_FILE : LOCAL_DEFAULT_FILE;
- } else {
- prefs.default_file_behavior = value;
- }
- disk_default_file_behavior(true);
- emit instance()->default_file_behaviorChanged(value);
- }
-}
-void qPrefGeneral::disk_default_file_behavior(bool doSync)
-{
- if (doSync) {
- qPrefPrivate::propSetValue(keyFromGroupAndName(group, "default_file_behavior"), prefs.default_file_behavior, default_prefs.default_file_behavior);
- } else {
- prefs.default_file_behavior = (enum def_file_behavior)qPrefPrivate::propValue(keyFromGroupAndName(group, "default_file_behavior"), default_prefs.default_file_behavior).toInt();
- if (prefs.default_file_behavior == UNDEFINED_DEFAULT_FILE)
- // undefined, so check if there's a filename set and
- // use that, otherwise go with no default file
- prefs.default_file_behavior = QString(prefs.default_filename).isEmpty() ? NO_DEFAULT_FILE : LOCAL_DEFAULT_FILE;
- }
-}
-
HANDLE_PREFERENCE_INT(General, "defaultsetpoint", defaultsetpoint);
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);
HANDLE_PROP_BOOL(General, "diveshareExport/private", diveshareExport_private);