desktop UI: add preference for making salinity editable

Create a checkbox in the Preferences: General screen that enables or disables
editing of the salinity data. This preference is saved with all the other
preferences.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
willemferguson 2019-11-19 11:52:33 +02:00 committed by Dirk Hohndel
parent 95a0a0f5a6
commit 732d5a9fbd
6 changed files with 19 additions and 1 deletions

View file

@ -27,6 +27,7 @@ void PreferencesDefaults::refreshSettings()
ui->font->setCurrentFont(qPrefDisplay::divelist_font());
ui->fontsize->setValue(qPrefDisplay::font_size());
ui->velocitySlider->setValue(qPrefDisplay::animation_speed());
}
void PreferencesDefaults::syncSettings()

View file

@ -70,6 +70,7 @@ void PreferencesLog::refreshSettings()
ui->show_average_depth->setChecked(prefs.show_average_depth);
ui->displayinvalid->setChecked(qPrefDisplay::display_invalid_dives());
ui->extraEnvironmentalDefault->setChecked(prefs.extraEnvironmentalDefault);
ui->salinityEditDefault->setChecked(prefs.salinityEditDefault);
}
void PreferencesLog::syncSettings()
@ -87,4 +88,5 @@ void PreferencesLog::syncSettings()
qPrefLog::set_show_average_depth(ui->show_average_depth->isChecked());
qPrefDisplay::set_display_invalid_dives(ui->displayinvalid->isChecked());
qPrefLog::set_extraEnvironmentalDefault(ui->extraEnvironmentalDefault->isChecked());
qPrefLog::set_salinityEditDefault(ui->salinityEditDefault->isChecked());
}

View file

@ -129,6 +129,13 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="salinityEditDefault">
<property name="text">
<string>In the Information tab, allow editing of water salinity</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">