QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleRotationCal.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3
4import QGroundControl
5import QGroundControl.Controls
6
7Rectangle {
8 // Indicates whether calibration is valid for this control
9 property bool calValid: false
10
11 // Indicates whether the control is currently being calibrated
12 property bool calInProgress: false
13
14 // Text to show while calibration is in progress
15 property string calInProgressText: qsTr("Hold Still")
16
17 // Image source
18 property var imageSource: ""
19
20 property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
21
22 color: calInProgress ? "yellow" : (calValid ? "green" : "red")
23
24 Rectangle {
25 readonly property int inset: 5
26
27 x: inset
28 y: inset
29 width: parent.width - (inset * 2)
30 height: parent.height - (inset * 2)
31 color: qgcPal.windowShade
32
33 Image {
34 width: parent.width
35 height: parent.height
36 source: imageSource
37 fillMode: Image.PreserveAspectFit
38 smooth: true
39 }
40
41 QGCLabel {
42 width: parent.width
43 height: parent.height
44 horizontalAlignment: Text.AlignHCenter
45 verticalAlignment: Text.AlignBottom
46 font.pointSize: ScreenTools.mediumFontPointSize
47 text: calInProgress ? calInProgressText : (calValid ? qsTr("Completed") : qsTr("Incomplete"))
48 }
49 }
50}