aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-02-22Dive list: remove filtering in MultiFilterSortModelGravatar Berthold Stoeger
Since we're doing the filtering at the core, don't filter in the sort-model (which is now inappropriately named). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-22Dive list: filter dives at DiveTripModel levelGravatar Berthold Stoeger
We use a QFilterProxyModel to filter out dives that are hidden according to the current filter-criterion. Instead, filter the dives already at the DiveTripModel level. Filter out hidden dives immediately when receiving them. The only difficult case is when dives are changed, because then visibility can change. This means that we have three cases to consider: 1) Visibility unchanged -> send change signal 2) Change from hidden to unhidden -> add dives to model 3) Change from unhidden to hidden -> remove dives from model Things get complicated by the fact that the tree-version of the model might have to add/remove full trips! Suggested-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-19undo: don't add dive to null-tripGravatar Berthold Stoeger
In moveDiveToTrip(), the dive was first removed from its old trip and then added to the new trip. This function is also used to remove the dive from its trip (by moving it to the "null-trip" if you whish). Even in that case add_dive_to_trip() was called. The only reason why this didn't crash is that add_dive_to_trip() checks whether old and new trip are the same. This is the case when adding to the "null-trip", since the dive was removed from the trip just before. To cut a long story short, to trust on add_dive_to_trip() not crashing if moving from the null-trip to the null-trip is way to subtly. If we remove a dive from its trip, don't call add_dive_to_trip() in the first place. Reported-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-18mobile/export: fix styling of radio buttonsGravatar Dirk Hohndel
Use the TemplateRadioButton to get the default styling - and by switching to the RadioButton from Controls.2 we also get exclusivity by default. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/user-manual: additional changes for style and FTDI supportGravatar Dirk Hohndel
Replace passive voice 'one' with active voice 'you'. More strongly articulate the limitations for FTDI / cable based downloads on mobile devices. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/user-manual: add short section about Dive DetailsGravatar Dirk Hohndel
This includes comments on how to zoom and pan the profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18update CHANGELOGGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: enable zoom and pan for the QML profileGravatar Dirk Hohndel
When running mobile on desktop there are some odd jumps in the mouse position while in drag mode (press and hold, then move). They make the user interface seem jerky. But I haven't observed the same behavior on the mobile device when testing. So I'm not sure what to do with that. Using opacity to indicate that the user is able to pan the profile seems reasonably obvious; not sure if it's the best possible way to do this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: add x/y offsets to widgetGravatar Dirk Hohndel
This will allow us to pan the profile around in the QML UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: add elapsed time reporting for profile renderingGravatar Dirk Hohndel
In verbose mode we log how long it took us to render the profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: create updateProfile methodGravatar Dirk Hohndel
This allows us to trigger an update even if the dive displayed stays the same. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: add invisible rectangle around QMLProfileGravatar Dirk Hohndel
This way we can clip the profile to it's designated size. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/developer: add menu entry to temporarily enable verbose modeGravatar Dirk Hohndel
One could argue that this should be a preference. I like the fact that it isn't persistent, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: fix horrendous user interfaceGravatar Dirk Hohndel
This should never have been merged as it was. The UI was atrocious and the functionality was by and large untested. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/resources: fix incorrectly coded XSLT stylesheetsGravatar Dirk Hohndel
The prefix meant that on device these weren't found. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17core: fix incorrect changes in divelogs.de exportGravatar Dirk Hohndel
This is complete nonsense and should never have been merged. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: don't allow file based exports on AndroidGravatar Dirk Hohndel
There is no native file dialog, access to the file system is highly restricted and will be much more so in Android 11. Let's not even start with this. This should never have been merged as it was. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: remove most of the export optionsGravatar Dirk Hohndel
A tablet or phone is not a computer. What would you do with a CSV or TeX/LaTeX file on a phone. Yeah, I get it, feature parity. This should never have been merged. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: clean up whitespaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-16Cleanup: remove unneeded QtConcurrent includesGravatar Berthold Stoeger
These became unneeded owing to code reshuffling. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-16build-system/iOS: create correct bundle IDGravatar Dirk Hohndel
If you are building your own flavor you'll need to change that, of course. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-16Add Cressi BLE name filtering for bluetooth discoveryGravatar Linus Torvalds
.. and update the libdivecomputer submodule to have them marked as BLE capable. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-02-15load-git: fix up any corrupted modechange event namesGravatar Linus Torvalds
Because of the multiple string confusion, we'd get the names wrong for modechange events. If we then made other changes to the dive and saved the end result back, they'd now be wrong in the git cloud storage too. Fix it up manually by just noticing that there's a 'divemode' string on the event line, which can only happen with modechange events. Maybe we should report the fixup? This just silently fixes it (but only for the git save format). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-02-15load-git: clean up string handling during parsingGravatar Linus Torvalds
We had some fairly obscure rules for how strings were parsed, and it actually caused bugs when the same line had multiple strings in it. That normally doesn't happen, and the cases where it was _supposed_ to happen had special cases for it (divecomputer ID lines, and tag lines). But by mistake, we had introduced a case of that for the event line handling in commit b9174332d ("Read and write divemode changes (xml and git)"), and nobody realized that the divemode string addition meant that "oops, now it's corrupting the event name". An event line could look like this: event 40:00 type=8 divemode="OC" name="modechange" where we now had both that "OC" and "modechange" strings, and the code to pick the name just picked the first string. So we'd end up effectively mis-parsing the above line as event 40:00 type=8 divemode="OC" name="OC" which is obviously wrong. The dive mode didn't really need to be a string in the first place (there is nothing to quote, and no spaces in it), but hey, here we are. We can't just magially fix the existing broken saves. So make it more straightforward to handle strings in the git format line parser. We still stash the different decoded strings together in one special memory buffer, but now the parser helpers automatically untangle it as they traverse the key value pairs. This is still overly subtle code, and it doesn't fix the cases where we've saved the wrong data back. That comes later. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-02-13Update libdivecomputerGravatar Dirk Hohndel
- fix Oceanic VT Pro date parsing - add Sherwood Wisdom 4 and Scubapro Aladin A1 IDs from Janice McLaughlin - fix Cressi gasmix index and depth parsing (the gasmix index bit had been misparsed as very deep depth) - Implement the gas mix sample - Limit the depth value to 11 bits - Add support for the Scubapro A1 - Add support for the Sherwood Wisdom 4 - Fix the vtpro datetime parsing Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-13mobile/gps: make sure updated GPS data are savedGravatar Dirk Hohndel
If we change the gps location of a dive that didn't have a dive site associated before (which is the normal case when a dive was just downloaded from a dive computer), a new dive site is created with that GPS fix and added to the dive. We need to mark that dive as changed in order for the changes to be saved to storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-13mobile UI: restructure menuGravatar Dirk Hohndel
This changes the 'GPS' entry to be called 'Location', moves the 'Map' entry below that, and reuses the map icon for both the map inside this submenu and for the main menu item. It moves the 'About' entry under 'Help' and both 'Export' and 'Dive summary' under 'Dive management'. This way we have only five (or with 'Developer' enabled, six) entries in the main menu making it much more appropriate for really tiny screens. Additionally, the entrieis moved into sub-menus are ones that are not all that commonly used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-13GitHub Actions/iOS: shift to using a pre-packaged Qt installationGravatar Dirk Hohndel
Since the official Qt binaries can no longer be installed without disclosing credentials (well, sure, that could be done through secrets), I decided that we should go back to packaging just the part of the iOS Qt SDK that we need. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-11mobile UI: add second environment variable for heightGravatar Dirk Hohndel
This is intended for testing on the desktop; this way a developer can reproduce the screen size (in grid units) that a user might experience. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-11Planner: don't filter cylindersGravatar Berthold Stoeger
In the planner we used to filter out "unused" cylinders as in the equipment tab. It is unclear whether that makes sense or can even easily be reproduced, since such cylinders have to come from an imported dive. To be on the save side, let's not do this. Replace the CylindersFilteredModel introduced recently by a plain CylindersModel. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-11Planner: make cylinder-model subobject of planner-modelGravatar Berthold Stoeger
The cylinder-model had an instance() function, but actually there were two cylinder models: one used by the equipment tab, one used by the planner. This is misleading. Therefore, remove the instance() function and make the cylinder-model a subobject of the planner-model. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-11Cylinders: Add CylindersModelFilteredGravatar Berthold Stoeger
When the show_unused_cylinders flag is not set, the cylinder tables in the equipment tab and the planner should not show unused cylinders. However, the code in CylindersModel is fundamentally broken if the unused cylinders are not at the end of the list: The correct number of cylinders is shown, but not the correct cylinders. Therefore, add a higher-level CylindersModelFiltered model on top of CylindersModel that does the actual filtering. Some calls are routed through to the base model (notably those that take indexes, as these have to be mapped), for some calls the caller has to get access to the source model first. We might want to adjust this. For filtering, reuse the already existing show_cylinder function and export it via CylindersModel. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-11Cleanup: make CylindersModel::updateBestMixes non-slotGravatar Berthold Stoeger
This was not used as a target of a connection anywhere. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-11Cleanup: remove filterSelectedDives function in divetripmodel.cppGravatar Berthold Stoeger
The last users of the returned vector were removed in commit e1abf9485cf59f1b8cb79d827fa386af48f095a4 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-11Filter: update filter if any of the string-modes changedGravatar Berthold Stoeger
Simply hook the corresponding signals to the update-filter slot. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-11Filter: implement starts-with and exact modesGravatar Berthold Stoeger
Currently, we do substring search. Implement starts-with and exact mode (for example when search for "Cave vs. Cavern" tags). For each textual search criterion add a combo-box. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-10build-system/coverity: it seems silly to need both wget and curlGravatar Dirk Hohndel
But hopefully with this we'll get the Coverity scans back. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: remove some debug outputGravatar Dirk Hohndel
I don't think we need that anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: expand refresh buttonGravatar Dirk Hohndel
Buttons ignore the width of the enclosed label and base their width on the illogically named implicitWidth instead. Also translate the button text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: more UI fine tuningGravatar Dirk Hohndel
Creating more space for the header column and a little visual separation for the different sections. The commit is much smaller than it looks - try 'git show -w'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09build-system/iOS: don't build libdivecomputer inside the source treeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09buils-system/iOS: change confusing variable nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09mobile UI: fix font size breakage on AndroidGravatar Dirk Hohndel
The pointSize() of a font can return -1 if the font was originally specificied with a pixelSize. Work around this by using QFontInfo to calculate the correct value. Additionally, don't use the pointSize() of a font when we can instead use the calculated size. This fixes the problem with the missing star ratings on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09documentation: remove reference to the building page on the Subsurface websiteGravatar Jason Bramwell
Removed the reference and link to the building page on the subsurface website (https://subsurface-divelog.org/building) from CONTRIBUTIONG.md. This page no longer exists and gives a 404 error. I have looked for suitable alternate build/contributing instructions on the website and on github and can't find anything so i think best to just remove the broken link for the time being. If more comprehensive instructions exist in the future this will be simple to add back in. Signed-off-by: Jason Bramwell <jb2cool@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09Correct celcius/celsius typo in test divesGravatar Jason Bramwell
Corrected typos in three files: dives/Test.csv dives/TestComma.csv dives/APDLogViewer.csv Simply replaced the word celcius with celsius. Signed-off-by: Jason Bramwell <jb2cool@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09documentation: break git pull command into three separate commandsGravatar Jason Bramwell
The contribution instructions originally had the cd, git checkout and git pull all on one command this is not allowed and gave a syntax/command error. When I looked at the CONTRIBUTING.md file the commands were on three separate lines it was just the markdown backticks that were missing from showing up as three separate lines. I have simply wrapped each of these lines in its own backticks. Signed-off-by: Jason Bramwell <jb2cool@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09mobile UI: fix alignment issue in dive details viewGravatar Dirk Hohndel
The 'Map it' button could overlap with the dive number below, depending on font size. This fixes the issue. Reported-by: Peter Reinold <mcc.nash@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09Correcting typos of the word celsiusGravatar Jason Bramwell
Corrected typo of the word celsius in three files: core/import-csv.c core/divefileter.h mobile-widgets/qml/Settings.qml These were spelled as celcius but corrected these to celsius. The 'core files were just comments but the mobile-widgets file would be 'active' code. Reported by: tormento <turment@gmail.com> Signed-off-by: Jason Bramwell <jb2cool@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09Cleanup: remove const bool parameters and return typesGravatar Berthold Stoeger
These just make no sense. Since the value is copied, it has no meaning to the caller whether the function can change the value (and vice versa for return types). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-09Cleanup: only use necessary includes in exportfuncs.hGravatar Berthold Stoeger
Forward declare if possible. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>