1pragma ComponentBehavior: Bound
7import QGroundControl.Controls
9/// Scrollable list of NTRIP caster mountpoints. Highlights the active selection
10/// and emits mountpointSelected() when the user picks one. The model rows must
11/// expose: index, mountpoint, details.
15 /// Mountpoint of the active selection (rendered as highlighted / "Selected").
16 property string selectedMountpoint
18 signal mountpointSelected(string mountpoint)
20 Layout.fillWidth: true
21 Layout.preferredHeight: Math.min(root.contentHeight, ScreenTools.defaultFontPixelHeight * 20)
22 spacing: ScreenTools.defaultFontPixelHeight * 0.25
24 QGCPalette { id: qgcPal }
29 required property int index
30 required property string mountpoint
31 required property string details
32 readonly property bool selected: entry.mountpoint === root.selectedMountpoint
34 width: ListView.view.width
35 height: mountRow.height + ScreenTools.defaultFontPixelHeight * 0.5
36 radius: ScreenTools.defaultFontPixelHeight * 0.25
37 color: entry.selected ? qgcPal.buttonHighlight
38 : entry.index % 2 === 0 ? qgcPal.windowShade : qgcPal.window
42 anchors.left: parent.left
43 anchors.right: parent.right
44 anchors.verticalCenter: parent.verticalCenter
45 anchors.margins: ScreenTools.defaultFontPixelWidth
47 // The filling details label lets this column take the free space, keeping buttons right-aligned.
49 Layout.fillWidth: true
50 Layout.minimumWidth: 0
54 spacing: ScreenTools.defaultFontPixelWidth
57 text: entry.mountpoint
58 textFormat: Text.PlainText
60 color: entry.selected ? qgcPal.buttonHighlightText : qgcPal.text
63 visible: entry.selected
64 text: qsTr("(selected)")
65 font.pointSize: ScreenTools.smallFontPointSize
66 color: qgcPal.buttonHighlightText
71 Layout.fillWidth: true
72 Layout.minimumWidth: 0
73 elide: Text.ElideRight
74 textFormat: Text.PlainText
76 font.pointSize: ScreenTools.smallFontPointSize
77 color: entry.selected ? qgcPal.buttonHighlightText : qgcPal.colorGrey
82 text: entry.selected ? qsTr("Selected") : qsTr("Select")
83 enabled: !entry.selected
84 onClicked: root.mountpointSelected(entry.mountpoint)