aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
AgeCommit message (Collapse)Author
2016-02-12QML UI: more progress update on start pageGravatar Dirk Hohndel
Again, to help track down where things hang. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12QML UI: add context menu to Theme TestGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12QML UI: experimentally enable context menu on each pageGravatar Dirk Hohndel
This is necessary to allow all user interaction when removing action buttons from the top bar. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12QML UI: experimentally turn off all the top bar buttonsGravatar Dirk Hohndel
This allows us to shrink the top bar quite a bit and have a little more screen real estate. In order to maintain functionality we need to reenable the context menu on some screens. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12QML UI: more progress information on the start pageGravatar Dirk Hohndel
Since some users report hangs when changing credentials it would be useful to see how far the application got. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: clear up more data when changing credentialsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: even with valid credentials, don't show empty dive listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML-UI: allow dive list to be pulled up above Action ButtonGravatar Dirk Hohndel
This way you can fully interact with it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: calculate correct height for the cloud credentialsGravatar Dirk Hohndel
It still complains about a binding loop but I don't quite understand why and how... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: remove unnecessary outer item from start pageGravatar Dirk Hohndel
This changes nothing except for removing the item and reindenting the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: try to get correct height for start pageGravatar Dirk Hohndel
Still not quite correct. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: make the start page scrollableGravatar Dirk Hohndel
This doesn't quite work yet as the start page appears to miscalculate its height (the cloud credentials page appears to be missing). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: redesign the About pageGravatar Dirk Hohndel
Make things centered, lay them out correctly, make sure the image fits. This includes the re-indentation of the previous commit - but the changes are so massive that it seemed pointless to do this as its own commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: close About page on back keyGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-11QML UI: cloud credentials: put the two buttons side by sideGravatar Dirk Hohndel
That looks better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: close all other pages when switching cloud credentialsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10Invalidate the remembered git SHA when changing credentialsGravatar Dirk Hohndel
Otherwise, when switching back and forth between two logins, during the second switch the dive list is not loaded as the code checks against the remembered git SHA before rewriting the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: disable some menu entries without valid credentialsGravatar Dirk Hohndel
This requires a patch to the mobile components that isn't upstream, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10Reset the authentication cache when trying new credentialsGravatar Dirk Hohndel
Otherwise Qt attempts to be smart and re-uses previously successful username (email) and password. This is an odd corner case, but it seems the right thing to do. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: allow changing credentialsGravatar Dirk Hohndel
With the integration of the credentials into the start page the logic for this has changed. Since the code for start page and dive list is actually on the same page, using opacity to switch between the two sub pages (depending on whether we have valid credentials and dives to show), the old way of changing credentials no longer worked. With theis patch the user once again can change their credentials (and change their mind and go back to the dive list). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10Better tracking of the status of the credentialsGravatar Dirk Hohndel
There are several parts of the UI that will do better if they know if the credentials that we have are incomplete (e.g., no password), invalid (server rejected them), valid (server accepted them) or potentially valid (we found a local cache for the email address, so that's likely correct, but because we are offline we cannot (or have not yet) verify the passord). So far this is specific for the mobile UI - it might make sense to try and use the same backend code and status tracking for desktop and mobile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: more accurate messages on the start pageGravatar Dirk Hohndel
Now the text shown better reflects what's going on, especially when the credentials are invalid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10Indentation fix after the last commitGravatar Dirk Hohndel
For the ThemeTest we could simply drop the item, for the GPS preferences and the DowbloadFromDiveComputer page everything got indented by one level. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: make back key work for all pagesGravatar Dirk Hohndel
Reported by a beta tester for the GPS preferences, but affects a couple more. We need to make sure that any page on the page stack is actually a MobileComponents.Page, other wise the Android back key doesn't close the page. This commit changes GPS preferences, the theme test, and the currently disabled download from divecomputer. it contains only the actual change (wrap the current content in a page). The reindentation is a separate commit for readability. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: redo the start pageGravatar Dirk Hohndel
It now explains the relationship between Subsurface-mobile and the desktop application and allows the user to enter the cloud credentials right there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: make cloud credentials usable as a component on a pageGravatar Dirk Hohndel
Instead of using this on its own page, it makes more sense to use it as part of the start page directly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: make flicking between dives fasterGravatar Rick Walsh
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10Adding about page to Subsurface-mobileGravatar Miika Turkia
This isn't pretty, but having the version string available on a place that people are likely to find does make sense when going public with the Subsurface-mobile. Especially when we do a public release, I assume the developer menu with App log might not be readily available for people to identify their installed version. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10Support function to print version stringGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09QML UI: dive edit, treat numeric input of duration as full minutesGravatar Joakim Bygdell
When editing the duration of a dive, if only numbers are entered they are treated as full miuntes. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09QML UI: Fix lingering edit modeGravatar Henrik Brautaset Aronsen
A dive would linger in edit mode when following these steps: start mobile. show theme info. click on dive in dive list. click edit. click back in topbar, again click back in the topbar. click on dive in dive list, still in edit mode. Not anymore. Also enable back button when viewing a dive. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09QML UI: Remove unused onClicked event for back buttonGravatar Henrik Brautaset Aronsen
I don't know how this got here. Probably having fun with copy and paste. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09QML UI: Back buttons for app log and theme infoGravatar Henrik Brautaset Aronsen
The app log and theme info had context menus with a single close item. No need for that. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09QML UI: enable edit of cylinder pressuresGravatar Joakim Bygdell
First cylinder only, show warning if there are more than one cylinder defined. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09QML UI: load from cache first when changing cloud credentialsGravatar Dirk Hohndel
We need to execute the same sequence of steps both when starting the app and when switching cloud credentials. This way things will work correctly when the device is offline and the user wants to switch accounts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09QML UI: draw edit/back button next to context menu button if it's shownGravatar Dirk Hohndel
Without this they were all anchored to parent.right and would be rendered on top of each other. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08QML UI: DiveDetailsView - calculate better width and set everywhereGravatar Dirk Hohndel
Even setting things up in the first row isn't enough. Every field in the grid needs an explicit width. How dumb is that. To make this more manageable calculate the correct widths at the beginning and then just reference those properties. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08QML UI: DiveDetailsView - set fixed column widthsGravatar Dirk Hohndel
In order for wrapping to work, the Text and TextEdit elements need to have a defined width. Normally the GridLayout is supposed to be able to figure out optimal widths for the different colums if you tell it which ones should stretch, but that has repeatedly caused infinite loops and crashes in the layout engine. For now, in order to get both wrapping (and therefore no clipping of the content) and avoid crashes, we hard code the width of the four columns by setting Layout.maxWidth for each element in the first row of the grid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08QML UI: DiveDetailsView - reorder the gridGravatar Dirk Hohndel
Let's put the three likely rather narrow items above each other in the right column and the others (especially the three that could run long: suit, buddy, dive master) in the left one. Also, make the individual entries more consistent in which attributes are set in which order - easier to read. Finally, make sure that all grid elements enable wrapping. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08Sync load from cloud status when changing cloud storage accountsGravatar Dirk Hohndel
Since this variable is specific to the cloud credentials in use, we need to reset it when we change credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08Always sync with cloud server when updating backend dataGravatar Dirk Hohndel
It makes no sense to only do this the very first time we connect to a cloud storage account. The existing code only happened to work because we incorrectly tried to maintain the loadFromCloud status across restarts of the application. So one bug hid another bug. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08Remember status of specific cloud account in settingsGravatar Dirk Hohndel
What matters is that the cloud storage for a specific email address has successfully been synced - and we need to remember this across restarts of the app. This way Subsurface-mobile can work with different accounts, even if offline. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08QML UI: correctly handle back key on editsGravatar Dirk Hohndel
This requires mobile components that include commit 03c868fc57e5 from earlier today. With this a single press on the back key cancels the edit and a second press on the back key brings you up one level in the page stack (usually back to the dive list). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08Move preferences under GPS menuGravatar Miika Turkia
Since we currently only have preferences that affect the GPS functionality, it might be more logical to have the preferences under GPS menu. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Avoid QtCreator warning about ==Gravatar Henrik Brautaset Aronsen
Warning M126: == and != may perform type coercion, use === or !== to avoid it Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Move endEditMode() to DiveDetails.qmlGravatar Henrik Brautaset Aronsen
Having endEditMode() in main.qml seemed wrong somehow. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Add top-right edit and back buttons for mobileGravatar Henrik Brautaset Aronsen
Adds a back button in edit mode, and an edit button for view mode. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07QML UI: another attempt to fix the random crashesGravatar Dirk Hohndel
I finally was able to reproduce the crashes with the infinite recursion when computing a GridLayout. This seems to be triggered by competing Layout.fillWidth settings that the layout engine couldn't figure out how to accomodate. I did three things to make this work better: - explicitly grab the columnWidth for the width of the DiveDetailsView. - split the GridLayout in two so the area above and below the profile are no longer forced to fit in the same column widths. - remove most of the Layout.fillWidth settings and only leave a couple that seem sufficient to get reasonable on screen layout in my experiments. Here's hoping that this one is finally resolved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07QML UI: disable download from divecomputer button on start pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Revert "QML UI: end edit mode when leaving the edit page"Gravatar Dirk Hohndel
This reverts commit d2928a137cabab30973a96a71beee9fd840db516. The presence of this Action causes crashes for one of the testers. Which is utterly ridiculous.