auto indentation qt
This commit is contained in:
parent
311ad15a68
commit
586dca5cd0
3 changed files with 1551 additions and 1437 deletions
|
|
@ -8,145 +8,148 @@ import SettingsCpp 1.0
|
||||||
import UtilsCpp
|
import UtilsCpp
|
||||||
|
|
||||||
AbstractSettingsLayout {
|
AbstractSettingsLayout {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
width: parent?.width
|
width: parent?.width
|
||||||
contentModel: [
|
contentModel: [{
|
||||||
{
|
"title": qsTr("Paramètres"),
|
||||||
title: qsTr("Paramètres"),
|
"subTitle": "",
|
||||||
subTitle: "",
|
"contentComponent": generalParametersComponent
|
||||||
contentComponent: generalParametersComponent
|
}, {
|
||||||
},
|
"title": qsTr("Paramètres de compte"),
|
||||||
{
|
"subTitle": "",
|
||||||
title: qsTr("Paramètres de compte"),
|
"contentComponent": advancedParametersComponent
|
||||||
subTitle: "",
|
}]
|
||||||
contentComponent: advancedParametersComponent
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
property alias account: mainItem.model
|
property alias account: mainItem.model
|
||||||
|
|
||||||
onSave: {
|
onSave: {
|
||||||
account.core.save()
|
account.core.save()
|
||||||
}
|
}
|
||||||
onUndo: account.core.undo()
|
onUndo: account.core.undo()
|
||||||
Connections {
|
Connections {
|
||||||
target: account.core
|
target: account.core
|
||||||
function onIsSavedChanged() {
|
function onIsSavedChanged() {
|
||||||
if (account.core.isSaved) UtilsCpp.showInformationPopup(qsTr("Succès"), qsTr("Les changements ont été sauvegardés"), true, mainWindow)
|
if (account.core.isSaved)
|
||||||
}
|
UtilsCpp.showInformationPopup(
|
||||||
}
|
qsTr("Succès"),
|
||||||
|
qsTr("Les changements ont été sauvegardés"), true,
|
||||||
|
mainWindow)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// General parameters
|
// General parameters
|
||||||
/////////////////////
|
/////////////////////
|
||||||
|
Component {
|
||||||
Component {
|
id: generalParametersComponent
|
||||||
id: generalParametersComponent
|
ColumnLayout {
|
||||||
ColumnLayout {
|
id: column
|
||||||
id: column
|
Layout.fillWidth: true
|
||||||
Layout.fillWidth: true
|
spacing: 20 * DefaultStyle.dp
|
||||||
spacing: 20 * DefaultStyle.dp
|
DecoratedTextField {
|
||||||
DecoratedTextField {
|
propertyName: "mwiServerAddress"
|
||||||
propertyName: "mwiServerAddress"
|
propertyOwnerGui: account
|
||||||
propertyOwnerGui: account
|
title: qsTr("URI du serveur de messagerie vocale")
|
||||||
title: qsTr("URI du serveur de messagerie vocale")
|
Layout.fillWidth: true
|
||||||
Layout.fillWidth: true
|
isValid: function (text) {
|
||||||
isValid: function(text) { return text.length == 0 || !text.endsWith(".") } // work around sdk crash when adress ends with .
|
return text.length == 0 || !text.endsWith(".")
|
||||||
toValidate: true
|
} // work around sdk crash when adress ends with .
|
||||||
}
|
|
||||||
DecoratedTextField {
|
|
||||||
propertyName: "voicemailAddress"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
title: qsTr("URI de messagerie vocale")
|
|
||||||
Layout.fillWidth: true
|
|
||||||
toValidate: 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"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
}
|
|
||||||
DecoratedTextField {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
title: qsTr("URL du serveur mandataire")
|
|
||||||
propertyName: "serverAddress"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
toValidate: true
|
|
||||||
}
|
|
||||||
SwitchSetting {
|
|
||||||
titleText: qsTr("Serveur mandataire sortant")
|
|
||||||
propertyName: "outboundProxyEnabled"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
}
|
|
||||||
DecoratedTextField {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
propertyName: "stunServer"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
title: qsTr("Adresse du serveur STUN")
|
|
||||||
toValidate: true
|
|
||||||
}
|
|
||||||
SwitchSetting {
|
|
||||||
titleText: qsTr("Activer ICE")
|
|
||||||
propertyName: "iceEnabled"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
}
|
|
||||||
SwitchSetting {
|
|
||||||
titleText: qsTr("AVPF")
|
|
||||||
propertyName: "avpfEnabled"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
}
|
|
||||||
SwitchSetting {
|
|
||||||
titleText: qsTr("Mode bundle")
|
|
||||||
propertyName: "bundleModeEnabled"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
}
|
|
||||||
DecoratedTextField {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
propertyName: "expire"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
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"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
toValidate: true
|
|
||||||
}
|
|
||||||
DecoratedTextField {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
title: qsTr("URI de l’usine à réunions")
|
|
||||||
propertyName: "audioVideoConferenceFactoryAddress"
|
|
||||||
propertyOwnerGui: account
|
|
||||||
toValidate: true
|
toValidate: true
|
||||||
}
|
}
|
||||||
DecoratedTextField {
|
DecoratedTextField {
|
||||||
Layout.fillWidth: true
|
propertyName: "voicemailAddress"
|
||||||
title: qsTr("URL du serveur d’échange de clés de chiffrement")
|
propertyOwnerGui: account
|
||||||
propertyName: "limeServerUrl"
|
title: qsTr("URI de messagerie vocale")
|
||||||
propertyOwnerGui: account
|
Layout.fillWidth: true
|
||||||
toValidate: true
|
toValidate: 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"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
}
|
||||||
|
DecoratedTextField {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
title: qsTr("URL du serveur mandataire")
|
||||||
|
propertyName: "serverAddress"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
toValidate: true
|
||||||
|
}
|
||||||
|
SwitchSetting {
|
||||||
|
titleText: qsTr("Serveur mandataire sortant")
|
||||||
|
propertyName: "outboundProxyEnabled"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
}
|
||||||
|
DecoratedTextField {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
propertyName: "stunServer"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
title: qsTr("Adresse du serveur STUN")
|
||||||
|
toValidate: true
|
||||||
|
}
|
||||||
|
SwitchSetting {
|
||||||
|
titleText: qsTr("Activer ICE")
|
||||||
|
propertyName: "iceEnabled"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
}
|
||||||
|
SwitchSetting {
|
||||||
|
titleText: qsTr("AVPF")
|
||||||
|
propertyName: "avpfEnabled"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
}
|
||||||
|
SwitchSetting {
|
||||||
|
titleText: qsTr("Mode bundle")
|
||||||
|
propertyName: "bundleModeEnabled"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
}
|
||||||
|
DecoratedTextField {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
propertyName: "expire"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
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"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
toValidate: true
|
||||||
|
}
|
||||||
|
DecoratedTextField {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
title: qsTr("URI de l’usine à réunions")
|
||||||
|
propertyName: "audioVideoConferenceFactoryAddress"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
toValidate: true
|
||||||
|
}
|
||||||
|
DecoratedTextField {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
title: qsTr("URL du serveur d’échange de clés de chiffrement")
|
||||||
|
propertyName: "limeServerUrl"
|
||||||
|
propertyOwnerGui: account
|
||||||
|
toValidate: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue