6import QGroundControl.Controls
7import QGroundControl.FactControls
8import QGroundControl.GPS.NTRIP
13 Layout.fillWidth: true
14 heading: qsTr("Mountpoint")
15 visible: _ntrip.ntripMountpoint.userVisible
17 QGCPalette { id: qgcPal }
19 property var _ntrip: QGroundControl.settingsManager.ntripSettings
20 property var _ntripMgr: QGroundControl.ntripManager
21 property bool _isActive: _ntrip.ntripServerConnectEnabled.rawValue
22 property bool _hasHost: _ntrip.ntripServerHostAddress.rawValue !== ""
23 property real _textFieldWidth: ScreenTools.defaultFontPixelWidth * 30
26 Layout.fillWidth: true
27 spacing: ScreenTools.defaultFontPixelWidth
29 LabelledFactTextField {
30 objectName: "ntripMountpointField"
31 Layout.fillWidth: true
32 textFieldPreferredWidth: root._textFieldWidth
33 label: fact.shortDescription
34 fact: root._ntrip.ntripMountpoint
35 enabled: !root._isActive
39 objectName: "ntripBrowseButton"
41 enabled: !root._isActive && root._hasHost &&
42 root._ntripMgr.sourceTableController.fetchStatus !== NTRIPSourceTableController.InProgress
43 onClicked: root._ntripMgr.fetchMountpoints()
48 Layout.fillWidth: true
49 visible: root._ntripMgr.sourceTableController.fetchStatus === NTRIPSourceTableController.InProgress
50 text: qsTr("Fetching mountpoints…")
51 color: qgcPal.colorOrange
55 Layout.fillWidth: true
56 visible: root._ntripMgr.sourceTableController.fetchStatus === NTRIPSourceTableController.Error
57 text: root._ntripMgr.sourceTableController.fetchError
58 color: qgcPal.colorRed
59 wrapMode: Text.WordWrap
63 Layout.fillWidth: true
64 visible: root._ntripMgr.sourceTableController.mountpointModel && root._ntripMgr.sourceTableController.mountpointModel.count > 0
65 model: root._ntripMgr.sourceTableController.mountpointModel
66 selectedMountpoint: root._ntrip.ntripMountpoint.rawValue
67 onMountpointSelected: (mountpoint) => root._ntripMgr.selectMountpoint(mountpoint)