mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
plannerShared: add o2narcotic
Add include of cylinderModel Add o2narcotic the set function is special because it first informs the plannerModel that there is a new value and then ask cylindermodel to calculate a new bestmix Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
413501bc61
commit
c4d9b737cd
2 changed files with 16 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "core/settings/qPrefDivePlanner.h"
|
||||
#include "core/settings/qPrefTechnicalDetails.h"
|
||||
#include "qt-models/diveplannermodel.h"
|
||||
#include "qt-models/cylindermodel.h"
|
||||
|
||||
plannerShared *plannerShared::instance()
|
||||
{
|
||||
|
@ -210,3 +211,14 @@ void plannerShared::set_sacfactor(double value)
|
|||
// NO conversion, this is done in the planner model.
|
||||
DivePlannerPointsModel::instance()->setSacFactor(value);
|
||||
}
|
||||
|
||||
bool plannerShared::o2narcotic()
|
||||
{
|
||||
return qPrefDivePlanner::o2narcotic();
|
||||
}
|
||||
void plannerShared::set_o2narcotic(bool value)
|
||||
{
|
||||
qPrefDivePlanner::set_o2narcotic(value);
|
||||
DivePlannerPointsModel::instance()->emitDataChanged();
|
||||
CylindersModel::instance()->updateBestMixes();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue