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
85b3c816
Commit
85b3c816
authored
Nov 28, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(components/chat): scaling on calls (incoming/outgoing, missed incoming/outgoing...)
parent
0db134c8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
19 deletions
+96
-19
declined_incoming_call.svg
tests/assets/images/declined_incoming_call.svg
+0
-0
declined_outgoing_call.svg
tests/assets/images/declined_outgoing_call.svg
+0
-0
missed_incoming_call.svg
tests/assets/images/missed_incoming_call.svg
+13
-0
missed_outgoing_call.svg
tests/assets/images/missed_outgoing_call.svg
+13
-0
en.ts
tests/assets/languages/en.ts
+18
-2
fr.ts
tests/assets/languages/fr.ts
+18
-2
resources.qrc
tests/resources.qrc
+4
-2
ChatModel.cpp
tests/src/components/chat/ChatModel.cpp
+13
-9
ChatProxyModel.cpp
tests/src/components/chat/ChatProxyModel.cpp
+1
-2
Event.qml
tests/ui/modules/Linphone/Chat/Event.qml
+16
-2
No files found.
tests/assets/images/
lost
_incoming_call.svg
→
tests/assets/images/
declined
_incoming_call.svg
View file @
85b3c816
File moved
tests/assets/images/
lost
_outgoing_call.svg
→
tests/assets/images/
declined
_outgoing_call.svg
View file @
85b3c816
File moved
tests/assets/images/missed_incoming_call.svg
0 → 100644
View file @
85b3c816
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"12px"
height=
"12px"
viewBox=
"0 0 12 12"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title>
call_lost
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
stroke-linecap=
"round"
>
<g
id=
"call_lost"
stroke=
"#FF0000"
stroke-width=
"2"
>
<path
d=
"M12.9852814,5.74407768 L-1.15685425,5.74407768"
id=
"Line"
transform=
"translate(6.266032, 5.768485) rotate(-45.000000) translate(-6.266032, -5.768485) "
></path>
<path
d=
"M11,11 L1,1"
id=
"Line"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/missed_outgoing_call.svg
0 → 100644
View file @
85b3c816
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"12px"
height=
"12px"
viewBox=
"0 0 12 12"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
<title>
call_lost
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
stroke-linecap=
"round"
>
<g
id=
"call_lost"
stroke=
"#FF0000"
stroke-width=
"2"
>
<path
d=
"M12.9852814,5.74407768 L-1.15685425,5.74407768"
id=
"Line"
transform=
"translate(6.266032, 5.768485) rotate(-45.000000) translate(-6.266032, -5.768485) "
></path>
<path
d=
"M11,11 L1,1"
id=
"Line"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/languages/en.ts
View file @
85b3c816
...
...
@@ -191,11 +191,27 @@
<
translation
type
=
"
vanished
"
>
Lost
outgoing
call
<
/translation
>
<
/message
>
<
message
>
<
source
>
end
Call
<
/source
>
<
source
>
outgoing
Call
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
outgoingCall
<
/source
>
<
source
>
declinedIncomingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
declinedOutgoingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
endedCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
missedIncomingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
missedOutgoingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
...
...
tests/assets/languages/fr.ts
View file @
85b3c816
...
...
@@ -191,11 +191,27 @@
<
translation
type
=
"
vanished
"
>
Appel
sortant
manqu
é
<
/translation
>
<
/message
>
<
message
>
<
source
>
end
Call
<
/source
>
<
source
>
outgoing
Call
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
outgoingCall
<
/source
>
<
source
>
declinedIncomingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
declinedOutgoingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
endedCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
missedIncomingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
missedOutgoingCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
...
...
tests/resources.qrc
View file @
85b3c816
...
...
@@ -22,6 +22,8 @@
<file>
assets/images/contact_edit_pressed.svg
</file>
<file>
assets/images/contact_normal.svg
</file>
<file>
assets/images/contact_selected.svg
</file>
<file>
assets/images/declined_incoming_call.svg
</file>
<file>
assets/images/declined_outgoing_call.svg
</file>
<file>
assets/images/delete_hovered.svg
</file>
<file>
assets/images/delete_normal.svg
</file>
<file>
assets/images/delete_pressed.svg
</file>
...
...
@@ -36,8 +38,8 @@
<file>
assets/images/led_red.svg
</file>
<file>
assets/images/led_white.svg
</file>
<file>
assets/images/linphone.png
</file>
<file>
assets/images/
lost
_incoming_call.svg
</file>
<file>
assets/images/
lost
_outgoing_call.svg
</file>
<file>
assets/images/
missed
_incoming_call.svg
</file>
<file>
assets/images/
missed
_outgoing_call.svg
</file>
<file>
assets/images/outgoing_call.svg
</file>
<file>
assets/images/search.svg
</file>
<file>
assets/images/tooltip_arrow_bottom.svg
</file>
...
...
tests/src/components/chat/ChatModel.cpp
View file @
85b3c816
...
...
@@ -60,14 +60,15 @@ bool ChatModel::removeRows (int row, int count, const QModelIndex &parent) {
// -------------------------------------------------------------------
void
ChatModel
::
removeEntry
(
int
id
)
{
qInfo
()
<<
"Removing chat entry:"
<<
id
<<
"of:"
<<
getSipAddress
();
qInfo
()
<<
QStringLiteral
(
"Removing chat entry: %1 of %2."
)
.
arg
(
id
).
arg
(
getSipAddress
());
if
(
!
removeRow
(
id
))
qWarning
()
<<
"Unable to remove chat entry:"
<<
id
;
qWarning
()
<<
QStringLiteral
(
"Unable to remove chat entry: %1"
).
arg
(
id
)
;
}
void
ChatModel
::
removeAllEntries
()
{
qInfo
()
<<
"Removing all chat entries of:"
<<
getSipAddress
(
);
qInfo
()
<<
QStringLiteral
(
"Removing all chat entries of: %1."
).
arg
(
getSipAddress
()
);
beginResetModel
();
...
...
@@ -165,7 +166,12 @@ void ChatModel::setSipAddress (const QString &sip_address) {
// Get calls.
for
(
auto
&
call_log
:
core
->
getCallHistoryForAddress
(
m_chat_room
->
getPeerAddress
()))
{
QVariantMap
start
,
end
;
// Ignore aborted calls.
if
(
call_log
->
getStatus
()
==
linphone
::
CallStatusAborted
)
continue
;
// Add start call.
QVariantMap
start
;
fillCallStartEntry
(
start
,
call_log
);
ChatEntryData
pair
=
qMakePair
(
start
,
static_pointer_cast
<
void
>
(
call_log
));
...
...
@@ -178,14 +184,12 @@ void ChatModel::setSipAddress (const QString &sip_address) {
);
m_entries
.
insert
(
it
,
pair
);
// Add end call. (if necessary)
}
endResetModel
();
emit
sipAddressChanged
(
sip_address
);
}
// QT_TR_NOOP('endCall'),
// QT_TR_NOOP('incomingCall'),
// QT_TR_NOOP('lostIncomingCall'),
// QT_TR_NOOP('lostOutgoingCall')
tests/src/components/chat/ChatProxyModel.cpp
View file @
85b3c816
...
...
@@ -5,7 +5,6 @@
ChatProxyModel
::
ChatProxyModel
(
QObject
*
parent
)
:
QSortFilterProxyModel
(
parent
)
{
m_chat_model
.
setParent
(
this
);
setSourceModel
(
&
m_chat_model
);
setFilterCaseSensitivity
(
Qt
::
CaseInsensitive
);
}
void
ChatProxyModel
::
removeEntry
(
int
id
)
{
...
...
@@ -23,5 +22,5 @@ bool ChatProxyModel::filterAcceptsRow (int source_row, const QModelIndex &source
index
.
data
()
);
return
(
data
[
"type"
].
toInt
()
==
m_entry_type_filter
)
;
return
data
[
"type"
].
toInt
()
==
m_entry_type_filter
;
}
tests/ui/modules/Linphone/Chat/Event.qml
View file @
85b3c816
...
...
@@ -9,11 +9,21 @@ import Utils 1.0
Row
{
property
string
_type
:
{
var
status
=
$chatEntry
.
status
if
(
$chatEntry
.
status
===
ChatModel
.
CallStatusSuccess
)
{
return
$chatEntry
.
isOutgoing
?
'
outgoing_call
'
:
'
incoming_call
'
}
return
''
if
(
$chatEntry
.
status
===
ChatModel
.
CallStatusDeclined
)
{
return
$chatEntry
.
isOutgoing
?
'
declined_outgoing_call
'
:
'
declined_incoming_call
'
}
if
(
$chatEntry
.
status
===
ChatModel
.
CallStatusMissed
)
{
return
$chatEntry
.
isOutgoing
?
'
missed_outgoing_call
'
:
'
missed_incoming_call
'
}
return
'
ended_call
'
}
height
:
ChatStyle
.
entry
.
lineHeight
...
...
@@ -32,8 +42,12 @@ Row {
// Private data for `lupdate`.
Item
{
property
var
i18n
:
[
QT_TR_NOOP
(
'
endCall
'
),
QT_TR_NOOP
(
'
declinedIncomingCall
'
),
QT_TR_NOOP
(
'
declinedOutgoingCall
'
),
QT_TR_NOOP
(
'
endedCall
'
),
QT_TR_NOOP
(
'
incomingCall
'
),
QT_TR_NOOP
(
'
missedIncomingCall
'
),
QT_TR_NOOP
(
'
missedOutgoingCall
'
),
QT_TR_NOOP
(
'
outgoingCall
'
)
]
}
...
...
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