aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.h
AgeCommit message (Collapse)Author
2017-02-04Let cylinderid = -1 mean same gas as beforeGravatar Robert C. Helling
It's not too clever to give 0 a special meaning (as here: use same gas as for previous leg) when 0 is a legitimate value. This should solve Willem's gas disappearance problem when reediting a dive in the planner. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-09-24Rename conservatism_level to vpmb_conservatismGravatar Rick Walsh
Make the variable purpose less ambiguous Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-23Remove another unused variableGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-23Remove unnecessary DivePlannerPointsModel functions and variablesGravatar Rick Walsh
Commit b1ed04a means that DivePlannerPointsModel::rememberTanks() and related functions and variables are no longer required Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-09Planner: automate calculation of best mix for max depthGravatar Rick Walsh
Add option to calculate the best mix portion of O2 and He for the dive's max depth if the user enters * in the MOD and MND cylinder fields. Gas portions are automatically recalculated if the max depth of the dive changes. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-09Have divedatapoint store cylinder id instead of gasmixGravatar Rick Walsh
Determining the correct cylinder index from a known gas mix can be complicated, but it is trivial to look up the gasmix from the cylinder_t structure. It makes sense to remember which cylinder is being used. This simplifies handling changing a cylinder's gas mix, either directly by the user, or indirectly in the planner. It also permits tracking of multiple cylinders of the same mix, e.g. independent twins / sidemount. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15VPM-B: Add conservatism levels to the ui. Fix planner settings disabling.Gravatar Jan Darowski
Conservatism level can now be changed from gui, is saved in settings. Also way of disabling the planner settings in the ui was improved to support more deco models and be called at the widget creation. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-07-03VPM-B: add deco choice to the ui.Gravatar Jan Darowski
Removed recreational mode from ui and pref and replaced it with new deco_mode enum. Added radio button ui selection. Set default deco_mode to Buehlmann algorithm. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-06-26Add only switch at required stop optionGravatar Rick Walsh
Add the option to only switch at required stop to the planner UI. This is not actually used yet. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-19Add planner minimum gas switch duration optionGravatar Rick Walsh
Add the option for a minimum gas switch duration to the planner UI. This is not actually used yet. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Set up signalling to display notes in planner again.Gravatar Robert C. Helling
This got broken in a recent transition to more abstract models. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DivePlannerModel and CylinderModel to qt-modelsGravatar Tomaz Canabrava
Still trying to make it easier for the Mobile Port: This patch is a bit bigger than I hopped, but it was the smallest that I could get. A lot of TODO items where added where I broke the code because the current implementation would break the QML implementtion on the designer. I'll most probably fix those myself when I finish the transition to the models to the new folder. I only moved both models at once because there's an interdependency between them (seems inevitable, tough, but I'll take a better look at it later). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>