diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-10-09 08:46:18 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-10-09 11:49:29 +0300 |
commit | 78cda85444a9b9ec384e19ec17686f2ce7c307ec (patch) | |
tree | 1e0e74006b7a9afdf7bd9046d1df459122c202ca /desktop-widgets | |
parent | 2cb5d45231b65a713cad0808badde250594b49de (diff) | |
download | subsurface-78cda85444a9b9ec384e19ec17686f2ce7c307ec.tar.gz |
Display units in dive list table based on prefs option
Add a preferences option which enables or disables display of units in the
main dive liste table.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/preferences/preferences_units.cpp | 2 | ||||
-rw-r--r-- | desktop-widgets/preferences/preferences_units.ui | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/desktop-widgets/preferences/preferences_units.cpp b/desktop-widgets/preferences/preferences_units.cpp index 9ff6eb0af..2ff09f192 100644 --- a/desktop-widgets/preferences/preferences_units.cpp +++ b/desktop-widgets/preferences/preferences_units.cpp @@ -43,6 +43,7 @@ void PreferencesUnits::refreshSettings() 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); + ui->show_units_table->setChecked(prefs.units.show_units_table); } void PreferencesUnits::syncSettings() @@ -60,4 +61,5 @@ void PreferencesUnits::syncSettings() 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()); } diff --git a/desktop-widgets/preferences/preferences_units.ui b/desktop-widgets/preferences/preferences_units.ui index 49ef80a22..d6c201d41 100644 --- a/desktop-widgets/preferences/preferences_units.ui +++ b/desktop-widgets/preferences/preferences_units.ui @@ -269,7 +269,23 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_11"> + <widget class="QGroupBox" name="groupBox_divelist"> + <property name="title"> + <string>Dive list table</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QCheckBox" name="show_units_table"> + <property name="text"> + <string>Show units in dive list table</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_gps"> <property name="title"> <string>GPS coordinates</string> </property> |