Commit 004dcd73 authored by Ronan Abhamon's avatar Ronan Abhamon

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

parent e84c5e2e
...@@ -639,6 +639,22 @@ Server url not configured.</translation> ...@@ -639,6 +639,22 @@ Server url not configured.</translation>
<source>videoRtpUdpPortLabel</source> <source>videoRtpUdpPortLabel</source>
<translation>Video RTP UDP port</translation> <translation>Video RTP UDP port</translation>
</message> </message>
<message>
<source>portsHeader</source>
<translation type="vanished">Port</translation>
</message>
<message>
<source>portHeader</source>
<translation>Port</translation>
</message>
<message>
<source>randomPortHeader</source>
<translation>Use a random port</translation>
</message>
<message>
<source>enabledPortHeader</source>
<translation>Enabled port</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsWindow</name> <name>SettingsWindow</name>
......
...@@ -649,6 +649,22 @@ Url du serveur non configurée.</translation> ...@@ -649,6 +649,22 @@ Url du serveur non configurée.</translation>
<source>videoRtpUdpPortLabel</source> <source>videoRtpUdpPortLabel</source>
<translation>Port Vidéo RTP UDP</translation> <translation>Port Vidéo RTP UDP</translation>
</message> </message>
<message>
<source>portsHeader</source>
<translation type="vanished">Port</translation>
</message>
<message>
<source>portHeader</source>
<translation>Port</translation>
</message>
<message>
<source>randomPortHeader</source>
<translation>Utiliser un port aléatoire</translation>
</message>
<message>
<source>enabledPortHeader</source>
<translation>Port activé</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsWindow</name> <name>SettingsWindow</name>
......
...@@ -184,6 +184,9 @@ ...@@ -184,6 +184,9 @@
<file>ui/modules/Common/Form/ListForm.qml</file> <file>ui/modules/Common/Form/ListForm.qml</file>
<file>ui/modules/Common/Form/Placements/FormEntry.qml</file> <file>ui/modules/Common/Form/Placements/FormEntry.qml</file>
<file>ui/modules/Common/Form/Placements/FormGroup.qml</file> <file>ui/modules/Common/Form/Placements/FormGroup.qml</file>
<file>ui/modules/Common/Form/Placements/FormHeaderEntry.qml</file>
<file>ui/modules/Common/Form/Placements/FormHeaderGroup.qml</file>
<file>ui/modules/Common/Form/Placements/FormHeader.qml</file>
<file>ui/modules/Common/Form/Placements/FormLine.qml</file> <file>ui/modules/Common/Form/Placements/FormLine.qml</file>
<file>ui/modules/Common/Form/Placements/Form.qml</file> <file>ui/modules/Common/Form/Placements/Form.qml</file>
<file>ui/modules/Common/Form/SmallButton.qml</file> <file>ui/modules/Common/Form/SmallButton.qml</file>
...@@ -224,6 +227,8 @@ ...@@ -224,6 +227,8 @@
<file>ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml</file> <file>ui/modules/Common/Styles/Form/Fields/TextFieldStyle.qml</file>
<file>ui/modules/Common/Styles/Form/ListFormStyle.qml</file> <file>ui/modules/Common/Styles/Form/ListFormStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Placements/FormGroupStyle.qml</file> <file>ui/modules/Common/Styles/Form/Placements/FormGroupStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Placements/FormHeaderGroupStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Placements/FormHeaderStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Placements/FormLineStyle.qml</file> <file>ui/modules/Common/Styles/Form/Placements/FormLineStyle.qml</file>
<file>ui/modules/Common/Styles/Form/Placements/FormStyle.qml</file> <file>ui/modules/Common/Styles/Form/Placements/FormStyle.qml</file>
<file>ui/modules/Common/Styles/Form/SmallButtonStyle.qml</file> <file>ui/modules/Common/Styles/Form/SmallButtonStyle.qml</file>
......
...@@ -5,26 +5,38 @@ import Common.Styles 1.0 ...@@ -5,26 +5,38 @@ import Common.Styles 1.0
// ============================================================================= // =============================================================================
// Like a `FormGroup` but without label. // Like a `FormGroup` but without label.
// Must be used in a `FormLine`.
// ============================================================================= // =============================================================================
RowLayout { Item {
default property alias _content: content.data default property alias _content: content.data
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
spacing: 0 implicitHeight: content.height
width: FormGroupStyle.content.width width: FormGroupStyle.content.width
Item { Item {
id: content id: content
readonly property int currentHeight: _content[0] ? _content[0].height : 0 readonly property int currentHeight: _content[0] ? _content[0].height : 0
readonly property int currentWidth: _content[0] ? _content[0].width : 0
Layout.alignment: ( anchors {
currentHeight < FormGroupStyle.legend.height ? Qt.AlignVCenter : Qt.AlignTop horizontalCenter: parent.horizontalCenter
) | Qt.AlignHCenter
Layout.preferredHeight: currentHeight top: width > FormGroupStyle.legend.width
Layout.maximumWidth: FormGroupStyle.content.width ? parent.top
: undefined
verticalCenter: width > FormGroupStyle.legend.width
? undefined
: parent.verticalCenter
}
height: currentHeight
width: currentWidth > FormGroupStyle.content.width
? FormGroupStyle.content.width
: currentWidth
} }
} }
...@@ -3,6 +3,9 @@ import QtQuick.Layouts 1.3 ...@@ -3,6 +3,9 @@ import QtQuick.Layouts 1.3
import Common.Styles 1.0 import Common.Styles 1.0
// =============================================================================
// Display a form component with a legend.
// Must be used in a `FormLine`.
// ============================================================================= // =============================================================================
RowLayout { RowLayout {
......
import Common.Styles 1.0
// =============================================================================
// Like a `FormLine` but used as form header.
// =============================================================================
FormLine {
height: FormHeaderStyle.height
width: parent.width
}
import QtQuick 2.7
import Common.Styles 1.0
// =============================================================================
// Display a title on a `FormEntry`.
// Must be used in a `FormHeader`.
// =============================================================================
Item {
property alias text: text.text
height: parent.height
width: FormGroupStyle.content.width
Text {
id: text
anchors.centerIn: parent
color: FormHeaderGroupStyle.text.color
elide: Text.ElideRight
font {
bold: true
pointSize: FormHeaderGroupStyle.text.fontSize
}
}
}
import QtQuick 2.7
import Common.Styles 1.0
// =============================================================================
// Display a title on a `FormGroup`.
// Must be used in a `FormHeader`.
// =============================================================================
Item {
property alias text: text.text
height: parent.height
width: FormGroupStyle.spacing + FormGroupStyle.legend.width + FormGroupStyle.content.width
Text {
id: text
anchors {
fill: parent
leftMargin: FormGroupStyle.spacing + FormGroupStyle.legend.width
}
color: FormHeaderGroupStyle.text.color
elide: Text.ElideRight
font {
bold: true
pointSize: FormHeaderGroupStyle.text.fontSize
}
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
...@@ -2,8 +2,11 @@ import QtQuick 2.7 ...@@ -2,8 +2,11 @@ import QtQuick 2.7
import Common.Styles 1.0 import Common.Styles 1.0
// =============================================================================
// A line of `FormGroup`/`FormEntry`.
// ============================================================================= // =============================================================================
Row { Row {
spacing: FormLineStyle.spacing spacing: FormLineStyle.spacing
width: parent.width
} }
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property QtObject text: QtObject {
property color color: Colors.j
property int fontSize: 10
}
}
pragma Singleton
import QtQuick 2.7
// =============================================================================
QtObject {
property int height: 30
}
...@@ -18,6 +18,8 @@ singleton NumericFieldStyle 1.0 Form/Fields/NumericFieldStyle.qml ...@@ -18,6 +18,8 @@ singleton NumericFieldStyle 1.0 Form/Fields/NumericFieldStyle.qml
singleton TextFieldStyle 1.0 Form/Fields/TextFieldStyle.qml singleton TextFieldStyle 1.0 Form/Fields/TextFieldStyle.qml
singleton FormGroupStyle 1.0 Form/Placements/FormGroupStyle.qml singleton FormGroupStyle 1.0 Form/Placements/FormGroupStyle.qml
singleton FormHeaderStyle 1.0 Form/Placements/FormHeaderStyle.qml
singleton FormHeaderGroupStyle 1.0 Form/Placements/FormHeaderGroupStyle.qml
singleton FormLineStyle 1.0 Form/Placements/FormLineStyle.qml singleton FormLineStyle 1.0 Form/Placements/FormLineStyle.qml
singleton FormStyle 1.0 Form/Placements/FormStyle.qml singleton FormStyle 1.0 Form/Placements/FormStyle.qml
......
...@@ -37,6 +37,9 @@ TextField 1.0 Form/Fields/TextField.qml ...@@ -37,6 +37,9 @@ TextField 1.0 Form/Fields/TextField.qml
Form 1.0 Form/Placements/Form.qml Form 1.0 Form/Placements/Form.qml
FormEntry 1.0 Form/Placements/FormEntry.qml FormEntry 1.0 Form/Placements/FormEntry.qml
FormGroup 1.0 Form/Placements/FormGroup.qml FormGroup 1.0 Form/Placements/FormGroup.qml
FormHeader 1.0 Form/Placements/FormHeader.qml
FormHeaderEntry 1.0 Form/Placements/FormHeaderEntry.qml
FormHeaderGroup 1.0 Form/Placements/FormHeaderGroup.qml
FormLine 1.0 Form/Placements/FormLine.qml FormLine 1.0 Form/Placements/FormLine.qml
TabBar 1.0 Form/Tab/TabBar.qml TabBar 1.0 Form/Tab/TabBar.qml
......
...@@ -15,6 +15,7 @@ TabContainer { ...@@ -15,6 +15,7 @@ TabContainer {
title: qsTr('callsTitle') title: qsTr('callsTitle')
width: parent.width width: parent.width
FormLine {
FormGroup { FormGroup {
label: qsTr('encryptionLabel') label: qsTr('encryptionLabel')
...@@ -27,6 +28,7 @@ TabContainer { ...@@ -27,6 +28,7 @@ TabContainer {
] ]
} }
} }
}
FormLine { FormLine {
FormGroup { FormGroup {
...@@ -51,12 +53,15 @@ TabContainer { ...@@ -51,12 +53,15 @@ TabContainer {
title: qsTr('chatTitle') title: qsTr('chatTitle')
width: parent.width width: parent.width
FormLine {
FormGroup { FormGroup {
label: qsTr('fileServerLabel') label: qsTr('fileServerLabel')
TextField {} TextField {}
} }
}
FormLine {
FormGroup { FormGroup {
label: qsTr('encryptWithLimeLabel') label: qsTr('encryptWithLimeLabel')
...@@ -70,4 +75,5 @@ TabContainer { ...@@ -70,4 +75,5 @@ TabContainer {
} }
} }
} }
}
} }
...@@ -58,6 +58,20 @@ TabContainer { ...@@ -58,6 +58,20 @@ TabContainer {
title: qsTr('networkProtocolAndPortsTitle') title: qsTr('networkProtocolAndPortsTitle')
width: parent.width width: parent.width
FormHeader {
FormHeaderGroup {
text: qsTr('portHeader')
}
FormHeaderEntry {
text: qsTr('randomPortHeader')
}
FormHeaderEntry {
text: qsTr('enabledPortHeader')
}
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('sipUdpPortLabel') label: qsTr('sipUdpPortLabel')
......
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