aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-02-14Add dive property to easily test if there isn't an actual diveGravatar Dirk Hohndel
Right now this just tests for zero duration, but maybe this should also return true for positive duration and max depth of 0. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-14Remove debug outputGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-14Grab pressures from samples if requiredGravatar Miika Turkia
If cylinder does not have start and end pressures assigned, attempt to grab them from the samples instead. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-14Test cylinder usage properlyGravatar Miika Turkia
It is better to use the proper function to test if cylinder is in use than just checking the description. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-14QML UI: back key on dive list exits the appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: when canceling a dive add, go back to dive listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: simplify and correct top bar layoutGravatar Dirk Hohndel
Now things are centered and reasonably well spaced Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: remove disabled parts of the top barGravatar Dirk Hohndel
I guess we are going with the Plasma Mobile influenced design after all Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: better margins for start pageGravatar Dirk Hohndel
This way it doesn't look like it's stuck in the corner. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13Fix incorrect reference to endEditMode()Gravatar Dirk Hohndel
Not sure how that slipped through the cracks. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: use action button for save in GPS preferencesGravatar Dirk Hohndel
For consistency Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: don't change dive while editingGravatar Dirk Hohndel
If the user taps on a dive in the dive list while a dive is being edited or added, ignore that tap. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: change the dive add/edit action button to be saveGravatar Dirk Hohndel
Remove the button on the page and instead use the action button to save and the back key to cancel. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: use action button and Android back button to save / go backGravatar Dirk Hohndel
This is more consistent with the rest of our UI To make this work you once again need changes to the mobile components that aren't upstream, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13QML UI: enable edit of gasmixGravatar 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-13Add helper function to parse gasmix stringsGravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13Add helper function to retrieve first gasGravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13While parsing weight and pressure we should not change the users settings.Gravatar Joakim Bygdell
Now it is possible to enter a specific unit that is different from the unit stored in the preferences. If only numbers are inputed the unit will be the same as specified by the users preferences. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12QML UI: remove the redundant context menus that just close the pageGravatar Dirk Hohndel
Android users are well used to using the back key for this. I kept the code in place as things may end up completely different on IOS or other mobile platforms. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12QML UI: when saving edits, really only save them locallyGravatar Dirk Hohndel
This should have been obvious. Without explicitly asking for only local git activity, it will connect to the remote. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12QML UI: don't even try to connect if email or password are emptyGravatar Dirk Hohndel
This way the user gets better messages on the screen. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12Don't connect to remote if git_local_only is setGravatar Dirk Hohndel
If there was no local cache we still tried to connect to the remote, even with git_local_only set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-12Add missing importGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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-10Don't just keep going when opening a git URL failsGravatar Dirk Hohndel
Once we identified that our filename is actually a git designator (as seen by the fact that it ends in a [branchname] surrounded by '[]'), we shouldn't try to open that filename in order to try other ways of parsing the data; instead we should just return an error to the caller. This way the calling code can tell that an error occured. 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>