aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2018-05-21iOS: updated text in About to reflect logs not logGravatar jan Iversen
Both subsurface.log and libdivecomputer.log are on the clipboard. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21iOS: store libdivecomputer.log in documents (same dir as app log)Gravatar jan Iversen
Make location of subsurface.log and libdivecomputer.log consistent Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21mobile: removed setting for libdivecomputer.logGravatar jan Iversen
Users need a simple way to report download problems. Asking them to go into settings, activate logging, and repeat the download is too much. libdivecomputer.log will always be generated, but overwritten, with every download, so the latest log is ready. The download is very slow due to BT, so there are no impact of having the log active, neither in terms of size (a concern on small mobiles) or write time. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-20QML UI: allow changing the connection IDGravatar jan Iversen
When downloading with bluetooth, changing connection did not work. The new selection was not passed to the download thread. Fixes #1274 Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-18mobile: add "Copy log to clipboard" buttonGravatar jan Iversen
on iOS it is practically impossible to copy the App log to e.g. a mail! in iOS 11 the log file is stored within the subsurface container and you first need to copy (actually using the clipboard) out from there to the "normal" document shared space, before it can be used. At least iOS users (and I believe Android users) are not really used to work with files, so the process is not easy to document in an understandable way. The alternative is to provide a button, which simply puts the log on the general clipboard, allowing it to be pasted in a multitud of applications. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17mobile: fix wrong coords when saving new locationGravatar Murillo Bernardes
This one place it was not being multiplied by 1000000, as expected for degrees_t. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-14Core: remove dive.h from files that don't need itGravatar Dirk Hohndel
Of course, quite a few of them indirectly get it through other header files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-14Core: introduce new subsurface-string headerGravatar Dirk Hohndel
First small step to shrinking dive.h. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-13mobile: fix next icon prefixGravatar Murillo Bernardes
Icons used directly by Kirigami use /org/kde/kirigami as prefix. Ex: previous and next icons on header. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-13iOS: fix "previous" button iconGravatar Murillo Bernardes
Icons used directly by Kirigami use /org/kde/kirigami as prefix. Ex: previous button on the GlobalDrawer. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-09mobile: show selected dive on details viewGravatar Murillo Bernardes
Call positionViewAtIndex in order to make the selected dive visible. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-07Planner: don't return static data in fake_dc()Gravatar Berthold Stoeger
fake_dc() used to return a statically allocated dc with statically allocated samples. This is of course a questionable practice in the light of multi-threading / resource ownership. Once these problems were recognized, the parameter "alloc" was added. If set to true, the function would still return a statically allocated dc, but heap-allocated samples, which could then be copied in a different dc. All in all an ownership nightmare and a recipie for disaster. The returned static dc was only used as a pointer to the samples anyway. There are four callers of fake_dc() and they all have access to a dc-structure without samples. Therefore, change the semantics of fake_dc() to fill out the passed in dc. If the caller does not care about the samples, it can simply reset the sample number to zero after work. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-16QML UI: fix incorrect icon referencesGravatar Dirk Hohndel
Not sure why this has worked in the past - it was simply wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16QML UI: ensure delegate height is not a fractionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16QML UI: dive list performance: enable cachingGravatar Dirk Hohndel
We had turned this off since it caused rendering issues, but that appears to be fixed now - and it should help to get us smoother rendering of the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16QML UI: dive list performance: no background rectangleGravatar Dirk Hohndel
This is one of the suggested performance enhancement to reduce redundant painting. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16QML UI: make the code easier to readGravatar Dirk Hohndel
And maybe this will make it faster as well? Depends on how the binding is implemented, I guess. But at least it's less confusing to read now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16QML UI: show offline notice when going offlineGravatar Dirk Hohndel
The logic was backwards and showed the notice when the user switched to auto sync mode. Fixes #1204 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16QML UI: change auto cloud sync menu textsGravatar Dirk Hohndel
This way the menu items describe what happens when you tap on that menu item. That seems more consistent and intuitive. See #1204 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-15QML UI: suppress warnings when showing GPS fixesGravatar Dirk Hohndel
Kirigami gets unhappy if a SwipeListItem isn't named listItem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-15QML UI: recalculate derived information after editing diveGravatar Dirk Hohndel
For example, when changing the cylinder, the SAC rate wasn't updated. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-15QML UI: don't show a vertical scrollbar in dive listGravatar Dirk Hohndel
With the folding trips it just looks confusing as it changes size. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-15QML: remove unused propertyGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14QML UI: always show dives that aren't in a tripGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14QML UI: allow collapsing the open tripGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14QML UI: animate trip foldingGravatar Dirk Hohndel
This looks much nicer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14QML UI: bring back folding tripsGravatar Dirk Hohndel
In older versions of Kirigami this caused all kinds of problems so we eventually gave up on it in commit 13c49276d1d4 (Revert "QML UI: make dive list fold dive trips"). Now this seems to work much better, so let's bring back trip folding! Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14Debug location savingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-14QML UI: if we don't have a current position, update it laterGravatar Dirk Hohndel
Once we get a new fix we asynchronously update the text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13iOS: log messagesGravatar Dirk Hohndel
So far we only wrote messages to subsurface.log on Android (since we couldn't figure out how to make that file user accessible on iOS). Now that that's fixed, we also need to actually write to the file in the first place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13iOS: make logfile accessible to userGravatar Dirk Hohndel
By creating it in the Documents path and setting the two magic keys, iOS will make the log file available to the user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-13iOS: always create subsurface.log fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-09Fix typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-02mapwidget-mobile: initialize the map to [0,0]Gravatar Lubomir I. Ivanov
Instead of showing the map zoomed over London by default, initialize the center at [0,0] and show the whole globe. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-02mapwidget-mobile: do not animate the first selectionGravatar Lubomir I. Ivanov
centerOnLocationHard() is added in MapPage.qml so that on `firstRun` the map is hard panned to the desired location without animation. This affects the selection of a new "Dive details" -> "Map it" or when opening a GPS location in the map. The idea behind this change is to avoid starting the map animation from an arbitrary location such as [0,0] or London. Also, to not start the map zoomed out completely and then zoom in on a selected dive. For this change to work, add the helper getCoordinatesForUUID() to qmlmapwidgethelper.cpp/.h and use it to obtain the QGeoCoordinates for a dive site UUID. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-03-19QML UI: Fix checkbox colorGravatar Joakim Bygdell
The background color in our own checkbox should match the page background. Also includes some whitespace cleanup. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19QML UI: drop focus when selecting a locationGravatar Joakim Bygdell
Make sure to drop focus both for typing and when selecting an entry from the list. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19Mobile: change location combobox idGravatar Joakim Bygdell
Change the id of the location combobox to math the naming scheme of the other comboboxes. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19Mobile: Fix location comboboxGravatar Joakim Bygdell
In the initial move to comboboxes the correct location model was not used. This uses the correct model and makes it behave like the other comboboxes. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19Mobile: for multiple buddies pick index of firstGravatar Joakim Bygdell
When a dive has multiple buddies, pick the index of the first to prevent the user from hanving to scroll through the entire list when editing. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19QML UI: drop focus on editGravatar Joakim Bygdell
Drop focus on editable comboboxes when pressing enter. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19Moblie: remove comparison when savingGravatar Joakim Bygdell
Removing the comparison of currentText vs editText when saving buddies fixes the issue of data loss when dive has more than one buddy. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19QML UI: drop focus when ComboBox element is pickedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19QML UI: cylinders aren't editableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19QML UI: switch editing back to comboBoxGravatar Joakim Bygdell
The HintsTextEdit just doesn't feel natural and intuitive. Edit, fixed rebase issues. Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-14Cleanup: introduce copy_qstring() functionGravatar Berthold Stoeger
strdup(qPrintable(s)) and copy_string(qPrintable(s)) were such common occurrences that they seem worthy of a short helper-function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-03-14Cleanup: consistently use qPrintable()Gravatar Berthold Stoeger
Replace constructs of the kind s.toUtf8().data(), s.toUtf8().constData(), s.toLocal8Bit().data(), s.toLocal8Bit.constData() or qUtf8Printable(s) by qPrintable(s). This is concise, consistent and - in principle - more performant than the .data() versions. Sadly, owing to a suboptimal implementation, qPrintable(s) currently is a pessimization compared to s.toUtf8().data(). A fix is scheduled for new Qt versions: https://codereview.qt-project.org/#/c/221331/ Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-03-12Mobile: pass QString as value to registerError()Gravatar Berthold Stoeger
registerError() may be called from a different thread context. Passing the message as a const-reference may lead to a dangling reference. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-03-11main.qml: handle mapPage in pageStack.onCurrentItemChanged()Gravatar Lubomir I. Ivanov
When the slot pageStack.onCurrentItemChanged() is reached make sure that the stackView becomes non-interactive. This prevents swiping left on the map to "go back". Also, always reload the map markers when the map becomes visible. This is not optimal and instead something in the lines of: DiveList.model.onChanged() is a much better solution. Ideally the map reload should happen on dive removal, dive addition, dive edits and sync from cloud. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-03-11main.qml: add a drawer action for the mapGravatar Lubomir I. Ivanov
This action uses the Breeze icon "map-globe.svg" and calls showMap(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>