Commit 95fb6b96 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Settings/SettingsNetwork): view in progress

parent f356a4f2
...@@ -607,6 +607,38 @@ Server url not configured.</translation> ...@@ -607,6 +607,38 @@ Server url not configured.</translation>
<source>networkProtocolAndPortsTitle</source> <source>networkProtocolAndPortsTitle</source>
<translation>Network protocol and Ports</translation> <translation>Network protocol and Ports</translation>
</message> </message>
<message>
<source>sipUdpPortLabel</source>
<translation>SIP UDP port</translation>
</message>
<message>
<source>randomSipUdpPortLabel</source>
<translation>Random</translation>
</message>
<message>
<source>sipTcpPortLabel</source>
<translation>SIP TCP port</translation>
</message>
<message>
<source>randomSipTcpPortLabel</source>
<translation>Random</translation>
</message>
<message>
<source>audioRtpUdpPortLabel</source>
<translation>Audio RTP UDP port</translation>
</message>
<message>
<source>randomAudioRtpUdpPortLabel</source>
<translation>Random</translation>
</message>
<message>
<source>randomVideoRtpUdpPortLabel</source>
<translation>Random</translation>
</message>
<message>
<source>videoRtpUdpPortLabel</source>
<translation>Video RTP UDP port</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsWindow</name> <name>SettingsWindow</name>
......
...@@ -556,7 +556,7 @@ Url du serveur non configurée.</translation> ...@@ -556,7 +556,7 @@ Url du serveur non configurée.</translation>
</message> </message>
<message> <message>
<source>noEncryption</source> <source>noEncryption</source>
<translation>Aucune</translation> <translation>Aucun</translation>
</message> </message>
<message> <message>
<source>autoAnswerLabel</source> <source>autoAnswerLabel</source>
...@@ -617,6 +617,38 @@ Url du serveur non configurée.</translation> ...@@ -617,6 +617,38 @@ Url du serveur non configurée.</translation>
<source>networkProtocolAndPortsTitle</source> <source>networkProtocolAndPortsTitle</source>
<translation>Protocol réseau et ports</translation> <translation>Protocol réseau et ports</translation>
</message> </message>
<message>
<source>sipUdpPortLabel</source>
<translation>Port SIP UDP</translation>
</message>
<message>
<source>randomSipUdpPortLabel</source>
<translation>Aléatoire</translation>
</message>
<message>
<source>sipTcpPortLabel</source>
<translation>Port SIP TCP</translation>
</message>
<message>
<source>randomSipTcpPortLabel</source>
<translation>Aléatoire</translation>
</message>
<message>
<source>audioRtpUdpPortLabel</source>
<translation>Port Audio RTP UDP</translation>
</message>
<message>
<source>randomAudioRtpUdpPortLabel</source>
<translation>Aléatoire</translation>
</message>
<message>
<source>randomVideoRtpUdpPortLabel</source>
<translation>Aléatoire</translation>
</message>
<message>
<source>videoRtpUdpPortLabel</source>
<translation>Port Vidéo RTP UDP</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsWindow</name> <name>SettingsWindow</name>
......
...@@ -26,4 +26,6 @@ ScrollBar { ...@@ -26,4 +26,6 @@ ScrollBar {
radius: ForceScrollBarStyle.contentItem.radius radius: ForceScrollBarStyle.contentItem.radius
} }
hoverEnabled: true hoverEnabled: true
visible: size < 1.0
} }
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.1
import Common 1.0
import Common.Styles 1.0 import Common.Styles 1.0
import Utils 1.0
// ============================================================================= // =============================================================================
...@@ -10,16 +14,47 @@ Rectangle { ...@@ -10,16 +14,47 @@ Rectangle {
anchors.fill: parent anchors.fill: parent
color: TabContainerStyle.color color: TabContainerStyle.color
ColumnLayout {
anchors.fill: parent
spacing: 0
Flickable {
ScrollBar.vertical: ForceScrollBar {
id: scrollBar
}
Layout.fillHeight: true
Layout.fillWidth: true
boundsBehavior: Flickable.StopAtBounds
clip: true
contentHeight: Utils.ensureArray(_content).reduce(function (acc, item) { return item.height }, 0, []) +
TabContainerStyle.topMargin + TabContainerStyle.bottomMargin
contentWidth: width
Item { Item {
id: content id: content
anchors { anchors {
fill: parent left: parent.left
bottomMargin: TabContainerStyle.bottomMargin
leftMargin: TabContainerStyle.leftMargin leftMargin: TabContainerStyle.leftMargin
right: parent.right
rightMargin: TabContainerStyle.rightMargin rightMargin: TabContainerStyle.rightMargin
top: parent.top
topMargin: TabContainerStyle.topMargin topMargin: TabContainerStyle.topMargin
} }
width: parent.width
}
}
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: TabContainerStyle.separator.height
color: TabContainerStyle.separator.color
visible: scrollBar.visible
}
} }
} }
...@@ -8,7 +8,7 @@ import Common 1.0 ...@@ -8,7 +8,7 @@ import Common 1.0
QtObject { QtObject {
property QtObject background: QtObject { property QtObject background: QtObject {
property int height: 36 property int height: 36
property int width: 300 property int width: 200
property int radius: 4 property int radius: 4
......
...@@ -7,8 +7,13 @@ import Common 1.0 ...@@ -7,8 +7,13 @@ import Common 1.0
QtObject { QtObject {
property color color: Colors.k property color color: Colors.k
property int bottomMargin: 15 property int bottomMargin: 30
property int leftMargin: 30 property int leftMargin: 30
property int rightMargin: 30 property int rightMargin: 30
property int topMargin: 30 property int topMargin: 30
property QtObject separator: QtObject {
property int height: 2
property color color: Colors.u
}
} }
...@@ -8,8 +8,8 @@ import App.Styles 1.0 ...@@ -8,8 +8,8 @@ import App.Styles 1.0
TabContainer { TabContainer {
Column { Column {
anchors.fill: parent
spacing: SettingsWindowStyle.forms.spacing spacing: SettingsWindowStyle.forms.spacing
width: parent.width
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// Transport. // Transport.
...@@ -59,7 +59,79 @@ TabContainer { ...@@ -59,7 +59,79 @@ TabContainer {
width: parent.width width: parent.width
FormLine { FormLine {
FormGroup {
label: qsTr('sipUdpPortLabel')
NumericField {
readOnly: randomSipUdpPort.checked
}
}
FormGroup {
label: qsTr('randomSipUdpPortLabel')
Switch {
id: randomSipUdpPort
}
}
}
FormLine {
FormGroup {
label: qsTr('sipTcpPortLabel')
NumericField {
readOnly: randomSipTcpPort.checked
}
}
FormGroup {
label: qsTr('randomSipTcpPortLabel')
Switch {
id: randomSipTcpPort
}
}
}
FormLine {
FormGroup {
label: qsTr('audioRtpUdpPortLabel')
NumericField {
readOnly: randomAudioRtpUdpPort.checked
}
}
FormGroup {
label: qsTr('randomAudioRtpUdpPortLabel')
Switch {
id: randomAudioRtpUdpPort
}
}
}
FormLine {
FormGroup {
label: qsTr('videoRtpUdpPortLabel')
NumericField {
readOnly: randomVideoRtpUdpPort.checked || !enableVideoRtpUdpPort.checked
}
}
FormGroup {
label: qsTr('randomVideoRtpUdpPortLabel')
Switch {
id: randomVideoRtpUdpPort
}
}
Switch {
id: enableVideoRtpUdpPort
}
} }
} }
......
...@@ -15,11 +15,8 @@ ApplicationWindow { ...@@ -15,11 +15,8 @@ ApplicationWindow {
height: SettingsWindowStyle.height height: SettingsWindowStyle.height
width: SettingsWindowStyle.width width: SettingsWindowStyle.width
maximumHeight: height minimumHeight: SettingsWindowStyle.height
maximumWidth: width minimumWidth: SettingsWindowStyle.width
minimumHeight: height
minimumWidth: width
title: qsTr('settingsTitle') title: qsTr('settingsTitle')
visible: true visible: true
...@@ -108,6 +105,7 @@ ApplicationWindow { ...@@ -108,6 +105,7 @@ ApplicationWindow {
TextButtonB { TextButtonB {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
Layout.topMargin: SettingsWindowStyle.validButton.topMargin
Layout.bottomMargin: SettingsWindowStyle.validButton.bottomMargin Layout.bottomMargin: SettingsWindowStyle.validButton.bottomMargin
Layout.rightMargin: SettingsWindowStyle.validButton.rightMargin Layout.rightMargin: SettingsWindowStyle.validButton.rightMargin
......
...@@ -14,5 +14,6 @@ QtObject { ...@@ -14,5 +14,6 @@ QtObject {
property QtObject validButton: QtObject { property QtObject validButton: QtObject {
property int bottomMargin: 30 property int bottomMargin: 30
property int rightMargin: 30 property int rightMargin: 30
property int topMargin: 30
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment