Commit 3577df44 authored by Wescoeur's avatar Wescoeur

feat(ui/modules/Linphone/Codecs): in progress

parent 4c43ae2f
...@@ -616,6 +616,10 @@ Server url not configured.</translation> ...@@ -616,6 +616,10 @@ Server url not configured.</translation>
<source>echoCancellationLabel</source> <source>echoCancellationLabel</source>
<translation>Enable echo cancellation</translation> <translation>Enable echo cancellation</translation>
</message> </message>
<message>
<source>audioCodecsTitle</source>
<translation>Audio codecs</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsCallsChat</name> <name>SettingsCallsChat</name>
...@@ -819,7 +823,7 @@ Server url not configured.</translation> ...@@ -819,7 +823,7 @@ Server url not configured.</translation>
</message> </message>
<message> <message>
<source>deleteAccountDescription</source> <source>deleteAccountDescription</source>
<translation type="unfinished"></translation> <translation>Are you sure you want to delete this account?</translation>
</message> </message>
</context> </context>
<context> <context>
...@@ -866,11 +870,11 @@ Server url not configured.</translation> ...@@ -866,11 +870,11 @@ Server url not configured.</translation>
</message> </message>
<message> <message>
<source>cancel</source> <source>cancel</source>
<translation type="unfinished">CANCEL</translation> <translation>CANCEL</translation>
</message> </message>
<message> <message>
<source>confirm</source> <source>confirm</source>
<translation type="unfinished">CONFIRM</translation> <translation>CONFIRM</translation>
</message> </message>
</context> </context>
<context> <context>
...@@ -934,6 +938,10 @@ Server url not configured.</translation> ...@@ -934,6 +938,10 @@ Server url not configured.</translation>
<source>videoSizeLabel</source> <source>videoSizeLabel</source>
<translation>Video resolution</translation> <translation>Video resolution</translation>
</message> </message>
<message>
<source>videoCodecsTitle</source>
<translation>Video codecs</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsWindow</name> <name>SettingsWindow</name>
......
...@@ -616,6 +616,10 @@ Url du serveur non configurée.</translation> ...@@ -616,6 +616,10 @@ Url du serveur non configurée.</translation>
<source>echoCancellationLabel</source> <source>echoCancellationLabel</source>
<translation>Activer annulation d&apos;écho</translation> <translation>Activer annulation d&apos;écho</translation>
</message> </message>
<message>
<source>audioCodecsTitle</source>
<translation>Codecs audio</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsCallsChat</name> <name>SettingsCallsChat</name>
...@@ -819,7 +823,7 @@ Url du serveur non configurée.</translation> ...@@ -819,7 +823,7 @@ Url du serveur non configurée.</translation>
</message> </message>
<message> <message>
<source>deleteAccountDescription</source> <source>deleteAccountDescription</source>
<translation type="unfinished"></translation> <translation>Êtes-vous sûr de vouloir supprimer ce compte ?</translation>
</message> </message>
</context> </context>
<context> <context>
...@@ -866,11 +870,11 @@ Url du serveur non configurée.</translation> ...@@ -866,11 +870,11 @@ Url du serveur non configurée.</translation>
</message> </message>
<message> <message>
<source>cancel</source> <source>cancel</source>
<translation type="unfinished">ANNULER</translation> <translation>ANNULER</translation>
</message> </message>
<message> <message>
<source>confirm</source> <source>confirm</source>
<translation type="unfinished">CONFIRMER</translation> <translation>CONFIRMER</translation>
</message> </message>
</context> </context>
<context> <context>
...@@ -934,6 +938,10 @@ Url du serveur non configurée.</translation> ...@@ -934,6 +938,10 @@ Url du serveur non configurée.</translation>
<source>videoSizeLabel</source> <source>videoSizeLabel</source>
<translation>Définition</translation> <translation>Définition</translation>
</message> </message>
<message>
<source>videoCodecsTitle</source>
<translation>Codecs vidéo</translation>
</message>
</context> </context>
<context> <context>
<name>SettingsWindow</name> <name>SettingsWindow</name>
......
...@@ -275,6 +275,7 @@ ...@@ -275,6 +275,7 @@
<file>ui/modules/Linphone/Chat/Message.js</file> <file>ui/modules/Linphone/Chat/Message.js</file>
<file>ui/modules/Linphone/Chat/Message.qml</file> <file>ui/modules/Linphone/Chat/Message.qml</file>
<file>ui/modules/Linphone/Chat/OutgoingMessage.qml</file> <file>ui/modules/Linphone/Chat/OutgoingMessage.qml</file>
<file>ui/modules/Linphone/Codecs/CodecsViewer.qml</file>
<file>ui/modules/Linphone/Contact/Avatar.qml</file> <file>ui/modules/Linphone/Contact/Avatar.qml</file>
<file>ui/modules/Linphone/Contact/ContactDescription.qml</file> <file>ui/modules/Linphone/Contact/ContactDescription.qml</file>
<file>ui/modules/Linphone/Contact/Contact.qml</file> <file>ui/modules/Linphone/Contact/Contact.qml</file>
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
// =============================================================================
ColumnLayout {
property alias model: view.model
// ---------------------------------------------------------------------------
height: 350
// ---------------------------------------------------------------------------
// Header.
// ---------------------------------------------------------------------------
Row {
Layout.fillWidth: true
height: 50
}
// ---------------------------------------------------------------------------
// Codecs.
// ---------------------------------------------------------------------------
ScrollableListView {
id: view
Layout.fillWidth: true
Layout.fillHeight: true
delegate: Rectangle {
color: 'red'
height: 30
width: view.width
Row {
anchors.fill: parent
Text {
text: $codec.mime
}
Text {
text: $codec.description
}
Text {
text: $codec.channels
}
Text {
text: $codec.bitrate
}
}
}
}
}
...@@ -14,6 +14,8 @@ Calls 1.0 Calls/Calls.qml ...@@ -14,6 +14,8 @@ Calls 1.0 Calls/Calls.qml
Chat 1.0 Chat/Chat.qml Chat 1.0 Chat/Chat.qml
CodecsViewer 1.0 Codecs/CodecsViewer.qml
Avatar 1.0 Contact/Avatar.qml Avatar 1.0 Contact/Avatar.qml
Contact 1.0 Contact/Contact.qml Contact 1.0 Contact/Contact.qml
ContactDescription 1.0 Contact/ContactDescription.qml ContactDescription 1.0 Contact/ContactDescription.qml
......
...@@ -4,80 +4,105 @@ import Common 1.0 ...@@ -4,80 +4,105 @@ import Common 1.0
import Linphone 1.0 import Linphone 1.0
import Utils 1.0 import Utils 1.0
import App.Styles 1.0
// ============================================================================= // =============================================================================
TabContainer { TabContainer {
Form { Column {
title: qsTr('audioTitle') spacing: SettingsWindowStyle.forms.spacing
width: parent.width width: parent.width
FormLine { // -------------------------------------------------------------------------
FormGroup { // Audio parameters.
label: qsTr('playbackDeviceLabel') // -------------------------------------------------------------------------
Form {
title: qsTr('audioTitle')
width: parent.width
FormLine {
FormGroup {
label: qsTr('playbackDeviceLabel')
ComboBox { ComboBox {
currentIndex: Utils.findIndex(model, function (device) { currentIndex: Utils.findIndex(model, function (device) {
return device === SettingsModel.playbackDevice return device === SettingsModel.playbackDevice
}) })
model: SettingsModel.audioDevices model: SettingsModel.audioDevices
onActivated: SettingsModel.playbackDevice = model[index] onActivated: SettingsModel.playbackDevice = model[index]
}
} }
} }
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('captureDeviceLabel') label: qsTr('captureDeviceLabel')
ComboBox { ComboBox {
currentIndex: Utils.findIndex(model, function (device) { currentIndex: Utils.findIndex(model, function (device) {
return device === SettingsModel.captureDevice return device === SettingsModel.captureDevice
}) })
model: SettingsModel.audioDevices model: SettingsModel.audioDevices
onActivated: SettingsModel.captureDevice = model[index] onActivated: SettingsModel.captureDevice = model[index]
}
} }
} }
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('ringerDeviceLabel') label: qsTr('ringerDeviceLabel')
ComboBox { ComboBox {
currentIndex: Utils.findIndex(model, function (device) { currentIndex: Utils.findIndex(model, function (device) {
return device === SettingsModel.ringerDevice return device === SettingsModel.ringerDevice
}) })
model: SettingsModel.audioDevices model: SettingsModel.audioDevices
onActivated: SettingsModel.ringerDevice = model[index] onActivated: SettingsModel.ringerDevice = model[index]
}
} }
} }
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('ringLabel') label: qsTr('ringLabel')
FileChooserButton { FileChooserButton {
selectedFile: SettingsModel.ringPath selectedFile: SettingsModel.ringPath
onAccepted: SettingsModel.ringPath = selectedFile onAccepted: SettingsModel.ringPath = selectedFile
}
} }
} }
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('echoCancellationLabel') label: qsTr('echoCancellationLabel')
Switch { Switch {
checked: SettingsModel.echoCancellationEnabled checked: SettingsModel.echoCancellationEnabled
onClicked: SettingsModel.echoCancellationEnabled = !checked onClicked: SettingsModel.echoCancellationEnabled = !checked
}
} }
} }
} }
// -------------------------------------------------------------------------
// Audio Codecs.
// -------------------------------------------------------------------------
Form {
title: qsTr('audioCodecsTitle')
width: parent.width
CodecsViewer {
model: AudioCodecsModel
width: parent.width
}
}
} }
} }
...@@ -4,88 +4,113 @@ import Common 1.0 ...@@ -4,88 +4,113 @@ import Common 1.0
import Linphone 1.0 import Linphone 1.0
import Utils 1.0 import Utils 1.0
import App.Styles 1.0
// ============================================================================= // =============================================================================
TabContainer { TabContainer {
Form { Column {
title: qsTr('videoCaptureTitle') spacing: SettingsWindowStyle.forms.spacing
width: parent.width width: parent.width
FormLine { // -------------------------------------------------------------------------
FormGroup { // Video parameters.
label: qsTr('videoInputDeviceLabel') // -------------------------------------------------------------------------
Form {
title: qsTr('videoCaptureTitle')
width: parent.width
FormLine {
FormGroup {
label: qsTr('videoInputDeviceLabel')
ComboBox { ComboBox {
currentIndex: Utils.findIndex(model, function (device) { currentIndex: Utils.findIndex(model, function (device) {
return device === SettingsModel.videoDevice return device === SettingsModel.videoDevice
}) })
model: SettingsModel.videoDevices model: SettingsModel.videoDevices
onActivated: SettingsModel.videoDevice = model[index] onActivated: SettingsModel.videoDevice = model[index]
}
} }
} }
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('videoPresetLabel') label: qsTr('videoPresetLabel')
ComboBox { ComboBox {
currentIndex: { currentIndex: {
var preset = SettingsModel.videoPreset var preset = SettingsModel.videoPreset
return Number(Utils.findIndex([ 'default', 'high-fps', 'custom' ], function (value) { return Number(Utils.findIndex([ 'default', 'high-fps', 'custom' ], function (value) {
return preset === value return preset === value
})) }))
} }
model: ListModel { model: ListModel {
id: presets id: presets
ListElement { ListElement {
key: qsTr('presetDefault') key: qsTr('presetDefault')
value: 'default' value: 'default'
} }
ListElement { ListElement {
key: qsTr('presetHighFps') key: qsTr('presetHighFps')
value: 'high-fps' value: 'high-fps'
} }
ListElement { ListElement {
key: qsTr('presetCustom') key: qsTr('presetCustom')
value: 'custom' value: 'custom'
}
} }
}
textRole: 'key' textRole: 'key'
onActivated: SettingsModel.videoPreset = presets.get(index).value onActivated: SettingsModel.videoPreset = presets.get(index).value
}
} }
} }
}
FormLine { FormLine {
FormGroup { FormGroup {
label: qsTr('videoSizeLabel') label: qsTr('videoSizeLabel')
ComboBox { ComboBox {
// TODO // TODO
}
} }
}
FormGroup { FormGroup {
label: qsTr('videoFramerateLabel') label: qsTr('videoFramerateLabel')
NumericField { NumericField {
maxValue: 60 maxValue: 60
minValue: 1 minValue: 1
readOnly: SettingsModel.videoPreset !== 'custom' readOnly: SettingsModel.videoPreset !== 'custom'
text: SettingsModel.videoFramerate text: SettingsModel.videoFramerate
onEditingFinished: SettingsModel.videoFramerate = text onEditingFinished: SettingsModel.videoFramerate = text
}
} }
} }
} }
// -------------------------------------------------------------------------
// Video Codecs.
// -------------------------------------------------------------------------
Form {
title: qsTr('videoCodecsTitle')
width: parent.width
CodecsViewer {
model: VideoCodecsModel
width: parent.width
}
}
} }
} }
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