Browse Source

Changed TCP/UDP connection settings names to follow more common terminology (#9502)

* Name and layout change for UDP/TCP settings

- To be more coherent with terminology used by MAVLink proxy/router softwares, the connection fields' labels was changed.
- A slight redesign of UDP server/host connection settings to allow for explaining notes and easier overview.

* Inherit widths from parent for less static layout

* Removed non-functional and unused reference
QGC4.4
Christoffer Björnram 4 years ago committed by GitHub
parent
commit
8d60ee12b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/ui/preferences/TcpSettings.qml
  2. 32
      src/ui/preferences/UdpSettings.qml

4
src/ui/preferences/TcpSettings.qml

@ -30,7 +30,7 @@ Column {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { QGCLabel {
text: qsTr("Host Address:") text: qsTr("Server Address:")
width: _firstColumn width: _firstColumn
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
@ -44,7 +44,7 @@ Column {
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { QGCLabel {
text: qsTr("TCP Port:") text: qsTr("Port:")
width: _firstColumn width: _firstColumn
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }

32
src/ui/preferences/UdpSettings.qml

@ -28,10 +28,24 @@ Column {
property string _currentHost: "" property string _currentHost: ""
Item {
height: ScreenTools.defaultFontPixelHeight * 2
width: parent.width
QGCLabel {
id: warningLabel
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
font.pointSize: ScreenTools.smallFontPointSize
wrapMode: Text.WordWrap
text: qsTr("Note: For best perfomance, please disable AutoConnect to UDP devices on the General page.")
}
}
Row { Row {
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
QGCLabel { QGCLabel {
text: qsTr("Listening Port:") text: qsTr("Port:")
width: _firstColumn width: _firstColumn
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
@ -54,7 +68,7 @@ Column {
width: parent.width width: parent.width
} }
QGCLabel { QGCLabel {
text: qsTr("Target Hosts:") text: qsTr("Server addresses (optional):")
} }
Item { Item {
width: hostRow.width width: hostRow.width
@ -62,16 +76,12 @@ Column {
Row { Row {
id: hostRow id: hostRow
spacing: ScreenTools.defaultFontPixelWidth spacing: ScreenTools.defaultFontPixelWidth
Item {
height: 1
width: _firstColumn
}
Column { Column {
id: hostColumn id: hostColumn
spacing: ScreenTools.defaultFontPixelHeight / 2 spacing: ScreenTools.defaultFontPixelHeight / 2
Rectangle { Rectangle {
height: 1 height: 1
width: _secondColumn width: parent.width
color: qgcPal.button color: qgcPal.button
visible: subEditConfig && subEditConfig.linkType === LinkConfiguration.TypeUdp && subEditConfig.hostList.length > 0 visible: subEditConfig && subEditConfig.linkType === LinkConfiguration.TypeUdp && subEditConfig.hostList.length > 0
} }
@ -80,7 +90,7 @@ Column {
delegate: delegate:
QGCButton { QGCButton {
text: modelData text: modelData
width: _secondColumn width: parent.width
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2 anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
autoExclusive: true autoExclusive: true
onClicked: { onClicked: {
@ -93,7 +103,7 @@ Column {
id: hostField id: hostField
focus: true focus: true
visible: false visible: false
width: ScreenTools.defaultFontPixelWidth * 30 width: parent.width
onEditingFinished: { onEditingFinished: {
if(subEditConfig) { if(subEditConfig) {
if(hostField.text !== "") { if(hostField.text !== "") {
@ -112,7 +122,7 @@ Column {
} }
Rectangle { Rectangle {
height: 1 height: 1
width: _secondColumn width: parent.width
color: qgcPal.button color: qgcPal.button
} }
Item { Item {
@ -120,7 +130,7 @@ Column {
width: parent.width width: parent.width
} }
Item { Item {
width: _secondColumn width: _firstColumn + _secondColumn
height: udpButtonRow.height height: udpButtonRow.height
Row { Row {
id: udpButtonRow id: udpButtonRow

Loading…
Cancel
Save