Commit a19bc4f3 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Settings/SettingsSipAccounts): in progress

parent c0673e5e
......@@ -789,6 +789,34 @@ Server url not configured.</translation>
<source>defaultSipAddressLabel</source>
<translation>SIP address</translation>
</message>
<message>
<source>proxyAccountsTitle</source>
<translation>Proxy accounts</translation>
</message>
<message>
<source></source>
<translation></translation>
</message>
<message>
<source>registerHeader</source>
<translation>Register</translation>
</message>
<message>
<source>eraseAllPasswords</source>
<translation>ERASE PASSWORDS</translation>
</message>
<message>
<source>addAccount</source>
<translation>ADD ACCOUNT</translation>
</message>
<message>
<source>editionHeader</source>
<translation>Edit</translation>
</message>
<message>
<source>deleteHeader</source>
<translation>Delete</translation>
</message>
</context>
<context>
<name>SettingsUi</name>
......
......@@ -789,6 +789,34 @@ Url du serveur non configurée.</translation>
<source>defaultSipAddressLabel</source>
<translation>Adresse SIP</translation>
</message>
<message>
<source>proxyAccountsTitle</source>
<translation>Comptes SIP</translation>
</message>
<message>
<source></source>
<translation></translation>
</message>
<message>
<source>registerHeader</source>
<translation>S&apos;enregistrer</translation>
</message>
<message>
<source>eraseAllPasswords</source>
<translation>EFFACER MOTS DE PASSE</translation>
</message>
<message>
<source>addAccount</source>
<translation>AJOUTER COMPTE</translation>
</message>
<message>
<source>editionHeader</source>
<translation>Éditer</translation>
</message>
<message>
<source>deleteHeader</source>
<translation>Supprimer</translation>
</message>
</context>
<context>
<name>SettingsUi</name>
......
......@@ -69,7 +69,6 @@
<file>assets/images/edit_normal.svg</file>
<file>assets/images/edit_pressed.svg</file>
<file>assets/images/ended_call.svg</file>
<file>assets/images/file.png</file>
<file>assets/images/file_sign.svg</file>
<file>assets/images/filter.svg</file>
<file>assets/images/fullscreen_hovered.svg</file>
......
......@@ -8,6 +8,10 @@ Column {
id: formTable
property alias titles: header.model
property bool disableLineTitle: false
property int legendLineWidth: FormTableStyle.entry.width
readonly property double maxItemWidth: {
var n = titles.length
var curWidth = (width - FormTableStyle.entry.width) / n - (n - 1) * FormTableLineStyle.spacing
......@@ -30,7 +34,9 @@ Column {
// No title for the titles column.
Item {
height: FormTableStyle.entry.height
width: FormTableStyle.entry.width
width: formTable.legendLineWidth
visible: !formTable.disableLineTitle
}
Repeater {
......
......@@ -6,6 +6,8 @@ import Common.Styles 1.0
// =============================================================================
Row {
id: formTableLine
property alias title: title.text
readonly property double maxItemWidth: parent.maxItemWidth
......@@ -26,11 +28,13 @@ Row {
verticalAlignment: Text.AlignVCenter
height: FormTableStyle.entry.height
width: FormTableStyle.entry.width
width: formTableLine.parent.legendLineWidth
font {
bold: false
pointSize: FormTableStyle.entry.text.fontSize
}
visible: !formTableLine.parent.disableLineTitle
}
}
......@@ -39,7 +39,7 @@ Window {
Shortcut {
sequence: StandardKey.Close
onActivated: window.hide()
onActivated: _exit()
}
// ---------------------------------------------------------------------------
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import Linphone 1.0
......@@ -55,5 +56,66 @@ TabContainer {
}
}
}
// -------------------------------------------------------------------------
// Proxy accounts.
// -------------------------------------------------------------------------
Form {
title: qsTr('proxyAccountsTitle')
width: parent.width
FormTable {
legendLineWidth: 280
titles: [
qsTr('registerHeader'),
qsTr('editionHeader'),
qsTr('deleteHeader')
]
Repeater {
model: AccountSettingsModel.accounts
delegate: FormTableLine {
title: modelData.sipAddress
FormTableEntry {
Switch {}
}
FormTableEntry {
ActionButton {
icon: 'edit'
iconSize: SettingsWindowStyle.sipAccounts.iconSize
}
}
FormTableEntry {
ActionButton {
icon: 'delete'
iconSize: SettingsWindowStyle.sipAccounts.iconSize
}
}
}
}
}
FormEmptyLine {}
}
Row {
anchors.right: parent.right
spacing: SettingsWindowStyle.sipAccounts.buttonsSpacing
TextButtonB {
text: qsTr('eraseAllPasswords')
}
TextButtonB {
text: qsTr('addAccount')
}
}
}
}
......@@ -16,4 +16,9 @@ QtObject {
property int rightMargin: 30
property int topMargin: 30
}
property QtObject sipAccounts: QtObject {
property int buttonsSpacing: 8
property int iconSize: 20
}
}
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