mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Create a text entry for default cylinder in preferences
We don't do anything with this just yet. And frankly, a drop down of the cylinders that we know of would be even better. But hey, it's a start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
03a0678b00
commit
8e5c222e98
4 changed files with 32 additions and 5 deletions
1
pref.h
1
pref.h
|
@ -18,6 +18,7 @@ typedef struct {
|
|||
struct preferences {
|
||||
const char *divelist_font;
|
||||
const char *default_filename;
|
||||
const char *default_cylinder;
|
||||
double font_size;
|
||||
partial_pressure_graphs_t pp_graphs;
|
||||
short mod;
|
||||
|
|
|
@ -652,6 +652,7 @@ void MainWindow::readSettings()
|
|||
|
||||
s.beginGroup("GeneralSettings");
|
||||
GET_TXT("default_filename", default_filename);
|
||||
GET_TXT("default_cylinder", default_cylinder);
|
||||
s.endGroup();
|
||||
|
||||
s.beginGroup("Display");
|
||||
|
|
|
@ -78,6 +78,7 @@ void PreferencesDialog::setUiFromPrefs()
|
|||
ui.font->setFont(QString(prefs.divelist_font));
|
||||
ui.fontsize->setValue(prefs.font_size);
|
||||
ui.defaultfilename->setText(prefs.default_filename);
|
||||
ui.defaultcylinder->setText(prefs.default_cylinder);
|
||||
ui.displayinvalid->setChecked(prefs.display_invalid_dives);
|
||||
ui.show_sac->setChecked(prefs.show_sac);
|
||||
ui.vertical_speed_minutes->setChecked(prefs.units.vertical_speed_time == units::MINUTES);
|
||||
|
@ -139,6 +140,7 @@ void PreferencesDialog::syncSettings()
|
|||
// Defaults
|
||||
s.beginGroup("GeneralSettings");
|
||||
s.value("default_filename", ui.defaultfilename->text());
|
||||
s.value("default_cylinder", ui.defaultcylinder->text());
|
||||
s.endGroup();
|
||||
|
||||
s.beginGroup("Display");
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3b">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="defaultfilename"/>
|
||||
</item>
|
||||
|
@ -193,6 +193,29 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_6">
|
||||
<property name="title">
|
||||
<string>Default Cylinder</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Use Default Cylinder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="defaultcylinder"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
|
@ -252,7 +275,7 @@
|
|||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="groupBox11">
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
|
@ -404,13 +427,13 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Time units</string>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
<widget class="QLabel" name="label13">
|
||||
<property name="text">
|
||||
<string>Ascent/Descent speed denominator</string>
|
||||
</property>
|
||||
|
@ -717,7 +740,7 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Calculate NDL/TTS</string>
|
||||
<string>Calculate NDL/TTS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue