aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/qml')
-rw-r--r--qt-mobile/qml/DiveDetails.qml2
-rw-r--r--qt-mobile/qml/main.qml1
2 files changed, 3 insertions, 0 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml
index 7958871fe..ca2e04f08 100644
--- a/qt-mobile/qml/DiveDetails.qml
+++ b/qt-mobile/qml/DiveDetails.qml
@@ -28,6 +28,7 @@ MobileComponents.Page {
property string date
property string number
property string weight
+ property alias viewEditText: viewEditSelector.text
state: "view"
@@ -46,6 +47,7 @@ MobileComponents.Page {
contextualActions: [
Action {
+ id: viewEditSelector
text: checked ? "View" : "Edit"
checkable: true
iconName: checked ? "view-readermode" : "document-edit"
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index 703f4d17f..e4bc08d67 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -49,6 +49,7 @@ MobileComponents.ApplicationWindow {
Action {
text: "Add dive manually"
onTriggered: {
+ detailsWindow.viewEditText = "Save"
detailsWindow.state = "edit"
detailsWindow.dive_id = manager.addDive();
detailsWindow.number = manager.getNumber(detailsWindow.dive_id)