summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/main.qml
diff options
context:
space:
mode:
authorGravatar Henrik Brautaset Aronsen <subsurface@henrik.synth.no>2016-02-07 22:23:07 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-07 13:56:46 -0800
commit47403588e5241368c43dd407090b1be214b56252 (patch)
tree1e4bf425e0ffd722ffdc0147a8d21984a3d718d9 /qt-mobile/qml/main.qml
parentd9763100940cbcff297d88a0f1597ba7bd07ea01 (diff)
downloadsubsurface-47403588e5241368c43dd407090b1be214b56252.tar.gz
Move endEditMode() to DiveDetails.qml
Having endEditMode() in main.qml seemed wrong somehow. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml/main.qml')
-rw-r--r--qt-mobile/qml/main.qml17
1 files changed, 6 insertions, 11 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index fae6422fd..6af5a364d 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -20,11 +20,6 @@ MobileComponents.ApplicationWindow {
visible: false
opacity: 0
- function endEditMode() {
- detailsWindow.state = "view"
- // somehow also should deal with the icon for the Action Button
- }
-
globalDrawer: MobileComponents.GlobalDrawer {
title: "Subsurface"
titleIcon: "qrc:/qml/subsurface-mobile-icon.png"
@@ -37,21 +32,21 @@ MobileComponents.ApplicationWindow {
for (var i=stackView.depth; i>1; i--) {
stackView.pop()
}
- endEditMode()
+ detailsWindow.endEditMode()
}
},
Action {
text: "Cloud credentials"
onTriggered: {
stackView.push(cloudCredWindow)
- endEditMode()
+ detailsWindow.endEditMode()
}
},
Action {
text: "Preferences"
onTriggered: {
stackView.push(prefsWindow)
- endEditMode()
+ detailsWindow.endEditMode()
}
},
MobileComponents.ActionGroup {
@@ -61,7 +56,7 @@ MobileComponents.ApplicationWindow {
Action {
text: "Download from computer"
onTriggered: {
- endEditMode()
+ detailsWindow.endEditMode()
stackView.push(downloadDivesWindow)
}
}
@@ -89,14 +84,14 @@ MobileComponents.ApplicationWindow {
Action {
text: "Refresh"
onTriggered: {
- endEditMode()
+ detailsWindow.endEditMode()
manager.loadDives();
}
}
Action {
text: "Upload to cloud"
onTriggered: {
- endEditMode()
+ detailsWindow.endEditMode()
manager.saveChanges();
}
}