Fill up plot_data with temperature all the way

This will fill out the gaps of temperature data between all the points
so we always have a temperature to show in the info box.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Introduce an on/off switch for calculating ndl/tts

Let the user choose if the calculation of ndl and tts is worth the time
it takes.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the special handling of ndl < 3m

This changes the special handling of ndl calculations when we deem that we
are too shallow for doing them. Previously we just set ndl to -1 and
printed a "-", now we return and print max_ndl, just as how most
divecomputers work.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Reorder info in information window

When moving along the plot, it's hard to look at a certain value when its
place in the info box moves due to values being added or removed above it.
This commit moves the "stable" values up top in the info box and the
values that come and go further down, so that the box expands downwards.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Break up calculate_deco_information

Break the huge calculate_deco_information into three different functions.
One for the current deco calculations, one for the ndl/tts/deco stop and
one for the gas calculations.
This makes it easier to disable/enable different functionality.

This also gets rid if the ccrdive state variable, and keeps that state
in the plot_data struct. Now we calculate the deco before we calculate
the gas properties, so if we have a po2, we're in ccr-mode, and if we
don't, we're in oc mode.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Partially revert d72c69db7a49f and fix its errors

In the offending commit a QWidget was changed to QTableView, but
only in the header - and thus making avaliable all method calls,
but the initialization of the widgets was still a QWidget, and
nothing of QTableView was used besides an incorrect call to
setColumnHidden.

This commit fixes that by using the view() method provided by the
TableView implementation which returns the true QTableView that should be
used for specific nitpicking, like hidding columns. :)

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix loading the information of splitter sizes on empty config.

We previously did did bad things when running with an empty configuration.
This attemps to clean it. We will now correctly handle the splitters in
almost all cases ( if I didn't break anything on the way. )

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