Age | Commit message (Collapse) | Author |
|
When the dive that is used to generate the header, we need to print
empty cylinders for the dives that had less cylinders than the one used
for header printing.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
With XSLT we have to be specific if we want to apply cylinder iteration
operation to one dive only. Thus using the last dive as reference when
printing cylinder header.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This is a partial revert of commit 99438121c4 ("mobile/dive-edit: use template
components and theme colors")
Clearly the information given in the Qt documentation on how to theme ComboBox
is flat out broken. The trade-off between 'better dark theme' and 'broken user
experience' is fairly easy to make.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
A few functions in save-html.c were local but not marked as static.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
This is an artifact of code that never came to be.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
This function was globalized in be462ae1a6 to be used for the calender
widget, but that never came to be. Therefore, for now unglobalize it
until it is needed. That said, there probably is a helper function to
turn pictures into gray-scale.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
When updating the NDK I forgot to adjust the install destination for the
translations.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
There is no reason that this dialog is a singleton. Since it is modal,
it can be created on demand. Apart from removing superfluous global state,
this simplifies code, because preparing the widget can now be done in
the constructor instead of overriding the showEvent() function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
There is no reason that this dialog is a singleton. Since it is modal,
it can be created on demand. This simplifies code, because the mode
(selected-only or all-dives) can be set in the constructor.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We need decimal point as size is stored with one decimal on imperial
export.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
We need to update field numbers when parsing CSV, as recently sac and
dive mode were added.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Test for importing Subsurface generated CSV dive details, with multiple
cylinders support.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
When Subsurface adds start tag to CSV file, there is no new line after
it. Thus changing XSLT to parse this way.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Debugging the tests with new test dive, I noticed that CSV export does
not work, if the exported XML includes trips.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Now that CSV export supports multiple cylinders and import doesn't, we
need a test dive with single cylinder in it. (Multi-cylinder import from
CSV will be supported for Subsurface style CSV export only, and not
generic exports that are used here.)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Fixes #2830
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
This will split the printing of header for CSV export. Cylinder
information is printed by itself allowing me to later print it in a loop
as many times as there are cylinders.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
I could have sworn that I have fixed this several times in various places,
but apparently (as shown by todays support emails) it's still possible to
setup a mixed case email address. So let's try to solve this problem at
the very top.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Use C-style function definitions (squirly brackets on new lines) and
remove empty lines at end of file.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
The salinity value was not displayed with localized thousands separators.
E.g. to a user of a German locale the density read as slightly over
1 g/l, when it should be approximately 1000 g/l. For consistency, also
localize that value.
Also localize the CNS and OTU numbers, even though these should
(hopefully!) never come with thousands separators.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
There is no reason to pass a non-const dive pointer as first
argument.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
The last caller was removed in 7eb422d98837b3cfb289a66fa0f3a8f78f222001.
Since this is the only caller of dive_within_time_range(), remove that
function as well.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
In analogy to the timestamp -> QDateTime conversion, create a
common function.
1) For symmetry with the opposite conversion.
2) To remove numerous inconsistencies.
3) To remove use of the deprecated QDateTime::toTime_t() function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
This must be an artifact from before using Qt's datetime functions.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
Move this function from maintab.cpp to qthelper.cpp. Since the
functionality was used in numerous places, use the helper function
there as well. This removes a number of inconsistencies. For example,
sometime setTimeSpec(Qt::UTC) was called, even though the
QDateTime object was already created with that time spec.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
Use defined function instead.
Signed-off-by: Paul Buxton <paulbuxton.mail@googlemail.com>
|
|
This was more painful than expected, because we get the "preferences"
changed signal too early when the user switches to system format.
The correct format is set by the preferences-widget, not the preferences
subsystem.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
When switching to system defaults, refresh the fields in the preferences
UI so that the user can tell how the fields will be formatted.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
The short and long date formats where initialized in a common if-branch.
However, inside the if-branch the code rechecked which of the two should
be initialized. This could make sense if there was some common code between
the two, but there wasn't. Therefore, make this two independent branches
to avoid one nesting-level.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Another small step to make the dark theme at least marginally useful.
We now use our template components and add the necessary elements to have
consistent text color.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This was all hard coded and wrong.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
I noticed that the download from dive computer page looked especially bad
in the dark theme (a user sent us some screenshots for a different reason)
and a quick look at the sources showed that we weren't using our template
label. Switching to that gives us the correct size by default so we can
drop all those explicit font size parameters. And we get the correct color
as used in the theme.
One random whitespace cleanup snuck into this commit. Oh well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Take into account the added SAC field in dive detail CSV export.
Note that we do a test of:
- export to CSV file
- import the written CSV file
- export the newly read data to second file
- compare these two exported files
As SAC information is not currently read from any import, this adds the
SAC value to the imported data before exporting again.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Simply adds SAC field to CSV export of dive details.
Fixes #2829
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Required by the app stores after a release.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Add a couple of known services (Scubapro G2 and Shearwater), and update
the names of others that turn out to be used for multiple dive
computers. Also add another Broadcom upgrade service UUID.
While at it, sort the services numerically to make it easier to see that
a UUID already exists, since these service numbers do get used across
multiple different devices.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|