Commit d67d8116 authored by Ronan's avatar Ronan
Browse files

unstable

parent b1349b02
......@@ -52,6 +52,25 @@
<translation>Previously</translation>
</message>
</context>
<context>
<name>contact</name>
<message>
<source>sipAccounts</source>
<translation>SIP ACCOUNT(S)</translation>
</message>
<message>
<source>address</source>
<translation>ADDRESS</translation>
</message>
<message>
<source>emails</source>
<translation>E-MAIL(S)</translation>
</message>
<message>
<source>webSites</source>
<translation>WEB SITE(S)</translation>
</message>
</context>
<context>
<name>contacts</name>
<message>
......
......@@ -52,6 +52,25 @@
<translation>Précédemment</translation>
</message>
</context>
<context>
<name>contact</name>
<message>
<source>sipAccounts</source>
<translation>COMPTE(S) SIP</translation>
</message>
<message>
<source>address</source>
<translation>ADRESSE(S)</translation>
</message>
<message>
<source>emails</source>
<translation>EMAIL(S)</translation>
</message>
<message>
<source>webSites</source>
<translation>SITE(S) WEB</translation>
</message>
</context>
<context>
<name>contacts</name>
<message>
......
......@@ -22,6 +22,7 @@
<file>ui/components/form/CheckBoxText.qml</file>
<file>ui/components/form/DropZone.qml</file>
<file>ui/components/form/LightButton.qml</file>
<file>ui/components/form/ListForm.qml</file>
<file>ui/components/form/ExclusiveButtons.qml</file>
<file>ui/components/form/ActionBar.qml</file>
<file>ui/components/form/ActionButton.qml</file>
......
......@@ -5,13 +5,13 @@ import 'qrc:/ui/components/image'
// ===================================================================
Item {
property bool enabled: false
property bool isCollapsed: false
signal collapsed (bool collapsed)
function updateCollapse () {
enabled = !enabled
collapsed(enabled)
isCollapsed = !isCollapsed
collapsed(isCollapsed)
rotate.start()
}
......@@ -29,10 +29,10 @@ Item {
RotationAnimation {
direction: RotationAnimation.Clockwise
duration: 200
from: enabled ? 0 : 180
from: isCollapsed ? 0 : 180
id: rotate
property: 'rotation'
target: backgroundImage
to: enabled ? 180 : 0
to: isCollapsed ? 180 : 0
}
}
import QtQuick 2.7
import QtQuick.Layouts 1.3
RowLayout {
readonly property int lineHeight: 30
property alias title: text.text
spacing: 0
RowLayout {
Layout.alignment: Qt.AlignTop
Layout.preferredHeight: lineHeight
spacing: 20
// Add item in list.
ActionButton {
Layout.preferredHeight: 16
Layout.preferredWidth: 16
onClicked: {
console.log(valuesModel.get(valuesModel.count - 1).$value.length)
if (valuesModel.count === 0 ||
valuesModel.get(valuesModel.count - 1).$value.length !== 0
) {
valuesModel.append({ $value: '' })
}
}
}
// List title.
Text {
Layout.preferredWidth: 130
id: text
}
}
// Content list.
ListView {
Layout.fillWidth: true
Layout.preferredHeight: values.count * lineHeight
id: values
interactive: false
model: ListModel {
id: valuesModel
ListElement { $value: 'toto' }
ListElement { $value: 'abc' }
ListElement { $value: 'machin' }
ListElement { $value: 'bidule' }
ListElement { $value: 'truc' }
}
delegate: Item {
implicitHeight: textEdit.height
width: parent.width
Rectangle {
color: textEdit.focus ? '#E6E6E6' : 'transparent'
id: background
implicitHeight: textEdit.height
implicitWidth: textEdit.contentWidth + textEdit.padding * 2
}
Text {
anchors.fill: textEdit
color: '#5A585B'
font.italic: true
padding: textEdit.padding
text: textEdit.text.length === 0 && !textEdit.focus
? qsTr('fillPlaceholder')
: ''
verticalAlignment: Text.AlignVCenter
}
TextEdit {
color: focus ? '#000000' : '#5A585B'
font.bold: !focus
height: lineHeight
id: textEdit
padding: 10
selectByMouse: true
text: $value
verticalAlignment: TextEdit.AlignVCenter
width: parent.width
// To handle editingFinished, it's necessary to set
// focus on another component.
Keys.onReturnPressed: parent.forceActiveFocus()
onEditingFinished: {
if (text.length === 0) {
valuesModel.remove(index)
}
// Hack: The edition is finished but the focus
// can be set.
focus = false
}
}
}
}
}
......@@ -13,7 +13,7 @@ ColumnLayout {
Image {
fillMode: Image.PreserveAspectFit
height: parent.height
width: 30
width: 20
}
Text {
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/form'
import 'qrc:/ui/components/scrollBar'
ColumnLayout {
spacing: 0
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 102
color: '#D1D1D1'
}
Flickable {
Layout.fillHeight: true
Layout.fillWidth: true
ScrollBar.vertical: ForceScrollBar { }
boundsBehavior: Flickable.StopAtBounds
clip: true
contentHeight: content.height
flickableDirection: Flickable.VerticalFlick
ColumnLayout {
anchors.left: parent.left
anchors.margins: 20
anchors.right: parent.right
id: content
ListForm {
title: qsTr('sipAccounts')
}
ListForm {
title: qsTr('address')
}
ListForm {
title: qsTr('emails')
}
ListForm {
title: qsTr('webSites')
}
}
}
}
......@@ -10,6 +10,7 @@ import 'qrc:/ui/components/chat'
ColumnLayout {
spacing: 0
// Contact bar.
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 102
......@@ -84,6 +85,7 @@ ColumnLayout {
}
}
// Messages/Calls filter.
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 40
......
......@@ -12,8 +12,9 @@ import 'qrc:/ui/scripts/utils.js' as Utils
ApplicationWindow {
id: mainWindow
maximumHeight: 70
minimumHeight: 70
minimumWidth: 780
minimumWidth: 700
title: 'Linphone'
visible: true
......@@ -33,9 +34,11 @@ ApplicationWindow {
Collapse {
Layout.preferredWidth: 25
Layout.fillHeight: parent.height
onCollapsed: {
mainWindow.height = collapsed ? 500 : 70
}
id: collapse
onCollapsed: mainWindowStates.state = collapsed
? 'collapsed'
: ''
}
// User info.
......@@ -85,33 +88,33 @@ ApplicationWindow {
// Main menu.
ColumnLayout {
Layout.fillHeight: true
Layout.preferredWidth: 250
Layout.maximumWidth: 250
Layout.preferredWidth: 250
spacing: 0
MenuEntry {
Layout.fillWidth: true
Layout.preferredHeight: 50
Layout.preferredWidth: parent.width
entryName: qsTr('homeEntry')
}
Item { Layout.preferredHeight: 2 }
MenuEntry {
Layout.fillWidth: true
Layout.preferredHeight: 50
Layout.preferredWidth: parent.width
entryName: qsTr('contactsEntry')
}
// History.
Timeline {
Layout.fillHeight: true
Layout.preferredWidth: parent.width
Layout.fillWidth: true
}
// Logo.
Rectangle {
Layout.preferredWidth: parent.width
Layout.fillWidth: true
Layout.preferredHeight: 70
color: '#EAEAEA'
}
......@@ -121,7 +124,23 @@ ApplicationWindow {
Loader {
Layout.fillHeight: true
Layout.fillWidth: true
source: 'qrc:/ui/views/mainWindow/home.qml'
source: 'qrc:/ui/views/mainWindow/contact.qml'
}
}
StateGroup {
id: mainWindowStates
states: State {
name: 'collapsed'
PropertyChanges {
height: 480
maximumHeight: 99999
maximumWidth: 99999
minimumHeight: 480
target: mainWindow
}
}
}
}
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