Don't round range for DoubleSpinBoxDelegate to int

This fixes simple copy-paste error that the DoubleSpinBoxDelegate range
was stored as int, thus rounding min value from 0.2 to 0.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use doubles in DoubleSpinBoxDelegate

The previous code used qreals, but it feels clearer to use doubles when
the name of the class contains the word double. The performance loss of
using doubles instead of floats on arm is non-existent in this case.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add step size in our SpinBox delegates

For the Set point spinbox, it was kinda hard just stepping by the
default 1.0, so setting it to step by 0.1 makes much more sense.

The int SpinBox got a step size parameter for consistency.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Lower CCR setpoint min value in planner to 0

We signal a bailout to OC via setting the setpoint to zero. A setpoint
between 0.2 and 0 would be really wierd, but i couldn't figure out any
better way to keep the bailout deco planning.

Note:
The gas consumption of CCR dives are plain wrong, but this atleast lets
you plan your deco for a CCR bailout plan.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix inserting gaschange events

Use a macro that works to get the current DC.

Fixes #613

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add type for gaschange events, if missing

Subsurface has saved gas change events without type attribute at some
point. Thus we need to add the type when reading in log files, if it is
missing. (Gas change logic relies on the type field nowadays.)

Fixes #617
Fixes #600

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Detect proper event type based on helium content

Select proper SAMPLE_EVENT_GASCHANGE "version" based on helium content
on the mix.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>