From 2e8f237d657072af06420d5fcfb5bf50d531c854 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Thu, 7 Nov 2024 21:34:17 +0100 Subject: [PATCH] Responsive settings views --- Linphone/view/CMakeLists.txt | 2 +- .../{GridLayout.qml => CallGridLayout.qml} | 0 .../Control/Container/Call/CallLayout.qml | 2 +- .../view/Page/Form/Settings/SettingsPage.qml | 4 +- .../Settings/AbstractSettingsLayout.qml | 94 ++- .../Settings/AccountSettingsGeneralLayout.qml | 643 ++++++++---------- .../AccountSettingsParametersLayout.qml | 303 ++++----- .../Settings/AdvancedSettingsLayout.qml | 306 ++++----- .../Layout/Settings/CallSettingsLayout.qml | 111 ++- .../Layout/Settings/CarddavSettingsLayout.qml | 130 ++-- .../Settings/ContactsSettingsLayout.qml | 90 +-- .../ContactsSettingsProviderLayout.qml | 41 +- .../Layout/Settings/DebugSettingsLayout.qml | 8 +- .../Layout/Settings/LdapSettingsLayout.qml | 261 ++++--- .../Layout/Settings/NetworkSettingsLayout.qml | 50 +- .../Settings/SecuritySettingsLayout.qml | 11 +- 16 files changed, 931 insertions(+), 1125 deletions(-) rename Linphone/view/Control/Container/Call/{GridLayout.qml => CallGridLayout.qml} (100%) diff --git a/Linphone/view/CMakeLists.txt b/Linphone/view/CMakeLists.txt index 7233f132e..b0686a11a 100644 --- a/Linphone/view/CMakeLists.txt +++ b/Linphone/view/CMakeLists.txt @@ -28,7 +28,7 @@ list(APPEND _LINPHONEAPP_QML_FILES view/Control/Container/Call/ActiveSpeakerLayout.qml view/Control/Container/Call/CallHistoryLayout.qml view/Control/Container/Call/CallLayout.qml - view/Control/Container/Call/GridLayout.qml + view/Control/Container/Call/CallGridLayout.qml view/Control/Container/Call/Mosaic.qml view/Control/Container/Contact/ContactLayout.qml view/Control/Container/Main/MainRightPanel.qml diff --git a/Linphone/view/Control/Container/Call/GridLayout.qml b/Linphone/view/Control/Container/Call/CallGridLayout.qml similarity index 100% rename from Linphone/view/Control/Container/Call/GridLayout.qml rename to Linphone/view/Control/Container/Call/CallGridLayout.qml diff --git a/Linphone/view/Control/Container/Call/CallLayout.qml b/Linphone/view/Control/Container/Call/CallLayout.qml index 4880051c3..b8735854d 100644 --- a/Linphone/view/Control/Container/Call/CallLayout.qml +++ b/Linphone/view/Control/Container/Call/CallLayout.qml @@ -73,7 +73,7 @@ Item { } Component{ id: gridComponent - GridLayout{ + CallGridLayout{ Layout.Layout.fillWidth: true Layout.Layout.fillHeight: true call: mainItem.call diff --git a/Linphone/view/Page/Form/Settings/SettingsPage.qml b/Linphone/view/Page/Form/Settings/SettingsPage.qml index 66e72534c..4db1ee74d 100644 --- a/Linphone/view/Page/Form/Settings/SettingsPage.qml +++ b/Linphone/view/Page/Form/Settings/SettingsPage.qml @@ -12,8 +12,8 @@ AbstractSettingsMenu { //{title: qsTr("Sécurité"), layout: "SecuritySettingsLayout"}, {title: qsTr("Conversations"), layout: "ChatSettingsLayout", visible: !SettingsCpp.disableChatFeature}, {title: qsTr("Contacts"), layout: "ContactsSettingsLayout"}, - {title: qsTr("Réunions"), layout: "MeetingsSettingsLayout", visible: !SettingsCpp.disableMeetingsFeature}, - {title: qsTr("Affichage"), layout: "DisplaySettingsLayout"}, + //{title: qsTr("Réunions"), layout: "MeetingsSettingsLayout", visible: !SettingsCpp.disableMeetingsFeature}, + //{title: qsTr("Affichage"), layout: "DisplaySettingsLayout"}, {title: qsTr("Réseau"), layout: "NetworkSettingsLayout"}, {title: qsTr("Paramètres avancés"), layout: "AdvancedSettingsLayout"} ] diff --git a/Linphone/view/Page/Layout/Settings/AbstractSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/AbstractSettingsLayout.qml index 1396b7949..dc677f106 100644 --- a/Linphone/view/Page/Layout/Settings/AbstractSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AbstractSettingsLayout.qml @@ -10,21 +10,36 @@ Rectangle { width: container.width height: container.height property string titleText - property var contentComponent + property var contentModel property var topbarOptionalComponent property var model color: 'white' property var container - + property int contentHeight: contentRepeater.count > 0 ? contentRepeater.itemAt(0).height * contentRepeater.count : 0 + property int minimumWidthForSwitchintToRowLayout: 981 * DefaultStyle.dp + property var useVerticalLayout + function setResponsivityFlags() { + var newValue = width < minimumWidthForSwitchintToRowLayout * DefaultStyle.dp + if (useVerticalLayout != newValue) { + useVerticalLayout = newValue + } + } + onWidthChanged: { + setResponsivityFlags() + } + Component.onCompleted: { + setResponsivityFlags() + } Control.ScrollView { id: scrollView height: parent.height width: parent.width - 2 * 45 * DefaultStyle.dp anchors.centerIn: parent - contentHeight: content.height + 20 * DefaultStyle.dp + contentHeight: (contentRepeater.height + header.height) + 20 * DefaultStyle.dp contentWidth: parent.width - 2 * 45 * DefaultStyle.dp Control.ScrollBar.vertical: ScrollBar { active: scrollView.contentHeight > container.height + visible: scrollView.contentHeight > container.height interactive: true policy: Control.ScrollBar.AsNeeded anchors.top: parent.top @@ -36,13 +51,14 @@ Rectangle { active: false } ColumnLayout { - id: content + id: header width: parent.width spacing: 10 * DefaultStyle.dp RowLayout { Layout.fillWidth: true Layout.topMargin: 20 * DefaultStyle.dp spacing: 5 * DefaultStyle.dp + Layout.bottomMargin: 10 * DefaultStyle.dp Button { id: backButton Layout.preferredHeight: 24 * DefaultStyle.dp @@ -74,18 +90,64 @@ Rectangle { Layout.rightMargin: 34 * DefaultStyle.dp } } - Rectangle { - Layout.fillWidth: true - Layout.topMargin: 16 * DefaultStyle.dp - height: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main - } - Loader { - Layout.fillWidth: true - sourceComponent: mainItem.contentComponent - } - Item { - Layout.fillHeight: true + Repeater { + id: contentRepeater + model: mainItem.contentModel + delegate: ColumnLayout { + Rectangle { + Layout.topMargin: 16 * DefaultStyle.dp + Layout.bottomMargin: 16 * DefaultStyle.dp + Layout.fillWidth: true + height: 1 * DefaultStyle.dp + color: DefaultStyle.main2_500main + } + GridLayout { + rows: 1 + columns: mainItem.useVerticalLayout ? 1 : 2 + Layout.fillWidth: true + Layout.preferredWidth: parent.width + rowSpacing: (modelData.title.length > 0 || modelData.subTitle.length > 0 ? 20 : 0) * DefaultStyle.dp + columnSpacing: 47 * DefaultStyle.dp + ColumnLayout { + Layout.preferredWidth: 341 * DefaultStyle.dp + Layout.maximumWidth: 341 * DefaultStyle.dp + spacing: 3 * DefaultStyle.dp + Text { + text: modelData.title + visible: modelData.title.length > 0 + font: Typography.h4 + wrapMode: Text.WordWrap + color: DefaultStyle.main2_600 + Layout.preferredWidth: parent.width + } + Text { + text: modelData.subTitle + visible: modelData.subTitle.length > 0 + font: Typography.p1s + wrapMode: Text.WordWrap + color: DefaultStyle.main2_600 + Layout.preferredWidth: parent.width + } + Item { + Layout.fillHeight: true + } + } + RowLayout { + anchors.topMargin: 21 * DefaultStyle.dp + anchors.bottomMargin: 21 * DefaultStyle.dp + anchors.leftMargin: (mainItem.useVerticalLayout ? 0 : 17) * DefaultStyle.dp + Layout.preferredWidth: (modelData.customWidth > 0 ? modelData.customWidth : 545) * DefaultStyle.dp + Layout.alignment: Qt.AlignRight + Loader { + Layout.fillWidth: true + sourceComponent: modelData.contentComponent + } + Item { + Layout.preferredWidth: (modelData.customRightMargin > 0 ? modelData.customRightMargin : 17) * DefaultStyle.dp + } + } + } + } } } } diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml index ffb7e051f..96bebad80 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsGeneralLayout.qml @@ -9,377 +9,328 @@ import UtilsCpp AbstractSettingsLayout { id: mainItem - contentComponent: content + + width: parent?.width + contentModel: [ + { + title: qsTr("Détails"), + subTitle: qsTr("Editer les informations de votre compte."), + contentComponent: accountParametersComponent + }, + { + title: qsTr("Vos appareils"), + subTitle: qsTr("La liste des appareils connectés à votre compte. Vous pouvez retirer les appareils que vous n’utilisez plus."), + contentComponent: accountDevicesComponent + } + ] + property alias account: mainItem.model + + // Account parameters + ////////////////////////// + Component { - id: content + id: accountParametersComponent ColumnLayout { - width: parent.width - spacing: 5 * DefaultStyle.dp + Layout.fillWidth: true + spacing: 20 * DefaultStyle.dp + Avatar { + id: avatar + account: model + displayPresence: false + Layout.preferredWidth: 100 * DefaultStyle.dp + Layout.preferredHeight: 100 * DefaultStyle.dp + Layout.alignment: Qt.AlignHCenter + } + IconLabelButton { + visible: model.core.pictureUri.length === 0 + Layout.preferredWidth: width + Layout.preferredHeight: 17 * DefaultStyle.dp + iconSource: AppIcons.camera + iconSize: 17 * DefaultStyle.dp + text: qsTr("Ajouter une image") + onClicked: fileDialog.open() + Layout.alignment: Qt.AlignHCenter + color: DefaultStyle.main2_600 + } RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp + visible: model.core.pictureUri.length > 0 + Layout.alignment: Qt.AlignHCenter spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Détails") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - Text { - text: qsTr("Editer les informations de votre compte.") - font: Typography.p1s - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - Layout.fillWidth: true - } - } - Item { - Layout.fillHeight: true + IconLabelButton { + Layout.preferredWidth: width + Layout.preferredHeight: 17 * DefaultStyle.dp + iconSource: AppIcons.pencil + iconSize: 17 * DefaultStyle.dp + text: qsTr("Modifier l'image") + color: DefaultStyle.main2_600 + onClicked: fileDialog.open() + } + IconLabelButton { + Layout.preferredWidth: width + Layout.preferredHeight: 17 * DefaultStyle.dp + iconSource: AppIcons.trashCan + iconSize: 17 * DefaultStyle.dp + text: qsTr("Supprimer l'image") + color: DefaultStyle.main2_600 + onClicked: model.core.pictureUri = "" + } + } + FileDialog { + id: fileDialog + currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0] + onAccepted: { + var avatarPath = UtilsCpp.createAvatar( selectedFile ) + if(avatarPath){ + model.core.pictureUri = avatarPath + avatar.model = model } } - ColumnLayout { + } + RowLayout { + Layout.fillWidth: true + spacing: 5 * DefaultStyle.dp + Text { + Layout.alignment: Qt.AlignLeft + text: qsTr("Adresse SIP :") + color: DefaultStyle.main2_600 + font: Typography.p2l + } + Text { + Layout.alignment: Qt.AlignLeft + text: model.core.identityAddress + color: DefaultStyle.main2_600 + font: Typography.p1 + } + Item { Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - Avatar { - account: model - displayPresence: false - Layout.preferredWidth: 100 * DefaultStyle.dp - Layout.preferredHeight: 100 * DefaultStyle.dp - Layout.alignment: Qt.AlignHCenter - } - IconLabelButton { - visible: model.core.pictureUri.length === 0 - Layout.preferredWidth: width - Layout.preferredHeight: 17 * DefaultStyle.dp - iconSource: AppIcons.camera - iconSize: 17 * DefaultStyle.dp - text: qsTr("Ajouter une image") - onClicked: fileDialog.open() - Layout.alignment: Qt.AlignHCenter - color: DefaultStyle.main2_600 - } - RowLayout { - visible: model.core.pictureUri.length > 0 - Layout.alignment: Qt.AlignHCenter - spacing: 5 * DefaultStyle.dp - IconLabelButton { - Layout.preferredWidth: width - Layout.preferredHeight: 17 * DefaultStyle.dp - iconSource: AppIcons.pencil - iconSize: 17 * DefaultStyle.dp - text: qsTr("Modifier l'image") - color: DefaultStyle.main2_600 - onClicked: fileDialog.open() - } - IconLabelButton { - Layout.preferredWidth: width - Layout.preferredHeight: 17 * DefaultStyle.dp - iconSource: AppIcons.trashCan - iconSize: 17 * DefaultStyle.dp - text: qsTr("Supprimer l'image") - color: DefaultStyle.main2_600 - onClicked: model.core.pictureUri = "" - } - } - FileDialog { - id: fileDialog - currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0] - onAccepted: { - var avatarPath = UtilsCpp.createAvatar( selectedFile ) - if(avatarPath){ - model.core.pictureUri = avatarPath - } - } - } - RowLayout { + } + IconLabelButton { + Layout.alignment: Qt.AlignRight + Layout.preferredWidth: 20 * DefaultStyle.dp + Layout.preferredHeight: 20 * DefaultStyle.dp + iconSize: 24 * DefaultStyle.dp + iconSource: AppIcons.copy + color: DefaultStyle.main2_600 + onClicked: UtilsCpp.copyToClipboard(model.core.identityAddress) + } + } + ColumnLayout { + spacing: 5 * DefaultStyle.dp + Layout.alignment: Qt.AlignLeft + Text { + text: qsTr("Nom d’affichage") + color: DefaultStyle.main2_600 + font: Typography.p2l + } + Text { + text: qsTr("Le nom qui sera affiché à vos correspondants lors de vos échanges.") + color: DefaultStyle.main2_600 + font: Typography.p1 + } + } + TextField { + Layout.alignment: Qt.AlignLeft + Layout.fillWidth: true + Layout.preferredHeight: 49 * DefaultStyle.dp + initialText: model.core.displayName + backgroundColor: DefaultStyle.grey_100 + onEditingFinished: { + if (text.length != 0) model.core.displayName = text + } + toValidate: true + } + Text { + text: qsTr("Indicatif international*") + color: DefaultStyle.main2_600 + font: Typography.p2l + } + ComboSetting { + Layout.fillWidth: true + Layout.topMargin: -15 * DefaultStyle.dp + entries: account.core.dialPlans + propertyName: "dialPlan" + propertyOwner: account.core + } + SwitchSetting { + titleText: account?.core.humaneReadableRegistrationState + subTitleText: account?.core.humaneReadableRegistrationStateExplained + propertyName: "registerEnabled" + propertyOwner: account?.core + } + RowLayout { + id:mainItem + spacing : 20 * DefaultStyle.dp + ColumnLayout { + spacing : 5 * DefaultStyle.dp + Text { + text: qsTr("Supprimer mon compte") + font: Typography.p2l + wrapMode: Text.WordWrap + color: DefaultStyle.danger_500main Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - Text { - Layout.alignment: Qt.AlignLeft - text: qsTr("Adresse SIP :") - color: DefaultStyle.main2_600 - font: Typography.p2l - } - Text { - Layout.alignment: Qt.AlignLeft - text: model.core.identityAddress - color: DefaultStyle.main2_600 - font: Typography.p1 - } - Item { - Layout.fillWidth: true - } - IconLabelButton { - Layout.alignment: Qt.AlignRight - Layout.preferredWidth: 20 * DefaultStyle.dp - Layout.preferredHeight: 20 * DefaultStyle.dp - iconSize: 24 * DefaultStyle.dp - iconSource: AppIcons.copy - color: DefaultStyle.main2_600 - onClicked: UtilsCpp.copyToClipboard(model.core.identityAddress) - } - } - ColumnLayout { - spacing: 5 * DefaultStyle.dp - Layout.alignment: Qt.AlignLeft - Text { - text: qsTr("Nom d’affichage") - color: DefaultStyle.main2_600 - font: Typography.p2l - } - Text { - text: qsTr("Le nom qui sera affiché à vos correspondants lors de vos échanges.") - color: DefaultStyle.main2_600 - font: Typography.p1 - } - } - TextField { - Layout.alignment: Qt.AlignLeft - Layout.fillWidth: true - Layout.preferredHeight: 49 * DefaultStyle.dp - initialText: model.core.displayName - backgroundColor: DefaultStyle.grey_100 - onEditingFinished: { - if (text.length != 0) model.core.displayName = text - } - toValidate: true } Text { - text: qsTr("Indicatif international*") - color: DefaultStyle.main2_600 - font: Typography.p2l - } - ComboSetting { + text: qsTr("Votre compte sera retiré de ce client linphone, mais vous restez connecté sur vos autres clients") + font: Typography.p1 + wrapMode: Text.WordWrap + color: DefaultStyle.main2_500main Layout.fillWidth: true - Layout.topMargin: -15 * DefaultStyle.dp - entries: account.core.dialPlans - propertyName: "dialPlan" - propertyOwner: account.core } - SwitchSetting { - titleText: account?.core.humaneReadableRegistrationState - subTitleText: account?.core.humaneReadableRegistrationStateExplained - propertyName: "registerEnabled" - propertyOwner: account?.core - } - RowLayout { - id:mainItem - spacing : 20 * DefaultStyle.dp - ColumnLayout { - spacing : 5 * DefaultStyle.dp - Text { - text: qsTr("Supprimer mon compte") - font: Typography.p2l - wrapMode: Text.WordWrap - color: DefaultStyle.danger_500main - Layout.fillWidth: true - } - Text { - text: qsTr("Votre compte sera retiré de ce client linphone, mais vous restez connecté sur vos autres clients") - font: Typography.p1 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_500main - Layout.fillWidth: true - } - } - Item { - Layout.fillWidth: true - } - Button { - background: Item{} - Layout.alignment: Qt.AlignRight - Layout.rightMargin: 5 * DefaultStyle.dp + } + Item { + Layout.fillWidth: true + } + Button { + background: Item{} + Layout.alignment: Qt.AlignRight + Layout.rightMargin: 5 * DefaultStyle.dp + Layout.preferredWidth: 24 * DefaultStyle.dp + Layout.preferredHeight: 24 * DefaultStyle.dp + contentItem: RowLayout { + Layout.alignment: Qt.AlignRight + EffectImage { + imageSource: AppIcons.trashCan + width: 24 * DefaultStyle.dp + height: 24 * DefaultStyle.dp Layout.preferredWidth: 24 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp - contentItem: RowLayout { - Layout.alignment: Qt.AlignRight + fillMode: Image.PreserveAspectFit + colorizationColor: DefaultStyle.danger_500main + } + } + onClicked: { + var mainWin = UtilsCpp.getMainWindow() + mainWin.showConfirmationLambdaPopup("", + qsTr("Supprimer ") + (model.core.displayName.length > 0 ? model.core.displayName : qsTr("le compte")) + " ?", + qsTr("Vous pouvez vous reconnecter à tout moment en cliquant sur \"Ajouter un compte\".\nCependant toutes les informations stockées sur ce périphérique seront supprimées."), + function (confirmed) { + if (confirmed) { + account.core.removeAccount() + } + } + ) + } + } + } + } + } + + + // Account devices + ////////////////////////// + + Component { + id: accountDevicesComponent + RoundedPane { + Layout.fillWidth: true + Layout.fillHeight: true + // Layout.minimumHeight: account.core.devices.length * 133 * DefaultStyle.dp + (account.core.devices.length - 1) * 15 * DefaultStyle.dp + 2 * 21 * DefaultStyle.dp + Layout.rightMargin: 30 * DefaultStyle.dp + Layout.topMargin: 20 * DefaultStyle.dp + Layout.bottomMargin: 4 * DefaultStyle.dp + Layout.leftMargin: 44 * DefaultStyle.dp + topPadding: 21 * DefaultStyle.dp + bottomPadding: 21 * DefaultStyle.dp + leftPadding: 17 * DefaultStyle.dp + rightPadding: 17 * DefaultStyle.dp + background: Rectangle { + anchors.fill: parent + color: DefaultStyle.grey_100 + radius: 15 * DefaultStyle.dp + } + contentItem: ColumnLayout { + spacing: 15 * DefaultStyle.dp + Repeater { + id: devices + model: AccountDeviceProxy { + id: accountDeviceProxy + account: model + } + Control.Control{ + Layout.fillWidth: true + height: 133 * DefaultStyle.dp + topPadding: 26 * DefaultStyle.dp + bottomPadding: 26 * DefaultStyle.dp + rightPadding: 36 * DefaultStyle.dp + leftPadding: 33 * DefaultStyle.dp + background: Rectangle { + anchors.fill: parent + color: DefaultStyle.grey_0 + radius: 10 * DefaultStyle.dp + } + contentItem: ColumnLayout { + width: parent.width + spacing: 20 * DefaultStyle.dp + RowLayout { + spacing: 5 * DefaultStyle.dp EffectImage { - imageSource: AppIcons.trashCan - width: 24 * DefaultStyle.dp - height: 24 * DefaultStyle.dp Layout.preferredWidth: 24 * DefaultStyle.dp Layout.preferredHeight: 24 * DefaultStyle.dp fillMode: Image.PreserveAspectFit - colorizationColor: DefaultStyle.danger_500main + colorizationColor: DefaultStyle.main2_600 + imageSource: modelData.core.userAgent.toLowerCase().includes('ios') | modelData.core.userAgent.toLowerCase().includes('android') ? AppIcons.mobile : AppIcons.desktop } - } - onClicked: { - var mainWin = UtilsCpp.getMainWindow() - mainWin.showConfirmationLambdaPopup("", - qsTr("Supprimer ") + (model.core.displayName.length > 0 ? model.core.displayName : qsTr("le compte")) + " ?", - qsTr("Vous pouvez vous reconnecter à tout moment en cliquant sur \"Ajouter un compte\".\nCependant toutes les informations stockées sur ce périphérique seront supprimées."), - function (confirmed) { - if (confirmed) { - account.core.removeAccount() - } - } - ) - } - } - } - } - } - Rectangle { - Layout.fillWidth: true - Layout.topMargin: 16 * DefaultStyle.dp - height: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main - } - RowLayout { - Layout.fillWidth: true - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Vos appareils") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - Text { - text: qsTr("La liste des appareils connectés à votre compte. Vous pouvez retirer les appareils que vous n’utilisez plus.") - font: Typography.p1s - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - Layout.fillWidth: true - } - } - Item { - Layout.fillHeight: true - } - } - RoundedPane { - Layout.fillWidth: true - Layout.fillHeight: true - // Layout.minimumHeight: account.core.devices.length * 133 * DefaultStyle.dp + (account.core.devices.length - 1) * 15 * DefaultStyle.dp + 2 * 21 * DefaultStyle.dp - Layout.rightMargin: 30 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.bottomMargin: 4 * DefaultStyle.dp - Layout.leftMargin: 44 * DefaultStyle.dp - topPadding: 21 * DefaultStyle.dp - bottomPadding: 21 * DefaultStyle.dp - leftPadding: 17 * DefaultStyle.dp - rightPadding: 17 * DefaultStyle.dp - background: Rectangle { - anchors.fill: parent - color: DefaultStyle.grey_100 - radius: 15 * DefaultStyle.dp - } - contentItem: ColumnLayout { - spacing: 15 * DefaultStyle.dp - Repeater { - id: devices - model: AccountDeviceProxy { - id: accountDeviceProxy - account: model - } - Control.Control{ - Layout.fillWidth: true - height: 133 * DefaultStyle.dp - topPadding: 26 * DefaultStyle.dp - bottomPadding: 26 * DefaultStyle.dp - rightPadding: 36 * DefaultStyle.dp - leftPadding: 33 * DefaultStyle.dp - - background: Rectangle { - anchors.fill: parent - color: DefaultStyle.grey_0 - radius: 10 * DefaultStyle.dp + Text { + text: modelData.core.deviceName + color: DefaultStyle.main2_600 + font: Typography.p2 } - contentItem: ColumnLayout { - width: parent.width - spacing: 20 * DefaultStyle.dp - RowLayout { - spacing: 5 * DefaultStyle.dp - EffectImage { - Layout.preferredWidth: 24 * DefaultStyle.dp - Layout.preferredHeight: 24 * DefaultStyle.dp - fillMode: Image.PreserveAspectFit - colorizationColor: DefaultStyle.main2_600 - imageSource: modelData.core.userAgent.toLowerCase().includes('ios') | modelData.core.userAgent.toLowerCase().includes('android') ? AppIcons.mobile : AppIcons.desktop - } - Text { - text: modelData.core.deviceName - color: DefaultStyle.main2_600 - font: Typography.p2 - } - Item { - Layout.fillWidth: true - } - MediumButton { - Layout.alignment: Qt.AlignRight - text: qsTr("Supprimer") - icon.source: AppIcons.trashCan - icon.width: 16 * DefaultStyle.dp - icon.height: 16 * DefaultStyle.dp - contentImageColor: DefaultStyle.main1_500_main - onClicked: { - var mainWin = UtilsCpp.getMainWindow() - mainWin.showConfirmationLambdaPopup("", - qsTr("Supprimer ") + modelData.core.deviceName + " ?", "", - function (confirmed) { - if (confirmed) { - accountDeviceProxy.deleteDevice(modelData) - } - } - ) + Item { + Layout.fillWidth: true + } + MediumButton { + Layout.alignment: Qt.AlignRight + text: qsTr("Supprimer") + icon.source: AppIcons.trashCan + icon.width: 16 * DefaultStyle.dp + icon.height: 16 * DefaultStyle.dp + contentImageColor: DefaultStyle.main1_500_main + onClicked: { + var mainWin = UtilsCpp.getMainWindow() + mainWin.showConfirmationLambdaPopup("", + qsTr("Supprimer ") + modelData.core.deviceName + " ?", "", + function (confirmed) { + if (confirmed) { + accountDeviceProxy.deleteDevice(modelData) + } } - } - } - RowLayout { - spacing: 5 * DefaultStyle.dp - Text { - text: qsTr("Dernière connexion:") - color: DefaultStyle.main2_600 - font: Typography.p2 - } - EffectImage { - Layout.preferredWidth: 20 * DefaultStyle.dp - Layout.preferredHeight: 20 * DefaultStyle.dp - imageSource: AppIcons.calendar - colorizationColor: DefaultStyle.main2_600 - fillMode: Image.PreserveAspectFit - } - Text { - text: UtilsCpp.formatDate(modelData.core.lastUpdateTimestamp,false) - color: DefaultStyle.main2_600 - font: Typography.p1 - } - EffectImage { - Layout.preferredWidth: 20 * DefaultStyle.dp - Layout.preferredHeight: 20 * DefaultStyle.dp - imageSource: AppIcons.clock - colorizationColor: DefaultStyle.main2_600 - fillMode: Image.PreserveAspectFit - } - Text { - text: UtilsCpp.formatTime(modelData.core.lastUpdateTimestamp) - color: DefaultStyle.main2_600 - font: Typography.p1 - } + ) } } } + RowLayout { + spacing: 5 * DefaultStyle.dp + Text { + text: qsTr("Dernière connexion:") + color: DefaultStyle.main2_600 + font: Typography.p2 + } + EffectImage { + Layout.preferredWidth: 20 * DefaultStyle.dp + Layout.preferredHeight: 20 * DefaultStyle.dp + imageSource: AppIcons.calendar + colorizationColor: DefaultStyle.main2_600 + fillMode: Image.PreserveAspectFit + } + Text { + text: UtilsCpp.formatDate(modelData.core.lastUpdateTimestamp,false) + color: DefaultStyle.main2_600 + font: Typography.p1 + } + EffectImage { + Layout.preferredWidth: 20 * DefaultStyle.dp + Layout.preferredHeight: 20 * DefaultStyle.dp + imageSource: AppIcons.clock + colorizationColor: DefaultStyle.main2_600 + fillMode: Image.PreserveAspectFit + } + Text { + text: UtilsCpp.formatTime(modelData.core.lastUpdateTimestamp) + color: DefaultStyle.main2_600 + font: Typography.p1 + } + } } } } diff --git a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml index bbd4ce69a..215766628 100644 --- a/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AccountSettingsParametersLayout.qml @@ -9,186 +9,137 @@ import UtilsCpp AbstractSettingsLayout { id: mainItem - contentComponent: content - property alias account: mainItem.model + width: parent?.width + contentModel: [ + { + title: qsTr("Paramètres"), + subTitle: "", + contentComponent: generalParametersComponent + }, + { + title: qsTr("Paramètres avancés"), + subTitle: "", + contentComponent: advancedParametersComponent + } + ] + + // General parameters + ///////////////////// + Component { - id: content + id: generalParametersComponent ColumnLayout { - width: parent.width - spacing: 5 * DefaultStyle.dp - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Paramètres") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - id: column - Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - DecoratedTextField { - propertyName: "mwiServerAddress" - propertyOwner: account.core - title: qsTr("URI du serveur de messagerie vocale") - isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "voicemailAddress" - propertyOwner: account.core - title: qsTr("URI de messagerie vocale") - isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } - toValidate: true - Layout.fillWidth: true - } - Item { - Layout.fillHeight: true - Layout.fillWidth: true - } - } - } - Rectangle { + id: column + Layout.fillWidth: true + spacing: 20 * DefaultStyle.dp + DecoratedTextField { + propertyName: "mwiServerAddress" + propertyOwner: account.core + title: qsTr("URI du serveur de messagerie vocale") + isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + toValidate: true Layout.fillWidth: true - Layout.topMargin: 16 * DefaultStyle.dp - height: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main } - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Paramètres avancés") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - Text { - text: qsTr("Transport") - color: DefaultStyle.main2_600 - font: Typography.p2l - } - ComboSetting { - Layout.fillWidth: true - Layout.topMargin: -15 * DefaultStyle.dp - entries: account.core.transports - propertyName: "transport" - propertyOwner: account.core - } - DecoratedTextField { - Layout.fillWidth: true - title: qsTr("URL du serveur mandataire") - propertyName: "serverAddress" - propertyOwner: account.core - isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } - toValidate: true - } - SwitchSetting { - titleText: qsTr("Serveur mandataire sortant") - propertyName: "outboundProxyEnabled" - propertyOwner: account.core - } - DecoratedTextField { - Layout.fillWidth: true - propertyName: "stunServer" - propertyOwner: account.core - title: qsTr("Adresse du serveur STUN") - isValid: function(text) { return UtilsCpp.isValidIPAddress(text) || UtilsCpp.isValidHostname(text); } - toValidate: true - } - SwitchSetting { - titleText: qsTr("Activer ICE") - propertyName: "iceEnabled" - propertyOwner: account.core - } - SwitchSetting { - titleText: qsTr("AVPF") - propertyName: "avpfEnabled" - propertyOwner: account.core - } - SwitchSetting { - titleText: qsTr("Mode bundle") - propertyName: "bundleModeEnabled" - propertyOwner: account.core - } - DecoratedTextField { - Layout.fillWidth: true - propertyName: "expire" - propertyOwner: account.core - title: qsTr("Expiration (en seconde)") - canBeEmpty: false - isValid: function(text) { return !isNaN(Number(text)); } - toValidate: true - } - DecoratedTextField { - Layout.fillWidth: true - title: qsTr("URI de l’usine à conversations") - propertyName: "conferenceFactoryAddress" - propertyOwner: account.core - isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } - toValidate: true - } - DecoratedTextField { - Layout.fillWidth: true - title: qsTr("URI de l’usine à réunions") - propertyName: "audioVideoConferenceFactoryAddress" - propertyOwner: account.core - isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } - visible: !SettingsCpp.disableMeetingsFeature - toValidate: true - } - DecoratedTextField { - Layout.fillWidth: true - title: qsTr("URL du serveur d’échange de clés de chiffrement") - propertyName: "limeServerUrl" - propertyOwner: account.core - isValid: function(text) { return UtilsCpp.isValidURL(text); } - toValidate: true - } - Item { - Layout.fillHeight: true - } - } + DecoratedTextField { + propertyName: "voicemailAddress" + propertyOwner: account.core + title: qsTr("URI de messagerie vocale") + isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + toValidate: true + Layout.fillWidth: true + } + } + } + + // Advanced parameters + ///////////////////// + + Component { + id: advancedParametersComponent + ColumnLayout { + Layout.fillWidth: true + spacing: 20 * DefaultStyle.dp + Text { + text: qsTr("Transport") + color: DefaultStyle.main2_600 + font: Typography.p2l + } + ComboSetting { + Layout.fillWidth: true + Layout.topMargin: -15 * DefaultStyle.dp + entries: account.core.transports + propertyName: "transport" + propertyOwner: account.core + } + DecoratedTextField { + Layout.fillWidth: true + title: qsTr("URL du serveur mandataire") + propertyName: "serverAddress" + propertyOwner: account.core + isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + toValidate: true + } + SwitchSetting { + titleText: qsTr("Serveur mandataire sortant") + propertyName: "outboundProxyEnabled" + propertyOwner: account.core + } + DecoratedTextField { + Layout.fillWidth: true + propertyName: "stunServer" + propertyOwner: account.core + title: qsTr("Adresse du serveur STUN") + isValid: function(text) { return UtilsCpp.isValidIPAddress(text) || UtilsCpp.isValidHostname(text); } + toValidate: true + } + SwitchSetting { + titleText: qsTr("Activer ICE") + propertyName: "iceEnabled" + propertyOwner: account.core + } + SwitchSetting { + titleText: qsTr("AVPF") + propertyName: "avpfEnabled" + propertyOwner: account.core + } + SwitchSetting { + titleText: qsTr("Mode bundle") + propertyName: "bundleModeEnabled" + propertyOwner: account.core + } + DecoratedTextField { + Layout.fillWidth: true + propertyName: "expire" + propertyOwner: account.core + title: qsTr("Expiration (en seconde)") + canBeEmpty: false + isValid: function(text) { return !isNaN(Number(text)); } + toValidate: true + } + DecoratedTextField { + Layout.fillWidth: true + title: qsTr("URI de l’usine à conversations") + propertyName: "conferenceFactoryAddress" + propertyOwner: account.core + isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + toValidate: true + } + DecoratedTextField { + Layout.fillWidth: true + title: qsTr("URI de l’usine à réunions") + propertyName: "audioVideoConferenceFactoryAddress" + propertyOwner: account.core + isValid: function(text) { return UtilsCpp.isValidSIPAddress(text); } + visible: !SettingsCpp.disableMeetingsFeature + toValidate: true + } + DecoratedTextField { + Layout.fillWidth: true + title: qsTr("URL du serveur d’échange de clés de chiffrement") + propertyName: "limeServerUrl" + propertyOwner: account.core + isValid: function(text) { return UtilsCpp.isValidURL(text); } + toValidate: true } } } diff --git a/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml index 80c11af8e..2ea89bdf0 100644 --- a/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/AdvancedSettingsLayout.qml @@ -8,196 +8,134 @@ import Linphone import 'qrc:/qt/qml/Linphone/view/Control/Tool/Helper/utils.js' as Utils AbstractSettingsLayout { - contentComponent: content + width: parent?.width + contentModel: [ + { + title: qsTr("Configuration distante"), + subTitle: "", + contentComponent: remoteProvisioningComponent + }, + { + title: qsTr("Codecs Audio"), + subTitle: "", + contentComponent: audioCodecsComponent, + }, + { + title: qsTr("Codecs Vidéo"), + subTitle: "", + contentComponent: videoCodecsComponent + }, + { + title: "", + subTitle: "", + contentComponent: hideFpsComponent + } + ] + + // Remote Provisioning + ////////////////////// + Component { - id: content + id: remoteProvisioningComponent ColumnLayout { - width: parent.width - spacing: 5 * DefaultStyle.dp - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Configuration distante") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - DecoratedTextField { - Layout.fillWidth: true - id: configUri - title: qsTr("URL de configuration distante") - toValidate: true - } - SmallButton { - Layout.alignment: Qt.AlignRight - text: qsTr("Télécharger et appliquer") - onClicked: { - var url = configUri.value() - if (UtilsCpp.isValidURL(url)) - UtilsCpp.useFetchConfig(configUri.value()) - else - UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("Format d'url invalide"), false, UtilsCpp.getMainWindow()) - } - } - } - } - Rectangle { + spacing: 20 * DefaultStyle.dp + DecoratedTextField { Layout.fillWidth: true - Layout.topMargin: 35 * DefaultStyle.dp - Layout.bottomMargin: 9 * DefaultStyle.dp - height: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main + id: configUri + title: qsTr("URL de configuration distante") + toValidate: true } - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Codecs Audio") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - Repeater { - model: PayloadTypeProxy { - filterType: PayloadTypeProxy.Audio | PayloadTypeProxy.NotDownloadable - } - SwitchSetting { - Layout.fillWidth: true - titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType) - subTitleText: modelData.core.clockRate + " Hz" - propertyName: "enabled" - propertyOwner: modelData.core - } - } - } - } - Rectangle { - Layout.fillWidth: true - Layout.topMargin: 35 * DefaultStyle.dp - Layout.bottomMargin: 9 * DefaultStyle.dp - height: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main - } - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Codecs Vidéo") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - Repeater { - model: PayloadTypeProxy { - id: videoPayloadTypeProxy - filterType: PayloadTypeProxy.Video | PayloadTypeProxy.NotDownloadable - } - SwitchSetting { - Layout.fillWidth: true - titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType) - subTitleText: modelData.core.encoderDescription - propertyName: "enabled" - propertyOwner: modelData.core - } - } - Repeater { - model: PayloadTypeProxy { - id: downloadableVideoPayloadTypeProxy - filterType: PayloadTypeProxy.Video | PayloadTypeProxy.Downloadable - } - SwitchSetting { - Layout.fillWidth: true - titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType) - subTitleText: modelData.core.encoderDescription - onCheckedChanged: function(checked) { - if (checked) - Utils.openCodecOnlineInstallerDialog(mainWindow, modelData.core) - } - } - } - } - } - Rectangle { - Layout.fillWidth: true - Layout.topMargin: 35 * DefaultStyle.dp - Layout.bottomMargin: 9 * DefaultStyle.dp - height: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main - } - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Item { - Layout.preferredWidth: 341 * DefaultStyle.dp - } - SwitchSetting { - Layout.rightMargin: 44 * DefaultStyle.dp - titleText:qsTr("Cacher les FPS") - propertyName: "hideFps" - propertyOwner: SettingsCpp + SmallButton { + Layout.alignment: Qt.AlignRight + text: qsTr("Télécharger et appliquer") + onClicked: { + var url = configUri.value() + if (UtilsCpp.isValidURL(url)) + UtilsCpp.useFetchConfig(configUri.value()) + else + UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("Format d'url invalide"), false, UtilsCpp.getMainWindow()) } } } } + + //Audio codecs + ////////////// + + Component { + id: audioCodecsComponent + ColumnLayout { + spacing: 20 * DefaultStyle.dp + Repeater { + model: PayloadTypeProxy { + filterType: PayloadTypeProxy.Audio | PayloadTypeProxy.NotDownloadable + } + SwitchSetting { + Layout.fillWidth: true + titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType) + subTitleText: modelData.core.clockRate + " Hz" + propertyName: "enabled" + propertyOwner: modelData.core + } + } + } + } + + //Video codecs + ////////////// + + Component { + id: videoCodecsComponent + ColumnLayout { + spacing: 20 * DefaultStyle.dp + Repeater { + model: PayloadTypeProxy { + filterType: PayloadTypeProxy.Video | PayloadTypeProxy.NotDownloadable + } + SwitchSetting { + Layout.fillWidth: true + titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType) + subTitleText: modelData.core.encoderDescription + propertyName: "enabled" + propertyOwner: modelData.core + } + } + Repeater { + model: PayloadTypeProxy { + id: downloadableVideoPayloadTypeProxy + filterType: PayloadTypeProxy.Video | PayloadTypeProxy.Downloadable + } + SwitchSetting { + Layout.fillWidth: true + titleText: Utils.capitalizeFirstLetter(modelData.core.mimeType) + subTitleText: modelData.core.encoderDescription + onCheckedChanged: Utils.openCodecOnlineInstallerDialog( + UtilsCpp.getMainWindow(), + modelData.core, + function cancelCallBack() { + setChecked(false) + }, + function successCallBack() { + videoPayloadTypeProxy.reload() + downloadableVideoPayloadTypeProxy.reload() + }) + } + } + } + } + + //Hide fps + ////////// + + Component { + id: hideFpsComponent + ColumnLayout { + spacing: 40 * DefaultStyle.dp + SwitchSetting { + titleText:qsTr("Cacher les FPS") + propertyName: "hideFps" + propertyOwner: SettingsCpp + } + } + } } diff --git a/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml index 1d5a1461a..628b17d74 100644 --- a/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/CallSettingsLayout.qml @@ -6,79 +6,56 @@ import Linphone import SettingsCpp 1.0 AbstractSettingsLayout { - contentComponent: content + id: mainItem width: parent?.width + contentModel: [ + { + title: "", + subTitle: "", + contentComponent: genericParametersComponent + }, + { + title: qsTr("Périphériques"), + subTitle: qsTr("Vous pouvez modifier les périphériques de sortie audio, le microphone et la caméra de capture."), + contentComponent: multiMediaParametersComponent, + customWidth: 540, + customRightMargin: 36 + } + ] + + // Generic call parameters + ////////////////////////// + Component { - id: content + id: genericParametersComponent ColumnLayout { - RowLayout { - spacing: 47 * DefaultStyle.dp - ColumnLayout { - Item { - Layout.preferredWidth: 341 * DefaultStyle.dp - } - } - ColumnLayout { - Layout.rightMargin: 25 * DefaultStyle.dp - Layout.topMargin: 36 * DefaultStyle.dp - spacing: 20 * DefaultStyle.dp - SwitchSetting { - titleText: qsTr("Annulateur d'écho") - subTitleText: qsTr("Évite que de l'écho soit entendu par votre correspondant") - propertyName: "echoCancellationEnabled" - propertyOwner: SettingsCpp - } - SwitchSetting { - Layout.fillWidth: true - titleText: qsTr("Activer l’enregistrement automatique des appels") - subTitleText: qsTr("Enregistrer tous les appels par défaut") - propertyName: "automaticallyRecordCallsEnabled" - propertyOwner: SettingsCpp - visible: !SettingsCpp.disableCallRecordings - } - } + spacing: 20 * DefaultStyle.dp + SwitchSetting { + titleText: qsTr("Annulateur d'écho") + subTitleText: qsTr("Évite que de l'écho soit entendu par votre correspondant") + propertyName: "echoCancellationEnabled" + propertyOwner: SettingsCpp } - Rectangle { + SwitchSetting { Layout.fillWidth: true - Layout.preferredHeight: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main - Layout.topMargin: 38 * DefaultStyle.dp - Layout.bottomMargin: 16 * DefaultStyle.dp - } - RowLayout { - spacing: 47 * DefaultStyle.dp - ColumnLayout { - Item { - Layout.preferredWidth: 341 * DefaultStyle.dp - Text { - id: periphTitle - text: qsTr("Périphériques") - font: Typography.p2 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - Text { - anchors.top: periphTitle.bottom - anchors.topMargin: 3 * DefaultStyle.dp - anchors.left: parent.left - anchors.right: parent.right - text: qsTr("Vous pouvez modifier les périphériques de sortie audio, le microphone et la caméra de capture.") - font: Typography.p1 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - } - Item { - Layout.fillHeight: true - } - } - MultimediaSettings { - ringerDevicesVisible: true - backgroundVisible: false - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - } + titleText: qsTr("Activer l’enregistrement automatique des appels") + subTitleText: qsTr("Enregistrer tous les appels par défaut") + propertyName: "automaticallyRecordCallsEnabled" + propertyOwner: SettingsCpp + visible: !SettingsCpp.disableCallRecordings } } } + + // Multimedia parameters + //////////////////////// + + Component { + id: multiMediaParametersComponent + MultimediaSettings { + ringerDevicesVisible: true + backgroundVisible: false + spacing: 20 * DefaultStyle.dp + } + } } diff --git a/Linphone/view/Page/Layout/Settings/CarddavSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/CarddavSettingsLayout.qml index 37c77ae11..b007d26f8 100644 --- a/Linphone/view/Page/Layout/Settings/CarddavSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/CarddavSettingsLayout.qml @@ -9,7 +9,14 @@ import UtilsCpp AbstractSettingsLayout { id: mainItem - contentComponent: content + width: parent?.width + contentModel: [ + { + title: qsTr("Carnet d'adresse CardDAV"), + subTitle: qsTr("Ajouter un carnet d’adresse CardDAV pour synchroniser vos contacts Linphone avec un carnet d’adresse tiers."), + contentComponent: cardDavParametersComponent + } + ] topbarOptionalComponent: topBar property alias carddavGui: mainItem.model property bool isNew: false @@ -61,85 +68,50 @@ AbstractSettingsLayout { } Component { - id: content + id: cardDavParametersComponent ColumnLayout { - width: parent.width - spacing: 5 * DefaultStyle.dp - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Carnet d'adresse CardDAV") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - Text { - text: qsTr("Ajouter un carnet d’adresse CardDAV pour synchroniser vos contacts Linphone avec un carnet d’adresse tiers.") - font: Typography.p1s - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - Layout.fillWidth: true - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - DecoratedTextField { - propertyName: "displayName" - propertyOwner: carddavGui.core - title: qsTr("Nom d’affichage") - canBeEmpty: false - toValidate: true - } - DecoratedTextField { - propertyName: "uri" - propertyOwner: carddavGui.core - title: qsTr("URL du serveur") - canBeEmpty: false - toValidate: true - } - DecoratedTextField { - propertyName: "username" - propertyOwner: carddavGui.core - title: qsTr("Nom d’utilisateur") - toValidate: true - } - DecoratedTextField { - propertyName: "password" - hidden: true - propertyOwner: carddavGui.core - title: qsTr("Mot de passe") - toValidate: true - } - DecoratedTextField { - propertyName: "realm" - propertyOwner: carddavGui.core - title: qsTr("Domaine d’authentification") - toValidate: true - } - SwitchSetting { - titleText: qsTr("Stocker ici les contacts nouvellement crées") - propertyName: "storeNewFriendsInIt" - propertyOwner: carddavGui.core - } - } + Layout.fillWidth: true + spacing: 20 * DefaultStyle.dp + Layout.rightMargin: 44 * DefaultStyle.dp + Layout.topMargin: 20 * DefaultStyle.dp + Layout.leftMargin: 64 * DefaultStyle.dp + DecoratedTextField { + propertyName: "displayName" + propertyOwner: carddavGui.core + title: qsTr("Nom d’affichage") + canBeEmpty: false + toValidate: true + } + DecoratedTextField { + propertyName: "uri" + propertyOwner: carddavGui.core + title: qsTr("URL du serveur") + canBeEmpty: false + toValidate: true + } + DecoratedTextField { + propertyName: "username" + propertyOwner: carddavGui.core + title: qsTr("Nom d’utilisateur") + toValidate: true + } + DecoratedTextField { + propertyName: "password" + hidden: true + propertyOwner: carddavGui.core + title: qsTr("Mot de passe") + toValidate: true + } + DecoratedTextField { + propertyName: "realm" + propertyOwner: carddavGui.core + title: qsTr("Domaine d’authentification") + toValidate: true + } + SwitchSetting { + titleText: qsTr("Stocker ici les contacts nouvellement crées") + propertyName: "storeNewFriendsInIt" + propertyOwner: carddavGui.core } } } diff --git a/Linphone/view/Page/Layout/Settings/ContactsSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/ContactsSettingsLayout.qml index 269e0b5d5..4709e4217 100644 --- a/Linphone/view/Page/Layout/Settings/ContactsSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/ContactsSettingsLayout.qml @@ -7,55 +7,65 @@ import Linphone AbstractSettingsLayout { id: mainItem - contentComponent: content + width: parent?.width + contentModel: [ + { + title: qsTr("Annuaires LDAP"), + subTitle: qsTr("Ajouter vos annuaires LDAP pour pouvoir effectuer des recherches dans la magic search bar."), + contentComponent: ldapParametersComponent + }, + { + title: qsTr("Carnet d'adresse CardDAV"), + subTitle: qsTr("Ajouter un carnet d’adresse CardDAV pour synchroniser vos contacts Linphone avec un carnet d’adresse tiers."), + contentComponent: cardDavParametersComponent + } + ] + function layoutUrl(name) { return layoutsPath+"/"+name+".qml" } function createGuiObject(name) { return Qt.createQmlObject('import Linphone; '+name+'Gui{}', mainItem) } + + // Ldap parameters + ////////////////// + Component { - id: content - ColumnLayout { - spacing: 5 * DefaultStyle.dp - ContactsSettingsProviderLayout { - title: qsTr("Annuaires LDAP") - addText: qsTr("Ajouter un annuaire LDAP") - addTextDescription: qsTr("Ajouter vos annuaires LDAP pour pouvoir effectuer des recherches dans la magic search bar.") - editText: qsTr("Modifier un annuaire LDAP") - proxyModel: LdapProxy {} - newItemGui: createGuiObject('Ldap') - settingsLayout: layoutUrl("LdapSettingsLayout") - owner: mainItem - titleProperty: "server" - supportsEnableDisable: true - showAddButton: true - } - Rectangle { - Layout.fillWidth: true - Layout.topMargin: 35 * DefaultStyle.dp - Layout.bottomMargin: 9 * DefaultStyle.dp - height: 1 * DefaultStyle.dp - color: DefaultStyle.main2_500main - } - ContactsSettingsProviderLayout { - id: carddavProvider - title: qsTr("Carnet d'adresse CardDAV") - addText: qsTr("Ajouter un carnet d'adresse CardDAV") - addTextDescription: qsTr("Ajouter un carnet d’adresse CardDAV pour synchroniser vos contacts Linphone avec un carnet d’adresse tiers.") - editText: qsTr("Modifier un carnet d'adresse CardDAV") - proxyModel: CarddavProxy { - onModelReset: { - carddavProvider.showAddButton = carddavProvider.proxyModel.count == 0 - carddavProvider.newItemGui = createGuiObject('Carddav') - } + id: ldapParametersComponent + ContactsSettingsProviderLayout { + addText: qsTr("Ajouter un annuaire LDAP") + editText: qsTr("Modifier un annuaire LDAP") + proxyModel: LdapProxy {} + newItemGui: createGuiObject('Ldap') + settingsLayout: layoutUrl("LdapSettingsLayout") + owner: mainItem + titleProperty: "server" + supportsEnableDisable: true + showAddButton: true + } + } + + // CardDAV parameters + ///////////////////// + + Component { + id: cardDavParametersComponent + ContactsSettingsProviderLayout { + id: carddavProvider + addText: qsTr("Ajouter un carnet d'adresse CardDAV") + editText: qsTr("Modifier un carnet d'adresse CardDAV") + proxyModel: CarddavProxy { + onModelReset: { + carddavProvider.showAddButton = carddavProvider.proxyModel.count == 0 + carddavProvider.newItemGui = createGuiObject('Carddav') } - newItemGui: createGuiObject('Carddav') - settingsLayout: layoutUrl("CarddavSettingsLayout") - owner: mainItem - titleProperty: "displayName" - supportsEnableDisable: false } + newItemGui: createGuiObject('Carddav') + settingsLayout: layoutUrl("CarddavSettingsLayout") + owner: mainItem + titleProperty: "displayName" + supportsEnableDisable: false } } } diff --git a/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml b/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml index 700bfd051..d4157ceac 100644 --- a/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml +++ b/Linphone/view/Page/Layout/Settings/ContactsSettingsProviderLayout.qml @@ -22,51 +22,23 @@ RowLayout { spacing: 5 * DefaultStyle.dp ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - text: mainItem.title - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - Layout.fillWidth: true - } - Text { - text: mainItem.addTextDescription - font: Typography.p1s - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - Layout.fillWidth: true - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.rightMargin: 25 * DefaultStyle.dp Layout.fillWidth: true Layout.fillHeight: true - spacing: 27 * DefaultStyle.dp - Layout.leftMargin: 76 * DefaultStyle.dp - Layout.topMargin: 16 * DefaultStyle.dp + spacing: 16 * DefaultStyle.dp Repeater { model: mainItem.proxyModel RowLayout { Layout.fillWidth: true Layout.alignment: Qt.AlignLeft|Qt.AlignHCenter - spacing: 5 * DefaultStyle.dp + Layout.preferredHeight: 74 * DefaultStyle.dp + spacing: 20 * DefaultStyle.dp Text { text: modelData.core[titleProperty] font: Typography.p2l wrapMode: Text.WordWrap color: DefaultStyle.main2_600 Layout.fillWidth: true - Layout.leftMargin: 17 * DefaultStyle.dp + Layout.alignment: Qt.AlignHCenter } Item { Layout.fillWidth: true @@ -88,7 +60,6 @@ RowLayout { Switch { id: switchButton Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - Layout.rightMargin: 17 * DefaultStyle.dp checked: supportsEnableDisable && modelData.core["enabled"] visible: supportsEnableDisable onToggled: { @@ -121,6 +92,10 @@ RowLayout { Layout.preferredHeight: 47 * DefaultStyle.dp Layout.alignment: Qt.AlignRight | Qt.AlignHCenter text: qsTr("Ajouter") + leftPadding: 20 * DefaultStyle.dp + rightPadding: 20 * DefaultStyle.dp + topPadding: 11 * DefaultStyle.dp + bottomPadding: 11 * DefaultStyle.dp visible: mainItem.showAddButton onClicked: { mainItem.owner.container.push(mainItem.settingsLayout, { diff --git a/Linphone/view/Page/Layout/Settings/DebugSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/DebugSettingsLayout.qml index 1491ad632..c972c3f62 100644 --- a/Linphone/view/Page/Layout/Settings/DebugSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/DebugSettingsLayout.qml @@ -12,7 +12,13 @@ AbstractSettingsLayout { Layout.fillHeight: true id: mainItem property string logsUrl - contentComponent: content + contentModel: [ + { + title: "", + subTitle: "", + contentComponent: content + } + ] Dialog { id: deleteLogs diff --git a/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml index 3c3e425ad..27179def9 100644 --- a/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/LdapSettingsLayout.qml @@ -9,10 +9,19 @@ import UtilsCpp AbstractSettingsLayout { id: mainItem - contentComponent: content + width: parent?.width + contentModel: [ + { + title: qsTr("Annuaires LDAP"), + subTitle: qsTr("Ajouter vos annuaires LDAP pour pouvoir effectuer des recherches dans la magic search bar."), + contentComponent: ldapParametersComponent + } + ] + topbarOptionalComponent: topBar property alias ldapGui: mainItem.model property bool isNew: false + Component { id: topBar RowLayout { @@ -39,6 +48,11 @@ AbstractSettingsLayout { } } Button { + leftPadding: 16 * DefaultStyle.dp + rightPadding: 16 * DefaultStyle.dp + topPadding: 10 * DefaultStyle.dp + bottomPadding: 10 * DefaultStyle.dp + textSize: 15 * DefaultStyle.dp text: qsTr("Enregistrer") onClicked: { if (ldapGui.core.isValid()) { @@ -53,147 +67,112 @@ AbstractSettingsLayout { } Component { - id: content + id: ldapParametersComponent ColumnLayout { - width: parent.width - spacing: 5 * DefaultStyle.dp - RowLayout { - Layout.topMargin: 16 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - Layout.minimumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - Layout.fillWidth: true - text: qsTr("Annuaires LDAP") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - } - Text { - text: qsTr("Ajouter vos annuaires LDAP pour pouvoir effectuer des recherches dans la magic search bar.") - font: Typography.p1s - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - Layout.fillWidth: true - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.fillWidth: true - spacing: 20 * DefaultStyle.dp - Layout.rightMargin: 44 * DefaultStyle.dp - Layout.topMargin: 20 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - DecoratedTextField { - id: server - propertyName: "server" - propertyOwner: ldapGui.core - title: qsTr("URL du serveur (ne peut être vide)") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "bindDn" - propertyOwner: ldapGui.core - title: qsTr("Bind DN") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "password" - hidden: true - propertyOwner: ldapGui.core - title: qsTr("Mot de passe") - toValidate: true - Layout.fillWidth: true - } - SwitchSetting { - titleText: qsTr("Utiliser TLS") - propertyName: "tls" - propertyOwner: ldapGui.core - } - DecoratedTextField { - propertyName: "baseObject" - propertyOwner: ldapGui.core - title: qsTr("Base de recherche (ne peut être vide)") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "filter" - propertyOwner: ldapGui.core - title: qsTr("Filtre") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "maxResults" - propertyOwner: ldapGui.core - validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } - title: qsTr("Nombre maximum de résultats") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "delay" - propertyOwner: ldapGui.core - validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } - title: qsTr("Délai entre 2 requêtes (en millisecondes)") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "timeout" - propertyOwner: ldapGui.core - title: qsTr("Durée maximun (en secondes)") - validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "minChars" - propertyOwner: ldapGui.core - title: qsTr("Nombre minimum de caractères pour la requête") - validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "nameAttribute" - propertyOwner: ldapGui.core - title: qsTr("Attributs de nom") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "sipAttribute" - propertyOwner: ldapGui.core - title: qsTr("Attributs SIP") - toValidate: true - Layout.fillWidth: true - } - DecoratedTextField { - propertyName: "sipDomain" - propertyOwner: ldapGui.core - title: qsTr("Domaine SIP") - toValidate: true - Layout.fillWidth: true - } - SwitchSetting { - titleText: qsTr("Débogage") - propertyName: "debug" - propertyOwner: ldapGui.core - } - } + Layout.fillWidth: true + spacing: 20 * DefaultStyle.dp + Layout.rightMargin: 44 * DefaultStyle.dp + Layout.topMargin: 20 * DefaultStyle.dp + Layout.leftMargin: 64 * DefaultStyle.dp + DecoratedTextField { + id: server + propertyName: "server" + propertyOwner: ldapGui.core + title: qsTr("URL du serveur (ne peut être vide)") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "bindDn" + propertyOwner: ldapGui.core + title: qsTr("Bind DN") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "password" + hidden: true + propertyOwner: ldapGui.core + title: qsTr("Mot de passe") + toValidate: true + Layout.fillWidth: true + } + SwitchSetting { + titleText: qsTr("Utiliser TLS") + propertyName: "tls" + propertyOwner: ldapGui.core + } + DecoratedTextField { + propertyName: "baseObject" + propertyOwner: ldapGui.core + title: qsTr("Base de recherche (ne peut être vide)") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "filter" + propertyOwner: ldapGui.core + title: qsTr("Filtre") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "maxResults" + propertyOwner: ldapGui.core + validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } + title: qsTr("Nombre maximum de résultats") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "delay" + propertyOwner: ldapGui.core + validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } + title: qsTr("Délai entre 2 requêtes (en millisecondes)") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "timeout" + propertyOwner: ldapGui.core + title: qsTr("Durée maximun (en secondes)") + validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "minChars" + propertyOwner: ldapGui.core + title: qsTr("Nombre minimum de caractères pour la requête") + validator: RegularExpressionValidator { regularExpression: /[0-9]+/ } + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "nameAttribute" + propertyOwner: ldapGui.core + title: qsTr("Attributs de nom") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "sipAttribute" + propertyOwner: ldapGui.core + title: qsTr("Attributs SIP") + toValidate: true + Layout.fillWidth: true + } + DecoratedTextField { + propertyName: "sipDomain" + propertyOwner: ldapGui.core + title: qsTr("Domaine SIP") + toValidate: true + Layout.fillWidth: true + } + SwitchSetting { + titleText: qsTr("Débogage") + propertyName: "debug" + propertyOwner: ldapGui.core } } } diff --git a/Linphone/view/Page/Layout/Settings/NetworkSettingsLayout.qml b/Linphone/view/Page/Layout/Settings/NetworkSettingsLayout.qml index 00a19f652..f602f22af 100644 --- a/Linphone/view/Page/Layout/Settings/NetworkSettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/NetworkSettingsLayout.qml @@ -6,46 +6,24 @@ import SettingsCpp 1.0 import Linphone AbstractSettingsLayout { - contentComponent: content + width: parent?.width + contentModel: [ + { + title: qsTr("Réseau"), + subTitle: "", + contentComponent: content + } + ] Component { id: content ColumnLayout { - spacing: 5 * DefaultStyle.dp - RowLayout { - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.fillWidth: true - spacing: 5 * DefaultStyle.dp - ColumnLayout { - Layout.preferredWidth: 341 * DefaultStyle.dp - Layout.maximumWidth: 341 * DefaultStyle.dp - spacing: 5 * DefaultStyle.dp - Text { - text: qsTr("Réseau") - font: Typography.h4 - wrapMode: Text.WordWrap - color: DefaultStyle.main2_600 - Layout.fillWidth: true - } - } - Item { - Layout.fillHeight: true - } - } - ColumnLayout { - Layout.rightMargin: 25 * DefaultStyle.dp - Layout.topMargin: 36 * DefaultStyle.dp - Layout.leftMargin: 64 * DefaultStyle.dp - spacing: 40 * DefaultStyle.dp - SwitchSetting { - Layout.fillWidth: true - titleText: qsTr("Autoriser l'IPv6") - propertyName: "ipv6Enabled" - propertyOwner: SettingsCpp - } - } + spacing: 40 * DefaultStyle.dp + SwitchSetting { + Layout.fillWidth: true + titleText: qsTr("Autoriser l'IPv6") + propertyName: "ipv6Enabled" + propertyOwner: SettingsCpp } } } } - diff --git a/Linphone/view/Page/Layout/Settings/SecuritySettingsLayout.qml b/Linphone/view/Page/Layout/Settings/SecuritySettingsLayout.qml index f14eefcb6..4232fd856 100644 --- a/Linphone/view/Page/Layout/Settings/SecuritySettingsLayout.qml +++ b/Linphone/view/Page/Layout/Settings/SecuritySettingsLayout.qml @@ -6,10 +6,17 @@ import SettingsCpp 1.0 import Linphone AbstractSettingsLayout { - contentComponent: content + width: parent?.width + contentModel: [ + { + title: "", + subTitle: "", + contentComponent: content + } + ] Component { id: content - Column { + ColumnLayout { spacing: 40 * DefaultStyle.dp SwitchSetting { titleText: qsTr("Chiffrer tous les fichiers")