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
7096eb69
Commit
7096eb69
authored
Jan 23, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): calls in progress
parent
2e8929f6
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
105 additions
and
84 deletions
+105
-84
resources.qrc
tests/resources.qrc
+1
-1
CallModel.cpp
tests/src/components/call/CallModel.cpp
+11
-6
CallModel.hpp
tests/src/components/call/CallModel.hpp
+6
-2
CallControls.qml
tests/ui/modules/Linphone/Calls/CallControls.qml
+3
-1
Calls.qml
tests/ui/modules/Linphone/Calls/Calls.qml
+1
-3
CallsStyle.qml
tests/ui/modules/Linphone/Styles/Calls/CallsStyle.qml
+1
-1
AbstractStartingCall.qml
tests/ui/views/App/Calls/AbstractStartingCall.qml
+12
-17
CallsWindow.qml
tests/ui/views/App/Calls/CallsWindow.qml
+11
-9
Incall.qml
tests/ui/views/App/Calls/Incall.qml
+26
-24
IncomingCall.qml
tests/ui/views/App/Calls/IncomingCall.qml
+3
-3
OutgoingCall.qml
tests/ui/views/App/Calls/OutgoingCall.qml
+8
-8
CallStyle.qml
tests/ui/views/App/Styles/Calls/CallStyle.qml
+0
-0
CallsWindowStyle.qml
tests/ui/views/App/Styles/Calls/CallsWindowStyle.qml
+21
-8
qmldir
tests/ui/views/App/Styles/qmldir
+1
-1
No files found.
tests/resources.qrc
View file @
7096eb69
...
...
@@ -260,8 +260,8 @@
<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/CallStyle.qml
</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>
<file>
ui/views/App/Styles/MainWindow/ConversationStyle.qml
</file>
...
...
tests/src/components/call/CallModel.cpp
View file @
7096eb69
...
...
@@ -110,18 +110,23 @@ void CallModel::setPausedByUser (bool status) {
bool
paused
=
getPausedByUser
();
if
(
status
)
{
if
(
!
paused
)
{
if
(
!
paused
)
CoreManager
::
getInstance
()
->
getCore
()
->
pauseCall
(
m_linphone_call
);
emit
pausedByUserChanged
(
true
);
}
return
;
}
if
(
paused
)
{
if
(
paused
)
CoreManager
::
getInstance
()
->
getCore
()
->
resumeCall
(
m_linphone_call
);
emit
pausedByUserChanged
(
false
);
}
}
bool
CallModel
::
getVideoInputEnabled
()
const
{
// TODO
return
false
;
}
void
CallModel
::
setVideoInputEnabled
(
bool
status
)
{
// TODO
}
bool
CallModel
::
getVideoOutputEnabled
()
const
{
...
...
tests/src/components/call/CallModel.hpp
View file @
7096eb69
...
...
@@ -13,7 +13,8 @@ class CallModel : public QObject {
Q_PROPERTY
(
CallStatus
status
READ
getStatus
NOTIFY
statusChanged
);
Q_PROPERTY
(
bool
isOutgoing
READ
isOutgoing
CONSTANT
);
Q_PROPERTY
(
bool
microMuted
READ
getMicroMuted
WRITE
setMicroMuted
NOTIFY
microMutedChanged
);
Q_PROPERTY
(
bool
pausedByUser
READ
getPausedByUser
WRITE
setPausedByUser
NOTIFY
pausedByUserChanged
);
Q_PROPERTY
(
bool
pausedByUser
READ
getPausedByUser
WRITE
setPausedByUser
NOTIFY
statusChanged
);
Q_PROPERTY
(
bool
videoInputEnabled
READ
getVideoInputEnabled
WRITE
setVideoInputEnabled
NOTIFY
videoInputEnabled
);
Q_PROPERTY
(
bool
videoOutputEnabled
READ
getVideoOutputEnabled
WRITE
setVideoOutputEnabled
NOTIFY
videoOutputEnabled
);
public:
...
...
@@ -38,8 +39,8 @@ public:
signals:
void
statusChanged
(
CallStatus
status
);
void
pausedByUserChanged
(
bool
status
);
void
microMutedChanged
(
bool
status
);
void
videoInputEnabled
(
bool
status
);
void
videoOutputEnabled
(
bool
status
);
private:
...
...
@@ -56,6 +57,9 @@ private:
bool
getPausedByUser
()
const
;
void
setPausedByUser
(
bool
status
);
bool
getVideoInputEnabled
()
const
;
void
setVideoInputEnabled
(
bool
status
);
bool
getVideoOutputEnabled
()
const
;
void
setVideoOutputEnabled
(
bool
status
);
...
...
tests/ui/modules/Linphone/Calls/CallControls.qml
View file @
7096eb69
...
...
@@ -43,7 +43,6 @@ Rectangle {
Layout.fillHeight
:
true
Layout.fillWidth
:
true
anchors.fill
:
parent
displayUnreadMessagesCount
:
true
...
...
@@ -55,7 +54,10 @@ Rectangle {
Item
{
id
:
content
Layout.fillHeight
:
true
Component.onCompleted
:
Layout
.
preferredWidth
=
data
[
0
].
width
}
}
...
...
tests/ui/modules/Linphone/Calls/Calls.qml
View file @
7096eb69
...
...
@@ -112,8 +112,6 @@ ListView {
}
}
// ---------------------------------------------------------------------------
Component
{
id
:
callActions
...
...
@@ -187,7 +185,7 @@ ListView {
id
:
_callControls
function
useColorStatus
()
{
return
calls
.
currentIndex
===
index
&&
$call
.
status
!==
CallModel
.
CallStatusEnded
return
calls
.
currentIndex
===
index
&&
$call
&&
$call
.
status
!==
CallModel
.
CallStatusEnded
}
color
:
useColorStatus
()
...
...
tests/ui/modules/Linphone/Styles/Calls/CallsStyle.qml
View file @
7096eb69
...
...
@@ -7,7 +7,7 @@ import Common 1.0
QtObject
{
property
QtObject
entry
:
QtObject
{
property
int
iconActionSize
:
3
0
property
int
iconActionSize
:
3
5
property
int
iconMenuSize
:
17
property
int
height
:
30
property
int
width
:
200
...
...
tests/ui/views/App/Calls/AbstractStartingCall.qml
View file @
7096eb69
...
...
@@ -10,24 +10,19 @@ import App.Styles 1.0
// =============================================================================
Rectangle
{
id
:
abstractCall
// ---------------------------------------------------------------------------
property
var
call
default
property
alias
_actionArea
:
actionArea
.
data
property
var
_contactObserver
:
SipAddressesModel
.
getContactObserver
(
sipAddress
)
// ---------------------------------------------------------------------------
color
:
Starting
CallStyle
.
backgroundColor
color
:
CallStyle
.
backgroundColor
ColumnLayout
{
anchors
{
fill
:
parent
topMargin
:
Starting
CallStyle
.
header
.
topMargin
topMargin
:
CallStyle
.
header
.
topMargin
}
spacing
:
0
...
...
@@ -38,12 +33,12 @@ Rectangle {
Column
{
Layout.fillWidth
:
true
spacing
:
Starting
CallStyle
.
header
.
spacing
spacing
:
CallStyle
.
header
.
spacing
ContactDescription
{
id
:
contactDescription
height
:
Starting
CallStyle
.
contactDescriptionHeight
height
:
CallStyle
.
contactDescriptionHeight
horizontalTextAlignment
:
Text
.
AlignHCenter
sipAddress
:
call
.
sipAddress
username
:
LinphoneUtils
.
getContactUsername
(
_contactObserver
.
contact
||
call
.
sipAddress
)
...
...
@@ -52,9 +47,9 @@ Rectangle {
BusyIndicator
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
color
:
Starting
CallStyle
.
busyIndicator
.
color
height
:
Starting
CallStyle
.
busyIndicator
.
height
width
:
Starting
CallStyle
.
busyIndicator
.
width
color
:
CallStyle
.
busyIndicator
.
color
height
:
CallStyle
.
busyIndicator
.
height
width
:
CallStyle
.
busyIndicator
.
width
visible
:
call
.
isOutgoing
}
...
...
@@ -69,7 +64,7 @@ Rectangle {
Layout.fillHeight
:
true
Layout.fillWidth
:
true
Layout.margins
:
Starting
CallStyle
.
containerMargins
Layout.margins
:
CallStyle
.
containerMargins
Avatar
{
id
:
avatar
...
...
@@ -78,14 +73,14 @@ Rectangle {
var
height
=
container
.
height
var
width
=
container
.
width
var
size
=
height
<
Starting
CallStyle
.
avatar
.
maxSize
&&
height
>
0
var
size
=
height
<
CallStyle
.
avatar
.
maxSize
&&
height
>
0
?
height
:
Starting
CallStyle
.
avatar
.
maxSize
:
CallStyle
.
avatar
.
maxSize
return
size
<
width
?
size
:
width
}
anchors.centerIn
:
parent
backgroundColor
:
Starting
CallStyle
.
avatar
.
backgroundColor
backgroundColor
:
CallStyle
.
avatar
.
backgroundColor
image
:
_contactObserver
.
contact
&&
_contactObserver
.
contact
.
avatar
username
:
contactDescription
.
username
...
...
@@ -102,7 +97,7 @@ Rectangle {
id
:
actionArea
Layout.fillWidth
:
true
Layout.preferredHeight
:
Starting
CallStyle
.
actionAreaHeight
Layout.preferredHeight
:
CallStyle
.
actionAreaHeight
}
}
}
tests/ui/views/App/Calls/CallsWindow.qml
View file @
7096eb69
...
...
@@ -41,9 +41,9 @@ Window {
Paned
{
anchors.fill
:
parent
defaultChildAWidth
:
250
maximumLeftLimit
:
250
minimumLeftLimit
:
110
defaultChildAWidth
:
CallsWindowStyle
.
callsList
.
defaultWidth
maximumLeftLimit
:
CallsWindowStyle
.
callsList
.
maximumWidth
minimumLeftLimit
:
CallsWindowStyle
.
callsList
.
minimumWidth
// -------------------------------------------------------------------------
// Calls list.
...
...
@@ -76,18 +76,20 @@ Window {
ActionBar
{
anchors
{
left
:
parent
.
left
leftMargin
:
10
leftMargin
:
CallsWindowStyle
.
callsList
.
header
.
leftMargin
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
40
iconSize
:
CallsWindowStyle
.
callsList
.
header
.
iconSize
ActionButton
{
icon
:
'
new_call
'
// TODO: launch new call
}
ActionButton
{
icon
:
'
new_conference
'
// TODO: launch new conference
}
}
}
...
...
@@ -113,8 +115,8 @@ Window {
anchors.fill
:
parent
closingEdge
:
Qt
.
RightEdge
defaultClosed
:
true
minimumLeftLimit
:
395
minimumRightLimit
:
300
minimumLeftLimit
:
CallsWindowStyle
.
call
.
minimumWidth
minimumRightLimit
:
CallsWindowStyle
.
chat
.
minimumWidth
resizeAInPriority
:
true
// -----------------------------------------------------------------------
...
...
@@ -178,9 +180,9 @@ Window {
}
childB
:
Loader
{
active
:
Boolean
(
window
.
call
)
active
:
Boolean
(
window
.
sipAddress
)
anchors.fill
:
parent
sourceComponent
:
window
.
call
?
chat
:
null
sourceComponent
:
window
.
sipAddress
?
chat
:
null
}
}
}
...
...
tests/ui/views/App/Calls/Incall.qml
View file @
7096eb69
...
...
@@ -21,12 +21,12 @@ Rectangle {
// ---------------------------------------------------------------------------
color
:
Starting
CallStyle
.
backgroundColor
color
:
CallStyle
.
backgroundColor
ColumnLayout
{
anchors
{
fill
:
parent
topMargin
:
Starting
CallStyle
.
header
.
topMargin
topMargin
:
CallStyle
.
header
.
topMargin
}
spacing
:
0
...
...
@@ -39,9 +39,9 @@ Rectangle {
id
:
info
Layout.fillWidth
:
true
Layout.leftMargin
:
20
Layout.leftMargin
:
CallStyle
.
info
.
leftMargin
Layout.rightMargin
:
20
Layout.preferredHeight
:
Starting
CallStyle
.
contactDescriptionHeight
Layout.preferredHeight
:
CallStyle
.
contactDescriptionHeight
Icon
{
id
:
callQuality
...
...
@@ -92,7 +92,7 @@ Rectangle {
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.margins
:
Starting
CallStyle
.
containerMargins
Layout.margins
:
CallStyle
.
containerMargins
Component
{
id
:
avatar
...
...
@@ -102,13 +102,13 @@ Rectangle {
var
height
=
container
.
height
var
width
=
container
.
width
var
size
=
height
<
Starting
CallStyle
.
avatar
.
maxSize
&&
height
>
0
var
size
=
height
<
CallStyle
.
avatar
.
maxSize
&&
height
>
0
?
height
:
Starting
CallStyle
.
avatar
.
maxSize
:
CallStyle
.
avatar
.
maxSize
return
size
<
width
?
size
:
width
}
backgroundColor
:
Starting
CallStyle
.
avatar
.
backgroundColor
backgroundColor
:
CallStyle
.
avatar
.
backgroundColor
image
:
_contactObserver
.
contact
?
_contactObserver
.
contact
.
vcard
.
avatar
:
''
username
:
contactDescription
.
username
...
...
@@ -128,7 +128,7 @@ Rectangle {
Loader
{
anchors.centerIn
:
parent
sourceComponent
:
isVideoCall
?
camera
:
avatar
sourceComponent
:
call
.
videoInputEnabled
?
camera
:
avatar
}
}
...
...
@@ -138,12 +138,12 @@ Rectangle {
Item
{
Layout.fillWidth
:
true
Layout.preferredHeight
:
Starting
CallStyle
.
actionAreaHeight
Layout.preferredHeight
:
CallStyle
.
actionAreaHeight
GridLayout
{
anchors
{
left
:
parent
.
left
leftMargin
:
Starting
CallStyle
.
leftButtonsGroupMargin
leftMargin
:
CallStyle
.
leftButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
...
...
@@ -152,55 +152,57 @@ Rectangle {
ActionSwitch
{
icon
:
'
micro
'
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
onClicked
:
enabled
=
!
enabled
}
ActionSwitch
{
icon
:
'
speaker
'
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
onClicked
:
enabled
=
!
enabled
}
ActionSwitch
{
icon
:
'
camera
'
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
onClicked
:
enabled
=
!
enabled
}
ActionButton
{
Layout.preferredHeight
:
Starting
CallStyle
.
iconSize
Layout.preferredWidth
:
Starting
CallStyle
.
iconSize
Layout.preferredHeight
:
CallStyle
.
iconSize
Layout.preferredWidth
:
CallStyle
.
iconSize
icon
:
'
options
'
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
}
}
Rectangle
{
anchors.centerIn
:
parent
color
:
'
red
'
height
:
Starting
CallStyle
.
userVideo
.
height
visible
:
call
.
width
>=
5
50
width
:
Starting
CallStyle
.
userVideo
.
width
height
:
CallStyle
.
userVideo
.
height
visible
:
incall
.
width
>=
6
50
width
:
CallStyle
.
userVideo
.
width
}
ActionBar
{
anchors
{
right
:
parent
.
right
rightMargin
:
Starting
CallStyle
.
rightButtonsGroupMargin
rightMargin
:
CallStyle
.
rightButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
ActionSwitch
{
enabled
:
!
call
.
pausedByUser
icon
:
'
pause
'
onClicked
:
enabled
=
!
enabled
onClicked
:
call
.
pausedByUser
=
enabled
}
ActionButton
{
icon
:
'
hangup
'
onClicked
:
C
all
.
terminate
()
onClicked
:
c
all
.
terminate
()
}
ActionSwitch
{
...
...
tests/ui/views/App/Calls/IncomingCall.qml
View file @
7096eb69
...
...
@@ -7,7 +7,7 @@ import App.Styles 1.0
AbstractStartingCall
{
ActionBar
{
anchors.centerIn
:
parent
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
ActionButton
{
icon
:
'
video_call_accept
'
...
...
@@ -25,10 +25,10 @@ AbstractStartingCall {
ActionBar
{
anchors
{
right
:
parent
.
right
rightMargin
:
Starting
CallStyle
.
rightButtonsGroupMargin
rightMargin
:
CallStyle
.
rightButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
ActionButton
{
icon
:
'
hangup
'
...
...
tests/ui/views/App/Calls/OutgoingCall.qml
View file @
7096eb69
...
...
@@ -10,26 +10,26 @@ import App.Styles 1.0
AbstractStartingCall
{
GridLayout
{
columns
:
parent
.
width
<
StartingCallStyle
.
low
&&
call
.
videoOutputEnabled
?
1
:
2
columns
:
parent
.
width
<
CallStyle
.
lowWidth
&&
call
.
videoOutputEnabled
?
1
:
2
rowSpacing
:
ActionBarStyle
.
spacing
anchors
{
left
:
parent
.
left
leftMargin
:
Starting
CallStyle
.
leftButtonsGroupMargin
leftMargin
:
CallStyle
.
leftButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
ActionSwitch
{
enabled
:
!
call
.
microMuted
icon
:
'
micro
'
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
onClicked
:
call
.
microMuted
=
enabled
}
ActionSwitch
{
icon
:
'
speaker
'
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
onClicked
:
enabled
=
!
enabled
}
...
...
@@ -37,8 +37,8 @@ AbstractStartingCall {
Item
{
anchors.centerIn
:
parent
height
:
Starting
CallStyle
.
userVideo
.
height
width
:
Starting
CallStyle
.
userVideo
.
width
height
:
CallStyle
.
userVideo
.
height
width
:
CallStyle
.
userVideo
.
width
visible
:
call
.
videoOutputEnabled
}
...
...
@@ -46,10 +46,10 @@ AbstractStartingCall {
ActionBar
{
anchors
{
right
:
parent
.
right
rightMargin
:
Starting
CallStyle
.
rightButtonsGroupMargin
rightMargin
:
CallStyle
.
rightButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
Starting
CallStyle
.
iconSize
iconSize
:
CallStyle
.
iconSize
ActionButton
{
icon
:
'
hangup
'
...
...
tests/ui/views/App/Styles/Calls/
Starting
CallStyle.qml
→
tests/ui/views/App/Styles/Calls/CallStyle.qml
View file @
7096eb69
File moved
tests/ui/views/App/Styles/Calls/CallsWindowStyle.qml
View file @
7096eb69
...
...
@@ -10,13 +10,26 @@ QtObject {
property
int
minimumWidth
:
960
property
string
title
:
'
Linphone
'
property
QtObject
callsList
:
QtObject
{
property
color
color
:
Colors
.
k
property
QtObject
call
:
QtObject
{
property
int
minimumWidth
:
395
}
property
QtObject
header
:
QtObject
{
property
int
height
:
60
property
color
color1
:
Colors
.
k
property
color
color2
:
Colors
.
v
}
}
property
QtObject
callsList
:
QtObject
{
property
color
color
:
Colors
.
k
property
int
defaultWidth
:
250
property
int
maximumWidth
:
250
property
int
minimumWidth
:
110
property
QtObject
header
:
QtObject
{
property
color
color1
:
Colors
.
k
property
color
color2
:
Colors
.
v
property
int
height
:
60
property
int
iconSize
:
40
property
int
leftMargin
:
10
}
}
property
QtObject
chat
:
QtObject
{
property
int
minimumWidth
:
300
}
}
tests/ui/views/App/Styles/qmldir
View file @
7096eb69
...
...
@@ -4,8 +4,8 @@ module App.Styles
# Views styles -----------------------------------------------------------------
singleton CallStyle 1.0 Calls/CallStyle.qml
singleton CallsWindowStyle 1.0 Calls/CallsWindowStyle.qml
singleton StartingCallStyle 1.0 Calls/StartingCallStyle.qml
singleton ContactEditStyle 1.0 MainWindow/ContactEditStyle.qml
singleton ContactsStyle 1.0 MainWindow/ContactsStyle.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