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
1f2fb48e
Commit
1f2fb48e
authored
Jan 20, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): calls in progress (unstable, crash)
parent
90c35eb2
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
170 additions
and
129 deletions
+170
-129
en.ts
tests/assets/languages/en.ts
+0
-22
fr.ts
tests/assets/languages/fr.ts
+4
-4
resources.qrc
tests/resources.qrc
+2
-1
App.cpp
tests/src/app/App.cpp
+1
-1
CallModel.cpp
tests/src/components/call/CallModel.cpp
+7
-3
CallModel.hpp
tests/src/components/call/CallModel.hpp
+4
-3
Calls.qml
tests/ui/modules/Linphone/Calls/Calls.qml
+10
-12
AbstractStartingCall.qml
tests/ui/views/App/Calls/AbstractStartingCall.qml
+22
-39
CallsWindow.qml
tests/ui/views/App/Calls/CallsWindow.qml
+81
-20
Incall.qml
tests/ui/views/App/Calls/Incall.qml
+3
-2
IncomingCall.qml
tests/ui/views/App/Calls/IncomingCall.qml
+2
-4
OutgoingCall.qml
tests/ui/views/App/Calls/OutgoingCall.qml
+10
-12
CallsWindowStyle.qml
tests/ui/views/App/Styles/Calls/CallsWindowStyle.qml
+22
-0
StartingCallStyle.qml
tests/ui/views/App/Styles/Calls/StartingCallStyle.qml
+0
-5
qmldir
tests/ui/views/App/Styles/qmldir
+2
-1
No files found.
tests/assets/languages/en.ts
View file @
1f2fb48e
...
...
@@ -357,17 +357,6 @@ Server url not configured.</translation>
<
translation
>
Display
tooltips
to
discover
Linphone
Desktop
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
IncomingCall
<
/name
>
<
message
>
<
source
>
incomingVideoCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
incomingAudioCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
MainWindow
<
/name
>
<
message
>
...
...
@@ -453,17 +442,6 @@ Server url not configured.</translation>
<
translation
type
=
"
vanished
"
>
CANCEL
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
OutgoingCall
<
/name
>
<
message
>
<
source
>
outgoingVideoCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
message
>
<
source
>
outgoingAudioCall
<
/source
>
<
translation
type
=
"
unfinished
"
><
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
PresenceString
<
/name
>
<
message
>
...
...
tests/assets/languages/fr.ts
View file @
1f2fb48e
...
...
@@ -349,11 +349,11 @@ Url du serveur non configurée.</translation>
<
name
>
IncomingCall
<
/name
>
<
message
>
<
source
>
incomingVideoCall
<
/source
>
<
translation
>
APPEL
VIDEO
ENTRANT
<
/translation
>
<
translation
type
=
"
vanished
"
>
APPEL
VIDEO
ENTRANT
<
/translation
>
<
/message
>
<
message
>
<
source
>
incomingAudioCall
<
/source
>
<
translation
>
APPEL
AUDIO
ENTRANT
<
/translation
>
<
translation
type
=
"
vanished
"
>
APPEL
AUDIO
ENTRANT
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
@@ -445,11 +445,11 @@ Url du serveur non configurée.</translation>
<
name
>
OutgoingCall
<
/name
>
<
message
>
<
source
>
outgoingVideoCall
<
/source
>
<
translation
>
APPEL
VIDEO
SORTANT
<
/translation
>
<
translation
type
=
"
vanished
"
>
APPEL
VIDEO
SORTANT
<
/translation
>
<
/message
>
<
message
>
<
source
>
outgoingAudioCall
<
/source
>
<
translation
>
APPEL
AUDIO
SORTANT
<
/translation
>
<
translation
type
=
"
vanished
"
>
APPEL
AUDIO
SORTANT
<
/translation
>
<
/message
>
<
/context
>
<
context
>
...
...
tests/resources.qrc
View file @
1f2fb48e
...
...
@@ -250,7 +250,7 @@
<file>
ui/scripts/Utils/uri-tools.js
</file>
<file>
ui/scripts/Utils/utils.js
</file>
<file>
ui/views/App/Calls/AbstractStartingCall.qml
</file>
<file>
ui/views/App/Calls/Calls.qml
</file>
<file>
ui/views/App/Calls/Calls
Window
.qml
</file>
<file>
ui/views/App/Calls/Incall.qml
</file>
<file>
ui/views/App/Calls/IncomingCall.qml
</file>
<file>
ui/views/App/Calls/OutgoingCall.qml
</file>
...
...
@@ -261,6 +261,7 @@
<file>
ui/views/App/MainWindow/MainWindow.qml
</file>
<file>
ui/views/App/ManageAccounts.qml
</file>
<file>
ui/views/App/qmldir
</file>
<file>
ui/views/App/Styles/Calls/CallsWindowStyle.qml
</file>
<file>
ui/views/App/Styles/Calls/StartingCallStyle.qml
</file>
<file>
ui/views/App/Styles/MainWindow/ContactEditStyle.qml
</file>
<file>
ui/views/App/Styles/MainWindow/ContactsStyle.qml
</file>
...
...
tests/src/app/App.cpp
View file @
1f2fb48e
...
...
@@ -21,7 +21,7 @@
// The two main windows of Linphone desktop.
#define QML_VIEW_MAIN_WINDOW "qrc:/ui/views/App/MainWindow/MainWindow.qml"
#define QML_VIEW_CALL_WINDOW "qrc:/ui/views/App/Calls/Calls.qml"
#define QML_VIEW_CALL_WINDOW "qrc:/ui/views/App/Calls/Calls
Window
.qml"
// =============================================================================
...
...
tests/src/components/call/CallModel.cpp
View file @
1f2fb48e
...
...
@@ -41,15 +41,19 @@ CallModel::CallModel (shared_ptr<linphone::Call> linphone_call) {
// -----------------------------------------------------------------------------
void
CallModel
::
accept
AudioCall
()
{
void
CallModel
::
accept
()
{
CoreManager
::
getInstance
()
->
getCore
()
->
acceptCall
(
m_linphone_call
);
}
void
CallModel
::
terminateCall
()
{
void
CallModel
::
acceptWithVideo
()
{
// TODO
}
void
CallModel
::
terminate
()
{
CoreManager
::
getInstance
()
->
getCore
()
->
terminateCall
(
m_linphone_call
);
}
void
CallModel
::
transfer
Call
()
{
void
CallModel
::
transfer
()
{
// TODO
}
...
...
tests/src/components/call/CallModel.hpp
View file @
1f2fb48e
...
...
@@ -30,9 +30,10 @@ public:
CallModel
(
std
::
shared_ptr
<
linphone
::
Call
>
linphone_call
);
~
CallModel
()
=
default
;
Q_INVOKABLE
void
acceptAudioCall
();
Q_INVOKABLE
void
terminateCall
();
Q_INVOKABLE
void
transferCall
();
Q_INVOKABLE
void
accept
();
Q_INVOKABLE
void
acceptWithVideo
();
Q_INVOKABLE
void
terminate
();
Q_INVOKABLE
void
transfer
();
signals:
void
statusChanged
(
CallStatus
status
);
...
...
tests/ui/modules/Linphone/Calls/Calls.qml
View file @
1f2fb48e
...
...
@@ -11,11 +11,9 @@ ListView {
// ---------------------------------------------------------------------------
property
var
_mapStatusToParams
// ---------------------------------------------------------------------------
readonly
property
var
selectedCall
:
currentIndex
>=
0
?
model
.
data
(
model
.
index
(
currentIndex
,
0
))
:
null
signal
entrySelected
(
var
entry
)
property
var
_mapStatusToParams
// ---------------------------------------------------------------------------
...
...
@@ -50,10 +48,10 @@ ListView {
handler
:
(
function
(
call
)
{
call
.
pausedByUser
=
false
})
},
{
name
:
qsTr
(
'
transferCall
'
),
handler
:
(
function
(
call
)
{
call
.
transfer
Call
()
})
handler
:
(
function
(
call
)
{
call
.
transfer
()
})
},
{
name
:
qsTr
(
'
terminateCall
'
),
handler
:
(
function
(
call
)
{
call
.
terminate
Call
()
})
handler
:
(
function
(
call
)
{
call
.
terminate
()
})
}],
component
:
callActions
,
string
:
'
connected
'
...
...
@@ -66,13 +64,13 @@ ListView {
_mapStatusToParams
[
CallModel
.
CallStatusIncoming
]
=
{
actions
:
[{
name
:
qsTr
(
'
acceptAudioCall
'
),
handler
:
(
function
(
call
)
{
call
.
accept
AudioCall
()
})
handler
:
(
function
(
call
)
{
call
.
accept
()
})
},
{
name
:
qsTr
(
'
acceptVideoCall
'
),
handler
:
(
function
(
call
)
{
call
.
accept
VideoCall
()
})
handler
:
(
function
(
call
)
{
call
.
accept
WithVideo
()
})
},
{
name
:
qsTr
(
'
terminateCall
'
),
handler
:
(
function
(
call
)
{
call
.
terminate
Call
()
})
handler
:
(
function
(
call
)
{
call
.
terminate
()
})
}],
component
:
callActions
,
string
:
'
incoming
'
...
...
@@ -80,7 +78,7 @@ ListView {
_mapStatusToParams
[
CallModel
.
CallStatusOutgoing
]
=
{
component
:
callAction
,
handler
:
(
function
(
call
)
{
call
.
terminate
Call
()
}),
handler
:
(
function
(
call
)
{
call
.
terminate
()
}),
icon
:
'
hangup
'
,
string
:
'
outgoing
'
}
...
...
@@ -91,10 +89,10 @@ ListView {
handler
:
(
function
(
call
)
{
call
.
pausedByUser
=
true
})
},
{
name
:
qsTr
(
'
transferCall
'
),
handler
:
(
function
(
call
)
{
call
.
transfer
Call
()
})
handler
:
(
function
(
call
)
{
call
.
transfer
()
})
},
{
name
:
qsTr
(
'
terminateCall
'
),
handler
:
(
function
(
call
)
{
call
.
terminate
Call
()
})
handler
:
(
function
(
call
)
{
call
.
terminate
()
})
}],
component
:
callActions
,
string
:
'
paused
'
...
...
tests/ui/views/App/Calls/AbstractStartingCall.qml
View file @
1f2fb48e
...
...
@@ -7,22 +7,19 @@ import LinphoneUtils 1.0
import
App
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
Rectangle
{
id
:
abstractCall
default
property
alias
_actionArea
:
actionArea
.
data
property
alias
callTypeLabel
:
callType
.
text
property
bool
isOutgoing
:
false
property
bool
isVideoCall
:
false
property
string
sipAddress
// ---------------------------------------------------------------------------
property
var
call
property
var
_contact
:
SipAddressesModel
.
mapSipAddressToContact
(
sipAddress
)
||
sipAddress
default
property
alias
_actionArea
:
actionArea
.
data
property
var
_contact
:
SipAddressesModel
.
mapSipAddressToContact
(
call
.
sipAddress
)
// -----------------------------------------------------------------
// -----------------------------------------------------------------
----------
color
:
StartingCallStyle
.
backgroundColor
...
...
@@ -34,47 +31,33 @@ Rectangle {
spacing
:
0
// ---------------------------------------------------------------
// C
all type
.
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
// C
ontact & Call type (animation)
.
// ---------------------------------------------------------------
----------
Column
{
Layout.fillWidth
:
true
spacing
:
StartingCallStyle
.
header
.
spacing
Text
{
id
:
callType
color
:
StartingCallStyle
.
callType
.
color
font
{
bold
:
true
pointSize
:
StartingCallStyle
.
callType
.
fontSize
}
horizontalAlignment
:
Text
.
AlignHCenter
width
:
parent
.
width
}
CaterpillarAnimation
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
abstractCall
.
isOutgoing
}
ContactDescription
{
id
:
contactDescription
height
:
StartingCallStyle
.
contactDescriptionHeight
horizontalTextAlignment
:
Text
.
AlignHCenter
sipAddress
:
abstractC
all
.
sipAddress
username
:
LinphoneUtils
.
getContactUsername
(
_contact
)
sipAddress
:
c
all
.
sipAddress
username
:
LinphoneUtils
.
getContactUsername
(
_contact
||
call
.
sipAddress
)
width
:
parent
.
width
}
CaterpillarAnimation
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
call
.
isOutgoing
}
}
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
// Contact visual.
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
Item
{
id
:
container
...
...
@@ -98,7 +81,7 @@ Rectangle {
anchors.centerIn
:
parent
backgroundColor
:
StartingCallStyle
.
avatar
.
backgroundColor
image
:
_contact
.
avatar
image
:
_contact
&&
_contact
.
avatar
username
:
contactDescription
.
username
height
:
_computeAvatarSize
()
...
...
@@ -106,9 +89,9 @@ Rectangle {
}
}
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
// Buttons.
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
Item
{
id
:
actionArea
...
...
tests/ui/views/App/Calls/Calls.qml
→
tests/ui/views/App/Calls/Calls
Window
.qml
View file @
1f2fb48e
import
QtGraphicalEffects
1.0
import
QtQuick
2.7
import
QtQuick
.
Controls
2.0
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Window
2.2
...
...
@@ -16,6 +15,18 @@ Window {
// ---------------------------------------------------------------------------
readonly
property
var
call
:
{
console
.
log
(
'
hihi
'
)
return
calls
.
selectedCall
}
readonly
property
var
sipAddress
:
{
if
(
call
)
{
return
call
.
sipAddress
}
}
// ---------------------------------------------------------------------------
function
launchAudioCall
(
sipAddress
)
{
window
.
show
()
...
...
@@ -28,8 +39,9 @@ Window {
// ---------------------------------------------------------------------------
minimumHeight
:
480
minimumWidth
:
960
minimumHeight
:
CallsWindowStyle
.
minimumHeight
minimumWidth
:
CallsWindowStyle
.
minimumWidth
title
:
CallsWindowStyle
.
title
Paned
{
anchors.fill
:
parent
...
...
@@ -37,13 +49,13 @@ Window {
maximumLeftLimit
:
250
minimumLeftLimit
:
110
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
// Calls list.
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
childA
:
Rectangle
{
anchors.fill
:
parent
color
:
'
#FFFFFF
'
color
:
CallsWindowStyle
.
callsList
.
color
ColumnLayout
{
anchors.fill
:
parent
...
...
@@ -51,7 +63,7 @@ Window {
Item
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
60
Layout.preferredHeight
:
CallsWindowStyle
.
callsList
.
header
.
height
LinearGradient
{
anchors.fill
:
parent
...
...
@@ -60,8 +72,8 @@ Window {
end
:
Qt
.
point
(
0
,
height
)
gradient
:
Gradient
{
GradientStop
{
position
:
0.0
;
color
:
'
#FFFFFF
'
}
GradientStop
{
position
:
1.0
;
color
:
'
#E3E3E3
'
}
GradientStop
{
position
:
0.0
;
color
:
CallsWindowStyle
.
callsList
.
header
.
color1
}
GradientStop
{
position
:
1.0
;
color
:
CallsWindowStyle
.
callsList
.
header
.
color2
}
}
}
...
...
@@ -85,6 +97,8 @@ Window {
}
Calls
{
id
:
calls
Layout.fillHeight
:
true
Layout.fillWidth
:
true
...
...
@@ -93,9 +107,9 @@ Window {
}
}
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
// Content.
// ---------------------------------------------------------------
// ---------------------------------------------------------------
----------
childB
:
Paned
{
anchors.fill
:
parent
...
...
@@ -105,20 +119,67 @@ Window {
minimumRightLimit
:
300
resizeAInPriority
:
true
// Call.
childA
:
Incall
{
// -----------------------------------------------------------------------
Component
{
id
:
incomingCall
IncomingCall
{
anchors.fill
:
parent
call
:
window
.
call
}
}
Component
{
id
:
outgoingCall
OutgoingCall
{
anchors.fill
:
parent
call
:
window
.
call
}
}
Component
{
id
:
incall
Incall
{
anchors.fill
:
parent
call
:
window
.
call
}
}
// -----------------------------------------------------------------------
childA
:
Loader
{
active
:
Boolean
(
window
.
call
)
anchors.fill
:
parent
sipAddress
:
'
sip:erwan.croze@sip.linphone.org
'
isVideoCall
:
true
sourceComponent
:
{
var
call
=
window
.
call
if
(
!
call
)
{
return
null
}
return
incomingCall
var
status
=
call
.
status
if
(
status
===
CallModel
.
CallStatusIncoming
)
{
return
incomingCall
}
if
(
status
===
CallModel
.
CallStatusOutgoing
)
{
return
outgoingCall
}
return
incall
}
}
// Chat.
childB
:
Chat
{
childB
:
Loader
{
active
:
Boolean
(
window
.
call
)
anchors.fill
:
parent
proxyModel
:
ChatProxyModel
{
id
:
chatProxyModel
sipAddress
:
'
sip:erwan.croze@sip.linphone.org
'
sourceComponent
:
Chat
{
anchors.fill
:
parent
proxyModel
:
ChatProxyModel
{
sipAddress
:
window
.
sipAddress
||
''
}
}
}
}
...
...
tests/ui/views/App/Calls/Incall.qml
View file @
1f2fb48e
...
...
@@ -13,8 +13,9 @@ import App.Styles 1.0
Rectangle
{
id
:
call
property
bool
isVideoCall
:
false
property
string
sipAddress
// ---------------------------------------------------------------------------
property
var
call
property
var
_contactObserver
:
SipAddressesModel
.
getContactObserver
(
sipAddress
)
...
...
tests/ui/views/App/Calls/IncomingCall.qml
View file @
1f2fb48e
...
...
@@ -5,10 +5,6 @@ import App.Styles 1.0
// ===================================================================
AbstractStartingCall
{
callTypeLabel
:
isVideoCall
?
qsTr
(
'
incomingVideoCall
'
)
:
qsTr
(
'
incomingAudioCall
'
)
ActionBar
{
anchors.centerIn
:
parent
iconSize
:
StartingCallStyle
.
iconSize
...
...
@@ -32,6 +28,8 @@ AbstractStartingCall {
ActionButton
{
icon
:
'
hangup
'
onClicked
:
call
.
terminate
()
}
}
}
tests/ui/views/App/Calls/OutgoingCall.qml
View file @
1f2fb48e
...
...
@@ -6,17 +6,12 @@ import Common.Styles 1.0
import
App
.
Styles
1.0
// ===================================================================
// ===================================================================
==========
AbstractStartingCall
{
isOutgoing
:
true
callTypeLabel
:
isVideoCall
?
qsTr
(
'
outgoingVideoCall
'
)
:
qsTr
(
'
outgoingAudioCall
'
)
GridLayout
{
rowSpacing
:
ActionBarStyle
.
spacing
columns
:
parent
.
width
<
415
&&
isVideoCall
?
1
:
2
columns
:
parent
.
width
<
415
&&
call
.
isVideoCall
?
1
:
2
anchors
{
left
:
parent
.
left
...
...
@@ -25,10 +20,11 @@ AbstractStartingCall {
}
ActionSwitch
{
enabled
:
!
call
.
microMuted
icon
:
'
micro
'
iconSize
:
StartingCallStyle
.
iconSize
onClicked
:
enabl
ed
=
!
enabled
onClicked
:
call
.
microMut
ed
=
!
enabled
}
ActionSwitch
{
...
...
@@ -39,24 +35,26 @@ AbstractStartingCall {
}
}
Rectangle
{
Item
{
anchors.centerIn
:
parent
color
:
'
red
'
height
:
StartingCallStyle
.
userVideo
.
height
visible
:
isVideoCall
width
:
StartingCallStyle
.
userVideo
.
width
visible
:
isVideoCall
}
ActionBar
{
anchors
{
verticalCenter
:
parent
.
verticalCenter
right
:
parent
.
right
rightMargin
:
StartingCallStyle
.
rightButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
StartingCallStyle
.
iconSize
ActionButton
{
icon
:
'
hangup
'
onClicked
:
call
.
terminate
()
}
}
}
tests/ui/views/App/Styles/Calls/CallsWindowStyle.qml
0 → 100644
View file @
1f2fb48e
pragma
Singleton
import
QtQuick
2.7
import
Common
1.0
// =============================================================================
QtObject
{
property
int
minimumHeight
:
480
property
int
minimumWidth
:
960
property
string
title
:
'
Linphone
'
property
QtObject
callsList
:
QtObject
{
property
color
color
:
Colors
.
k
property
QtObject
header
:
QtObject
{
property
int
height
:
60
property
color
color1
:
Colors
.
k
property
color
color2
:
Colors
.
v
}
}
}
tests/ui/views/App/Styles/Calls/StartingCallStyle.qml
View file @
1f2fb48e
...
...
@@ -19,11 +19,6 @@ QtObject {
property
int
maxSize
:
300
}
property
QtObject
callType
:
QtObject
{
property
color
color
:
Colors
.
x
property
int
fontSize
:
17
}
property
QtObject
header
:
QtObject
{
property
int
spacing
:
10
property
int
topMargin
:
26
...
...
tests/ui/views/App/Styles/qmldir
View file @
1f2fb48e
...
...
@@ -2,8 +2,9 @@
module App.Styles
# Views styles -------------------------------------------------------
# Views styles -------------------------------------------------------
----------
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton StartingCallStyle 1.0 Calls/StartingCallStyle.qml
singleton ContactEditStyle 1.0 MainWindow/ContactEditStyle.qml
...
...
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