1pragma ComponentBehavior: Bound
7import QGroundControl.Controls
8import QGroundControl.FactControls
9import QGroundControl.GPS
14 readonly property NTRIPSettings _ntrip: QGroundControl.settingsManager.ntripSettings
15 readonly property NTRIPManager _ntripMgr: QGroundControl.gpsManager.ntrip
16 readonly property NTRIPSourceTableController _sourceTable: root._ntripMgr.sourceTableController
17 readonly property Vehicle _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
18 property bool _isActive: root._ntrip.ntripServerConnectEnabled.rawValue
19 readonly property bool _hasHost: root._ntrip.ntripServerHostAddress.rawValue !== ""
20 readonly property bool _fetching: root._sourceTable.fetchStatus === NTRIPSourceTableController.InProgress
22 Layout.fillWidth: true
23 heading: qsTr("NTRIP Mountpoint")
24 visible: root._ntrip.userVisible && (root._ntrip.ntripMountpoint as SettingsFact).userVisible
27 Layout.fillWidth: true
28 spacing: ScreenTools.defaultFontPixelWidth
30 LabelledFactTextField {
31 objectName: "ntripMountpointField"
32 Layout.fillWidth: true
33 textFieldPreferredWidth: ScreenTools.defaultFontPixelWidth * 30
34 fact: root._ntrip.ntripMountpoint
35 enabled: !root._isActive
39 objectName: "ntripBrowseButton"
41 enabled: !root._isActive && root._hasHost && !root._fetching
42 onClicked: root._activeVehicle ? root._ntripMgr.fetchMountpoints(root._activeVehicle.coordinate)
43 : root._ntripMgr.fetchMountpoints()
48 visible: root._fetching
49 text: qsTr("Fetching mountpoints…")
53 objectName: "ntripSourceTableSecurityWarning"
55 text: root._sourceTable.securityWarning
60 visible: root._sourceTable.fetchStatus === NTRIPSourceTableController.Error
61 text: root._sourceTable.fetchError
66 objectName: "ntripMountpointList"
67 Layout.fillWidth: true
68 enabled: !root._isActive
70 model: root._sourceTable.mountpointModel
71 selectedMountpoint: root._ntrip.ntripMountpoint.rawValue
72 onMountpointSelected: (mountpoint) => { root._ntrip.ntripMountpoint.rawValue = mountpoint }