mobile UI: add divelist context drawer action to edit trip details

For now this only shows the trip details. They can be edited on the page, but
there is no way to save those edits, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-02-21 21:32:40 -08:00
parent 028807ebc5
commit 4b4df28ecd
4 changed files with 83 additions and 1 deletions

View file

@ -284,6 +284,16 @@ Kirigami.ScrollablePage {
mapPage.centerOnDiveSite(currentItem.myData.diveSite)
}
}
property QtObject tripDetailsEdit: Kirigami.Action {
text: qsTr("Edit trip details")
visible: currentItem && currentItem.myData && currentItem.myData.isTrip
onTriggered: {
tripEditWindow.tripLocation = currentItem.myData.tripLocation
tripEditWindow.tripNotes = currentItem.myData.tripNotes
pageStack.push(tripEditWindow)
}
}
property QtObject undoAction: Kirigami.Action {
text: qsTr("Undo") + " " + manager.undoText
enabled: manager.undoText !== ""
@ -294,7 +304,7 @@ Kirigami.ScrollablePage {
enabled: manager.redoText !== ""
onTriggered: manager.redo()
}
property variant contextactions: [ removeDiveFromTripAction, addDiveToTripAboveAction, addDiveToTripBelowAction, deleteAction, mapAction, undoAction, redoAction ]
property variant contextactions: [ removeDiveFromTripAction, addDiveToTripAboveAction, addDiveToTripBelowAction, deleteAction, mapAction, tripDetailsEdit, undoAction, redoAction ]
StartPage {
id: startPage
anchors.fill: parent