2013-11-14 00:48:00 +01:00
|
|
|
import QtQuick 2.0
|
2012-07-23 09:19:24 +02:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
color: "#666666"
|
|
|
|
|
2012-09-09 08:58:54 +02:00
|
|
|
SvgElementImage {
|
2012-07-23 09:19:24 +02:00
|
|
|
id: background
|
2013-10-20 06:49:59 +02:00
|
|
|
elementName: "pfd-window"
|
2012-07-23 09:19:24 +02:00
|
|
|
fillMode: Image.PreserveAspectFit
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2012-09-09 08:58:54 +02:00
|
|
|
sceneSize: Qt.size(width, height)
|
2012-07-23 09:19:24 +02:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: sceneItem
|
2013-10-20 15:05:14 +02:00
|
|
|
property variant viewportSize : Qt.size(width, height)
|
|
|
|
|
2012-07-23 09:19:24 +02:00
|
|
|
width: parent.paintedWidth
|
|
|
|
height: parent.paintedHeight
|
|
|
|
anchors.centerIn: parent
|
|
|
|
clip: true
|
|
|
|
|
2012-07-31 16:32:46 +02:00
|
|
|
Loader {
|
|
|
|
id: worldLoader
|
2012-07-29 08:05:59 +02:00
|
|
|
anchors.fill: parent
|
2012-07-31 16:32:46 +02:00
|
|
|
source: qmlWidget.terrainEnabled ? "PfdTerrainView.qml" : "PfdWorldView.qml"
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2013-10-20 06:49:59 +02:00
|
|
|
HorizontCenter {
|
|
|
|
id: horizontCenterItem
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2013-10-20 06:49:59 +02:00
|
|
|
anchors.fill: parent
|
|
|
|
}
|
2012-09-09 08:58:54 +02:00
|
|
|
|
2013-10-20 06:49:59 +02:00
|
|
|
RollScale {
|
|
|
|
id: rollscale
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2013-10-20 06:49:59 +02:00
|
|
|
horizontCenter: horizontCenterItem.horizontCenter
|
|
|
|
anchors.fill: parent
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2012-09-09 08:58:54 +02:00
|
|
|
SvgElementImage {
|
2012-07-23 09:19:24 +02:00
|
|
|
id: foreground
|
2012-09-09 08:58:54 +02:00
|
|
|
elementName: "foreground"
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2012-09-09 08:58:54 +02:00
|
|
|
|
2012-07-23 09:19:24 +02:00
|
|
|
anchors.centerIn: parent
|
|
|
|
}
|
|
|
|
|
2012-09-20 01:17:10 +02:00
|
|
|
SvgElementImage {
|
|
|
|
id: side_slip
|
|
|
|
elementName: "sideslip"
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2012-09-20 01:17:10 +02:00
|
|
|
smooth: true
|
|
|
|
|
2013-06-23 00:10:00 +02:00
|
|
|
property real sideSlip: AccelState.y
|
2012-09-20 01:17:10 +02:00
|
|
|
//smooth side slip changes, a low pass filter replacement
|
|
|
|
//accels are updated once per second
|
|
|
|
Behavior on sideSlip {
|
|
|
|
SmoothedAnimation {
|
|
|
|
duration: 1000
|
|
|
|
velocity: -1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
anchors.horizontalCenter: foreground.horizontalCenter
|
|
|
|
//0.5 coefficient is empirical to limit indicator movement
|
|
|
|
anchors.horizontalCenterOffset: -sideSlip*width*0.5
|
|
|
|
y: scaledBounds.y * sceneItem.height
|
|
|
|
}
|
|
|
|
|
2012-09-11 07:16:58 +02:00
|
|
|
Compass {
|
|
|
|
anchors.fill: parent
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
SpeedScale {
|
|
|
|
anchors.fill: parent
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
AltitudeScale {
|
|
|
|
anchors.fill: parent
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2012-09-02 05:33:29 +02:00
|
|
|
VsiScale {
|
|
|
|
anchors.fill: parent
|
2013-10-20 15:05:14 +02:00
|
|
|
sceneSize: sceneItem.viewportSize
|
2012-09-02 05:33:29 +02:00
|
|
|
}
|
|
|
|
|
2014-05-25 05:46:06 +02:00
|
|
|
// PfdIndicators {
|
|
|
|
// anchors.fill: parent
|
|
|
|
// sceneSize: sceneItem.viewportSize
|
|
|
|
// }
|
2013-10-20 15:05:14 +02:00
|
|
|
|
|
|
|
Info {
|
|
|
|
anchors.fill: parent
|
|
|
|
sceneSize: sceneItem.viewportSize
|
|
|
|
}
|
|
|
|
|
|
|
|
Warnings {
|
|
|
|
anchors.fill: parent
|
|
|
|
sceneSize: sceneItem.viewportSize
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|