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 {
|
struct preferences {
|
||||||
const char *divelist_font;
|
const char *divelist_font;
|
||||||
const char *default_filename;
|
const char *default_filename;
|
||||||
|
const char *default_cylinder;
|
||||||
double font_size;
|
double font_size;
|
||||||
partial_pressure_graphs_t pp_graphs;
|
partial_pressure_graphs_t pp_graphs;
|
||||||
short mod;
|
short mod;
|
||||||
|
|
|
@ -652,6 +652,7 @@ void MainWindow::readSettings()
|
||||||
|
|
||||||
s.beginGroup("GeneralSettings");
|
s.beginGroup("GeneralSettings");
|
||||||
GET_TXT("default_filename", default_filename);
|
GET_TXT("default_filename", default_filename);
|
||||||
|
GET_TXT("default_cylinder", default_cylinder);
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
s.beginGroup("Display");
|
s.beginGroup("Display");
|
||||||
|
|
|
@ -78,6 +78,7 @@ void PreferencesDialog::setUiFromPrefs()
|
||||||
ui.font->setFont(QString(prefs.divelist_font));
|
ui.font->setFont(QString(prefs.divelist_font));
|
||||||
ui.fontsize->setValue(prefs.font_size);
|
ui.fontsize->setValue(prefs.font_size);
|
||||||
ui.defaultfilename->setText(prefs.default_filename);
|
ui.defaultfilename->setText(prefs.default_filename);
|
||||||
|
ui.defaultcylinder->setText(prefs.default_cylinder);
|
||||||
ui.displayinvalid->setChecked(prefs.display_invalid_dives);
|
ui.displayinvalid->setChecked(prefs.display_invalid_dives);
|
||||||
ui.show_sac->setChecked(prefs.show_sac);
|
ui.show_sac->setChecked(prefs.show_sac);
|
||||||
ui.vertical_speed_minutes->setChecked(prefs.units.vertical_speed_time == units::MINUTES);
|
ui.vertical_speed_minutes->setChecked(prefs.units.vertical_speed_time == units::MINUTES);
|
||||||
|
@ -139,6 +140,7 @@ void PreferencesDialog::syncSettings()
|
||||||
// Defaults
|
// Defaults
|
||||||
s.beginGroup("GeneralSettings");
|
s.beginGroup("GeneralSettings");
|
||||||
s.value("default_filename", ui.defaultfilename->text());
|
s.value("default_filename", ui.defaultfilename->text());
|
||||||
|
s.value("default_cylinder", ui.defaultcylinder->text());
|
||||||
s.endGroup();
|
s.endGroup();
|
||||||
|
|
||||||
s.beginGroup("Display");
|
s.beginGroup("Display");
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3b">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="defaultfilename"/>
|
<widget class="QLineEdit" name="defaultfilename"/>
|
||||||
</item>
|
</item>
|
||||||
|
@ -193,6 +193,29 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<spacer name="verticalSpacer_2">
|
<spacer name="verticalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -252,7 +275,7 @@
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox11">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
@ -404,13 +427,13 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QHBoxLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Time units</string>
|
<string>Time units</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout">
|
<layout class="QGridLayout">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel">
|
<widget class="QLabel" name="label13">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Ascent/Descent speed denominator</string>
|
<string>Ascent/Descent speed denominator</string>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in a new issue