Commit graph

8 commits

Author SHA1 Message Date
Dirk Hohndel
415536aba9 QML UI: in dive details edit, put date on its own line
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-05 22:50:31 -08:00
Dirk Hohndel
fa338a26b8 QML UI: add feature to add current position when editing dive
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-01 17:26:26 -08:00
Dirk Hohndel
a0aa27e864 QML UI: handle editing of depth
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-01 00:55:34 -08:00
Dirk Hohndel
2c28b16b26 QML UI: handle editing of duration
I don't think these regular expressions are sufficiently exhaustive - but this
is forward progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 00:55:25 -08:00
Dirk Hohndel
99a5a743c4 QML UI: change the way we extract input data from dive edit
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-26 22:57:47 -08:00
Dirk Hohndel
8baae6a3b6 QML-UI: make dive edit almost sort of work
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-07 22:24:56 -08:00
Sebastian Kügler
8cf4725742 split divedetails into view and edit parts
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-07 18:46:32 +01:00
Sebastian Kügler
bd7af5a511 state machine controls edit/view dive details
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-07 18:46:32 +01:00