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
e07748ba
Commit
e07748ba
authored
Dec 01, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): calls views in progress.
parent
c3c64c75
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
376 additions
and
70 deletions
+376
-70
call_accept_hovered.svg
tests/assets/images/call_accept_hovered.svg
+15
-0
call_accept_normal.svg
tests/assets/images/call_accept_normal.svg
+15
-0
call_accept_pressed.svg
tests/assets/images/call_accept_pressed.svg
+15
-0
hangup_hovered.svg
tests/assets/images/hangup_hovered.svg
+13
-0
hangup_normal.svg
tests/assets/images/hangup_normal.svg
+13
-0
hangup_pressed.svg
tests/assets/images/hangup_pressed.svg
+13
-0
video_call_accept_hovered.svg
tests/assets/images/video_call_accept_hovered.svg
+15
-0
video_call_accept_normal.svg
tests/assets/images/video_call_accept_normal.svg
+15
-0
video_call_accept_pressed.svg
tests/assets/images/video_call_accept_pressed.svg
+15
-0
resources.qrc
tests/resources.qrc
+11
-4
Icon.qml
tests/ui/modules/Common/Image/Icon.qml
+2
-2
RoundedImage.qml
tests/ui/modules/Common/Image/RoundedImage.qml
+1
-0
Avatar.qml
tests/ui/modules/Linphone/Contact/Avatar.qml
+15
-9
linphone-utils.js
tests/ui/scripts/LinphoneUtils/linphone-utils.js
+14
-0
qmldir
tests/ui/scripts/LinphoneUtils/qmldir
+3
-0
AbstractCall.qml
tests/ui/views/App/Calls/AbstractCall.qml
+128
-0
Calls.qml
tests/ui/views/App/Calls/Calls.qml
+3
-4
IncomingCall.qml
tests/ui/views/App/Calls/IncomingCall.qml
+35
-0
OutgoingCall.qml
tests/ui/views/App/Calls/OutgoingCall.qml
+35
-0
StartingOutgoingCall.qml
tests/ui/views/App/Calls/StartingOutgoingCall.qml
+0
-51
No files found.
tests/assets/images/call_accept_hovered.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
call_accept_over
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"call_accept_over"
>
<circle
fill=
"#7D9F21"
cx=
"20"
cy=
"20"
r=
"20"
></circle>
<g
id=
"call_icon"
transform=
"translate(9.000000, 9.000000)"
stroke-width=
"1.5"
stroke=
"#FFFFFF"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<path
d=
"M0.797831313,3.39639949 C-0.629468455,7.43554002 1.37064325,13.2080051 4.60766925,16.445894 L4.67554581,16.5133156 C7.9118623,19.7504948 13.6842079,21.7511398 17.7208528,20.3234595 L20.7828661,16.3084488 L16.6121235,12.1370674 L12.7966095,15.3645475 L9.30959911,11.8770806 L9.24266856,11.8096591 L5.75613117,8.32219216 L8.98204149,4.50424154 L4.81295445,0.333333333 L0.797831313,3.39639949 L0.797831313,3.39639949 Z"
></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/call_accept_normal.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
call_accept default
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"call_accept-default"
>
<circle
fill=
"#9ECD1D"
cx=
"20"
cy=
"20"
r=
"20"
></circle>
<g
id=
"call_icon"
transform=
"translate(9.000000, 9.000000)"
stroke-width=
"1.5"
stroke=
"#FFFFFF"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<path
d=
"M0.797831313,3.39639949 C-0.629468455,7.43554002 1.37064325,13.2080051 4.60766925,16.445894 L4.67554581,16.5133156 C7.9118623,19.7504948 13.6842079,21.7511398 17.7208528,20.3234595 L20.7828661,16.3084488 L16.6121235,12.1370674 L12.7966095,15.3645475 L9.30959911,11.8770806 L9.24266856,11.8096591 L5.75613117,8.32219216 L8.98204149,4.50424154 L4.81295445,0.333333333 L0.797831313,3.39639949 L0.797831313,3.39639949 Z"
></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/call_accept_pressed.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
call_accept_clic
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"call_accept_clic"
>
<circle
fill=
"#9ECD1D"
cx=
"20"
cy=
"20"
r=
"20"
></circle>
<g
id=
"call_icon"
transform=
"translate(9.000000, 9.000000)"
stroke-width=
"1.5"
stroke=
"#FFFFFF"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<path
d=
"M0.797831313,3.39639949 C-0.629468455,7.43554002 1.37064325,13.2080051 4.60766925,16.445894 L4.67554581,16.5133156 C7.9118623,19.7504948 13.6842079,21.7511398 17.7208528,20.3234595 L20.7828661,16.3084488 L16.6121235,12.1370674 L12.7966095,15.3645475 L9.30959911,11.8770806 L9.24266856,11.8096591 L5.75613117,8.32219216 L8.98204149,4.50424154 L4.81295445,0.333333333 L0.797831313,3.39639949 L0.797831313,3.39639949 Z"
></path>
</g>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/hangup_hovered.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
hangup_over
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"hangup_over"
>
<circle
fill=
"#DC4100"
cx=
"20"
cy=
"20"
r=
"20"
></circle>
<path
d=
"M30.5377049,16.8536881 C28.9534689,13.3895361 24.237941,11 20.3101049,11 L20.2283082,11 C16.299941,11 11.5833508,13.390831 10,16.8540581 L10.5777115,21.3393637 L15.6386623,21.3393637 L15.9968328,16.8753322 L24.5417574,16.8753322 L24.8990426,21.3393637 L29.9599934,21.3393637 L30.5377049,16.8536881 L30.5377049,16.8536881 Z M16.6905115,25.7612171 L20.0360328,29.2560777 L20.2692066,29.4991567 L16.6905115,25.7612171 Z M23.8477246,25.7647319 L20.2692066,29.4991567 L23.8477246,25.7647319 Z M20.2692066,29.1152992 L20.2692066,21.7137866 L20.2692066,29.1152992 Z"
stroke=
"#FFFFFF"
stroke-width=
"1.5"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/hangup_normal.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
hangup_default
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"hangup_default"
>
<circle
fill=
"#FF5E00"
cx=
"20"
cy=
"20"
r=
"20"
></circle>
<path
d=
"M30.5377049,16.8536881 C28.9534689,13.3895361 24.237941,11 20.3101049,11 L20.2283082,11 C16.299941,11 11.5833508,13.390831 10,16.8540581 L10.5777115,21.3393637 L15.6386623,21.3393637 L15.9968328,16.8753322 L24.5417574,16.8753322 L24.8990426,21.3393637 L29.9599934,21.3393637 L30.5377049,16.8536881 L30.5377049,16.8536881 Z M16.6905115,25.7612171 L20.0360328,29.2560777 L20.2692066,29.4991567 L16.6905115,25.7612171 Z M23.8477246,25.7647319 L20.2692066,29.4991567 L23.8477246,25.7647319 Z M20.2692066,29.1152992 L20.2692066,21.7137866 L20.2692066,29.1152992 Z"
stroke=
"#FFFFFF"
stroke-width=
"1.5"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/hangup_pressed.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
hangup_clic
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"hangup_clic"
>
<circle
fill=
"#FF5E00"
cx=
"20"
cy=
"20"
r=
"20"
></circle>
<path
d=
"M30.5377049,16.8536881 C28.9534689,13.3895361 24.237941,11 20.3101049,11 L20.2283082,11 C16.299941,11 11.5833508,13.390831 10,16.8540581 L10.5777115,21.3393637 L15.6386623,21.3393637 L15.9968328,16.8753322 L24.5417574,16.8753322 L24.8990426,21.3393637 L29.9599934,21.3393637 L30.5377049,16.8536881 L30.5377049,16.8536881 Z M16.6905115,25.7612171 L20.0360328,29.2560777 L20.2692066,29.4991567 L16.6905115,25.7612171 Z M23.8477246,25.7647319 L20.2692066,29.4991567 L23.8477246,25.7647319 Z M20.2692066,29.1152992 L20.2692066,21.7137866 L20.2692066,29.1152992 Z"
stroke=
"#FFFFFF"
stroke-width=
"1.5"
stroke-linecap=
"round"
stroke-linejoin=
"round"
></path>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/video_call_accept_hovered.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
video_call_accept_over
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"video_call_accept_over"
>
<path
d=
"M20,40 C31.045695,40 40,31.045695 40,20 C40,8.954305 31.045695,0 20,0 C8.954305,0 0,8.954305 0,20 C0,31.045695 8.954305,40 20,40 Z"
fill=
"#7D9F21"
></path>
<g
id=
"videocall_icon"
transform=
"translate(9.000000, 13.000000)"
stroke-linecap=
"round"
stroke-width=
"1.5"
stroke=
"#FFFFFF"
stroke-linejoin=
"round"
>
<polygon
points=
"21.9033897 6.53341215 21.9033897 0.673601511 16.1289093 5.25958769 16.1289093 0.333333333 0.333333333 0.333333333 0.333333333 12.9483398 16.1289093 12.9483398 16.1289093 8.02208543 21.9033897 12.6080716"
></polygon>
</g>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/video_call_accept_normal.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
video_call_accept_default
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"video_call_accept_default"
>
<path
d=
"M20,40 C31.045695,40 40,31.045695 40,20 C40,8.954305 31.045695,0 20,0 C8.954305,0 0,8.954305 0,20 C0,31.045695 8.954305,40 20,40 Z"
fill=
"#9ECD1D"
></path>
<g
id=
"videocall_icon"
transform=
"translate(9.000000, 13.000000)"
stroke-linecap=
"round"
stroke-width=
"1.5"
stroke=
"#FFFFFF"
stroke-linejoin=
"round"
>
<polygon
points=
"21.9033897 6.53341215 21.9033897 0.673601511 16.1289093 5.25958769 16.1289093 0.333333333 0.333333333 0.333333333 0.333333333 12.9483398 16.1289093 12.9483398 16.1289093 8.02208543 21.9033897 12.6080716"
></polygon>
</g>
</g>
</g>
</svg>
\ No newline at end of file
tests/assets/images/video_call_accept_pressed.svg
0 → 100644
View file @
e07748ba
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
<title>
video_call_accept_clic
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
<g
id=
"video_call_accept_clic"
>
<path
d=
"M20,40 C31.045695,40 40,31.045695 40,20 C40,8.954305 31.045695,0 20,0 C8.954305,0 0,8.954305 0,20 C0,31.045695 8.954305,40 20,40 Z"
fill=
"#9ECD1D"
></path>
<g
id=
"videocall_icon"
transform=
"translate(9.000000, 13.000000)"
stroke-linecap=
"round"
stroke-width=
"1.5"
stroke=
"#FFFFFF"
stroke-linejoin=
"round"
>
<polygon
points=
"21.9033897 6.53341215 21.9033897 0.673601511 16.1289093 5.25958769 16.1289093 0.333333333 0.333333333 0.333333333 0.333333333 12.9483398 16.1289093 12.9483398 16.1289093 8.02208543 21.9033897 12.6080716"
></polygon>
</g>
</g>
</g>
</svg>
\ No newline at end of file
tests/resources.qrc
View file @
e07748ba
...
...
@@ -4,11 +4,12 @@
<file>
assets/images/attachment_normal.svg
</file>
<file>
assets/images/attachment_pressed.svg
</file>
<file>
assets/images/auto_answer.svg
</file>
<file>
assets/images/a-v-a-t-a-r-120120@3x.png
</file>
<file>
assets/images/call_accept_hovered.svg
</file>
<file>
assets/images/call_accept_normal.svg
</file>
<file>
assets/images/call_accept_pressed.svg
</file>
<file>
assets/images/call_hovered.svg
</file>
<file>
assets/images/call_normal.svg
</file>
<file>
assets/images/call_pressed.svg
</file>
<file>
assets/images/cat.jpg
</file>
<file>
assets/images/chat_error.svg
</file>
<file>
assets/images/chat_hovered.svg
</file>
<file>
assets/images/chat_normal.svg
</file>
...
...
@@ -31,6 +32,9 @@
<file>
assets/images/delete_pressed.svg
</file>
<file>
assets/images/ended_call.svg
</file>
<file>
assets/images/filter.svg
</file>
<file>
assets/images/hangup_hovered.svg
</file>
<file>
assets/images/hangup_normal.svg
</file>
<file>
assets/images/hangup_pressed.svg
</file>
<file>
assets/images/history.svg
</file>
<file>
assets/images/home_normal.svg
</file>
<file>
assets/images/home_selected.svg
</file>
...
...
@@ -48,6 +52,9 @@
<file>
assets/images/tooltip_arrow_left.svg
</file>
<file>
assets/images/tooltip_arrow_right.svg
</file>
<file>
assets/images/tooltip_arrow_top.svg
</file>
<file>
assets/images/video_call_accept_hovered.svg
</file>
<file>
assets/images/video_call_accept_normal.svg
</file>
<file>
assets/images/video_call_accept_pressed.svg
</file>
<file>
assets/images/video_call_hovered.svg
</file>
<file>
assets/images/video_call_normal.svg
</file>
<file>
assets/images/video_call_pressed.svg
</file>
...
...
@@ -149,8 +156,8 @@
<file>
ui/scripts/Utils/utils.js
</file>
<file>
ui/views/App/Calls/AbstractCall.qml
</file>
<file>
ui/views/App/Calls/Calls.qml
</file>
<file>
ui/views/App/Calls/
Starting
IncomingCall.qml
</file>
<file>
ui/views/App/Calls/
Starting
OutgoingCall.qml
</file>
<file>
ui/views/App/Calls/IncomingCall.qml
</file>
<file>
ui/views/App/Calls/OutgoingCall.qml
</file>
<file>
ui/views/App/MainWindow/Contact.qml
</file>
<file>
ui/views/App/MainWindow/Contacts.qml
</file>
<file>
ui/views/App/MainWindow/Conversation.qml
</file>
...
...
tests/ui/modules/Common/Image/Icon.qml
View file @
e07748ba
...
...
@@ -24,9 +24,9 @@ Item {
Image
{
function
_checkIconSize
()
{
Utils
.
assert
(
iconSize
!=
null
&&
iconSize
>
0
,
iconSize
!=
null
&&
iconSize
>
=
0
,
'
`iconSize` must be defined and must be positive. (icon=`
'
+
icon
+
'
`)
'
icon
+
'
`
, iconSize=
'
+
iconSize
+
'
)
'
)
}
...
...
tests/ui/modules/Common/Image/RoundedImage.qml
View file @
e07748ba
...
...
@@ -34,6 +34,7 @@ Item {
property
color
foregroundColor
:
item
.
foregroundColor
property
var
image
:
imageContainer
// See: https://www.opengl.org/sdk/docs/man/html/mix.xhtml
fragmentShader
:
'
uniform lowp sampler2D image;
uniform lowp sampler2D mask;
...
...
tests/ui/modules/Linphone/Contact/Avatar.qml
View file @
e07748ba
...
...
@@ -9,8 +9,11 @@ import Utils 1.0
// ===================================================================
Item
{
id
:
avatar
property
alias
image
:
roundedImage
.
source
property
alias
presenceLevel
:
presenceLevel
.
level
property
color
backgroundColor
:
AvatarStyle
.
backgroundColor
property
string
username
property
var
_initialsRegex
:
/^
\s
*
([^\s\.]
+
)(?:[\s\.]
+
([^\s\.]
+
))?
/
...
...
@@ -34,6 +37,13 @@ Item {
// -----------------------------------------------------------------
RoundedImage
{
id
:
roundedImage
anchors.fill
:
parent
backgroundColor
:
avatar
.
backgroundColor
}
Text
{
anchors.centerIn
:
parent
color
:
AvatarStyle
.
initials
.
color
...
...
@@ -50,18 +60,14 @@ Item {
text
:
_computeInitials
()
}
RoundedImage
{
id
:
roundedImage
anchors.fill
:
parent
backgroundColor
:
AvatarStyle
.
backgroundColor
}
PresenceLevel
{
id
:
presenceLevel
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
anchors
{
bottom
:
parent
.
bottom
right
:
parent
.
right
}
height
:
parent
.
height
/
3
width
:
parent
.
width
/
3
}
...
...
tests/ui/scripts/LinphoneUtils/linphone-utils.js
0 → 100644
View file @
e07748ba
// ===================================================================
// Contains linphone helpers.
// ===================================================================
.
pragma
library
.
import
'
qrc:/ui/scripts/Utils/utils.js
'
as
Utils
// Returns the username of a contact object or URI string.
function
getContactUsername
(
contact
)
{
return
Utils
.
isString
(
contact
)
?
contact
.
substring
(
4
,
contact
.
indexOf
(
'
@
'
))
// 4 = length("sip:")
:
contact
.
username
}
tests/ui/scripts/LinphoneUtils/qmldir
0 → 100644
View file @
e07748ba
module LinphoneUtils
LinphoneUtils 1.0 linphone-utils.js
tests/ui/views/App/Calls/AbstractCall.qml
0 → 100644
View file @
e07748ba
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
Common
1.0
import
Linphone
1.0
import
LinphoneUtils
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
_contact
:
ContactsListModel
.
mapSipAddressToContact
(
sipAddress
)
||
sipAddress
// -----------------------------------------------------------------
color
:
'
#E8E8E8
'
ColumnLayout
{
anchors
{
fill
:
parent
topMargin
:
26
}
spacing
:
0
// ---------------------------------------------------------------
// Call type.
// ---------------------------------------------------------------
Column
{
spacing
:
10
Layout.fillWidth
:
true
Text
{
id
:
callType
color
:
'
#96A5B1
'
font
{
bold
:
true
pointSize
:
17
}
horizontalAlignment
:
Text
.
AlignHCenter
width
:
parent
.
width
}
CaterpillarAnimation
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
visible
:
abstractCall
.
isOutgoing
}
}
// ---------------------------------------------------------------
// Contact visual.
// ---------------------------------------------------------------
Item
{
id
:
container
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.margins
:
20
Item
{
anchors.verticalCenter
:
parent
.
verticalCenter
implicitHeight
:
contactDescription
.
height
+
avatar
.
height
width
:
parent
.
width
ContactDescription
{
id
:
contactDescription
username
:
LinphoneUtils
.
getContactUsername
(
_contact
)
sipAddress
:
abstractCall
.
sipAddress
height
:
60
horizontalTextAlignment
:
Text
.
AlignHCenter
width
:
parent
.
width
}
Avatar
{
id
:
avatar
function
_computeAvatarSize
()
{
var
height
=
container
.
height
-
contactDescription
.
height
var
width
=
container
.
width
var
size
=
height
<
250
&&
height
>
0
?
height
:
250
return
size
<
width
?
size
:
width
}
anchors
{
top
:
contactDescription
.
bottom
horizontalCenter
:
parent
.
horizontalCenter
}
backgroundColor
:
'
#A1A1A1
'
image
:
_contact
.
avatar
username
:
contactDescription
.
username
height
:
_computeAvatarSize
()
width
:
height
}
}
}
// ---------------------------------------------------------------
// Buttons.
// ---------------------------------------------------------------
Item
{
id
:
actionArea
Layout.alignment
:
Qt
.
AlignHCenter
Layout.fillWidth
:
true
Layout.preferredHeight
:
100
}
}
}
tests/ui/views/App/Calls/Calls.qml
View file @
e07748ba
...
...
@@ -78,14 +78,13 @@ Window {
closingEdge
:
Qt
.
RightEdge
defaultChildAWidth
:
300
defaultClosed
:
true
minimumLeftLimit
:
2
50
minimumRightLimit
:
3
50
minimumLeftLimit
:
3
50
minimumRightLimit
:
2
50
resizeAInPriority
:
true
// Call.
childA
:
Abstract
Call
{
childA
:
Incoming
Call
{
anchors.fill
:
parent
callTypeLabel
:
'
INCOMING VIDEO CALL
'
sipAddress
:
'
sip:erwan.croze@sip.linphone.org
'
}
...
...
tests/ui/views/App/Calls/
Starting
IncomingCall.qml
→
tests/ui/views/App/Calls/IncomingCall.qml
View file @
e07748ba
import
Common
1.0
import
Linphone
1.0
StartingCall
{
avatarImage
:
"
qrc:/imgs/cat_contact.jpg
"
callType
:
'
INCOMING CALL
'
sipAddress
:
'
mister-meow@sip-linphone.org
'
username
:
'
Mister Meow
'
// ===================================================================
AbstractCall
{
callTypeLabel
:
isVideoCall
?
'
INCOMING VIDEO CALL
'
:
'
INCOMING AUDIO CALL
'
ActionBar
{
anchors.centerIn
:
parent
iconSize
:
40
ActionButton
{
icon
:
'
cam
'
icon
:
'
video_call_accept
'
}
ActionButton
{
icon
:
'
call
'
icon
:
'
call_accept
'
}
}
ActionBar
{
anchors
{
verticalCenter
:
parent
.
verticalCenter
right
:
parent
.
right
rightMargin
:
85
}
iconSize
:
40
ActionButton
{
icon
:
'
hangup
'
...
...
tests/ui/views/App/Calls/OutgoingCall.qml
0 → 100644
View file @
e07748ba
import
Common
1.0
// ===================================================================
AbstractCall
{
callTypeLabel
:
isVideoCall
?
'
OUTGOING VIDEO CALL
'
:
'
OUTGOING AUDIO CALL
'
ActionBar
{
anchors.centerIn
:
parent
iconSize
:
40
ActionButton
{
icon
:
'
video_call_accept
'
}
ActionButton
{
icon
:
'
call_accept
'
}
}
ActionBar
{
anchors
{
verticalCenter
:
parent
.
verticalCenter
right
:
parent
.
right
rightMargin
:
85
}
iconSize
:
40
ActionButton
{
icon
:
'
hangup
'
}
}
}
tests/ui/views/App/Calls/StartingOutgoingCall.qml
deleted
100644 → 0
View file @
c3c64c75
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
Common
1.0
import
Linphone
1.0
StartingCall
{
avatarImage
:
"
qrc:/imgs/cat_contact.jpg
"
callType
:
'
OUTGOING CALL
'
sipAddress
:
'
mister-meow@sip-linphone.org
'
username
:
'
Mister Meow
'
RowLayout
{
anchors.fill
:
parent
spacing
:
0
ActionBar
{
iconSize
:
40
ActionButton
{
icon
:
'
micro
'
}
ActionButton
{
icon
:
'
speaker
'
}
ActionButton
{
icon
:
'
cam
'
}
}
// TODO: Cam.
Item
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
}
ActionBar
{
iconSize
:
40
ActionButton
{
icon
:
'
hangup
'
}
ActionButton
{
icon
:
'
chat
'
}
}
}
}
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