diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-06-12 12:09:49 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-06-12 12:09:49 -0700 |
commit | f2e03022fa420309c268221cf75b41f176526455 (patch) | |
tree | 3a239722c7690453569f809b071e592c599a001d /mobile-widgets/qml | |
parent | 72523ff0dfc6f8e2ecd9ef07f72cdce2af527e3d (diff) | |
download | subsurface-f2e03022fa420309c268221cf75b41f176526455.tar.gz |
QML UI: disable GPS functionality on iOS
I still haven't figured out how to make GPS work on iOS. So let's not
pretend this works.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r-- | mobile-widgets/qml/main.qml | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index b4c6f3610..f3db1b297 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -95,7 +95,8 @@ Kirigami.ApplicationWindow { titleIcon: "qrc:/qml/subsurface-mobile-icon.png" bannerImageSource: "dive.jpg" - actions: [ + + property list<QtObject> topActions: [ Kirigami.Action { text: qsTr("Dive list") onTriggered: { @@ -127,16 +128,6 @@ Kirigami.ApplicationWindow { }, Kirigami.Action { text: qsTr("Manage dives") - /* - * disable for the beta to avoid confusion - Action { - text: qsTr("Download from computer") - onTriggered: { - detailsWindow.endEditMode() - stackView.push(downloadDivesWindow) - } - } - */ Kirigami.Action { text: qsTr("Add dive manually") enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD @@ -179,8 +170,10 @@ Kirigami.ApplicationWindow { } } } - }, + } + ] // end topActions + property list<QtObject> gpsActions: [ Kirigami.Action { text: qsTr("GPS") enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL @@ -227,8 +220,10 @@ Kirigami.ApplicationWindow { detailsWindow.endEditMode() } } - }, + } + ] // end gpsActions + property list<QtObject> bottomActions: [ Kirigami.Action { text: qsTr("Developer") Kirigami.Action { @@ -258,7 +253,21 @@ Kirigami.ApplicationWindow { detailsWindow.endEditMode() } } - ] // end actions + ] // end bottonActions + + Component.onCompleted: { + var createActions = new Array(0) + for (var i = 0; i < topActions.length; i++) + createActions.push(topActions[i]) + if (Qt.platform !== "ios") { + for (var i = 0; i < gpsActions.length; i++) + createActions.push(gpsActions[i]) + } + for (var i = 0; i < bottomActions.length; i++) + createActions.push(bottomActions[i]) + actions = createActions + print(actions) + } MouseArea { height: childrenRect.height |