QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
HorizontalCompassAttitude.qml
Go to the documentation of this file.
1import QtQuick
2
3import QGroundControl
4import QGroundControl.Controls
5
6Rectangle {
7 id: control
8 width: Math.min(_defaultWidth, _maxWidth)
9 height: _outerRadius * 2
10 radius: _outerRadius
11 color: qgcPal.window
12
13 property real extraInset: 0
14 property real extraValuesWidth: _outerRadius
15
16 property real _defaultWidth: mainWindow.width * 0.2
17 property real _maxWidth: ScreenTools.defaultFontPixelHeight * 15
18 property real _innerRadius: (width - (_topBottomMargin * 3)) / 4
19 property real _outerRadius: _innerRadius + _topBottomMargin
20 property real _spacing: ScreenTools.defaultFontPixelHeight * 0.33
21 property real _topBottomMargin: (width * 0.05) / 2
22
23 DeadMouseArea { anchors.fill: parent }
24
25 QGCPalette { id: qgcPal }
26
27 QGCAttitudeWidget {
28 id: attitude
29 anchors.leftMargin: control._topBottomMargin
30 anchors.left: parent.left
31 size: control._innerRadius * 2
32 vehicle: globals.activeVehicle
33 anchors.verticalCenter: parent.verticalCenter
34 }
35
36 QGCCompassWidget {
37 id: compass
38 anchors.leftMargin: control._spacing
39 anchors.left: attitude.right
40 size: control._innerRadius * 2
41 vehicle: globals.activeVehicle
42 anchors.verticalCenter: parent.verticalCenter
43 }
44}