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
639fabf8
Commit
639fabf8
authored
Jan 25, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): many fixes on calls (pause, buttons, actions...)
parent
04961056
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
194 additions
and
85 deletions
+194
-85
prepare.conf
prepare.conf
+0
-1
generic_error_hovered.svg
tests/assets/images/generic_error_hovered.svg
+14
-0
generic_error_normal.svg
tests/assets/images/generic_error_normal.svg
+14
-0
generic_error_pressed.svg
tests/assets/images/generic_error_pressed.svg
+14
-0
resources.qrc
tests/resources.qrc
+3
-0
CallModel.cpp
tests/src/components/call/CallModel.cpp
+29
-11
CallModel.hpp
tests/src/components/call/CallModel.hpp
+2
-2
CallsListModel.cpp
tests/src/components/calls/CallsListModel.cpp
+10
-2
Colors.qml
tests/ui/modules/Common/Colors.qml
+1
-0
Calls.qml
tests/ui/modules/Linphone/Calls/Calls.qml
+78
-69
Avatar.qml
tests/ui/modules/Linphone/Contact/Avatar.qml
+2
-0
Incall.qml
tests/ui/views/App/Calls/Incall.qml
+18
-0
CallStyle.qml
tests/ui/views/App/Styles/Calls/CallStyle.qml
+9
-0
No files found.
prepare.conf
View file @
639fabf8
-
DENABLE_CXX_WRAPPER
=
YES
-
DENABLE_GTK_UI
=
NO
-
DENABLE_JPEG
=
NO
tests/assets/images/generic_error_hovered.svg
0 → 100644
View file @
639fabf8
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"12px"
height=
"10px"
viewBox=
"0 0 12 10"
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>
chat_error
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"chat_error"
>
<polygon
id=
"Path-1067"
fill=
"#FF0000"
points=
"6.05012213 3.64153152e-14 0 10 12 10"
></polygon>
<path
d=
"M6,6 L6,3.5"
id=
"chat_message_delivered-copy-4"
stroke=
"#FFFFFF"
stroke-width=
"1.4"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
<ellipse
id=
"Oval-24"
fill=
"#FFFFFF"
cx=
"6.03499979"
cy=
"8.13500017"
rx=
"0.834999979"
ry=
"0.834999979"
></ellipse>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/generic_error_normal.svg
0 → 100644
View file @
639fabf8
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"12px"
height=
"10px"
viewBox=
"0 0 12 10"
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>
chat_error
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"chat_error"
>
<polygon
id=
"Path-1067"
fill=
"#FF0000"
points=
"6.05012213 3.64153152e-14 0 10 12 10"
></polygon>
<path
d=
"M6,6 L6,3.5"
id=
"chat_message_delivered-copy-4"
stroke=
"#FFFFFF"
stroke-width=
"1.4"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
<ellipse
id=
"Oval-24"
fill=
"#FFFFFF"
cx=
"6.03499979"
cy=
"8.13500017"
rx=
"0.834999979"
ry=
"0.834999979"
></ellipse>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/generic_error_pressed.svg
0 → 100644
View file @
639fabf8
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"12px"
height=
"10px"
viewBox=
"0 0 12 10"
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>
chat_error
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"chat_error"
>
<polygon
id=
"Path-1067"
fill=
"#FF0000"
points=
"6.05012213 3.64153152e-14 0 10 12 10"
></polygon>
<path
d=
"M6,6 L6,3.5"
id=
"chat_message_delivered-copy-4"
stroke=
"#FFFFFF"
stroke-width=
"1.4"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
<ellipse
id=
"Oval-24"
fill=
"#FFFFFF"
cx=
"6.03499979"
cy=
"8.13500017"
rx=
"0.834999979"
ry=
"0.834999979"
></ellipse>
</g>
</g>
</svg>
\ No newline at end of file
tests/resources.qrc
View file @
639fabf8
...
...
@@ -80,6 +80,9 @@
<file>
assets/images/fullscreen_hovered.svg
</file>
<file>
assets/images/fullscreen_normal.svg
</file>
<file>
assets/images/fullscreen_pressed.svg
</file>
<file>
assets/images/generic_error_hovered.svg
</file>
<file>
assets/images/generic_error_normal.svg
</file>
<file>
assets/images/generic_error_pressed.svg
</file>
<file>
assets/images/generic_error.svg
</file>
<file>
assets/images/hangup_hovered.svg
</file>
<file>
assets/images/hangup_normal.svg
</file>
...
...
tests/src/components/call/CallModel.cpp
View file @
639fabf8
...
...
@@ -18,16 +18,22 @@ CallModel::CallModel (shared_ptr<linphone::Call> linphone_call) {
case
linphone
:
:
CallStateConnected
:
case
linphone
:
:
CallStateEnd
:
case
linphone
:
:
CallStateError
:
case
linphone
:
:
CallStatePaused
:
case
linphone
:
:
CallStateRefered
:
case
linphone
:
:
CallStateReleased
:
case
linphone
:
:
CallStateStreamsRunning
:
m_
linphone_call_status
=
stat
e
;
m_
paused_by_remote
=
fals
e
;
break
;
case
linphone
:
:
CallStatePausedByRemote
:
if
(
m_linphone_call_status
!=
linphone
::
CallStatePaused
)
m_linphone_call_status
=
state
;
m_paused_by_remote
=
true
;
break
;
case
linphone
:
:
CallStatePausing
:
m_paused_by_user
=
true
;
break
;
case
linphone
:
:
CallStateResuming
:
m_paused_by_user
=
false
;
break
;
default:
...
...
@@ -64,7 +70,7 @@ QString CallModel::getSipAddress () const {
}
CallModel
::
CallStatus
CallModel
::
getStatus
()
const
{
switch
(
m_linphone_call
_status
)
{
switch
(
m_linphone_call
->
getState
()
)
{
case
linphone
:
:
CallStateConnected
:
case
linphone
:
:
CallStateStreamsRunning
:
return
CallStatusConnected
;
...
...
@@ -77,9 +83,23 @@ CallModel::CallStatus CallModel::getStatus () const {
case
linphone
:
:
CallStatePaused
:
case
linphone
:
:
CallStatePausedByRemote
:
case
linphone
:
:
CallStatePausing
:
case
linphone
:
:
CallStateResuming
:
return
CallStatusPaused
;
default:
case
linphone
:
:
CallStateUpdating
:
case
linphone
:
:
CallStateUpdatedByRemote
:
return
m_paused_by_remote
?
CallStatusPaused
:
CallStatusConnected
;
case
linphone
:
:
CallStateEarlyUpdatedByRemote
:
case
linphone
:
:
CallStateEarlyUpdating
:
case
linphone
:
:
CallStateIdle
:
case
linphone
:
:
CallStateIncomingEarlyMedia
:
case
linphone
:
:
CallStateIncomingReceived
:
case
linphone
:
:
CallStateOutgoingEarlyMedia
:
case
linphone
:
:
CallStateOutgoingInit
:
case
linphone
:
:
CallStateOutgoingProgress
:
case
linphone
:
:
CallStateOutgoingRinging
:
break
;
}
...
...
@@ -111,20 +131,18 @@ void CallModel::setMicroMuted (bool status) {
}
bool
CallModel
::
getPausedByUser
()
const
{
return
m_
linphone_call_status
==
linphone
::
CallStatePaused
;
return
m_
paused_by_user
;
}
void
CallModel
::
setPausedByUser
(
bool
status
)
{
bool
paused
=
getPausedByUser
();
if
(
status
)
{
if
(
!
paused
)
if
(
!
m_paused_by_user
)
CoreManager
::
getInstance
()
->
getCore
()
->
pauseCall
(
m_linphone_call
);
return
;
}
if
(
paused
)
if
(
m_paused_by_user
)
CoreManager
::
getInstance
()
->
getCore
()
->
resumeCall
(
m_linphone_call
);
}
...
...
tests/src/components/call/CallModel.hpp
View file @
639fabf8
...
...
@@ -69,8 +69,8 @@ private:
void
setVideoOutputEnabled
(
bool
status
);
bool
m_micro_muted
=
false
;
linphone
::
CallState
m_linphone_call_status
=
linphone
::
CallStateIdl
e
;
bool
m_paused_by_remote
=
false
;
bool
m_paused_by_user
=
fals
e
;
std
::
shared_ptr
<
linphone
::
Call
>
m_linphone_call
;
};
...
...
tests/src/components/calls/CallsListModel.cpp
View file @
639fabf8
...
...
@@ -76,8 +76,16 @@ void CallsListModel::launchAudioCall (const QString &sip_uri) const {
void
CallsListModel
::
launchVideoCall
(
const
QString
&
sip_uri
)
const
{
shared_ptr
<
linphone
::
Core
>
core
=
CoreManager
::
getInstance
()
->
getCore
();
// TODO: Deal with videos.
core
->
inviteAddress
(
core
->
interpretUrl
(
::
Utils
::
qStringToLinphoneString
(
sip_uri
)));
shared_ptr
<
linphone
::
Address
>
address
=
core
->
interpretUrl
(
::
Utils
::
qStringToLinphoneString
(
sip_uri
));
if
(
!
address
)
return
;
shared_ptr
<
linphone
::
CallParams
>
params
=
core
->
createCallParams
(
nullptr
);
params
->
enableEarlyMediaSending
(
true
);
params
->
enableVideo
(
true
);
core
->
inviteAddressWithParams
(
address
,
params
);
}
// -----------------------------------------------------------------------------
...
...
tests/ui/modules/Common/Colors.qml
View file @
639fabf8
...
...
@@ -13,6 +13,7 @@ QtObject {
property
color
g
:
'
#6B7A86
'
property
color
g10
:
'
#1A6B7A86
'
property
color
g20
:
'
#336B7A86
'
property
color
g90
:
'
#E66B7A86
'
property
color
h
:
'
#687680
'
property
color
i
:
'
#FE5E00
'
property
color
i30
:
'
#4DFE5E00
'
...
...
tests/ui/modules/Linphone/Calls/Calls.qml
View file @
639fabf8
...
...
@@ -17,17 +17,9 @@ ListView {
// ---------------------------------------------------------------------------
function
_getSignIcon
(
call
)
{
if
(
call
)
{
return
'
call_sign_
'
+
_mapStatusToParams
[
call
.
status
].
string
}
return
''
}
function
_getParams
(
call
)
{
if
(
call
)
{
return
_mapStatusToParams
[
call
.
status
]
return
_mapStatusToParams
[
call
.
status
]
(
call
)
}
}
...
...
@@ -42,63 +34,74 @@ ListView {
Component.onCompleted
:
{
_mapStatusToParams
=
{}
_mapStatusToParams
[
CallModel
.
CallStatusConnected
]
=
{
actions
:
[{
handler
:
(
function
(
call
)
{
call
.
pausedByUser
=
false
}),
name
:
qsTr
(
'
resumeCall
'
)
},
{
handler
:
(
function
(
call
)
{
call
.
transfer
()
}),
name
:
qsTr
(
'
transferCall
'
)
},
{
handler
:
(
function
(
call
)
{
call
.
terminate
()
}),
name
:
qsTr
(
'
terminateCall
'
)
}],
component
:
callActions
,
icon
:
'
hangup
'
,
string
:
'
connected
'
}
_mapStatusToParams
[
CallModel
.
CallStatusEnded
]
=
{
icon
:
'
hangup
'
,
string
:
'
ended
'
}
_mapStatusToParams
[
CallModel
.
CallStatusIncoming
]
=
{
actions
:
[{
name
:
qsTr
(
'
acceptAudioCall
'
),
handler
:
(
function
(
call
)
{
call
.
accept
()
})
},
{
name
:
qsTr
(
'
acceptVideoCall
'
),
handler
:
(
function
(
call
)
{
call
.
acceptWithVideo
()
})
},
{
name
:
qsTr
(
'
terminateCall
'
),
handler
:
(
function
(
call
)
{
call
.
terminate
()
})
}],
component
:
callActions
,
string
:
'
incoming
'
}
_mapStatusToParams
[
CallModel
.
CallStatusOutgoing
]
=
{
component
:
callAction
,
handler
:
(
function
(
call
)
{
call
.
terminate
()
}),
icon
:
'
hangup
'
,
string
:
'
outgoing
'
}
_mapStatusToParams
[
CallModel
.
CallStatusConnected
]
=
(
function
(
call
)
{
return
{
actions
:
[{
handler
:
(
function
()
{
call
.
pausedByUser
=
true
}),
name
:
qsTr
(
'
pauseCall
'
)
},
{
handler
:
(
function
()
{
call
.
transfer
()
}),
name
:
qsTr
(
'
transferCall
'
)
},
{
handler
:
(
function
()
{
call
.
terminate
()
}),
name
:
qsTr
(
'
terminateCall
'
)
}],
component
:
callActions
,
string
:
'
connected
'
}
})
_mapStatusToParams
[
CallModel
.
CallStatusPaused
]
=
{
actions
:
[{
handler
:
(
function
(
call
)
{
call
.
pausedByUser
=
true
}),
name
:
qsTr
(
'
pauseCall
'
)
},
{
handler
:
(
function
(
call
)
{
call
.
transfer
()
}),
name
:
qsTr
(
'
transferCall
'
)
},
{
handler
:
(
function
(
call
)
{
call
.
terminate
()
}),
name
:
qsTr
(
'
terminateCall
'
)
}],
component
:
callActions
,
string
:
'
paused
'
}
_mapStatusToParams
[
CallModel
.
CallStatusEnded
]
=
(
function
(
call
)
{
return
{
string
:
'
ended
'
}
})
_mapStatusToParams
[
CallModel
.
CallStatusIncoming
]
=
(
function
(
call
)
{
return
{
actions
:
[{
name
:
qsTr
(
'
acceptAudioCall
'
),
handler
:
(
function
()
{
call
.
accept
()
})
},
{
name
:
qsTr
(
'
acceptVideoCall
'
),
handler
:
(
function
()
{
call
.
acceptWithVideo
()
})
},
{
name
:
qsTr
(
'
terminateCall
'
),
handler
:
(
function
()
{
call
.
terminate
()
})
}],
component
:
callActions
,
string
:
'
incoming
'
}
})
_mapStatusToParams
[
CallModel
.
CallStatusOutgoing
]
=
(
function
(
call
)
{
return
{
component
:
callAction
,
handler
:
(
function
()
{
call
.
terminate
()
}),
icon
:
'
hangup
'
,
string
:
'
outgoing
'
}
})
_mapStatusToParams
[
CallModel
.
CallStatusPaused
]
=
(
function
(
call
)
{
return
{
actions
:
[(
call
.
pausedByUser
?
{
handler
:
(
function
()
{
call
.
pausedByUser
=
false
}),
name
:
qsTr
(
'
resumeCall
'
)
}
:
{
handler
:
(
function
()
{
call
.
pausedByUser
=
true
}),
name
:
qsTr
(
'
pauseCall
'
)
}),
{
handler
:
(
function
()
{
call
.
transfer
()
}),
name
:
qsTr
(
'
transferCall
'
)
},
{
handler
:
(
function
()
{
call
.
terminate
()
}),
name
:
qsTr
(
'
terminateCall
'
)
}],
component
:
callActions
,
string
:
'
paused
'
}
})
}
// ---------------------------------------------------------------------------
...
...
@@ -107,10 +110,10 @@ ListView {
id
:
callAction
ActionButton
{
icon
:
params
.
icon
icon
:
params
.
icon
||
'
generic_error
'
iconSize
:
CallsStyle
.
entry
.
iconActionSize
onClicked
:
params
.
handler
(
call
)
onClicked
:
params
.
handler
()
}
}
...
...
@@ -149,7 +152,7 @@ ListView {
onClicked
:
{
menu
.
hideMenu
()
params
.
actions
[
index
].
handler
(
call
)
params
.
actions
[
index
].
handler
()
}
}
}
...
...
@@ -233,7 +236,11 @@ ListView {
?
CallsStyle
.
entry
.
usernameColor
.
selected
:
CallsStyle
.
entry
.
usernameColor
.
normal
signIcon
:
_getSignIcon
(
$call
)
signIcon
:
{
var
params
=
loader
.
params
return
params
?
'
call_sign_
'
+
params
.
string
:
''
}
sipAddress
:
$call
.
sipAddress
width
:
parent
.
width
...
...
@@ -245,6 +252,8 @@ ListView {
// -------------------------------------------------------------------------
Loader
{
id
:
loader
property
int
callId
:
index
property
var
call
:
$call
property
var
callControls
:
_callControls
...
...
tests/ui/modules/Linphone/Contact/Avatar.qml
View file @
639fabf8
...
...
@@ -13,6 +13,7 @@ Item {
property
alias
presenceLevel
:
presenceLevel
.
level
property
color
backgroundColor
:
AvatarStyle
.
backgroundColor
property
color
foregroundColor
:
'
transparent
'
property
string
username
property
var
image
...
...
@@ -45,6 +46,7 @@ Item {
anchors.fill
:
parent
backgroundColor
:
avatar
.
backgroundColor
foregroundColor
:
avatar
.
foregroundColor
source
:
avatar
.
image
||
''
}
...
...
tests/ui/views/App/Calls/Incall.qml
View file @
639fabf8
...
...
@@ -148,11 +148,29 @@ Rectangle {
}
backgroundColor
:
CallStyle
.
container
.
avatar
.
backgroundColor
foregroundColor
:
call
.
status
===
CallModel
.
CallStatusPaused
?
CallStyle
.
container
.
pause
.
color
:
'
transparent
'
image
:
_contactObserver
.
contact
&&
_contactObserver
.
contact
.
vcard
.
avatar
username
:
contactDescription
.
username
height
:
_computeAvatarSize
()
width
:
height
Text
{
anchors.fill
:
parent
color
:
CallStyle
.
container
.
pause
.
text
.
color
// `|| 1` => `pointSize` must be greater than 0.
font.pointSize
:
(
width
/
CallStyle
.
container
.
pause
.
text
.
fontSizeFactor
)
||
1
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
'
▐ ▌
'
textFormat
:
Text
.
RichText
visible
:
call
.
status
===
CallModel
.
CallStatusPaused
}
}
}
...
...
tests/ui/views/App/Styles/Calls/CallStyle.qml
View file @
639fabf8
...
...
@@ -28,6 +28,15 @@ QtObject {
property
color
backgroundColor
:
Colors
.
w
property
int
maxSize
:
300
}
property
QtObject
pause
:
QtObject
{
property
color
color
:
Colors
.
g90
property
QtObject
text
:
QtObject
{
property
color
color
:
Colors
.
k
property
int
fontSizeFactor
:
10
}
}
}
property
QtObject
header
:
QtObject
{
...
...
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