aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-11-28Merging dives: Improve merging of divemaster, buddy and notesGravatar Stefan Fuchs
Change the merging behavior for the following information: Divemaster, buddy, suit: From "(a) or (b)" to "a, b" Notes: From "(a) or (b)" to "a\n--\nb" Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-28Correctly handle dive notes in maintab.cppGravatar Stefan Fuchs
Remove duplicate and incorrect setPlainText call via macro for dive notes. Deal correctly with ASCII line breaks "\n" in dive notes with html markup (replace them with <br>). Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-28android: Add new usb vid/pid's to manifestGravatar Anton Lundin
This adds vid/pid of the recently added usb devices. * EON Steel core * Scubapro G2 * Scubapro Aladin Square Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-28Rename "tank bar" to "gas bar" in EN documentation sourceGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-28Rename string "tank bar" to "gas bar" in UIGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-28Documentation: Merge and update french translationsGravatar Guillaume GARDET
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
2017-11-28Fix typo connot > cannot.Gravatar Martin Měřinský
Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2017-11-27iOS build fixGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-27mapwidget.qml: return early instead of doing branchingGravatar Lubomir I. Ivanov
The centerOn*() functions can just return early for invalid input, instead of branching the conditions. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27mapwidget.qml: more minor improvementsGravatar Lubomir I. Ivanov
- Add the helper coordIsValid() and use it in centerOnCoordinate(). This checks for NaN coordinates and prevents an infinite while() loop. - Use '-= 1.0' instead of '--' to be more clear that the decremented variable is a float - Store the current center with 'centerStored' in centerOnCoordinate(). Fixes a possible zoom out glitch. - use Math.floor() to convert 'zoomLevel' to integer when estimating zoomOut in centerOn*() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27mapwidget.qml: remove unused zoom-out functionGravatar Lubomir I. Ivanov
The zoom out function is no longer used as we don't zoom out when a dive doesn't have dive site coordinates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27mapwidget.qml: make pan and zoom-in have the same durationGravatar Lubomir I. Ivanov
There was a problem with the current different duration for pan and zoom. Ideally the pan should before the zoom: Map zooms out -> pan to new center starts -> zoom in The problem with this is that if the map pans out too much it loses it's center and the above scheme would not work. To solve the problem, make the duration of pan and zoom the same this is not idea, but prevents the case where the map would not zoom-in at the correct center. Also remove the easing function. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27ReleaseNotes: update with the recent map changesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27locationinformation: don't update map location on typingGravatar Lubomir I. Ivanov
Currently when the user is typing new coordinates the marker on the map changes location right away. Disable that and add a 'flag' button that should be pressed instead. Also make the coordinates update when pressing Enter or when the text field loses focus. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27map-widget: interrupt map animations on new interactionsGravatar Lubomir I. Ivanov
When the map is performing zoom/pan animation and the user performs an action that would trigger a new zoom/pan animation, but some glitches can occurs. An example would be when one clicks a dive in the dive list - the zoom/pan animation will trigger, so that the map is centered on the dive site, but if the user clicks the [+] button to zoom-in, while the animation is running the map will glitch. This patch prevents such glitches by stopping all running animations in progress when the user: - single clicks the map - uses the mouse-wheel to zoom - presses the [+] / [-] buttons Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27map-widget: use 'getter' function coordinate() for MapLocationGravatar Lubomir I. Ivanov
Avoid using qvariant_cast() with getRole() in favor of MapLocation::coordinate() in MapWidgetHelper::reloadMapLocations(). This makes the code more readble. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27map-widget: start dive site editing with coords pre-enteredGravatar Lubomir I. Ivanov
Once the user starts editing a dive site, make sure to pass coordinates of either the current map center (if a new MapLocation is being added) or the coordinates of the existing MapLocation. The "Dive site management" coordinates text field would receive these new coordinates after the displayed_dive_site struct is updated and the coordinatesChanged() signal is emitted. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27map-widget: move the map with the edited dive siteGravatar Lubomir I. Ivanov
Once the user starts editing the coordinates by hand (from the "Dive site management" UI) make sure to update the map to center on those user entered coordinates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-27Hopefully fix Android buildGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Move Cobalt and Divinglog DB parsing to parse-db.cGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Move atoi_n to parse.cGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Move Shearwater DB parsing into parse-db.cGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Move metric variable to parse.cGravatar Miika Turkia
This is required when moving Shearwater DB parsing into parse-db.c Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Move add_dive_site to parse.cGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Move Suunto DB imports into parse-db.cGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Refactore parse-xml.c into parse.c and parse-xml.cGravatar Miika Turkia
This should help us to move parsing that is not XML related to other files, hopefully making the code cleaner. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Fix test parsing as new DC appears in the XML filesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Add test for DM5 importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Add imported version of DM5 test diveGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Test dives in DM5 database formatGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-11-27Clone breeze icons from GitHubGravatar Dirk Hohndel
anongit.kde.org appears to have problems. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-27Code cleanup: Move index declarations into for loopGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27After edit the cylinders of a dive copy the full samplesGravatar Stefan Fuchs
After editing the cylinder table (e.g. deleting a cylinder) and accepting the changes copy the whole dc samples for the dive edited. This is important because the sensor idx in the samples may have changed. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27Use MAX_CYLINDERS consistentlyGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27Use MAX_SENSORS define everywhereGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27When replanning logged dive call CylindersModel->updateDiveGravatar Stefan Fuchs
reset_cylinder may transform unused cylinders into zombie cylinders inside the planner because it adds a depth info and therefore the planner will use them. By calling CylindersModel->updateDive these cylinders will become visible and can be deleted by the user. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27Add debug function dump_cylindersGravatar Stefan Fuchs
This function can be used to dump print all cylinder data. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27Compile dump_tissues function only if needed based on defineGravatar Stefan Fuchs
Compile it only when DECO_CALC_DEBUG is defined. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27Store and load the planner related depth info of a cylinder in logfileGravatar Stefan Fuchs
Store cylinder.depth in XML files and in git storage. This info is in fact the gas switch depth of a specific gas/cylinder in the planner. This change avoids the need of typing in a user specific depth value again when replanning an existing planned dive. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-27QML UI: add versions of key libraries to the logGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-27Latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-26Update list of divecomputers supported in Subsurface-mobileGravatar Dirk Hohndel
There was some whitespace change as well - this is straight from the tool. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-26Inform LocationFilterModel of added dive site nameGravatar Berthold Stoeger
If the user implicitly adds a dive site by editing a dive, and a location filter is active, check the new dive site in the location filter. This is done by informing the LocationFilterModel of the new dive site name prior to repopulation. The LocationFilterModel then adds a corresponding entry and marks it as checked. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-26Inform LocationFilterModel of changed dive site nameGravatar Berthold Stoeger
Since commit 01d961086c1d175732c597dc9acdba7cc4cd2d26, the location filter list is updated if a dive site is edited. The problem is that if the name of a selected dive site is changed, the selection is lost. Therefore, before repopulating, inform the location filter that a dive site changed its name. The location filter then internally changes the name and can properly transfer the old selection on repopulate. This is performed via the new LocationInformationWidget::nameChanged signal, which is connected to the new LocationFilterModel::changeName slot. A special case to be handled is the following: [ ] Site 1 [x] Site 2 and "Site 2" being renamed to "Site 1", i.e. both sites being merged. Here, the merging is detected and "Site 1" will likewise be checked: [x] Site 1 [x] Site 1 No merging is performed, as the list will be repopulated anyway. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-26Simplify signal handling after dive site editingGravatar Berthold Stoeger
Since commit 01d961086c1d175732c597dc9acdba7cc4cd2d26, MainWindow::refreshDisplay() is called in the refreshDiveInfo() signal of maintab after editing a dive site. Since this was the only use of the refreshDiveInfo signal, remove this signal and instead connect to MainWindow::refreshDisplay directly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-26Fix comparison function in qt-models/divelocationmodel.cppGravatar Berthold Stoeger
The function dive_site_less_than() in qt-models/divelocationmodel.cpp does not what it promises: it uses less-or-equal instead of less-than comparison. Note that, even though this may sound pedantic, this is an actual bug. Usually, sorting functions suppose that they are provided with strict weak ordering, which <= does *not* provide. This is the actual reason for the crash mentioned in commit f8a3a8521003a26525b658840ce8e7bfd3f7b141. While touching this function, make it of static linkage, since its usage is local to this translation unit. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-26Remove unused method LocationInformationModel::addDiveSite()Gravatar Berthold Stoeger
The call to this method was removed in commit f4c31f110fc98eb6d5d18c806e6b0f2ccc762d54 Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-26Remove redundant declaration of set_userid()Gravatar Berthold Stoeger
set_userid() was declared in core/dive.h and dektop_widgets/subsurfacewebservices.h. Remove the second instance because two declarations of the same function are a recipe for disaster. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-26In maintab clear location tags when selecting a dive w/o dive siteGravatar Stefan Fuchs
Until now when selecting a dive w/o dive site after having a previous dive with dive site and location tags displayed, the location tags of the previously selected dive where still displayed. This fixes this behavior. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-25Update ReleaseNotesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>