aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveDetailsEdit.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-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-02QML UI: resolve confusion about dive list model orderingGravatar Dirk Hohndel
Oops, I forgot to take the sort model on top of the model into account. Now everything should stay consistent - ListView order when accessed from QML, but internal order when accessing the underlying array. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02QML UI: after adding a dive, jump to it in the listGravatar Dirk Hohndel
Don't do the slow motion scrolling through the list if we previously showed a different dive in the list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-28QML UI: ensure that after a dive edit the profile is redrawnGravatar Dirk Hohndel
Normally this is triggered when the DiveDetailsView component is completed, but since QML isn't recreating this component unless we switch to a dive a couple of spots in the dive list away from this one, we wouldn't get any changes in the data reflected in the profile. But since this now redraws the same dive that potentially was drawn last, we need to make sure we call plotDive() with force=true. I also suspect that this could help with the strange bug that sometimes we show a blank profile after certain edits. See #1013 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-20QML UI: only allow valid gas mixesGravatar Dirk Hohndel
The input is restricted to EAN100 EANxx (with 'x' one of 0..9) AIR xx/xx (with 'x' one of 0..9) xxx (with 'x' one of 0..9 and the number <= 100) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-20QML UI: don't allow negative duration or depthGravatar 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-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-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-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: use the new helper to ensure the right dive is selected after editGravatar Dirk Hohndel
There are two cases where this is important - when running Manually add dive which may add a dive in the middle of the dive list - when editing the date and time of a dive which may move it around in the dive list Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: add field to edit the total weightGravatar Dirk Hohndel
This isn't hooked up to anything, yet. 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: make all buttons more attractiveGravatar Rick Walsh
Commit f3f7930 introduced a more attractive button style to the start page. This patch turns it into its own type so it can easily be used everywhere. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.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-06QML UI: edit notes in rich text modeGravatar Dirk Hohndel
This way we don't show <br> for line breaks. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-05QML UI: in dive details edit, put date on its own lineGravatar Dirk Hohndel
This way we can support a simple way for the user to edit the date. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01QML UI: add feature to add current position when editing diveGravatar Dirk Hohndel
This isn't quite perfect yet. If it takes too long to get the GPS fix (i.e., if you save it before you get the fix), this will simply fail and not store a position. But in normal conditions (you check the box, you edit the data, you save), especially when outside on a dive boat, this should work fine. For the other cases we need to implement some kind of callback to still collect the data. 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-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-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-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>