aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetails.qml
AgeCommit message (Collapse)Author
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Revert "QML UI: make sure the correct data is in the bread crumbs"Gravatar Dirk Hohndel
This reverts commit 410fd222d15dca8673606133499cefde780f163b. The change this relied on was rejected by upstream Kirigami Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: animate showing the dive edit sheetGravatar Dirk Hohndel
This now uses the correct property to open the OverlaySheet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Revert "QML UI: animate showing the dive edit sheet"Gravatar Dirk Hohndel
This reverts commit faa22d5343f39f335bc281e139bc347241295ebf. Upstream Kirigami already had a property to do this. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: make sure the correct data is in the bread crumbsGravatar Dirk Hohndel
Once again this requires changes that aren't upstream in Kirigami. But with this the bread crumbs update when the user swipes from dive to dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: remove obsolete codeGravatar Dirk Hohndel
This simply causes an error Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: animate showing the dive edit sheetGravatar Dirk Hohndel
This requires a change to Kirigami so that a property change (instead of calling the open() function) can trigger the animation. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: end editing mode when edit overlay is flicked offscreenGravatar Dirk Hohndel
Just changing the state isn't quite enough. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-31Merge branch 'kirigamiPort' of https://github.com/sebasje/subsurface into ↵Gravatar Dirk Hohndel
mergeKirigamiPort This merge was a bit more challenging given how far things had diverged, but I hope I got it mostly right. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-30QML UI: simplify the code to cancel edit / addGravatar Dirk Hohndel
This way we have one function that correctly ends both modes. As a positive side effect this fixes a bug where one could exit the add mode by tapping Dive list in the main menu which would not delete the partially created dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23QML UI: work around missing back button on iOSGravatar Dirk Hohndel
Especially when showing the dive details and editing dive details, having the option to go back in the context menu is nicer on iOS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-11QML UI: try to clean up UI before showing notificationGravatar Dirk Hohndel
This way we shouldn't have a drawer or other changes to the UI prevent the user from seeing / interacting with the notification. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08port to Kirigami imports and new apiGravatar Marco Martin
first quick and dirty port of the imports to Kirigami 1.0 (using system installed for now) adapt to api changes and try out some of the proposed ui changes from the HIG Signed-off-by: Marco Martin <notmart@gmail.com>
2016-03-03use the global showPassiveNotification functionGravatar Marco Martin
don't create a local PassiveNotification copy, use the global show/hidePassiveNotification from ApplicationWindow, now that it works Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-29QML UI: implement undeleteGravatar Dirk Hohndel
This code is very similar to the undo code in the desktop UI, but untangling that from the desktop seemed massive overkill; we don't have lists of dives to delete and undelete here - so this is actually much simpler and easier to maintain (I hope). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-29QML UI: present an undo dialog after deleteGravatar Dirk Hohndel
The dialog gives the user 3 seconds to undo the delete and then disappears without any user interaction. This isn't hooked up, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-23QML UI: add context menu to delete diveGravatar Dirk Hohndel
This allows the user to delete the currently shown dive. This action takes effect right away, no confirmation, it gets right away written to the local git cache. One idea for an undo operation here could be to simply reset the git tree to HEAD^ and reload. Not elegant, but would work. 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: 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: 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-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: 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-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-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-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-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-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.
2016-02-06QML UI: end edit mode when leaving the edit pageGravatar Dirk Hohndel
This should fix the problem when using the back key to exit the edit page. Requires a patch to the mobile components that isn't upstream, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05QML UI: enable editing of weightGravatar Dirk Hohndel
But only if there is only one weight system defined in the dive. Otherwise display a read only text that explains that this cannot be edited. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05QML UI: explicitly hide the keyboard when exiting dive editGravatar Dirk Hohndel
If you save or cancel the dive edit, the keyboard should be closed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29Minor cleanupsGravatar Dirk Hohndel
Improve readability of the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: introduce "add" state and correctly clean up when canceledGravatar Dirk Hohndel
Adding a dive is just like editing it, except that canceling the operation has different consequences. Instead of trying to figure this out by some inference on other state, let's just make it explicit and then clean up after ourselves if the user canceled a manual dive add. This also switches to use the properties that we defined in order for the main menu to be able to setup these values. Makes the code easier to read and is more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: remove apparently obsolete codeGravatar Dirk Hohndel
I couldn't make sense of either the code nor the comment, so I tried what broke when I removed it. Nothing that I could find. So maybe we don't need this after all? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: better way to determine dive details edit widthGravatar Dirk Hohndel
Instead of passing magic values around, calculate the columnWidth as part of the SubsurfaceTheme object. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: add the properties needed to be able to manually add diveGravatar Dirk Hohndel
This way the trigger from the main drawer works again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: use unique names for the different ListViewsGravatar Dirk Hohndel
Having both the dive list (the vertical list) and the sequence of dive details (the horizontally swipe-able list) named the same caused me endless confusion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21QML UI: maximize horizontal size of notes when editingGravatar Dirk Hohndel
This seems a bit brute force but I couldn't get the width to propagate correctly any other way. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20QML UI: switch edit back to not being a drawerGravatar Dirk Hohndel
With this edit seems to work again. The edit page can be scrolled around on smaller screens to allow editing every part of it and to allow the user to press the "save" button. This is mainly intended to make sure testing can continue - it's unclear if this will be the final design. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20QML UI: show date and time for diveGravatar Dirk Hohndel
We keep losing the time when people move code around. date really is just the date and doesn't include the time component. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19Close edit drawer when current dive changesGravatar Sebastian Kügler
This prevents having the edit drawer opened at a different than the current dive. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-12Better behavior for dive details flickingGravatar Sebastian Kügler
- stop at bounds, this is in line with other flickables. I really don't like Flickables floppy default behavior to allow dragging and scrolling over the bounds. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-12Fix bugs in edit drawerGravatar Sebastian Kügler
- As the list may get reset on save, the dive_id effectively changes since currentItem isn't updated. So after editing, we end up with a different currentItem than visible. This is very unintuitive, but has to do with the model resetting. It would result in the edit view not showing the current dive when opened the second time. Let's make sure that out currentItem is always the visible one before we're filling the data into the edit page. - Close the drawer when we're navigating away from the dive item, for example when hitting the back button. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-12dive details navigationGravatar Sebastian Kügler
This patch reworks the navigation of the dive details. - The detailsview is now a list view with page-sized delegates. This allows horizontal swiping to the next and previous dive. - The central button now allows to open the edit mode for the dive. Original patch was done by Marco Martin, but needed to be reapplied by hand. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-07QML UI: clean up notes field after editGravatar Dirk Hohndel
We don't want any of the rich text markup to sneak into our fields. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-06QML UI: reimplement context menu for dive detailsGravatar Dirk Hohndel
With the mobile components fixed we can now simply switch between different menu content - no need to play games and redefine the actions on the fly. This also adds a cancel button for editing and cleans up when the user hits cancel. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-05QML UI: allow edit of dive date and timeGravatar Dirk Hohndel
This is a bit more complicated because we are asking the user to edit the text field instead of giving them a date and time picker. This is not a great choice, but let's run with it for now. One downside is that the user is likely going to edit the date "Oct 29" -> "Oct 25" without adjusting the day of the week. And if we then try to parse that Qt correctly complains about an invalid date. So we hack around this by removing the day of the week from both the format and the date entered (which of course now will break things if the user did, in fact, adjust the day of the week). As I said, not a great solution. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-06adjustments needed for latest mobilecomponentsGravatar Sebastian Kügler
- flickable is gone, Page now just takes the children items, meaning we can remove this assignment - BasicListItem is factored out, and we now need it in our qrc Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-01QML UI: update context menu textGravatar Dirk Hohndel
The automagic update gets disabled once we overwrite the text with "Save" at some point, so instead we appear to have to do this manually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01QML UI: handle editing of depthGravatar Dirk Hohndel
Getting closer to being able to really edit / add dives in the mobile UI. This works for manually added dives - needs a bit more thought for dives downloaded from dive computers as we don't necessarily want to change the maxdepth in conflict with the samples. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>