aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveList.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-02-21 21:32:40 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-10 09:25:57 -0700
commit4b4df28ecdd528c3ad74b95b6ab00a29f24d256a (patch)
tree57bc766dff682a648239328150004624ae0a21e7 /mobile-widgets/qml/DiveList.qml
parent028807ebc5085652c53f75c1419e9cca988cd0a9 (diff)
downloadsubsurface-4b4df28ecdd528c3ad74b95b6ab00a29f24d256a.tar.gz
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>
Diffstat (limited to 'mobile-widgets/qml/DiveList.qml')
-rw-r--r--mobile-widgets/qml/DiveList.qml12
1 files changed, 11 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index 0df3f6e54..7013c8f28 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -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