2012-07-23 09:19:24 +02:00
|
|
|
import Qt 4.7
|
|
|
|
import "."
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
color: "#666666"
|
|
|
|
|
2012-09-09 08:58:54 +02:00
|
|
|
SvgElementImage {
|
2012-07-23 09:19:24 +02:00
|
|
|
id: background
|
2012-09-09 08:58:54 +02:00
|
|
|
elementName: "background"
|
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
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2012-09-09 08:58:54 +02:00
|
|
|
SvgElementImage {
|
2012-07-23 09:19:24 +02:00
|
|
|
id: rollscale
|
2012-09-09 08:58:54 +02:00
|
|
|
elementName: "rollscale"
|
|
|
|
sceneSize: background.sceneSize
|
|
|
|
|
2012-07-23 09:19:24 +02:00
|
|
|
smooth: true
|
2012-09-02 05:33:29 +02:00
|
|
|
anchors.centerIn: parent
|
|
|
|
//rotate it around the center of scene
|
|
|
|
transform: Rotation {
|
|
|
|
angle: -AttitudeActual.Roll
|
|
|
|
origin.x : sceneItem.width/2 - x
|
|
|
|
origin.y : sceneItem.height/2 - y
|
|
|
|
}
|
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"
|
|
|
|
sceneSize: background.sceneSize
|
|
|
|
|
2012-07-23 09:19:24 +02:00
|
|
|
anchors.centerIn: parent
|
|
|
|
}
|
|
|
|
|
2012-09-09 08:58:54 +02:00
|
|
|
SvgElementImage {
|
2012-07-23 09:19:24 +02:00
|
|
|
id: compass
|
2012-09-09 08:58:54 +02:00
|
|
|
elementName: "compass"
|
|
|
|
sceneSize: background.sceneSize
|
|
|
|
|
2012-07-23 09:19:24 +02:00
|
|
|
clip: true
|
|
|
|
|
|
|
|
y: 12
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
2012-09-09 08:58:54 +02:00
|
|
|
SvgElementImage {
|
2012-07-23 09:19:24 +02:00
|
|
|
id: compass_band
|
2012-09-09 08:58:54 +02:00
|
|
|
elementName: "compass-band"
|
|
|
|
sceneSize: background.sceneSize
|
2012-07-23 09:19:24 +02:00
|
|
|
|
|
|
|
anchors.centerIn: parent
|
2012-09-03 07:23:51 +02:00
|
|
|
//the band is 540 degrees wide, AttitudeActual.Yaw is converted to -180..180 range
|
|
|
|
anchors.horizontalCenterOffset: -1*((AttitudeActual.Yaw+180+720) % 360 - 180)/540*width
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SpeedScale {
|
|
|
|
anchors.fill: parent
|
2012-09-09 08:58:54 +02:00
|
|
|
sceneSize: background.sceneSize
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
AltitudeScale {
|
|
|
|
anchors.fill: parent
|
2012-09-09 08:58:54 +02:00
|
|
|
sceneSize: background.sourceSize
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
|
2012-09-02 05:33:29 +02:00
|
|
|
VsiScale {
|
|
|
|
anchors.fill: parent
|
2012-09-09 08:58:54 +02:00
|
|
|
sceneSize: background.sourceSize
|
2012-09-02 05:33:29 +02:00
|
|
|
}
|
|
|
|
|
2012-07-23 09:19:24 +02:00
|
|
|
PfdIndicators {
|
|
|
|
anchors.fill: parent
|
2012-09-09 08:58:54 +02:00
|
|
|
sceneSize: background.sourceSize
|
2012-07-23 09:19:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|