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>
This commit is contained in:
Robert C. Helling 2015-05-20 12:25:46 +02:00 committed by Dirk Hohndel
parent 0e78915c7e
commit 187f7dab9f
5 changed files with 183 additions and 136 deletions

View file

@ -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);