In the context menu of the profile it makes no sense to offer the ability
to switch gases unless there is a gas to switch to.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Includes the dive list filters and modifications on tissues graph.
Corrects a typpo.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added comment about meaning of o2pressure in struct plot_info.
Turned some pressures from double (in bar) to pressure_t (in mbar)
[Dirk Hohndel: picked parts of this patch and dropped others]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The only place where I'm not sure if there are unintended sideeffects of
changing over to the new domain is QCoreApplication::setOrganizationDomain
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit 0d7c192e6e ("For CCR dives, the diluent cylinder is the
current cylinder") a few things got broken. This tries to undo those
changes and adds expanded XML output.
1) Calculate correct partial pressure of oxygen to be plotted on
dive profile, taking into account the oxygen sensor data.
Currently, erroneously, OC PO2 values are shown, due to an
erroneous calling parameter to fill_pressures().
2) Read start and end cylinder pressured correctly. some wrong
assignments were done in file.c. This is now corrected and the correct
cylinder pressures are shown in the equipment tab.
3) Write correct cylinder pressures to XML. Currently the data for
the two cylinders are written to XML the wrong way round
(diluent pressures = oxygen and vice versa).
4) Expand XML output:
a) Write oxygen sensor data to XML
b) Write no_of_02sensors to XML
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit d5d7fdc9af ("For CCR dives, show plot for diluent and O2
cylinder pressures") we end up dereferencing current before it is first
initialized. Bad.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Qt by default uses a rather simplistic text heuristic to figure out if a
menu entry is one of the special ones that need to be moved into the
application menu (About, Preferences, Quit - but for Preferences anything
that matches settings, options, config is used as well).
This patch tells Qt to keep its hands off the the DC configuration entry
in the menu.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
RulerNodeItem2::recalculate() does something which is
apparently not a good idea in combination with
RulerNodeItem2::mouseMoveEvent().
Each time the mouse moves, setPos() is called. Then in
recalculate() the x() value is checked and if less than 0
it's changed to x = 0 (setPos(0, y());).
This last call (setPos(0, y());)
however does not work and the value remains less than zero
leaving one of the ruler points outside of the graph.
To solve the issue we add a silly explicit check if x() < 0
before calling setPos() in RulerNodeItem2::mouseMoveEvent().
The 'x() > timeAxis->posAtValue(data->sec)' strangely works
on the other hand.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Extend the tooltips to be shown both on the labels and the values and add
tooltips for all min/avg/max elements.
To avoid confusion when only one dive is selected, no longer show min SAC
or max SAC or min duration or max duration.
Fixes#694
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the unused upper widget, set a somewhat random but at least more
reasonable default size and finally support Ctrl-W and Ctrl-Q shortcuts.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also fixes a bug in the diluent pressure interpolation
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Covers CCR APD and Poseidon divelogs and importing. Already changed
by the time of writing this commit, at least twice.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Somehow I forgot to submit this back in October.
Includes the gases pressures bar graph.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Change the meaning that _the_ cylinder (as we treat it in OC dives) is the
diluent cylinder (rather than the O2 cylinder). This eliminates special
cases. Now, for CCR, we have to handle the O2 cylinder in addition
(rather than the diluent in addition).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Slowly trying to track down all spots where we copy string pointers
instead of string data. And making sure that we free those pointers before
overwriting them.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Maybe it would be better to just copy the whole structure and then clear
the things we don't want to copy? This seems fragile.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We copied the string pointers instead of copying the strings. Once those
got freed, things went downhill.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Few smaller changes to text dealing with tissue pressures graph
Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Random constants are bad. Let's use the indices that we already calculated
(and true and false if we mean boolean values).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
--047d7b8737f87ede8e050803e6b2
Content-Type: text/plain; charset=UTF-8
<div dir="ltr"><br></div>
From 3db4a422485374801ca2f6233ec23b8671a8656d Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <tomaz.canabrava@intel.com>
Date: Sun, 16 Nov 2014 23:22:58 -0200
Subject: [PATCH] fix 727 - position correctly the popup.
When the user entered a tag and that made the message box display
the popup with the possible choices was still in the old position
hidding the line edit.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is an anonymized version of a real dive. With the latest changes the
SAC calculations now make "mostly sense".
What's clearly still broken is the tank pressure graph.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch is bigger than necessary because I also renamed the
get_cylinder_use() function to the much more accurate
get_cylinder_idx_by_use().
If we have no gas changes (except for a possible explicit first gas),
(which in the CCR case also means no bailout), this code will give you
correct per cylinder depth and duration for oxygen and diluent and
therefore create more reasonable gas consumption data for CCR dives.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Oddly we already had code to load this from XML, but nothing else.
This makes the load from XML work like the rest of our code and adds the
save to XML plus the load and save for the git format.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a time linear gas interpolation strategy. Some minor changes.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>