summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp1
-rw-r--r--qt-ui/preferences.cpp3
-rw-r--r--qt-ui/preferences.ui11
3 files changed, 15 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 3b56134c1..d9019fa00 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -587,6 +587,7 @@ void MainWindow::readSettings()
GET_INT("gfhigh", gfhigh);
set_gf(prefs.gflow, prefs.gfhigh);
GET_BOOL("show_time", show_time);
+ GET_BOOL("show_sac", show_sac);
s.endGroup();
s.beginGroup("Display");
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index e5ddc558d..4ba8739a3 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -74,6 +74,7 @@ void PreferencesDialog::setUiFromPrefs()
ui.defaultfilename->setText(prefs.default_filename);
ui.displayinvalid->setChecked(prefs.show_invalid);
ui.show_time->setChecked(prefs.show_time);
+ ui.show_sac->setChecked(prefs.show_sac);
ui.vertical_speed_minutes->setChecked(prefs.units.vertical_speed_time == units::MINUTES);
ui.vertical_speed_seconds->setChecked(prefs.units.vertical_speed_time == units::SECONDS);
}
@@ -118,6 +119,7 @@ void PreferencesDialog::setPrefsFromUi()
prefs.default_filename = strdup(ui.defaultfilename->text().toUtf8().data());
prefs.display_invalid_dives = ui.displayinvalid->isChecked();
SP(show_time, ui.show_time);
+ SP(show_sac, ui.show_sac);
}
#define SB(V, B) s.setValue(V, (int)(B->isChecked() ? 1 : 0))
@@ -144,6 +146,7 @@ void PreferencesDialog::syncSettings()
s.setValue("gflow", ui.gflow->value());
s.setValue("gfhigh", ui.gfhigh->value());
SB("show_time", ui.show_time);
+ SB("show_sac", ui.show_sac);
s.endGroup();
// Units
diff --git a/qt-ui/preferences.ui b/qt-ui/preferences.ui
index 18767a790..df7333837 100644
--- a/qt-ui/preferences.ui
+++ b/qt-ui/preferences.ui
@@ -724,6 +724,17 @@
</item>
</layout>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_11b">
+ <item>
+ <widget class="QCheckBox" name="show_sac">
+ <property name="text">
+ <string>Show SAC</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
</item>