aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-02-27documentation: additional explanations around Windows USB driversGravatar Dirk Hohndel
This is adapted from a conversation with Jef. Suggested-by: Jef Driesen <jef@libdivecomputer.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-27cleanup: don't update tabs twice in MainTab::rejectChangesGravatar Berthold Stoeger
The updateDiveInfo() call updates all tabs. No need to do it right afterwards. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-27cleanup: remove weightsystems_equal functionGravatar Berthold Stoeger
This was used to test whether the "really discard changes?" message should be shown. However, we now edit weightsystems directly with undo commands. Therefore, the check is unnecessary and the whole function can be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-27cleanup: remove MainTab::modifiedGravatar Berthold Stoeger
This field was not set to true since introducing undo of dive fields. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-25mobile/profile: make the fonts 25% smallerGravatar Dirk Hohndel
This will seem too small to many - it's pushing it, but it leads to a significantly less cluttered profile, and we now have the zoom capability for readability. I think this is a nice improvement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-25mobile/profile: make the wait before dragging even shorterGravatar Dirk Hohndel
Several users still found the wait too long - this is near instantaneous it just ignores brief taps. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-24CylinderModel: remove unnecessary "Is used" headerGravatar Berthold Stoeger
This header is a rebase artifact and introduces a pointless column in the cylinder tables. It was erroneously introduced in 6622f42aab937e72cc11cb5512012394aa687767. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-23build-system: use working version of Breeze iconsGravatar Dirk Hohndel
As of today some of the icons that we need are no longer in the git repoo but instead created via script. Instead of making this work everywhere, let's just use a working SHA... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-23cleanup: remove CleanerTableModel::warningMessage signalGravatar Berthold Stoeger
Nobody was ever listening to this signal(?) and the last sender was removed in ac52034778bc5c82bb6c689d765b337b6d75b24a. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-22Filter: move actual filtering loop to core/divefilter.cppGravatar Berthold Stoeger
The DiveFilter class defined the showDive() function to test whether a dive should be filtered or not. This was used in DiveTripModel to loop over all dives or all dives affected by an editing action. This restricts us in how we do filtering: We can't use indexes that give us directly the result. To make the filtering more flexible, move the actual loops that do the filtering to the DiveFilter class. The undo-commands likewise called directly the showDive() function to check whether newly added dives are shown. Use the new interface here as well. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-22Filter: update current dive if change hides current diveGravatar Berthold Stoeger
When changing the filter-criterion and the current dive is hidden, a new dive is made current. However, when a dive is hidden because it was edited, it is still shown. Make this consistent by also selecing a new current dive in the latter case. Do this by comparing the current_dive before and after calculating the filter. Since this is now done in multiple places move this code to the ShownChange class. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-22Cleanup: remove shown flag of DiveTripModelTree itemsGravatar Berthold Stoeger
Since we now filter at the model level, items are by definition shown. No need for a flag. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-22Cleanup: remove DiveTripModelBase::SHOWN_ROLEGravatar Berthold Stoeger
This role was used by the filter-proxy model as filter criterion. Since we don't use that model to filter anymore, we can remove the role. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-22Cleanup: remove DiveTripModelBase::sendShownChangedSignals()Gravatar Berthold Stoeger
This was used by the old filtering code. This is not necessary anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
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>