QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
RTCMMessageChips.qml
Go to the documentation of this file.
1pragma ComponentBehavior: Bound
2
3import QtQuick
4
5import QGroundControl
6import QGroundControl.Controls
7import QGroundControl.GPS
8
9/// Wrapping chips for RTCM message counts; ID 0 is unidentified.
10Flow {
11 id: root
12
13 property list<rtcmMessageCount> messageCounts
14
15 spacing: ScreenTools.defaultFontPixelWidth / 2
16
17 QGCPalette { id: qgcPal }
18
19 Repeater {
20 model: root.messageCounts
21
22 delegate: Rectangle {
23 id: chip
24
25 required property rtcmMessageCount modelData
26
27 implicitWidth: chipLabel.implicitWidth + ScreenTools.defaultFontPixelWidth * 1.2
28 implicitHeight: chipLabel.implicitHeight + ScreenTools.defaultFontPixelHeight * 0.3
29 radius: implicitHeight / 2
30 color: qgcPal.windowShade
31 border.color: qgcPal.groupBorder
32 border.width: 1
33
34 QGCLabel {
35 id: chipLabel
36
37 anchors.centerIn: parent
38 //: %1 is an RTCM message ID, %2 is the number of messages received with that ID
39 text: qsTr("%1 × %2").arg(chip.modelData.messageId === 0 ? qsTr("unknown")
40 : chip.modelData.messageId)
41 .arg(chip.modelData.count)
42 textFormat: Text.PlainText
43 font.pointSize: ScreenTools.smallFontPointSize
44 }
45 }
46 }
47}