aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetails.qml
AgeCommit message (Collapse)Author
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>
2016-01-01QML UI: handle editing of durationGravatar Dirk Hohndel
I don't think these regular expressions are sufficiently exhaustive - but this is forward progress. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-31QML UI: refresh UI after editing / adding a diveGravatar Dirk Hohndel
This way the properties of the shown list element are updated based on what was edited. This feels weird and backwards - but it appears to be the way to do this - you literally update the elemnts in this specific instance of that QML page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-31QML UI: we don't need those semicolonsGravatar Dirk Hohndel
The code is rather inconsistent when it comes to the use of semicolons in the JS code. Let's try to not have them... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26QML UI: change the way we extract input data from dive editGravatar Dirk Hohndel
Instead of doing the silly "onEditingFinished" we get the strings from the QML components at the time we commit the change. Much more logical, much more straight forward, no issues with the TextArea not having an onEditingFinished signal. This still has a few open todos: the temperatures aren't parsed, the edit screen is missing depth and duration, we can't edit the dive time (and it isn't passed in on the commit). But it's progress. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26QML UI: correct text for context drawer when adding diveGravatar Dirk Hohndel
This needs to say "Save" to indicate that you are saving the data that was entered. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26QML-UI: add hacky, useless way to show the GPS location of a diveGravatar Dirk Hohndel
This is of course stupid and NOT what we want to do, but one could argue it's better than nothing (well, not sure, whatever). If we have a GPS location associated with a dive and you tap on the location name when showing the dive details, it opens a static image of a satellite map with a marker for the dive site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07QML-UI: make dive edit almost sort of workGravatar Dirk Hohndel
So this has a lot of caveats: - right now it only works for buddy, divemaster and suit - you have to actually exit the field with your cursor or the change doesn't take - that's ridiculous, there must be a far more clever way to do this - because I use the onEditingFinished handler I can't do this for the Notes (so here's another reason why I KNOW that this is the wrong way to do this) But it shows in principle how this could be done and once someone who actually knows what they are doing gets their hands on the code I'm optimistic that this can be morphed into something much more useful. It does tie together the changes made in the previous commits so that both clicking around on the dive list gives the expected results and synching the data back to the cloud actually works. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-08implement new menu structureGravatar Sebastian Kügler
This patch creates the following menu structure in the application menu as discussed on irc: Cloud credentials Preferences Manage dives Download from computer Add dive manually Refresh dives Upload to cloud GPS Add GPS tags to dives Upload GPS data Clear GPS cache Advanced (hidden by default) App log Theme Information "Save" moves out of the context menu, since it's a global thing (syncs to server). Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07redesign dive details viewGravatar Sebastian Kügler
This change cleans up the layout optimized for viewing dive details. The top part contains brief and essential dive info (location, depth, duration, dive no.), then the profile, then a table with more details, and finally the notes. The goal here is to present the dive's data more efficiently and attractively now that the edit part is factored out. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07dive edit gets contextual actionsGravatar Sebastian Kügler
Option to switch between view and edit and to save the changes are now in the context drawer. Let's see how this works out. If it turns out to be badly discoverable (which is what I'm worried about), this needs to be fixed at component level.
2015-12-07add a contextdrawerGravatar Sebastian Kügler
This item can be dragged in from the right hand side and provides contextual actions for a page. It will be used in the dive details edit. If there are actions, the floating button on the bottom shows an arrow indicating that one can drag it in from the right hand side to the left. Also clean up a bit of a noisy print that's not needed anymore. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07split divedetails into view and edit partsGravatar Sebastian Kügler
This splits the dive detail page into two modes: view and edit - The edit part loses the profile (it's not editable anyway) - The view part gets a new layout, friendlier for viewing - Properties for diveNumber, duration, depth and weight are added Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07state machine controls edit/view dive detailsGravatar Sebastian Kügler
This is the first part of splitting the dive details into edit/view modes. - introduce a state machine to switch between view and edit mode - factor out the editor into its own component Both components are almost the same, but we can change them individually now. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-02QML-UI: Remove button from dive detailsGravatar Joakim Bygdell
The button to hide the dive profile serves no purpose anymore. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30The system integrated component is TextAreaGravatar Marco Martin
this will give graphical styling and behavior Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30Align the labels ar rightGravatar Marco Martin
uniform look for forms: labels aligned at the right, fileds at the left Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30use a ScrollView for the main flickableGravatar Marco Martin
It managed the styled scroll indicator and the behavior. Signed-off-by: Marco Martin <notmart@gmail.com>