This extends the hack in commit 2e057bc29a ("QML UI: hide action button
when keyboard is visible") to the left and right button as well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We never actually create a list of dive sites for which we
call the reverse lookup service, it's always just displayed_dive_site.
So make this all much simpler and just go straight for that.
This commit removes a loop, but doesn't change the indentation of the
code inside the loop to make it easier to see what was changed. That
whitespace change will be in my next commit.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The more I looked at the code that added the country to the dive site,
the more it seemed redundant given what we have with the taxonomy.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We don't want to just be able to copy all of a dive site.
Sometimes we might want to be able to copy just the taxonomy.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Print the delta between the required minimum gas result and the cylinder
pressure at last bottom datapoint in results.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Wire up the UI elements (QSpinBoxes) for ascend rates (4x) and descend rate
(1x) correctly so that the profile and calculation is updated immediately
after the value is changed (e.g. increased/decresed by 1) by clicking
the QSpinBox arrows.
Until now one had to click into the profile or change another planner
preference first before the change became effective.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
A weird crash occurs if DiveListView creates another local
instance of DiveTripModel inside reload(). Re-use the member
variable tripModel and assign it a new instance of DiveTripModel.
Reported-by: Gaetan Bisson <bisson@archlinux.org>
Tested-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The `static int defaultWidth[]` definition in divelistview.cpp
could potentially end up missing an element which can later result
in out-of-bounds access when iterating through the list of
columns and updating their widths.
Add a couple of methods in DiveTripModel for setting and getting
the widths and use those. The default values are now pre-set in a
QVector in the DiveTripModel() constructor.
Throw warnings if out-of-bounds columns are requested.
Reported-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add more information for the divesite, a country can be used to help
sorting.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This will hold the information for the profile upload.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we don't set first_ceiling_pressure at start of dive, a shallow ceiling can
be shown when it shouldn't be.
Fixes#584
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
... and reset deco information in profile ceiling computation.
The planner test then needs to know about the struct holding the deco
state.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Calculating dive.when + dive.duration doesn't always give the correct
endtime of a dive especially when a dive has surface interval(s) in
the middle.
Using the helper function dive_endtime() fixes this issue.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
When we merge dives, the sample_start and sample_end pressures are only
used in-memory for displaying data to the user. However, we should
update them as well as this will show the user the correct data in the
equipment/cylinder and i.e. SAC calculation.
Fixes#577
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>