summaryrefslogtreecommitdiffstats
path: root/core/trip.h
AgeCommit message (Collapse)Author
2020-05-03selection: add selection flag for tripsGravatar Berthold Stoeger
In analogy to dives add a selection flag for trips. The reason being that search for a selected trip can be painfully slow when we do it through Qt's proxy model. Make sure to deselect trips when they are removed from the core. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-10core/trip handling: add helper function to get trip from idGravatar Dirk Hohndel
In the QML code we pass ids around. I had assumed that there already was a reverse lookup function, but I wasn't able to find it. So I added it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-10code cleanup: add empty table structuresGravatar Dirk Hohndel
It seemed to make sense to combine all three types in one commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-21Core: add unique id to tripGravatar Berthold Stoeger
To make it easier to pass around trips through QML, give each trip a unique id. The id is generated in alloc_trip() and uses the same function to generate unique dive ids. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-28Import: use TRIP_THRESHOLD when checking for trip-overlapGravatar Berthold Stoeger
When checking for trip-overlap on import, only really overlapping trips have been considered, i.e. when dives had overlapping times. Instead use the TRIP_THRESHOLD so that on download dives are added to the same trip if in a two-days time frame. Reported-by: Miika Turkia <miika.turkia@gmail.com> Reported-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-06-19Cleanup: move trip-related functions into own translation unitGravatar Berthold Stoeger
These functions were spread out over dive.c and divelist.c. Move them into their own file to make all this a bit less monolithic. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>