QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleSummaryRow.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7
8ColumnLayout {
9 id: root
10 Layout.fillWidth: true
11 spacing: 0
12
13 property string labelText: "Label"
14 property string valueText: "value"
15 property string valueColor: ""
16 property bool showDivider: true
17
18 RowLayout {
19 id: rowLayout
20 Layout.fillWidth: true
21 Layout.topMargin: ScreenTools.defaultFontPixelHeight * 0.2
22 Layout.bottomMargin: ScreenTools.defaultFontPixelHeight * 0.2
23 spacing: ScreenTools.defaultFontPixelHeight
24
25 QGCLabel {
26 id: label
27 Layout.fillWidth: true
28 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
29 text: root.labelText
30 wrapMode: Text.WordWrap
31 }
32
33 QGCLabel {
34 id: valueLabel
35 Layout.fillWidth: true
36 Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
37 horizontalAlignment: Text.AlignRight
38 text: root.valueText
39 color: root.valueColor !== "" ? root.valueColor : QGroundControl.globalPalette.text
40 wrapMode: Text.WordWrap
41 }
42 }
43
44 Rectangle {
45 Layout.fillWidth: true
46 Layout.preferredHeight: 1
47 color: Qt.rgba(QGroundControl.globalPalette.text.r, QGroundControl.globalPalette.text.g, QGroundControl.globalPalette.text.b, 0.08)
48 visible: root.showDivider
49 }
50}