Commit c821e797 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(mainWindow): use Timeline component

parent c1f7bdab
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<file>languages/en.qm</file> <file>languages/en.qm</file>
<file>ui/components/scrollBar/ForceScrollBar.qml</file> <file>ui/components/scrollBar/ForceScrollBar.qml</file>
<file>ui/components/misc/MenuEntry.qml</file> <file>ui/components/misc/MenuEntry.qml</file>
<file>ui/components/timeline/Timeline.qml</file>
<file>ui/components/select/SelectContact.qml</file> <file>ui/components/select/SelectContact.qml</file>
<file>ui/components/collapse/Collapse.qml</file> <file>ui/components/collapse/Collapse.qml</file>
<file>ui/components/contact/Contact.qml</file> <file>ui/components/contact/Contact.qml</file>
......
...@@ -71,12 +71,12 @@ Item { ...@@ -71,12 +71,12 @@ Item {
$username: 'Toto' $username: 'Toto'
} }
ListElement { ListElement {
$presence: 'do$not$disturb' $presence: 'do_not_disturb'
$sipAddress: 'valentin.cognito.sip.linphone.org' $sipAddress: 'valentin.cognito.sip.linphone.org'
$username: 'Toto' $username: 'Toto'
} }
ListElement { ListElement {
$presence: 'do$not$disturb' $presence: 'do_not_disturb'
$sipAddress: 'charles.henri.sip.linphone.org' $sipAddress: 'charles.henri.sip.linphone.org'
$username: 'Toto' $username: 'Toto'
} }
......
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/scrollBar'
ColumnLayout {
Row {
Layout.preferredHeight: 35
spacing: 30
Image {
fillMode: Image.PreserveAspectFit
height: parent.height
width: 30
}
Text {
color: '#5A585B'
font.pointSize: 13
height: parent.height
text: qsTr('timelineTitle')
verticalAlignment: Text.AlignVCenter
}
}
Rectangle {
color: '#DEDEDE'
Layout.fillWidth: true
Layout.preferredHeight: 1
}
ListView {
Layout.fillHeight: true
Layout.fillWidth: true
ScrollBar.vertical: ForceScrollBar { }
boundsBehavior: Flickable.StopAtBounds
clip: true
highlightRangeMode: ListView.ApplyRange
spacing: 0
// Replace by C++ class.
model: ListModel {
ListElement {
$presence: 'connected'
$sipAddress: 'jim.williams.zzzz.yyyy.kkkk.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'connected'
$sipAddress: 'toto.lala.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'disconnected'
$sipAddress: 'machin.truc.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'absent'
$sipAddress: 'hey.listen.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'do_not_disturb'
$sipAddress: 'valentin.cognito.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'do_not_disturb'
$sipAddress: 'charles.henri.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'disconnected'
$sipAddress: 'yesyes.nono.sip.linphone.org'
$username: 'Toto'
}
ListElement {
$presence: 'connected'
$sipAddress: 'nsa.sip.linphone.org'
$username: 'Toto'
}
}
delegate: Contact {
presence: $presence
sipAddress: $sipAddress
username: $username
width: parent.width
}
}
}
...@@ -26,6 +26,7 @@ ColumnLayout { ...@@ -26,6 +26,7 @@ ColumnLayout {
spacing: 20 spacing: 20
width: parent.width width: parent.width
// TODO: Replace by top-level component.
TextField { TextField {
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle { background: Rectangle {
......
...@@ -6,6 +6,7 @@ import 'qrc:/ui/components/collapse' ...@@ -6,6 +6,7 @@ import 'qrc:/ui/components/collapse'
import 'qrc:/ui/components/contact' import 'qrc:/ui/components/contact'
import 'qrc:/ui/components/form' import 'qrc:/ui/components/form'
import 'qrc:/ui/components/misc' import 'qrc:/ui/components/misc'
import 'qrc:/ui/components/timeline'
import 'qrc:/ui/scripts/utils.js' as Utils import 'qrc:/ui/scripts/utils.js' as Utils
...@@ -85,6 +86,7 @@ ApplicationWindow { ...@@ -85,6 +86,7 @@ ApplicationWindow {
ColumnLayout { ColumnLayout {
Layout.fillHeight: true Layout.fillHeight: true
Layout.preferredWidth: 250 Layout.preferredWidth: 250
Layout.maximumWidth: 250
spacing: 0 spacing: 0
MenuEntry { MenuEntry {
...@@ -102,14 +104,14 @@ ApplicationWindow { ...@@ -102,14 +104,14 @@ ApplicationWindow {
} }
// History. // History.
Item { Timeline {
Layout.fillHeight: true Layout.fillHeight: true
Layout.preferredWidth: parent.width Layout.preferredWidth: parent.width
} }
// Logo. // Logo.
Rectangle { Rectangle {
Layout.preferredWidth: 250 Layout.preferredWidth: parent.width
Layout.preferredHeight: 70 Layout.preferredHeight: 70
color: '#EAEAEA' color: '#EAEAEA'
} }
...@@ -119,7 +121,7 @@ ApplicationWindow { ...@@ -119,7 +121,7 @@ ApplicationWindow {
Loader { Loader {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
source: 'qrc:/ui/views/mainWindow/contacts.qml' source: 'qrc:/ui/views/mainWindow/conversation.qml'
} }
} }
} }
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