6import QGroundControl.Controls
7import QGroundControl.FactControls
10 Layout.fillWidth: true
11 heading: qsTr("Server")
12 visible: _ntrip.ntripServerHostAddress.userVisible || _ntrip.ntripServerPort.userVisible ||
13 _ntrip.ntripUsername.userVisible || _ntrip.ntripPassword.userVisible
15 property var _ntrip: QGroundControl.settingsManager.ntripSettings
16 property bool _isActive: _ntrip.ntripServerConnectEnabled.rawValue
17 property real _textFieldWidth: ScreenTools.defaultFontPixelWidth * 30
19 LabelledFactTextField {
20 objectName: "ntripHostField"
21 Layout.fillWidth: true
22 textFieldPreferredWidth: _textFieldWidth
23 fact: _ntrip.ntripServerHostAddress
24 visible: fact.userVisible
28 LabelledFactTextField {
29 Layout.fillWidth: true
30 textFieldPreferredWidth: _textFieldWidth
31 fact: _ntrip.ntripServerPort
32 visible: fact.userVisible
36 LabelledFactTextField {
37 Layout.fillWidth: true
38 textFieldPreferredWidth: _textFieldWidth
39 label: fact.shortDescription
40 fact: _ntrip.ntripUsername
41 visible: fact.userVisible
46 Layout.fillWidth: true
47 visible: _ntrip.ntripPassword.userVisible
48 spacing: ScreenTools.defaultFontPixelWidth * 0.5
50 LabelledFactTextField {
52 Layout.fillWidth: true
53 textFieldPreferredWidth: _textFieldWidth
54 label: fact.shortDescription
55 fact: _ntrip.ntripPassword
56 textField.echoMode: _showPassword ? TextInput.Normal : TextInput.Password
59 property bool _showPassword: false
63 text: passwordField._showPassword ? qsTr("Hide") : qsTr("Show")
64 onClicked: passwordField._showPassword = !passwordField._showPassword
65 Layout.alignment: Qt.AlignBottom
70 objectName: "ntripUseTlsSwitch"
71 Layout.fillWidth: true
72 text: fact.shortDescription
73 fact: _ntrip.ntripUseTls
74 visible: fact.userVisible
79 objectName: "ntripAcceptSelfSignedSwitch"
80 Layout.fillWidth: true
81 text: fact.shortDescription
82 fact: _ntrip.ntripAllowSelfSignedCerts
83 visible: fact.userVisible
84 enabled: !_isActive && _ntrip.ntripUseTls.rawValue