The filter menu wasn't connected to anything other than a debug print.
This removes that menu.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I assume the theme directory should be deleted on uninstall the same way
e.g. Documentation directory is deleted.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I prefer that we show the first tab by default. Everyone should remember
that Qt Creator changes the currently shown tab as default on save.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I don't like that the event structure includes the variable length array.
That really makes it a pain to change the name of an event (on the flip
side, freeing events is easier I guess).
Anyway, to correctly rename an event we need to actually remove the event
from the correct dc and then add a new event with the new name. The
previous code was insane (it only worked if the new name was of smaller or
equal length, otherwise it had a beautiful buffer overflow).
And of course we need to do this both for the current_dive and the
displayed_dive.
Fixes#616
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This used to work because we actually displayed the current_dive. Now with
displayed_dive the pointers are of course different! So we need to compare
the actual events instead.
See #616
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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#617Fixes#600
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
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>
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>
When adding the method that includes the depth unit to the DiveItem class
I realized that this was yet another implementation of our depth unit
conversion. We should just call the existing helper instead.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
At least for my dives there wasn't enough space for depth and duration in
the header, most likely because I made the last two columns smaller to
create more space for tags and suit.
With this commit the depth and doration in the header now spans two
columns and easily fits.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
use setPointSize instead of setPixelSize to make it device independent,
also reduced a bit the size of the font.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We can use QPicture to record the painting done by a QPainter and it will
be saved in vector format, then we can simply paint that.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All animations are now on the Animations namespace, which resulted in a
bit of code cleanup, which is nice.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This seems to be needed for the correct print of the profile,
What was happening on the print code was that the profile even in print
mode was doing animations, and we were getting a frame of it and trying to
print it.
Also, a bit of code cleanup.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The old layout tried to add the search on top of the help view, which
didn't really work because of the way that the QWebView rendered: we got
garbage after a scroll with the find opened. So now I'v created a QWidget
and layed down the QWebView and the search bar vertically.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Based on Glance's idea on rewritting the Delegates, but
we don't need to redo the wheel as Qt already gives us
the correct Delegate, we just need to set some boundaries
on it before returning.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't compare pO2 with a bool, compare it with the result of the ?:
expression instead.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Gas changes generated by Xdeep can contain mix information with decimal
comma instead of decimal point. Thus we need to convert the comma to
point before performing mathematical operations on it.
Fixes#612
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds image support to UDDF export. As far as I can tell from
the UDDF specification, the images can only be added to notes field, so
that is what we do here. (buddy and owner can also have image tags, but
that is irrelevant for Subsurface currently.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I don't know why the plot_info was walked backwards - for our purposes
walking forward needs to make a lot more sense. And the event nicely goes
away when the diveplan gets modified and the displayed_dive gets reset.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
affects mainly capitalisation on the dive list context menu
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Makse capitalisation consistent.
Makes title more specific
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Makse capitalisation consistent.
Makes title more specific
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The start and end pressures were reported the wrong way.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>