mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop-widgets: replace vars. qPrefDivePlanner -> plannerShared
change local setBailout to plannerShared and update connect. change signals to slots in plannerShared Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
87f680f5e7
commit
df6f01a6f6
2 changed files with 2 additions and 9 deletions
|
@ -450,7 +450,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
||||||
ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
|
ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
|
||||||
ui.decopo2->setValue(prefs.decopo2 / 1000.0);
|
ui.decopo2->setValue(prefs.decopo2 / 1000.0);
|
||||||
ui.backgasBreaks->setChecked(prefs.doo2breaks);
|
ui.backgasBreaks->setChecked(prefs.doo2breaks);
|
||||||
setBailout(false);
|
plannerShared::set_dobailout(false);
|
||||||
setBailoutVisibility(false);
|
setBailoutVisibility(false);
|
||||||
ui.o2narcotic->setChecked(prefs.o2narcotic);
|
ui.o2narcotic->setChecked(prefs.o2narcotic);
|
||||||
ui.drop_stone_mode->setChecked(prefs.drop_stone_mode);
|
ui.drop_stone_mode->setChecked(prefs.drop_stone_mode);
|
||||||
|
@ -497,7 +497,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
||||||
connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
|
connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
|
||||||
connect(ui.vpmb_conservatism, SIGNAL(valueChanged(int)), plannerModel, SLOT(setVpmbConservatism(int)));
|
connect(ui.vpmb_conservatism, SIGNAL(valueChanged(int)), plannerModel, SLOT(setVpmbConservatism(int)));
|
||||||
connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
|
connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
|
||||||
connect(ui.bailout, SIGNAL(toggled(bool)), this, SLOT(setBailout(bool)));
|
connect(ui.bailout, SIGNAL(toggled(bool)), plannerShared::instance(), SLOT(set_bailout(bool)));
|
||||||
connect(ui.o2narcotic, SIGNAL(toggled(bool)), this, SLOT(setO2narcotic(bool)));
|
connect(ui.o2narcotic, SIGNAL(toggled(bool)), this, SLOT(setO2narcotic(bool)));
|
||||||
connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSwitchAtReqStop(bool)));
|
connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSwitchAtReqStop(bool)));
|
||||||
connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
|
connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
|
||||||
|
@ -652,12 +652,6 @@ void PlannerSettingsWidget::setBackgasBreaks(bool dobreaks)
|
||||||
plannerModel->emitDataChanged();
|
plannerModel->emitDataChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlannerSettingsWidget::setBailout(bool dobailout)
|
|
||||||
{
|
|
||||||
qPrefDivePlanner::instance()->set_dobailout(dobailout);
|
|
||||||
plannerModel->emitDataChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlannerSettingsWidget::setO2narcotic(bool o2narcotic)
|
void PlannerSettingsWidget::setO2narcotic(bool o2narcotic)
|
||||||
{
|
{
|
||||||
qPrefDivePlanner::instance()->set_o2narcotic(o2narcotic);
|
qPrefDivePlanner::instance()->set_o2narcotic(o2narcotic);
|
||||||
|
|
|
@ -80,7 +80,6 @@ slots:
|
||||||
void setDecoPo2(double po2);
|
void setDecoPo2(double po2);
|
||||||
void setBestmixEND(int depth);
|
void setBestmixEND(int depth);
|
||||||
void setBackgasBreaks(bool dobreaks);
|
void setBackgasBreaks(bool dobreaks);
|
||||||
void setBailout(bool dobailout);
|
|
||||||
void setO2narcotic(bool o2narcotic);
|
void setO2narcotic(bool o2narcotic);
|
||||||
void disableDecoElements(int mode);
|
void disableDecoElements(int mode);
|
||||||
void disableBackgasBreaks(bool enabled);
|
void disableBackgasBreaks(bool enabled);
|
||||||
|
|
Loading…
Add table
Reference in a new issue