property Component dialogComponent
// property alias m: mainPage
- /*
- ToolBarLayout {
- id: commonTools
- visible: false
- ToolItem { iconId: "icon-m-toolbar-back"; onClicked: pageStack.pop(); }
- // ToolItem { iconId: "icon-m-toolbar-home"; onClicked: pageStack.pop(); }
- ToolItem { iconId: "icon-m-toolbar-view-menu"; onClicked: myMenu.open(); }
- }
- */
ToolBarLayout {
id: commonTools
ToolButton {
onRudderChanged: {if(drone.confUseJoyStick) drone.yaw=rudder;}
}
+ Keys.onUpPressed: {
+ console.debug("QML:Keys.onUpPressed",event.key)
+ if (event.key == Qt.Key_TopMenu)
+ console.debug("QML: opening menu!")
+ else if (event.key == Qt.Key_MediaPrevious) {
+ console.debug("QML: closing! (maybe)")
+ pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
+ }
+ }
+ Keys.onPressed: {
+ console.debug("QML:Keys.onPressed",event.key)
+ if (event.key == Qt.Key_TopMenu)
+ console.debug("QML: opening menu!")
+ else if (event.key == Qt.Key_MediaPrevious) {
+ console.debug("QML: closing! (maybe)")
+ pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
+ }
+ }
+
+ function backKey() {
+ console.debug("QML: backKey")
+ pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
+ }
+
Component {
id: mainpageComponent
Button {
x:400
- width:60
+ width:80
height:50
id:flyButton
anchors.bottom:parent.bottom
}
Button {
x:500;
- width:80
+ width:90
height:50
id:emergencyButton
anchors.bottom:parent.bottom