Sections 6 and 9.3 of the user manual has some problems with the
ascii-doc code for maintaining the prper alignment of subheadings.
This patch corrects the asciidoc markup code to solve this
problem
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Including a tiny change for one of the new strings to be consistent with
the capitalization rules we recently established.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
At least in some cases the maximum sample depth can be more than
recorded maximum depth on DivingLog XML export. Thus the maximum depth
is doubled for unit detection.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
qt 5.3, win7 64bit.
beginRemoveRows() asserts in removeSelectedPoints()
because rowCount() - 1, becomes less than firstRow.
This needs a check in removeSelectedPoints() if the number
of passed rows is zero.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This makes the screen repopulate itself after a dive change only
one time instead of the old 4. we were repopulateing when we
removed the actual selection to reset the old selection previously
stored, sigh.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The text we generate for the diveplan has a table inside, and
we must use HTML only for the dive plan. so I treat all text
as HTML, look for a table item, if it doesn't have, I treat
it as Simple text and set it on the notes. Works and makes
linus loves me again.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This simplifies so much of the code that we were using to control
the visibility of the HeartRate. now things are much saner.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This breaks compatibility with old preferences, but it's a single
key and not that very important so I don't think it's a bigger issue
I've renamed prefs.animation to prefs.animation_speed to denote
that it's a value, and not a state.
Also, fixed the places that were treating it as a state (on/off)
to treat it like a correct value.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The pictures were being plotted in print mode, the main
reason for this was that when we entered print mode and
had already a picture plotted, the method would return
before removing them from the screen. This fixes it.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
for some reason we did a if(true) setValue(true) else serValue(false)
now we just use the value to set the value. =p
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All other default settings we get from subsurfacestartup.c's
initialization of the prefs struct. The planner had its defaults there
and in the retrieve of the settings from QSettings.
This changes so the defaults for planner settings will be read from the
defaults prefs struct as all other settings.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Before this function was changed it was really supposed to just change a
gas that was passed in in case there was an event that changed the mix -
but with the new name the caller will assume that they get a valid gasmix.
And promptly we had one caller that didn't initialize gas to be based on
the first cylinder before calling get_gas_at_time().
Instead of adding yet one more spot that knows about the oddity of the old
API I simply changed get_gas_at_time() to do what it name appears to imply
and fixed the other callers not to bother to initialize the gasmix.
Fixes#647
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Tiny updates to Relnotes and README, include the latest formatted manual,
change the version in the project file
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Not supported. Also the profile in "6 dives per page" doesn't really
allow much variations because it looks bad if we scale it down further
on A4.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These were hidden and we don't really support them because
our print layouting is not that flexible in Qt!
Note: printoptions.ui is now converted to UNIX line breaks.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Changes to user manual to rplace three images, as pointed out by Sergey.
Small changes to text of manual to reflect blue editing bar UI.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Well, the information was bad, it was being printed twice
if the text is HTML, print only once.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
well... we have a good and working printing system now. :)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I think it's intuitive to do not warn if everything was according to the
plan, and keep the dialog open after a print was due is something that I
find it strange.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch just adds the HTML Delegate to print the text.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The model was not being deleted when the table was, and thus we
recreated it for every print.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
QPointer is a smart pointer, it will delete itself when the
refcount == 0.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I don't know if this fixes anything, but it is asked of us to
do that by the Qt docs.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added a HTML delegate to show rendered HTML on print.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
active_o2 is now just a wrapper to return the o2 part of the active gas at
a certain time.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This converts the get_gas_from_events to a get_gas_at_time function that
actually maps our events to what cylinder and thus gas we are breathing
at that time.
[Dirk Hohndel: fixed to actually use the gas that was looked up
(and make things compile)]
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
current_dive is the selected dive, and displayed_dive is the one we are
currently drawing. They are quite often the same one, but not in the
case of adding a dive for example.
This fixes potential null pointer dereferences in the case of a blank
divelist, and makes sure we use the correct data in the case of adding
and planning dives.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Get rid of unit type shortcut in planner. Also use "to" instead of "-" in ascent rate intervals.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
is_cylinder_used uses get_cylinder_index as underlaying function that
does the right thing with with respect on how to find the closest
matching cylinder, and handles both types of gaschange events correctly.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This function operates on cylinder ids, so its actually about cylinders
not gases.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With a pSCR it is entirely possible to have a SAC rate below 2.8l/min.
Since we still don't want to include SAC rates of 0 let's change the
cutoff to 0.1l/min.
Fixes#624
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Sometimes the planner can produce negative pressures (i.e. when the
cylinders are not properly configured) or when the usser ignored
gas management (for whatever reason). When such a dive gets saved and
reread we should not display a further "Strange pressure reading"
warning on the command line.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds two changes
a) it uses rint() to make sure we don't truncate the displayed values
b) it moves the update of the displayed values into a helper function that
is also called whenever the settings change
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>