From affdc9d39428e5aa50564e3c5cb6a513b7f2a01c Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Tue, 31 Jul 2018 18:40:59 +0200 Subject: core: activate qPrefUnits remove Units from SettingsObjectWrapper and reference qPrefUnits update files using SettingsObjectWrapper/Units to use qPrefUnits this activated qPrefUnits and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen --- desktop-widgets/preferences/preferences_units.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/preferences/preferences_units.cpp b/desktop-widgets/preferences/preferences_units.cpp index 1dc006fc8..7985ffb0c 100644 --- a/desktop-widgets/preferences/preferences_units.cpp +++ b/desktop-widgets/preferences/preferences_units.cpp @@ -51,14 +51,14 @@ void PreferencesUnits::syncSettings() QString unitSystem[] = {"metric", "imperial", "personal"}; short unitValue = ui->metric->isChecked() ? METRIC : (ui->imperial->isChecked() ? IMPERIAL : PERSONALIZE); - units->setUnitSystem(unitSystem[unitValue]); - units->setTemperature(ui->fahrenheit->isChecked() ? units::FAHRENHEIT : units::CELSIUS); - units->setLength(ui->feet->isChecked() ? units::FEET : units::METERS); - units->setPressure(ui->psi->isChecked() ? units::PSI : units::BAR); - units->setVolume(ui->cuft->isChecked() ? units::CUFT : units::LITER); - units->setWeight(ui->lbs->isChecked() ? units::LBS : units::KG); - units->setVerticalSpeedTime(ui->vertical_speed_minutes->isChecked() ? units::MINUTES : units::SECONDS); - units->setCoordinatesTraditional(ui->gpsTraditional->isChecked()); - units->setDurationUnits(ui->duration_mixed->isChecked() ? units::MIXED : (ui->duration_no_hours->isChecked() ? units::MINUTES_ONLY : units::ALWAYS_HOURS)); - units->setShowUnitsTable(ui->show_units_table->isChecked()); + units->set_unit_system(unitSystem[unitValue]); + units->set_temperature(ui->fahrenheit->isChecked() ? units::FAHRENHEIT : units::CELSIUS); + units->set_length(ui->feet->isChecked() ? units::FEET : units::METERS); + units->set_pressure(ui->psi->isChecked() ? units::PSI : units::BAR); + units->set_volume(ui->cuft->isChecked() ? units::CUFT : units::LITER); + units->set_weight(ui->lbs->isChecked() ? units::LBS : units::KG); + units->set_vertical_speed_time(ui->vertical_speed_minutes->isChecked() ? units::MINUTES : units::SECONDS); + units->set_coordinates_traditional(ui->gpsTraditional->isChecked()); + units->set_duration_units(ui->duration_mixed->isChecked() ? units::MIXED : (ui->duration_no_hours->isChecked() ? units::MINUTES_ONLY : units::ALWAYS_HOURS)); + units->set_show_units_table(ui->show_units_table->isChecked()); } -- cgit v1.2.3-70-g09d2