Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
179cbedd
Commit
179cbedd
authored
Nov 22, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Linphone/Contact/Contact): supports uri as contact attr
parent
328a451a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
11 deletions
+25
-11
Contact.qml
tests/ui/modules/Linphone/Contact/Contact.qml
+10
-4
Timeline.qml
tests/ui/modules/Linphone/Timeline.qml
+13
-5
MainWindow.qml
tests/ui/views/App/MainWindow/MainWindow.qml
+2
-2
No files found.
tests/ui/modules/Linphone/Contact/Contact.qml
View file @
179cbedd
...
@@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3
...
@@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3
import
Common
1.0
import
Common
1.0
import
Linphone
1.0
import
Linphone
1.0
import
Linphone
.
Styles
1.0
import
Linphone
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
...
@@ -12,6 +13,7 @@ Rectangle {
...
@@ -12,6 +13,7 @@ Rectangle {
property
alias
sipAddressColor
:
description
.
sipAddressColor
property
alias
sipAddressColor
:
description
.
sipAddressColor
property
alias
usernameColor
:
description
.
usernameColor
property
alias
usernameColor
:
description
.
usernameColor
// Can be a contact object or just a sip address.
property
var
contact
property
var
contact
color
:
'
transparent
'
// No color by default.
color
:
'
transparent
'
// No color by default.
...
@@ -30,9 +32,11 @@ Rectangle {
...
@@ -30,9 +32,11 @@ Rectangle {
Layout.preferredHeight
:
ContactStyle
.
contentHeight
Layout.preferredHeight
:
ContactStyle
.
contentHeight
Layout.preferredWidth
:
ContactStyle
.
contentHeight
Layout.preferredWidth
:
ContactStyle
.
contentHeight
image
:
contact
.
avatar
image
:
contact
.
avatar
||
''
presenceLevel
:
contact
.
presenceLevel
presenceLevel
:
contact
.
presenceLevel
||
Presence
.
White
username
:
contact
.
username
username
:
Utils
.
isString
(
contact
)
?
contact
.
substring
(
4
,
contact
.
indexOf
(
'
@
'
))
// 4 = length("sip:")
:
contact
.
username
}
}
ContactDescription
{
ContactDescription
{
...
@@ -40,7 +44,9 @@ Rectangle {
...
@@ -40,7 +44,9 @@ Rectangle {
Layout.fillHeight
:
true
Layout.fillHeight
:
true
Layout.fillWidth
:
true
Layout.fillWidth
:
true
sipAddress
:
contact
.
sipAddress
sipAddress
:
Utils
.
isString
(
contact
)
?
contact
:
contact
.
sipAddress
username
:
avatar
.
username
username
:
avatar
.
username
}
}
...
...
tests/ui/modules/Linphone/Timeline.qml
View file @
179cbedd
...
@@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3
...
@@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3
import
Common
1.0
import
Common
1.0
import
Linphone
1.0
import
Linphone
1.0
import
Linphone
.
Styles
1.0
import
Linphone
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
...
@@ -12,7 +13,7 @@ ColumnLayout {
...
@@ -12,7 +13,7 @@ ColumnLayout {
property
alias
model
:
view
.
model
property
alias
model
:
view
.
model
signal
contactSelected
(
var
contact
)
signal
entrySelected
(
var
entry
)
// -----------------------------------------------------------------
// -----------------------------------------------------------------
...
@@ -63,9 +64,16 @@ ColumnLayout {
...
@@ -63,9 +64,16 @@ ColumnLayout {
currentIndex
:
-
1
currentIndex
:
-
1
delegate
:
Item
{
delegate
:
Item
{
property
var
contact
:
ContactsListModel
.
mapSipAddressToContact
(
property
var
contact
:
{
$timelineEntry
.
sipAddresses
Utils
.
assert
(
)
!
Utils
.
isArray
(
$timelineEntry
.
sipAddresses
),
'
Conferences are not supported at this moment.
'
)
return
ContactsListModel
.
mapSipAddressToContact
(
$timelineEntry
.
sipAddresses
)
||
$timelineEntry
.
sipAddresses
}
height
:
TimelineStyle
.
contact
.
height
height
:
TimelineStyle
.
contact
.
height
width
:
parent
.
width
width
:
parent
.
width
...
@@ -97,7 +105,7 @@ ColumnLayout {
...
@@ -97,7 +105,7 @@ ColumnLayout {
onClicked
:
{
onClicked
:
{
view
.
currentIndex
=
index
view
.
currentIndex
=
index
timeline
.
contact
Selected
(
parent
.
contact
)
timeline
.
entry
Selected
(
parent
.
contact
)
}
}
}
}
}
}
...
...
tests/ui/views/App/MainWindow/MainWindow.qml
View file @
179cbedd
...
@@ -160,9 +160,9 @@ ApplicationWindow {
...
@@ -160,9 +160,9 @@ ApplicationWindow {
Layout.fillWidth
:
true
Layout.fillWidth
:
true
model
:
TimelineModel
model
:
TimelineModel
on
Contact
Selected
:
{
on
Entry
Selected
:
{
menu
.
resetSelectedEntry
()
menu
.
resetSelectedEntry
()
setView
(
'
Conversation
'
,
{
contact
:
contact
})
setView
(
'
Conversation
'
,
{
contact
:
entry
})
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment