summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt/SettingsObjectWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.cpp')
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp65
1 files changed, 2 insertions, 63 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index 1fb770c56..ba03fc336 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -134,60 +134,6 @@ void PartialPressureGasSettings::setPheThreshold(double value)
emit pheThresholdChanged(value);
}
-GeocodingPreferences::GeocodingPreferences(QObject *parent) :
- QObject(parent)
-{
-
-}
-
-taxonomy_category GeocodingPreferences::firstTaxonomyCategory() const
-{
- return prefs.geocoding.category[0];
-}
-
-taxonomy_category GeocodingPreferences::secondTaxonomyCategory() const
-{
- return prefs.geocoding.category[1];
-}
-
-taxonomy_category GeocodingPreferences::thirdTaxonomyCategory() const
-{
- return prefs.geocoding.category[2];
-}
-
-void GeocodingPreferences::setFirstTaxonomyCategory(taxonomy_category value)
-{
- if (value == prefs.geocoding.category[0])
- return;
- QSettings s;
- s.beginGroup(group);
- s.setValue("cat0", value);
- prefs.geocoding.category[0] = value;
- emit firstTaxonomyCategoryChanged(value);
-}
-
-void GeocodingPreferences::setSecondTaxonomyCategory(taxonomy_category value)
-{
- if (value == prefs.geocoding.category[1])
- return;
- QSettings s;
- s.beginGroup(group);
- s.setValue("cat1", value);
- prefs.geocoding.category[1]= value;
- emit secondTaxonomyCategoryChanged(value);
-}
-
-void GeocodingPreferences::setThirdTaxonomyCategory(taxonomy_category value)
-{
- if (value == prefs.geocoding.category[2])
- return;
- QSettings s;
- s.beginGroup(group);
- s.setValue("cat2", value);
- prefs.geocoding.category[2] = value;
- emit thirdTaxonomyCategoryChanged(value);
-}
-
GeneralSettingsObjectWrapper::GeneralSettingsObjectWrapper(QObject *parent) :
QObject(parent)
{
@@ -395,7 +341,7 @@ QObject(parent),
techDetails(new qPrefTechnicalDetails(this)),
pp_gas(new PartialPressureGasSettings(this)),
facebook(new qPrefFacebook(this)),
- geocoding(new GeocodingPreferences(this)),
+ geocoding(new qPrefGeocoding(this)),
proxy(new qPrefProxy(this)),
cloud_storage(new qPrefCloudStorage(this)),
planner_settings(new qPrefDivePlanner(this)),
@@ -443,14 +389,7 @@ void SettingsObjectWrapper::load()
qPrefCloudStorage::instance()->load();
qPrefDisplay::instance()->load();
qPrefProxy::instance()->load();
-
- // GeoManagement
- s.beginGroup("geocoding");
-
- GET_ENUM("cat0", taxonomy_category, geocoding.category[0]);
- GET_ENUM("cat1", taxonomy_category, geocoding.category[1]);
- GET_ENUM("cat2", taxonomy_category, geocoding.category[2]);
- s.endGroup();
+ qPrefGeocoding::instance()->load();
// GPS service time and distance thresholds
qPrefLocationService::instance()->load();