aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2016-05-03QML UI: make sure Kirigami doesn't exit by mistakeGravatar Dirk Hohndel
The ApplicationWindow has the backRequested signal and if we don't accept that event, Kirigami will exit the app which is never what we want. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML UI: show nocloud button at startGravatar Dirk Hohndel
While this seemed to work fine on iOS and when compiling the QML UI on a desktop, on Android the nocloud button wasn't shown at app start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02Make the last column take all the available sizeGravatar Marco Martin
The grid layout had each column fixed to a width taken as a portion of the grid width, but since the grid has a columnSpacing defined as well, the computation doesn't add up, helping in causing an infinite recursion problem in the attempt of sizing and positioning all the children of the layout [Dirk Hohndel: heavily modified, but the basic idea remains] Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-02Don't wrap labelsGravatar Marco Martin
if the text in every column can wrap anywhre, we don't have a stable way to know how large the columns themselves may be. This can cause an infinite recursion while trying to figure out the width of the items, as the sizeHint(Qt::ImplicitSize) of those labels (Buddy, Cylinder etc) will not be stable as it will once return the size of the text wrapped and once the size of the text not wrapped. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-01QML UI: break grid layout into smaller layoutsGravatar Dirk Hohndel
Since the big layout causes an infinite recursion in the Qt/QML layout engine. Also remove a no longer accurate comment. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-01QML UI: Left align all labels in DiveDetailsViewGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Remove duplicate resource mentionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Merge branch 'offlineDefault'Gravatar Dirk Hohndel
2016-04-30QML UI: when first entering cloud credentials, force cloud connectionGravatar Dirk Hohndel
With offline the default now, we need to force a connection at least once so that the repos are in sync. And then of course we need to return to the correct state, regardless on whether this connection succeeded or failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Connect to the reply, not the managerGravatar Dirk Hohndel
This way if there are other pending connections we don't get triggered by the wrong completion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: forceRemoteSync means connect even without unsaved changesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: better diagnostics when cloud connection failsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Only create the path to no cloud local storage onceGravatar Dirk Hohndel
This required a small change to the helper function, but this seemed totally worth it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30QML UI: make text match the implementationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-30Fix logic for when to mark dive list as changedGravatar Dirk Hohndel
Since saving checks if there are changes, we have to always mark the dive list as changed before asking for the changes to be saved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29QML UI: when switching from no cloud to cloud usage, don't drop local dataGravatar Dirk Hohndel
This is rather simplistic, it just imports the local data into the remote repository and therefore loses the git history of the local data - but I wasn't able to make the git merge without shared base commit work, so I went this much easier to implement route instead. One thing we need to be careful about is that contacting the remote server could fail. If we don't manage to merge the dives from cloud server and local storage, we need to revery to no cloud status in order not to lose the local data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29QML UI: fix order of tests when saving changesGravatar Dirk Hohndel
Only check for previous cloud connection when actually trying to save to cloud Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29Clean up comparison syntax in qmlGravatar Dirk Hohndel
For consistency. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-29QML UI: make sure nothing is lost when changing cloud credentialsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27QML UI: handle failure to read local dive dataGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27only set index if we have specific targetGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27QML UI: use anchor to fill parentGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27Remove hack that's no longer neededGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27QML UI: with a local default file setup, open that at startGravatar Dirk Hohndel
And set no cloud mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27Add helper function for the consumption of loaded dive dataGravatar Dirk Hohndel
This allows us to call that part of the process from multiple places in the future. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-27QML UI: in no cloud mode, save to a default local repoGravatar Dirk Hohndel
And set that up as the default file to load at start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-26QML UI: start out with save button visibleGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-26Adapt to Kirigami api changesGravatar Marco Martin
* add new file AbstractApplicationHeader.qml to the qrc * add new file AbstractApplicationWindow.qml to the qrc * use new api for custom ApplicationHeader header: Kirigami.ApplicationHeader { minimumHeight: 0 preferredHeight: Kirigami.Units.gridUnit * (Qt.platform.os == "ios" ? 2 : 1) maximumHeight: Kirigami.Units.gridUnit * 2 } Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22QML UI: adapt "Manage dives" to no cloud statusGravatar Dirk Hohndel
If we are in no cloud mode - allow adding dives via the menu - enabling / disabling automatic sync makes no sense. - if the user wants to manually sync the cloud, they need to first enter credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22QML UI: when chosing 'no cloud', switch to dive listGravatar Dirk Hohndel
Currently we don't remember that we picked 'no cloud' across restarts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22QML UI: turn off 'no cloud' button when not in useGravatar Dirk Hohndel
This needs to be actively cleared. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22QML UI: add option to disable cloud to start screenGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22QML UI: allow switching to offline mode without valid credentialsGravatar Dirk Hohndel
If the user wants to work offline, they don't need validated credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22QML UI: reword the intro text to mention offline modeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-22QML UI: rename menu entry for offline useGravatar Dirk Hohndel
That really is what it boils down to. Also removes a few stray spaces in the warning text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-21QML UI: allow changing input fields with tab/return keyGravatar Dirk Hohndel
This assumes a physical keyboard (e.g., iPad with BT keyboard). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-21QML UI: don't exit on iOSGravatar Dirk Hohndel
Apparently users interpret that as a crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-21QML UI: add new Kirigami fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20QML UI: don't show add dive button without valid credentialsGravatar Dirk Hohndel
Given that currently we don't deal well with not having a git repository that is linked to cloud storage, don't allow people to add dives unless there are verified cloud credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20QML UI: make sure drawer is really closed after deleteGravatar Dirk Hohndel
At least one iPhone user still has the drawer pop open and prevent them from using the undo function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: make multi column support work againGravatar Dirk Hohndel
Due to a change in Kirigami on most tablets even in landscape mode we are only showing one column. Because of this I missed the fact that I had broken multi column support by mistake. Without setting the width of the dive list it expands all the way and prevents the showing of two pages next to each other. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19Don't put margins outside the internal ListViewGravatar Marco Martin
put the margins only around the fullscreen delegate of the listview, making the listview go all trough the screen edges. This because the cutted effect when the list view is half scrolled looks quite ugly. Making the ListView reach the borders also moves the scroll indicator at the screen edge where it conventionally is. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: correctly show if we are accessing remote or local storageGravatar Dirk Hohndel
This makes sure that if the user switches to offline mode they don't get incorrect notifications that tell them that they are accessing cloud storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: prevent changing pages while showing the edit/add overlay sheetGravatar Dirk Hohndel
If you switch back to the dive list by swiping horizontally you stay in edit/add mode and then can't select a dive on the dive list. This way you have to discard or save the edit, first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19Remove QML files that are no longer usedGravatar Dirk Hohndel
The TextButton was what we used for actions very early on, and the TopBar has now been replaced by the Kirigami header bar. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: show dive site on map with left action on dive details pageGravatar Dirk Hohndel
The icon isn't great, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: adapt for latest KirigamiGravatar Dirk Hohndel
In commit 50ebdd020e3c of the Kirigami project the syntax with which actions are added to pages has changed. This commit tracks that, adds the new file that was added in Kirigami and also removes the now obsolete context menus (since we have a working back button on iOS now) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19QML UI: always show the time stamp when logging dataGravatar Dirk Hohndel
This should help understand some of the issues with git storage and GPS fixes better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17QML UI: only show GPS service / use current location if GPS accessibleGravatar Dirk Hohndel
If there is no GPS source or if permission to use it was denied, don't offer to run the GPS service or to detect the current location when adding or editing dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17QML UI: make the state of the GPS service available to QMLGravatar Dirk Hohndel
This exposes a locationServiceAvailable property to QML and keeps it in sync with the corresponding state in the GpsLocation widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>