QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SensorsGpsStatus.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7/// What the GPS offers a calibration which is matched to the GPS: a coloured dot, the fix, and its accuracy and satellites.
8/// gps is the result of SensorsRows.gpsReadiness().
9ColumnLayout {
10 id: control
11
12 required property var gps
13
14 spacing: 0
15
16 QGCPalette { id: qgcPal }
17
18 RowLayout {
19 spacing: ScreenTools.defaultFontPixelWidth
20
21 Rectangle {
22 implicitWidth: ScreenTools.defaultFontPixelHeight * 0.6
23 implicitHeight: implicitWidth
24 radius: implicitWidth / 2
25 color: control.gps.level === "none" ? qgcPal.colorRed :
26 control.gps.level === "poor" ? qgcPal.colorOrange : qgcPal.colorGreen
27 }
28
29 QGCLabel {
30 text: control.gps.summary
31 font.bold: true
32 color: control.gps.level === "none" ? qgcPal.errorText :
33 control.gps.level === "poor" ? qgcPal.warningText : qgcPal.successText
34 }
35 }
36
37 QGCLabel {
38 text: control.gps.detail
39 color: qgcPal.textSecondary
40 font.pointSize: ScreenTools.smallFontPointSize
41 }
42}