diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-05-20 12:25:46 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-20 10:34:10 -0700 |
commit | 187f7dab9fb6fba4ee798beda707e82b1aeb32f0 (patch) | |
tree | 9437285e952a079f11d5a3bd0707433da093096c /qt-ui/preferences.cpp | |
parent | 0e78915c7e28166872039ba31448fe7615fb4661 (diff) | |
download | subsurface-187f7dab9fb6fba4ee798beda707e82b1aeb32f0.tar.gz |
Add option to display GPS coordinates as decimals
This adds a field to the units preferences to have GPS coordinates
show as decimals (as for example Google maps does it).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r-- | qt-ui/preferences.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index e4f97002e..aeccc961c 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -146,6 +146,8 @@ void PreferencesDialog::setUiFromPrefs() ui.imperial->setChecked(true); else ui.personalize->setChecked(true); + ui.gpsTraditional->setChecked(prefs.coordinates_traditional); + ui.gpsDecimal->setChecked(!prefs.coordinates_traditional); ui.celsius->setChecked(prefs.units.temperature == units::CELSIUS); ui.fahrenheit->setChecked(prefs.units.temperature == units::FAHRENHEIT); @@ -306,6 +308,7 @@ void PreferencesDialog::syncSettings() s.setValue("volume", ui.cuft->isChecked() ? units::CUFT : units::LITER); s.setValue("weight", ui.lbs->isChecked() ? units::LBS : units::KG); s.setValue("vertical_speed_time", ui.vertical_speed_minutes->isChecked() ? units::MINUTES : units::SECONDS); + s.setValue("coordinates", ui.gpsTraditional->isChecked()); s.endGroup(); // Defaults @@ -384,6 +387,7 @@ void PreferencesDialog::loadSettings() GET_UNIT("weight", weight, units::LBS, units::KG); } GET_UNIT("vertical_speed_time", vertical_speed_time, units::MINUTES, units::SECONDS); + GET_BOOL("coordinates", coordinates_traditional); s.endGroup(); s.beginGroup("TecDetails"); GET_BOOL("po2graph", pp_graphs.po2); |