Commit fbcbb7e1 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(app): add many links between components

parent 6fa3026c
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</message> </message>
<message> <message>
<source>addContact</source> <source>addContact</source>
<translation></translation> <translation>ADD CONTACTS</translation>
</message> </message>
<message> <message>
<source>displayTooltip</source> <source>displayTooltip</source>
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
</message> </message>
<message> <message>
<source>addContact</source> <source>addContact</source>
<translation></translation> <translation>AJOUTER CONTACTS</translation>
</message> </message>
<message> <message>
<source>displayTooltip</source> <source>displayTooltip</source>
......
...@@ -118,10 +118,10 @@ ScrollableListView { ...@@ -118,10 +118,10 @@ ScrollableListView {
id: loader id: loader
source: $type === 'message' source: $type === 'message'
? ( ? (
'qrc:/ui/Linphone/Chat/' + 'qrc:/ui/modules/Linphone/Chat/' +
($outgoing ? 'Outgoing' : 'Incoming') + ($outgoing ? 'Outgoing' : 'Incoming') +
'Message.qml' 'Message.qml'
) : 'qrc:/ui/Linphone/Chat/Event.qml' ) : 'qrc:/ui/modules/Linphone/Chat/Event.qml'
} }
} }
......
...@@ -24,10 +24,10 @@ ColumnLayout { ...@@ -24,10 +24,10 @@ ColumnLayout {
model: entries model: entries
Rectangle { Rectangle {
color: _selectedEntry === index color: mouseArea.pressed
? MenuStyle.entry.color.selected
: (mouseArea.pressed
? MenuStyle.entry.color.pressed ? MenuStyle.entry.color.pressed
: (_selectedEntry === index
? MenuStyle.entry.color.selected
: (mouseArea.containsMouse : (mouseArea.containsMouse
? MenuStyle.entry.color.hovered ? MenuStyle.entry.color.hovered
: MenuStyle.entry.color.normal : MenuStyle.entry.color.normal
...@@ -76,12 +76,10 @@ ColumnLayout { ...@@ -76,12 +76,10 @@ ColumnLayout {
hoverEnabled: true hoverEnabled: true
onClicked: { onClicked: {
if (_selectedEntry !== index) {
_selectedEntry = index _selectedEntry = index
entrySelected(index) entrySelected(index)
} }
} }
} }
} }
}
} }
...@@ -43,12 +43,12 @@ ColumnLayout { ...@@ -43,12 +43,12 @@ ColumnLayout {
Layout.alignment: Qt.AlignBottom | Qt.AlignRight Layout.alignment: Qt.AlignBottom | Qt.AlignRight
ActionButton { ActionButton {
icon: 'delete' icon: 'history'
onClicked: console.log('clicked!!!') onClicked: window.setView('Conversation')
} }
ActionButton { ActionButton {
icon: 'contact' icon: 'delete'
onClicked: console.log('clicked!!!') onClicked: console.log('clicked!!!')
} }
} }
......
...@@ -43,6 +43,8 @@ ColumnLayout { ...@@ -43,6 +43,8 @@ ColumnLayout {
TextButtonB { TextButtonB {
text: qsTr('addContact') text: qsTr('addContact')
onClicked: window.setView('Contact')
} }
} }
} }
...@@ -224,12 +226,15 @@ ColumnLayout { ...@@ -224,12 +226,15 @@ ColumnLayout {
ActionButton { ActionButton {
icon: 'chat' icon: 'chat'
onClicked: window.setView('Conversation')
} }
} }
ActionButton { ActionButton {
iconSize: parent.height iconSize: parent.height
icon: 'delete' icon: 'delete'
onClicked: Utils.openConfirmDialog(contact, { onClicked: Utils.openConfirmDialog(contact, {
descriptionText: qsTr('removeContactDescription'), descriptionText: qsTr('removeContactDescription'),
exitHandler: function (status) { exitHandler: function (status) {
......
...@@ -74,7 +74,7 @@ ColumnLayout { ...@@ -74,7 +74,7 @@ ColumnLayout {
ActionButton { ActionButton {
icon: 'contact' icon: 'contact'
onClicked: console.log('clicked!!!') onClicked: window.setView('Contact')
} }
} }
} }
......
...@@ -7,7 +7,12 @@ import Linphone 1.0 ...@@ -7,7 +7,12 @@ import Linphone 1.0
import 'qrc:/ui/scripts/utils.js' as Utils import 'qrc:/ui/scripts/utils.js' as Utils
ApplicationWindow { ApplicationWindow {
id: mainWindow id: window
function setView (view) {
loaderContent.source = 'qrc:/ui/views/MainWindow/' + view + '.qml'
}
maximumHeight: 70 maximumHeight: 70
minimumHeight: 70 minimumHeight: 70
minimumWidth: 780 minimumWidth: 780
...@@ -32,7 +37,7 @@ ApplicationWindow { ...@@ -32,7 +37,7 @@ ApplicationWindow {
Layout.fillHeight: parent.height Layout.fillHeight: parent.height
id: collapse id: collapse
onCollapsed: mainWindowStates.state = isCollapsed() onCollapsed: windowStates.state = isCollapsed()
? 'collapsed' ? 'collapsed'
: '' : ''
} }
...@@ -48,12 +53,12 @@ ApplicationWindow { ...@@ -48,12 +53,12 @@ ApplicationWindow {
// User actions. // User actions.
ActionButton { ActionButton {
Layout.preferredWidth: 16 Layout.preferredWidth: 16
onClicked: Utils.openWindow('ManageAccounts', mainWindow) onClicked: Utils.openWindow('ManageAccounts', window)
} }
ActionButton { ActionButton {
Layout.preferredWidth: 16 Layout.preferredWidth: 16
onClicked: Utils.openWindow('NewCall', mainWindow) onClicked: Utils.openWindow('NewCall', window)
} }
// Search. // Search.
...@@ -212,6 +217,12 @@ ApplicationWindow { ...@@ -212,6 +217,12 @@ ApplicationWindow {
onEntrySelected: { onEntrySelected: {
console.log('entry', entry) console.log('entry', entry)
if (entry === 0) {
setView('Home')
} else if (entry === 1) {
setView('Contacts')
}
} }
} }
...@@ -273,6 +284,8 @@ ApplicationWindow { ...@@ -273,6 +284,8 @@ ApplicationWindow {
// Main content. // Main content.
Loader { Loader {
id: loaderContent
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
source: 'qrc:/ui/views/MainWindow/Home.qml' source: 'qrc:/ui/views/MainWindow/Home.qml'
...@@ -280,7 +293,7 @@ ApplicationWindow { ...@@ -280,7 +293,7 @@ ApplicationWindow {
} }
StateGroup { StateGroup {
id: mainWindowStates id: windowStates
states: State { states: State {
name: 'collapsed' name: 'collapsed'
...@@ -290,7 +303,7 @@ ApplicationWindow { ...@@ -290,7 +303,7 @@ ApplicationWindow {
maximumHeight: 99999 maximumHeight: 99999
maximumWidth: 99999 maximumWidth: 99999
minimumHeight: 480 minimumHeight: 480
target: mainWindow target: window
} }
} }
} }
......
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