Add minimum gas calculation to planner output.
Add the two UI parameters prefs.sacfactor and prefs.problemsolvingtime.
Connect UI signals and slots for recalculation of diveplan.
Disable minimum gas calculation if there was already a warning before.
If minimum gas result is larger then cylinder start pressure give warning message instead of result.
Add line break before pO2 warnings but only if warnings exist.
Signed-off-by: Joachim Ritter <jritter@bitsenke.de>
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
In the cylinder table today the cylinder start and end pressure fields
are marked red and the end pressure font is set to italic if cyl->end is 0.
But sometimes with planned dives there is no cyl->end but only cyl->sample_end.
This is taken into account now.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Not using lrint(f) when converting double/float to int
creates rounding errors.
This error was detected by TestParse::testParseDM4 failure
on Windows. It was creating rounding inconsistencies
on Linux too, see change in TestDiveDM4.xml.
Enable -Wfloat-conversion for gcc version greater than 4.9.0
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Using gcc option "-Wfloat-conversion" is useful to catch
potential conversion errors (where lrint should be used).
rint returns double and still raises the same warning,
this is why this change updates all rint calls to lrint.
In few places, where input type is a float, corresponding
lrinf is used.
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Bottom pO2 gas option in planner should be always enabled because
also recreational dives can use nitrox and produce "high pO2" warnings.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Going to "Template -> Edit" now has a field to enter the
border width (in pixels as only that makes sense in CSS as a flexible
unit, TMK).
This field modifies the template_options.borderwidth Grantlee
property which is part of the bundled templates already
and allows the users to modify the borders of tables.
The C++ implementation was missing, while the HTML (template)
implementation was already in place. Overlooked during GSoC.
Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This marks the UI as modified and updates the maxdepth of the dive; it
ignores changes to the duration, doesn't modify the profile, so it's
nowhere near ready.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And hide them for now. This doesn't change anything visible, it's just
putting in place the pieces for later use.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Two different menu path lead to "open a logfile". The File-Open-Logfile
and Import-Import Logfile. The first opens a new logbook, and the second adds the
data to the current log.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Lets try to be consistent. A dive computer can be in upload mode, and is uploading, but
seen from the host PC, we are downloading.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The here edited section is confusing. It references double clicking,
which does not work in 4.6 (and not sure it ever worked)
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Do not repeat the almost same text in the next sentence.
When entering a dive location name, auto location of
dive site names makes it easy to select an existing dive site name.
When typing the name of a dive site,
a dropdown list appears showing all sites with similar names.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The way keybord shortcuts work is confusing. 2 ways are used:
- denoted as ctrl-? for some of them
- denoted as underlined character in menu items, proabably language
dependent, and inconsistent.
Despite all this, try to describe it in the manual as it is.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Manual added gas gas changes have effect to the right of the profile, not as erroneously
stated to the left of the point of gas change.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
In the original version, parsing and comparing output was
done in separate test methods. This was forbidding use of
QTest cleanup to call clear_dive_file_data().
As a side effect a failure in one test would make other tests
failing too (since call to clear_dive_file_data was skipped
by QCOMPARE failure).
Added a FILE_COMPARE macro to avoid code duplication.
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
In case of QCOMPARE failure, code following the comparison
is not executed, this results in application state not being
properly resorted and often gives several test failures,
when only one test really fails.
Using QTest cleanup method allows restoring proper state,
before next test is executed.
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Method originally called testSetup is more a precondition
to test execution rather than an actual test.
QTest recommends to use initTestCase for that purpose.
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>