Reenabled copying the diveplan to dive notes.

Gas consumption calculation fixed. Pressure difference still needs cylinder size to be set.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge branch 'atdotde'

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>

Conflicts:
	qt-ui/diveplanner.cpp
Planner: Re-enable using the new profile.

This correctly enables the planner on the new profile,
but it doesn't triggers the correct paint on the canvas.

[Dirk Hohndel: remove other remnants of the disabled planner as well]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: states Add and Plan have a similar behavior

So, the code is equal.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: Move method down below to easy comparisson with another.

Planner and add states are driving me nuts.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Small code cleanup.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove uneeded call.

The disableDcShortcuts is called inside of the ProfileGraphics
( I actually think that this method should be moved to there )

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Created a function to create a fake dive for Add and Plan states.

This function should likely to move to C in the future, I'm only
adding this here because I'm changing this file so much ( already
4 rewrites of the function )

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make the planner show something.

This is working in the wrong way, mostly because I'm setting the
plannermodel to ADD state ( and the planner graphic to the
correct PLAN state ), but I don't know why - when on PLAN state
on the model, things just don't work.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: Don't include the ascent in the default dive

Allow to both create the full default dive or ownly the descent and bottom
part (so the planner can deal with the ascent).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: copy samples and events for plan and add

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: convert assert into warning

We need to make sure we let the user know about this in a more user
friendly way...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge branch 'Planner'
Activate the Planner

On the cleanup dirk forgot to set the plan tipe to PLAN instead of ADD

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Do not set maxTime when the handler is moving.

Fixes massive cpu hog.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Speed up the grid: don't repaint when uneeded.

Added a flag to only recalculate the axis when needed.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix warning

When converting from assert to if I forgot to invert the comparison...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Planner: don't try to update the MainTab dive info while in plan mode

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>