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
88e0688e
Commit
88e0688e
authored
Oct 24, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unstable
parent
a0ea030f
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
250 additions
and
66 deletions
+250
-66
resources.qrc
tests/resources.qrc
+1
-0
Borders.qml
tests/ui/modules/Common/Borders.qml
+2
-2
DialogPlus.qml
tests/ui/modules/Common/Dialog/DialogPlus.qml
+1
-1
RoundedImage.qml
tests/ui/modules/Common/Image/RoundedImage.qml
+20
-16
InvertedMouseArea.qml
tests/ui/modules/Common/InvertedMouseArea.qml
+1
-9
DropDownMenu.qml
tests/ui/modules/Common/Popup/DropDownMenu.qml
+29
-8
PanedStyle.qml
tests/ui/modules/Common/Styles/PanedStyle.qml
+1
-1
ScrollableListView.qml
tests/ui/modules/Common/View/ScrollableListView.qml
+5
-1
CallControls.qml
tests/ui/modules/Linphone/Call/CallControls.qml
+66
-0
Message.qml
tests/ui/modules/Linphone/Chat/Message.qml
+2
-1
OutgoingMessage.qml
tests/ui/modules/Linphone/Chat/OutgoingMessage.qml
+7
-19
Contact.qml
tests/ui/modules/Linphone/Contact/Contact.qml
+2
-0
ContactDescription.qml
tests/ui/modules/Linphone/Contact/ContactDescription.qml
+6
-3
qmldir
tests/ui/modules/Linphone/qmldir
+3
-0
utils.js
tests/ui/scripts/Utils/utils.js
+14
-1
Calls.qml
tests/ui/views/Calls/Calls.qml
+88
-3
StartingCall.qml
tests/ui/views/Calls/StartingCall.qml
+2
-1
No files found.
tests/resources.qrc
View file @
88e0688e
...
...
@@ -75,6 +75,7 @@
<file>
ui/modules/Common/Styles/qmldir
</file>
<file>
ui/modules/Common/Styles/SearchBoxStyle.qml
</file>
<file>
ui/modules/Common/View/ScrollableListView.qml
</file>
<file>
ui/modules/Linphone/Call/CallControls.qml
</file>
<file>
ui/modules/Linphone/Chat/Chat.qml
</file>
<file>
ui/modules/Linphone/Chat/Event.qml
</file>
<file>
ui/modules/Linphone/Chat/IncomingMessage.qml
</file>
...
...
tests/ui/modules/Common/Borders.qml
View file @
88e0688e
...
...
@@ -7,8 +7,6 @@ import QtQuick 2.7
// ===================================================================
Item
{
default
property
alias
content
:
content
.
data
property
var
borderColor
property
var
borderWidth
...
...
@@ -22,6 +20,8 @@ Item {
property
int
rightWidth
:
0
property
int
topWidth
:
0
default
property
alias
_content
:
content
.
data
Rectangle
{
id
:
bottomBorder
...
...
tests/ui/modules/Common/Dialog/DialogPlus.qml
View file @
88e0688e
...
...
@@ -9,11 +9,11 @@ import Common.Styles 1.0
// ===================================================================
Window
{
default
property
alias
content
:
content
.
data
// Required.
property
alias
buttons
:
buttons
.
data
// Optionnal.
property
alias
descriptionText
:
description
.
text
// Optionnal.
property
bool
centeredButtons
:
false
default
property
alias
_content
:
content
.
data
// Required.
property
bool
_disableExitStatus
signal
exitStatus
(
int
status
)
...
...
tests/ui/modules/Common/Image/RoundedImage.qml
View file @
88e0688e
...
...
@@ -22,26 +22,30 @@ Item {
Rectangle
{
anchors.fill
:
parent
layer.enabled
:
true
layer.samplerName
:
'
mask
'
radius
:
parent
.
width
/
2
layer.effect
:
ShaderEffect
{
property
var
image
:
imageContainer
layer
{
effect
:
ShaderEffect
{
property
var
image
:
imageContainer
fragmentShader
:
"
uniform lowp sampler2D image;
uniform lowp sampler2D mask;
uniform lowp float qt_Opacity;
fragmentShader
:
"
uniform lowp sampler2D image;
uniform lowp sampler2D mask;
uniform lowp float qt_Opacity;
varying highp vec2 qt_TexCoord0;
varying highp vec2 qt_TexCoord0;
void main () {
gl_FragColor = texture2D(image, qt_TexCoord0) *
texture2D(mask, qt_TexCoord0).a *
qt_Opacity;
}
"
}
void main () {
gl_FragColor = texture2D(image, qt_TexCoord0) *
texture2D(mask, qt_TexCoord0).a *
qt_Opacity;
}
"
enabled
:
true
samplerName
:
'
mask
'
}
radius
:
parent
.
width
/
2
}
}
tests/ui/modules/Common/InvertedMouseArea.qml
View file @
88e0688e
...
...
@@ -19,15 +19,7 @@ Item {
_mouseArea
=
builder
.
createObject
()
}
_mouseArea
.
parent
=
(
function
()
{
var
root
=
item
while
(
root
.
parent
!=
null
)
{
root
=
root
.
parent
}
return
root
})()
_mouseArea
.
parent
=
Utils
.
getTopParent
(
item
)
}
function
_deleteMouseArea
()
{
...
...
tests/ui/modules/Common/Popup/DropDownMenu.qml
View file @
88e0688e
...
...
@@ -2,17 +2,26 @@ import QtQuick 2.7
import
Common
1.0
import
Common
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// Low component to display a list/menu in a popup.
// ===================================================================
Rectangle
{
default
property
alias
content
:
content
.
data
property
int
entryHeight
property
int
maxMenuHeight
property
bool
drawOnRoot
:
false
property
int
entryHeight
// Only with a ListView child.
property
int
maxMenuHeight
// Only with a ListView child.
property
var
relativeTo
default
property
alias
_content
:
content
.
data
function
show
()
{
if
(
drawOnRoot
)
{
this
.
x
=
relativeTo
.
mapToItem
(
null
,
relativeTo
.
width
,
0
).
x
this
.
y
=
relativeTo
.
mapToItem
(
null
,
relativeTo
.
width
,
0
).
y
}
visible
=
true
}
...
...
@@ -20,16 +29,28 @@ Rectangle {
visible
=
false
}
// Ugly. Just ugly.
// `model` is a reference on a unknown component!
// See usage with SearchBox.
implicitHeight
:
{
function
_computeHeight
()
{
var
model
=
_content
[
0
].
model
if
(
model
==
null
)
{
return
content
.
height
}
var
height
=
model
.
count
*
entryHeight
return
height
>
maxMenuHeight
?
maxMenuHeight
:
height
return
(
maxMenuHeight
!==
undefined
&&
height
>
maxMenuHeight
)
?
maxMenuHeight
:
height
}
implicitHeight
:
_computeHeight
()
visible
:
false
z
:
Constants
.
zPopup
Component.onCompleted
:
{
if
(
drawOnRoot
)
{
parent
=
Utils
.
getTopParent
(
this
)
}
}
Rectangle
{
id
:
content
...
...
tests/ui/modules/Common/Styles/PanedStyle.qml
View file @
88e0688e
...
...
@@ -9,7 +9,7 @@ QtObject {
property
int
transitionDuration
:
200
property
QtObject
handle
:
QtObject
{
property
int
width
:
10
property
int
width
:
5
property
QtObject
color
:
QtObject
{
property
color
hovered
:
Colors
.
h
...
...
tests/ui/modules/Common/View/ScrollableListView.qml
View file @
88e0688e
...
...
@@ -6,8 +6,12 @@ import Common 1.0
// ===================================================================
ListView
{
ScrollBar.vertical
:
ForceScrollBar
{}
ScrollBar.vertical
:
ForceScrollBar
{
id
:
scrollBar
}
boundsBehavior
:
Flickable
.
StopAtBounds
clip
:
true
contentWidth
:
width
-
scrollBar
.
width
spacing
:
0
}
tests/ui/modules/Linphone/Call/CallControls.qml
0 → 100644
View file @
88e0688e
import
QtQuick
2.7
import
QtQuick
.
Layouts
1.3
import
QtQuick
.
Controls
2.0
import
Linphone
1.0
import
Common
1.0
RowLayout
{
implicitHeight
:
contact
.
height
spacing
:
1
Rectangle
{
Layout.fillWidth
:
true
color
:
'
#434343
'
implicitHeight
:
contact
.
height
Contact
{
id
:
contact
anchors.fill
:
parent
presenceLevel
:
Presence
.
Green
sipAddress
:
'
math.hart@sip-linphone.org
'
sipAddressColor
:
'
#FFFFFF
'
username
:
'
Mathilda Hart
'
usernameColor
:
'
#FFFFFF
'
}
}
Rectangle
{
id
:
button
Layout.preferredHeight
:
contact
.
height
Layout.preferredWidth
:
42
color
:
'
#434343
'
Text
{
anchors.centerIn
:
parent
color
:
'
#FFFFFF
'
text
:
'
...
'
}
MouseArea
{
anchors.fill
:
parent
hoverEnabled
:
true
onClicked
:
{
menu
.
show
()
}
}
}
DropDownMenu
{
drawOnRoot
:
true
id
:
menu
entryHeight
:
22
height
:
100
width
:
120
relativeTo
:
button
Keys.onEscapePressed
:
hide
()
Rectangle
{
color
:
'
red
'
anchors.fill
:
parent
}
}
}
tests/ui/modules/Linphone/Chat/Message.qml
View file @
88e0688e
...
...
@@ -5,9 +5,10 @@ import QtQuick 2.7
Item
{
id
:
container
default
property
alias
content
:
content
.
data
property
alias
backgroundColor
:
rectangle
.
color
default
property
alias
_content
:
content
.
data
implicitHeight
:
text
.
contentHeight
+
text
.
padding
*
2
Rectangle
{
...
...
tests/ui/modules/Linphone/Chat/OutgoingMessage.qml
View file @
88e0688e
import
QtQuick
2.7
import
Common
1.0
import
Linphone
1.0
Item
{
implicitHeight
:
message
.
height
width
:
parent
.
width
-
16
Message
{
id
:
message
anchors
{
left
:
parent
.
left
right
:
parent
.
right
}
Message
{
id
:
message
backgroundColor
:
'
#E4E4E4
'
backgroundColor
:
'
#E4E4E4
'
// TODO: Success and re-send icon.
Icon
{
iconSize
:
16
icon
:
'
valid
'
}
// TODO: Success and re-send icon.
Icon
{
iconSize
:
16
icon
:
'
valid
'
}
}
tests/ui/modules/Linphone/Contact/Contact.qml
View file @
88e0688e
...
...
@@ -12,7 +12,9 @@ Item {
property
alias
image
:
avatar
.
image
property
alias
presenceLevel
:
avatar
.
presenceLevel
property
alias
sipAddress
:
description
.
sipAddress
property
alias
sipAddressColor
:
description
.
sipAddressColor
property
alias
username
:
avatar
.
username
property
alias
usernameColor
:
description
.
usernameColor
height
:
ContactStyle
.
height
...
...
tests/ui/modules/Linphone/Contact/ContactDescription.qml
View file @
88e0688e
...
...
@@ -7,6 +7,8 @@ import Linphone.Styles 1.0
Column
{
property
alias
sipAddress
:
sipAddress
.
text
property
alias
username
:
username
.
text
property
color
sipAddressColor
:
ContactDescriptionStyle
.
sipAddress
.
color
property
color
usernameColor
:
ContactDescriptionStyle
.
username
.
color
property
int
horizontalTextAlignment
// Username.
...
...
@@ -14,7 +16,8 @@ Column {
id
:
username
clip
:
true
color
:
ContactDescriptionStyle
.
username
.
color
color
:
usernameColor
elide
:
Text
.
ElideRight
font.bold
:
true
font.pointSize
:
ContactDescriptionStyle
.
username
.
fontSize
height
:
parent
.
height
/
2
...
...
@@ -27,8 +30,8 @@ Column {
Text
{
id
:
sipAddress
c
lip
:
true
color
:
ContactDescriptionStyle
.
sipAddress
.
color
c
olor
:
sipAddressColor
elide
:
Text
.
ElideRight
font.pointSize
:
ContactDescriptionStyle
.
sipAddress
.
fontSize
height
:
parent
.
height
/
2
horizontalAlignment
:
horizontalTextAlignment
...
...
tests/ui/modules/Linphone/qmldir
View file @
88e0688e
...
...
@@ -6,6 +6,9 @@ module Linphone
# Components ---------------------------------------------------------
# Call
CallControls 1.0 Call/CallControls.qml
# Chat
Chat 1.0 Chat/Chat.qml
...
...
tests/ui/scripts/Utils/utils.js
View file @
88e0688e
...
...
@@ -106,6 +106,19 @@ function clearTimeout (timer) {
// -------------------------------------------------------------------
// Returns the top (root) parent of one component.
function
getTopParent
(
component
)
{
var
parent
=
component
.
parent
while
(
parent
.
parent
!=
null
)
{
parent
=
parent
.
parent
}
return
parent
}
// -------------------------------------------------------------------
// Invoke a `cb` function with each value of the interval: `[0, n[`.
// Return a mapped array created with the returned values of `cb`.
function
times
(
n
,
cb
,
context
)
{
...
...
@@ -144,7 +157,7 @@ function genRandomNumberBetweenIntervals (intervals) {
return
genRandomNumber
(
intervals
[
0
][
0
],
intervals
[
0
][
1
])
}
// Compute the
number of values
.
// Compute the
intervals size
.
var
size
=
0
intervals
.
forEach
(
function
(
interval
)
{
size
+=
interval
[
1
]
-
interval
[
0
]
...
...
tests/ui/views/Calls/Calls.qml
View file @
88e0688e
...
...
@@ -16,7 +16,7 @@ Window {
anchors.fill
:
parent
defaultChildAWidth
:
250
maximumLeftLimit
:
300
minimumLeftLimit
:
50
minimumLeftLimit
:
1
50
// Calls list.
childA
:
ColumnLayout
{
...
...
@@ -45,10 +45,95 @@ Window {
}
}
Rectangle
{
ScrollableListView
{
Layout.fillWidth
:
true
Layout.fillHeight
:
true
color
:
'
red
'
spacing
:
1
delegate
:
CallControls
{
width
:
parent
.
width
}
model
:
ListModel
{
ListElement
{
$presence
:
'
do_not_disturb
'
$sipAddress
:
'
charles.henri.sip.linphone.org
'
}
ListElement
{
$presence
:
'
disconnected
'
$sipAddress
:
'
yesyes.nono.sip.linphone.org
'
}
ListElement
{
$presence
:
'
connected
'
$sipAddress
:
'
nsa.sip.linphone.org
'
}
ListElement
{
$presence
:
'
do_not_disturb
'
$sipAddress
:
'
charles.henri.sip.linphone.org
'
}
ListElement
{
$presence
:
'
disconnected
'
$sipAddress
:
'
yesyes.nono.sip.linphone.org
'
}
ListElement
{
$presence
:
'
connected
'
$sipAddress
:
'
nsa.sip.linphone.org
'
}
ListElement
{
$presence
:
'
do_not_disturb
'
$sipAddress
:
'
charles.henri.sip.linphone.org
'
}
ListElement
{
$presence
:
'
disconnected
'
$sipAddress
:
'
yesyes.nono.sip.linphone.org
'
}
ListElement
{
$presence
:
'
connected
'
$sipAddress
:
'
nsa.sip.linphone.org
'
}
ListElement
{
$presence
:
'
do_not_disturb
'
$sipAddress
:
'
charles.henri.sip.linphone.org
'
}
ListElement
{
$presence
:
'
disconnected
'
$sipAddress
:
'
yesyes.nono.sip.linphone.org
'
}
ListElement
{
$presence
:
'
connected
'
$sipAddress
:
'
nsa.sip.linphone.org
'
}
ListElement
{
$presence
:
'
do_not_disturb
'
$sipAddress
:
'
charles.henri.sip.linphone.org
'
}
ListElement
{
$presence
:
'
disconnected
'
$sipAddress
:
'
yesyes.nono.sip.linphone.org
'
}
ListElement
{
$presence
:
'
connected
'
$sipAddress
:
'
nsa.sip.linphone.org
'
}
ListElement
{
$presence
:
'
do_not_disturb
'
$sipAddress
:
'
charles.henri.sip.linphone.org
'
}
ListElement
{
$presence
:
'
disconnected
'
$sipAddress
:
'
yesyes.nono.sip.linphone.org
'
}
ListElement
{
$presence
:
'
connected
'
$sipAddress
:
'
nsa.sip.linphone.org
'
}
ListElement
{
$presence
:
'
do_not_disturb
'
$sipAddress
:
'
charles.henri.sip.linphone.org
'
}
ListElement
{
$presence
:
'
disconnected
'
$sipAddress
:
'
yesyes.nono.sip.linphone.org
'
}
ListElement
{
$presence
:
'
connected
'
$sipAddress
:
'
nsa.sip.linphone.org
'
}
}
}
}
...
...
tests/ui/views/Calls/StartingCall.qml
View file @
88e0688e
...
...
@@ -5,12 +5,13 @@ import Common 1.0
import
Linphone
1.0
Rectangle
{
default
property
alias
actionArea
:
actionArea
.
data
property
alias
callType
:
callType
.
text
property
alias
sipAddress
:
contactDescription
.
sipAddress
property
alias
username
:
contactDescription
.
username
property
alias
avatarImage
:
image
.
source
default
property
alias
_actionArea
:
actionArea
.
data
color
:
'
#EAEAEA
'
ColumnLayout
{
...
...
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