diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-05-06 13:44:22 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-06 13:49:36 -0700 |
commit | 876b479d695acda652e7b6c81c6b899946d42a85 (patch) | |
tree | cc01ab6c306c94e0d542fd43000d11f62e056cd8 /desktop-widgets | |
parent | 38b9185974e4f5199ee8f65bac97dab76b058e41 (diff) | |
download | subsurface-876b479d695acda652e7b6c81c6b899946d42a85.tar.gz |
Wire up duration units preference UI
Now we track the preference, but we don't act on it, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/preferences/preferences_units.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop-widgets/preferences/preferences_units.cpp b/desktop-widgets/preferences/preferences_units.cpp index 2717688a6..9ff6eb0af 100644 --- a/desktop-widgets/preferences/preferences_units.cpp +++ b/desktop-widgets/preferences/preferences_units.cpp @@ -40,6 +40,9 @@ void PreferencesUnits::refreshSettings() ui->vertical_speed_minutes->setChecked(prefs.units.vertical_speed_time == units::MINUTES); ui->vertical_speed_seconds->setChecked(prefs.units.vertical_speed_time == units::SECONDS); + ui->duration_mixed->setChecked(prefs.units.duration_units == units::MIXED); + ui->duration_no_hours->setChecked(prefs.units.duration_units == units::MINUTES_ONLY); + ui->duration_show_hours->setChecked(prefs.units.duration_units == units::ALWAYS_HOURS); } void PreferencesUnits::syncSettings() @@ -56,4 +59,5 @@ void PreferencesUnits::syncSettings() 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)); } |