+// uiName:Harmattan
import QtQuick 1.0
import com.nokia.meego 1.0
import Drone 1.0
DroneControl {
id:drone
+ // logSeq:initialPage.frameSeq
}
JoyStick {
id:js
onRudderChanged: {if(drone.confUseJoyStick) drone.yaw=rudder;}
}
+ 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_Close) {
+ 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
Page {
id:mainPage
+ property int frameSeq:0
property bool connectingBoxVisible:true
//onEntered:(mainWindow.fullscreen=true)
state:"Landscape"
DroneVideo {
+ id:droneVideo
y:0
x:0
// anchors.horizontalCenter:parent.horizontalCenter
width:drone.confFullScreen? parent.width:640 ;height:480*width/640;
- }
+ }
+ Binding {
+ target:drone
+ property:"logSeq"
+ value: droneVideo.frameSeq;
+ }
EfisPFD {
id:hudPDF
y:0
- x:100
+ anchors.horizontalCenter: parent.horizontalCenter
visible:drone.confShowHorizon
roll:drone.droneRoll
pitch:drone.dronePitch
ias:drone.droneSpeed
alt:drone.droneAltitude
+ heading:drone.droneYaw
indicatorColor:"#00FF00"
skyColor:"#00000000"
groundColor:"#00000000"
-// value:lj.xv
-// value2:lj.yv
- width:640;height:480;
+ width:500;height:400;
}
Text {
y:50
// visible:drone.confUseAccel
+ visible:drone.confShowDebug
color: "#00FF00"
id: droneCtrlValues
font.pixelSize:25
anchors.left:parent.left
anchors.bottom:parent.bottom
anchors.margins:10
- // joyBackground: ""
+ joyBackground: ""
onYvChanged:{drone.vVelocity=-1*yv/200.0;}
onXvChanged:{drone.yaw=xv/200.0;}
onPressedChanged: { drone.ctrlActive=pressed;}
visible: !drone.confUseJoyStick
id:rj
- // joyBackground: ""
+ joyBackground: ""
anchors.right:parent.right
anchors.bottom:parent.bottom
width:200;height:200;
}
Button {
- x:400
- width:60
+ x:300
+ width:80
id:flyButton
anchors.bottom:parent.bottom
anchors.margins:15
}
}
Button {
- x:400;y:100
- width:120
+ x:450
+ width:100
id:emergencyButton
- anchors.top:parent.top
+ anchors.bottom:parent.bottom
anchors.margins:15
- text:"Energency";
+ text:"Emrg";
checkable:true
onClicked:{drone.emergency=checked;}
}
-
+ Button {
+ x:600;
+ width:100
+ id:recordButton
+ anchors.bottom:parent.bottom
+ anchors.margins:15
+ text:"Rec";
+ checkable:true
+ onClicked:{droneVideo.recVideo=checked; drone.logFileName=droneVideo.videoFileName; drone.recordLog=checked;}
+ }
+ Text {
+ y:700
+ anchors.bottom:parent.bottom
+ // visible:droneVideo.recVideo
+ color: "#00FF00"
+ id: droneFrameSeq
+ font.pixelSize:25
+ text: droneVideo.videoFileName+ " "+droneVideo.frameSeq
+ }
Connections {
target:drone
Component.onCompleted: {
if (mainpageComponent.status != Component.Ready)
- // pageStack.push(mainpageComponent);
- // else
console.log("Error loading component:", mainpageComponent.errorString());
dialogComponent = Qt.createComponent("ConfigDialog.qml");