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> ...@@ -789,6 +789,34 @@ Server url not configured.</translation>
<source>defaultSipAddressLabel</source> <source>defaultSipAddressLabel</source>
<translation>SIP address</translation> <translation>SIP address</translation>
</message> </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>
<context> <context>
<name>SettingsUi</name> <name>SettingsUi</name>
......
...@@ -789,6 +789,34 @@ Url du serveur non configurée.</translation> ...@@ -789,6 +789,34 @@ Url du serveur non configurée.</translation>
<source>defaultSipAddressLabel</source> <source>defaultSipAddressLabel</source>
<translation>Adresse SIP</translation> <translation>Adresse SIP</translation>
</message> </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>
<context> <context>
<name>SettingsUi</name> <name>SettingsUi</name>
......
...@@ -69,7 +69,6 @@ ...@@ -69,7 +69,6 @@
<file>assets/images/edit_normal.svg</file> <file>assets/images/edit_normal.svg</file>
<file>assets/images/edit_pressed.svg</file> <file>assets/images/edit_pressed.svg</file>
<file>assets/images/ended_call.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/file_sign.svg</file>
<file>assets/images/filter.svg</file> <file>assets/images/filter.svg</file>
<file>assets/images/fullscreen_hovered.svg</file> <file>assets/images/fullscreen_hovered.svg</file>
......
...@@ -8,6 +8,10 @@ Column { ...@@ -8,6 +8,10 @@ Column {
id: formTable id: formTable
property alias titles: header.model property alias titles: header.model
property bool disableLineTitle: false
property int legendLineWidth: FormTableStyle.entry.width
readonly property double maxItemWidth: { readonly property double maxItemWidth: {
var n = titles.length var n = titles.length
var curWidth = (width - FormTableStyle.entry.width) / n - (n - 1) * FormTableLineStyle.spacing var curWidth = (width - FormTableStyle.entry.width) / n - (n - 1) * FormTableLineStyle.spacing
...@@ -30,7 +34,9 @@ Column { ...@@ -30,7 +34,9 @@ Column {
// No title for the titles column. // No title for the titles column.
Item { Item {
height: FormTableStyle.entry.height height: FormTableStyle.entry.height
width: FormTableStyle.entry.width width: formTable.legendLineWidth
visible: !formTable.disableLineTitle
} }
Repeater { Repeater {
......
...@@ -6,6 +6,8 @@ import Common.Styles 1.0 ...@@ -6,6 +6,8 @@ import Common.Styles 1.0
// ============================================================================= // =============================================================================
Row { Row {
id: formTableLine
property alias title: title.text property alias title: title.text
readonly property double maxItemWidth: parent.maxItemWidth readonly property double maxItemWidth: parent.maxItemWidth
...@@ -26,11 +28,13 @@ Row { ...@@ -26,11 +28,13 @@ Row {
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
height: FormTableStyle.entry.height height: FormTableStyle.entry.height
width: FormTableStyle.entry.width width: formTableLine.parent.legendLineWidth
font { font {
bold: false bold: false
pointSize: FormTableStyle.entry.text.fontSize pointSize: FormTableStyle.entry.text.fontSize
} }
visible: !formTableLine.parent.disableLineTitle
} }
} }
...@@ -39,7 +39,7 @@ Window { ...@@ -39,7 +39,7 @@ Window {
Shortcut { Shortcut {
sequence: StandardKey.Close sequence: StandardKey.Close
onActivated: window.hide() onActivated: _exit()
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
......
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0 import Common 1.0
import Linphone 1.0 import Linphone 1.0
...@@ -55,5 +56,66 @@ TabContainer { ...@@ -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 { ...@@ -16,4 +16,9 @@ QtObject {
property int rightMargin: 30 property int rightMargin: 30
property int topMargin: 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