diff options
author | jan Iversen <jani@apache.org> | 2018-07-31 18:40:59 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-02 08:59:56 -0700 |
commit | affdc9d39428e5aa50564e3c5cb6a513b7f2a01c (patch) | |
tree | c97cd82f4442cdac9ce499dcfb9a4169d4dcc1be /desktop-widgets | |
parent | 54335e1ec680216bc0fd15fa880e7dbc23d098a6 (diff) | |
download | subsurface-affdc9d39428e5aa50564e3c5cb6a513b7f2a01c.tar.gz |
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 <jani@apache.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/preferences/preferences_units.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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()); } |