QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
NtripServerSettings.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7import QGroundControl.FactControls
8
9SettingsGroupLayout {
10 Layout.fillWidth: true
11 heading: qsTr("Server")
12 visible: _ntrip.ntripServerHostAddress.userVisible || _ntrip.ntripServerPort.userVisible ||
13 _ntrip.ntripUsername.userVisible || _ntrip.ntripPassword.userVisible
14
15 property var _ntrip: QGroundControl.settingsManager.ntripSettings
16 property bool _isActive: _ntrip.ntripServerConnectEnabled.rawValue
17 property real _textFieldWidth: ScreenTools.defaultFontPixelWidth * 30
18
19 LabelledFactTextField {
20 Layout.fillWidth: true
21 textFieldPreferredWidth: _textFieldWidth
22 fact: _ntrip.ntripServerHostAddress
23 visible: fact.userVisible
24 enabled: !_isActive
25 }
26
27 LabelledFactTextField {
28 Layout.fillWidth: true
29 textFieldPreferredWidth: _textFieldWidth
30 fact: _ntrip.ntripServerPort
31 visible: fact.userVisible
32 enabled: !_isActive
33 }
34
35 LabelledFactTextField {
36 Layout.fillWidth: true
37 textFieldPreferredWidth: _textFieldWidth
38 label: fact.shortDescription
39 fact: _ntrip.ntripUsername
40 visible: fact.userVisible
41 enabled: !_isActive
42 }
43
44 RowLayout {
45 Layout.fillWidth: true
46 visible: _ntrip.ntripPassword.userVisible
47 spacing: ScreenTools.defaultFontPixelWidth * 0.5
48
49 LabelledFactTextField {
50 id: passwordField
51 Layout.fillWidth: true
52 textFieldPreferredWidth: _textFieldWidth
53 label: fact.shortDescription
54 fact: _ntrip.ntripPassword
55 textField.echoMode: _showPassword ? TextInput.Normal : TextInput.Password
56 enabled: !_isActive
57
58 property bool _showPassword: false
59 }
60
61 QGCButton {
62 text: passwordField._showPassword ? qsTr("Hide") : qsTr("Show")
63 onClicked: passwordField._showPassword = !passwordField._showPassword
64 Layout.alignment: Qt.AlignBottom
65 }
66 }
67
68 FactCheckBoxSlider {
69 Layout.fillWidth: true
70 text: fact.shortDescription
71 fact: _ntrip.ntripUseTls
72 visible: fact.userVisible
73 enabled: !_isActive
74 }
75}