summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp10
-rw-r--r--qt-ui/preferences.cpp4
-rw-r--r--qt-ui/preferences.h1
-rw-r--r--qt-ui/preferences.ui7
4 files changed, 19 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 23c972741..1f3d7def9 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -564,6 +564,13 @@ bool MainWindow::askSaveChanges()
else \
prefs.field = default_prefs.field
+#define GET_TXT(name, field) \
+ v = s.value(QString(name)); \
+ if (v.isValid()) \
+ prefs.field = strdup(v.toString().toUtf8().constData()); \
+ else \
+ prefs.field = default_prefs.field
+
void MainWindow::initialUiSetup()
{
@@ -623,7 +630,8 @@ void MainWindow::readSettings()
GET_BOOL("calcalltissues", calc_all_tissues);
GET_INT("gflow", gflow);
GET_INT("gfhigh", gfhigh);
- set_gf(prefs.gflow, prefs.gfhigh);
+ GET_BOOL("gf_low_at_maxdepth", gf_low_at_maxdepth);
+ set_gf(prefs.gflow, prefs.gfhigh, prefs.gf_low_at_maxdepth);
GET_BOOL("show_sac", show_sac);
s.endGroup();
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index f638d9d7d..0249c894f 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -55,6 +55,7 @@ void PreferencesDialog::setUiFromPrefs()
ui.gflow->setValue(prefs.gflow);
ui.gfhigh->setValue(prefs.gfhigh);
+ ui.gf_low_at_maxdepth->setChecked(prefs.gf_low_at_maxdepth);
// units
if (prefs.unit_system == METRIC)
@@ -111,7 +112,7 @@ void PreferencesDialog::syncSettings()
s.setValue("pn2threshold", ui.pn2Threshold->value());
SB("ead", ui.ead_end_eadd);
SB("mod", ui.mod);
- s.setValue("modppo2", ui.maxppo2->value());
+ s.setValue("modppO2", ui.maxppo2->value());
SB("dcceiling", ui.dc_reported_ceiling);
SB("redceiling", ui.red_ceiling);
SB("calcceiling", ui.calculated_ceiling);
@@ -120,6 +121,7 @@ void PreferencesDialog::syncSettings()
SB("calcalltissues", ui.all_tissues);
s.setValue("gflow", ui.gflow->value());
s.setValue("gfhigh", ui.gfhigh->value());
+ SB("gf_low_at_maxdepth", ui.gf_low_at_maxdepth);
SB("show_sac", ui.show_sac);
s.endGroup();
diff --git a/qt-ui/preferences.h b/qt-ui/preferences.h
index 1cd3d9096..fb0fcbc94 100644
--- a/qt-ui/preferences.h
+++ b/qt-ui/preferences.h
@@ -26,7 +26,6 @@ public slots:
private:
explicit PreferencesDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
void setUiFromPrefs();
- void setUIFromSettings();
Ui::PreferencesDialog ui;
struct preferences oldPrefs;
};
diff --git a/qt-ui/preferences.ui b/qt-ui/preferences.ui
index 7e071face..581670c91 100644
--- a/qt-ui/preferences.ui
+++ b/qt-ui/preferences.ui
@@ -763,6 +763,13 @@
<item row="1" column="1">
<widget class="QSpinBox" name="gfhigh"/>
</item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QCheckBox" name="gf_low_at_maxdepth">
+ <property name="text">
+ <string>GFLow at max depth</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>