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