QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
FactTextFieldGrid.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7GridLayout {
8 property var factList ///< List of Facts to show
9 property var factLabels ///< Labels for facts, if not set, use Fact.name or Fact.shortDescription
10 property bool useNameForLabels: true ///< true: Use Fact.name for labels, false: Use Fact.shortDescription
11
12 rows: factList.length
13 flow: GridLayout.TopToBottom
14
15 Repeater {
16 model: parent.factList
17
18 QGCLabel {
19 text: {
20 if (factLabels) {
21 return factLabels[index]
22 } else if (useNameForLabels) {
23 return modelData.name
24 } else {
25 return modelData.shortDescription
26 }
27 }
28 }
29 }
30
31 Repeater {
32 model: parent.factList
33
34 FactTextField {
35 Layout.fillWidth: true
36 fact: modelData
37 }
38 }
39}