QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ConfigRowGroups.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7/// Groups of rows from PX4ConfigRows.groupRows, each under a ConfigGroupHeader. rowDelegate is created for each row
8/// with the required properties modelData (the row) and index (its position in the group).
9Repeater {
10 property var groupShown: function (group) { return true }
11 property Component rowDelegate
12 /// Prefix of the test hook objectName of each group, which ends with the group name in letters and digits
13 property string objectNamePrefix: ""
14
15 ColumnLayout {
16 objectName: objectNamePrefix !== "" ? objectNamePrefix + "_group_" + modelData.name.replace(/[^A-Za-z0-9]/g, "") : ""
17 Layout.fillWidth: true
18 spacing: ScreenTools.defaultFontPixelHeight * 0.5
19 visible: groupShown(modelData)
20
21 required property var modelData
22
23 ConfigGroupHeader {
24 text: modelData.name
25 }
26
27 Repeater {
28 model: modelData.rows
29 delegate: rowDelegate
30 }
31 }
32}