summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/diveplanner.cpp
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-11-02 20:39:58 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2017-11-04 14:51:02 +0100
commit57032e9fcb3f892ffc64e4985ed27bd50a40bf20 (patch)
treed6bab7d72ec46cff68efae546ed6d4184f8c51e7 /desktop-widgets/diveplanner.cpp
parent8b56dc30d78aabc697749a8542d6d4f39b63f44d (diff)
downloadsubsurface-57032e9fcb3f892ffc64e4985ed27bd50a40bf20.tar.gz
In planner for different deco modes enable/disable options correctly
Disable option "safety stop" for all deco modes other than "recreational". Disable also labels "reserve gas", "GF ..." and "VPM conservatism" correctly. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'desktop-widgets/diveplanner.cpp')
-rw-r--r--desktop-widgets/diveplanner.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp
index 2f3fd49c5..38d41d59a 100644
--- a/desktop-widgets/diveplanner.cpp
+++ b/desktop-widgets/diveplanner.cpp
@@ -250,13 +250,18 @@ void PlannerSettingsWidget::decoSacChanged(const double decosac)
void PlannerSettingsWidget::disableDecoElements(int mode)
{
if (mode == RECREATIONAL) {
+ ui.label_gflow->setDisabled(false);
+ ui.label_gfhigh->setDisabled(false);
ui.gflow->setDisabled(false);
ui.gfhigh->setDisabled(false);
ui.lastStop->setDisabled(true);
ui.backgasBreaks->setDisabled(true);
ui.bottompo2->setDisabled(false);
ui.decopo2->setDisabled(true);
+ ui.safetystop->setDisabled(false);
+ ui.label_reserve_gas->setDisabled(false);
ui.reserve_gas->setDisabled(false);
+ ui.label_vpmb_conservatism->setDisabled(true);
ui.vpmb_conservatism->setDisabled(true);
ui.switch_at_req_stop->setDisabled(true);
ui.min_switch_duration->setDisabled(true);
@@ -270,13 +275,18 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.problemsolvingtime->blockSignals(false);
}
else if (mode == VPMB) {
+ ui.label_gflow->setDisabled(true);
+ ui.label_gfhigh->setDisabled(true);
ui.gflow->setDisabled(true);
ui.gfhigh->setDisabled(true);
ui.lastStop->setDisabled(false);
ui.backgasBreaks->setDisabled(false);
ui.bottompo2->setDisabled(false);
ui.decopo2->setDisabled(false);
+ ui.safetystop->setDisabled(true);
+ ui.label_reserve_gas->setDisabled(true);
ui.reserve_gas->setDisabled(true);
+ ui.label_vpmb_conservatism->setDisabled(false);
ui.vpmb_conservatism->setDisabled(false);
ui.switch_at_req_stop->setDisabled(false);
ui.min_switch_duration->setDisabled(false);
@@ -286,13 +296,18 @@ void PlannerSettingsWidget::disableDecoElements(int mode)
ui.problemsolvingtime->setValue(prefs.problemsolvingtime);
}
else if (mode == BUEHLMANN) {
+ ui.label_gflow->setDisabled(false);
+ ui.label_gfhigh->setDisabled(false);
ui.gflow->setDisabled(false);
ui.gfhigh->setDisabled(false);
ui.lastStop->setDisabled(false);
ui.backgasBreaks->setDisabled(false);
ui.bottompo2->setDisabled(false);
ui.decopo2->setDisabled(false);
+ ui.safetystop->setDisabled(true);
+ ui.label_reserve_gas->setDisabled(true);
ui.reserve_gas->setDisabled(true);
+ ui.label_vpmb_conservatism->setDisabled(true);
ui.vpmb_conservatism->setDisabled(true);
ui.switch_at_req_stop->setDisabled(false);
ui.min_switch_duration->setDisabled(false);