Add the dive computer text.

Added the dive computer text on the bottom left side of the new Profile.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the depth text.

Depth text got added to the new profile.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simplfy the code for the cylinder pressure.

Instead of asking the data as we do on the generic models, use the
internal knowledge of the class.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the gas presssure profile texts.

This just adds the texts for the gas profile. I've also added a method on
the dataModel() to return the diveId of the last used dive in a way that
the other methods can use it.

This code is almost 1-to-1 with the old one, a bit of thinkering can be
used to merge this loop with the upper one.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Plot gas value function ported to the new canvas.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the DiveCalculatedCeiling item.

This item plots the DiveCalculatedCeiling over the profile. I still need
to add the Calc All Tissues version.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the tissues to the profile graph

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix building in git shallow clones

If we are building from a shallow clone, just guess the version based on
whats hard-coded in VERSION and append a -git to show thats it somwhere
behind that.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remember to clean the tissues when changing dives.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Prevent potential math overflow in new profile

Test for max_temp == min_temp to prevent math overflow when calculating
temperature axis in new profile

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't compare floats for equality

Now that we have a macro to replace float equality testing, we should use
it in places where floating point jitter might bite use otherwise.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Show dive computer ceiling

This patch adds dive computer calculated ceiling on the profile graph as a
'hole' on it. There's an item that paints it in red - maybe we shouldn't
offer an option here and show that only in red?

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we draw ceilings in red do not dig a hole on the profile.

This is an attempt to speed up painting a bit. Since we will draw the red
ceiling on top of the profile, I don't see a reason to dig a hole in it,
creating an more complex shape to be passed to the painter. Easier shapes
are easier to draw. ( I think )

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Draw the Ceiling in red if preferences are marked for that.

This code actually uses the preferences for something. It will show and
hide the calculated ceiling in red if the prefrerences are changed for
that. One bad thing that I did in this commit ( so it was easy to try ) is
that a preference change will redraw the whole graph - not optimized. I'll
make this better in a later commit so that only the affected items will be
redrawn.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Better use of the preferences changed signal.

When the preferences changed signal is fired, the items that can change
their visual based on the preferences now have to reimplement the
preferencesChanged method, so they know if they need to be replotted on
screen. I already implemented that for two of the items ( ProfileDepth and
Ceiling ) but others might need that too.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Whitespace, whitespace, whitespace

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Revert "Get rid of the planner"

This reverts commit c4a47a7d60b53c9b2e2ffb874afaf733d43123aa.
Add a travis.yml to test a build.
Mac support in travis.yml
Clone a bit deeper, so we get a tag to describe