aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-05-31Print empty cylinder, if neededGravatar Miika Turkia
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>
2020-05-31Print at most as many cylinders as the header hasGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-31Limit cylinders to one dive onlyGravatar Miika Turkia
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>
2020-05-30mobile: update version to 3.0.8Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-30mobile/dive-edit: fix broken editable combo boxesGravatar Dirk Hohndel
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>
2020-05-29cleanup: make local functions of static linkageGravatar Berthold Stoeger
A few functions in save-html.c were local but not marked as static. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-27cleanup: remove QCalendarWidget forward declaration and includeGravatar Berthold Stoeger
This is an artifact of code that never came to be. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-27cleanup: unglobalize grayImage()Gravatar Berthold Stoeger
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>
2020-05-27Android: install translations into the right placeGravatar Dirk Hohndel
When updating the NDK I forgot to adjust the install destination for the translations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-27cleanup: un-singletonize ShiftTimesDialogGravatar Berthold Stoeger
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>
2020-05-27cleanup: un-singletonize RenumberDialogGravatar Berthold Stoeger
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>
2020-05-26Update changelogGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-26Fix precision bug on SubsurfaceCSV importGravatar Miika Turkia
We need decimal point as size is stored with one decimal on imperial export. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Remove debug outputGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Add dive mode support for SubsurfaceCSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Fix field indexes after dive mode and sac changeGravatar Miika Turkia
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>
2020-05-26CSV import: add SAC if we end up supporting itGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Test case for multicylinder support on CSV importGravatar Miika Turkia
Test for importing Subsurface generated CSV dive details, with multiple cylinders support. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26XML start tag does not have new line before headerGravatar Miika Turkia
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>
2020-05-26Print correct template name on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Trip support for CSV export of dive detailsGravatar Miika Turkia
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>
2020-05-26Use single cylinder dive for testsGravatar Miika Turkia
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>
2020-05-26Initialize variable to silence compiler warningGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Add multicylinder support for Subsurface CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Take SAC into account on SubsurfaceCSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26Multi cylinder support for CSV exportGravatar Miika Turkia
Fixes #2830 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-26CSV export: Split printing of headerGravatar Miika Turkia
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>
2020-05-25mobile/credentials: email address must be lower caseGravatar Dirk Hohndel
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>
2020-05-25cleanup: whitespace fixes in TabDiveInformationGravatar Berthold Stoeger
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>
2020-05-25desktop: localize salinity valueGravatar Berthold Stoeger
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>
2020-05-22cleanup: constify time_during_dive_with_offset() functionGravatar Berthold Stoeger
There is no reason to pass a non-const dive pointer as first argument. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-22cleanup: remove unused function get_dive_n_near()Gravatar Berthold Stoeger
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>
2020-05-22cleanup: create common QDateTime -> timestamp conversion functionGravatar Berthold Stoeger
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>
2020-05-22cleanup: remove unused libc-structures from get_trip_date_string()Gravatar Berthold Stoeger
This must be an artifact from before using Qt's datetime functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-05-22cleanup: move timestampToDateTime() to qthelper.cppGravatar Berthold Stoeger
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>
2020-05-22Fix incorrect Farenheit to Kelvin formula.Gravatar Paul Buxton
Use defined function instead. Signed-off-by: Paul Buxton <paulbuxton.mail@googlemail.com>
2020-05-22desktop: update date and time fields if user changes formatGravatar Berthold Stoeger
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>
2020-05-22desktop: refresh date/time format when switching to system defaultsGravatar Berthold Stoeger
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>
2020-05-22cleanup: set long and short date formats in independent branchesGravatar Berthold Stoeger
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>
2020-05-18update CHANGELOGGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-18mobile/dive-edit: use template components and theme colorsGravatar Dirk Hohndel
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>
2020-05-18mobile/UI: correctly theme template spin boxGravatar Dirk Hohndel
This was all hard coded and wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-18mobile/dc-download: fix dark theme appearanceGravatar Dirk Hohndel
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>
2020-05-18Use stored SAC for validationGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-18TestParse to support SACGravatar Miika Turkia
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>
2020-05-18CSV export: include SAC when exporting dive detailsGravatar Miika Turkia
Simply adds SAC field to CSV export of dive details. Fixes #2829 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-18format for readabilityGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2020-05-17add missing CHANGELOG entryGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-17mobile: update version to 3.0.7Gravatar Dirk Hohndel
Required by the app stores after a release. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-17BLE: trivial updates to the GATT services listsGravatar Linus Torvalds
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>