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 @@
...
@@ -75,6 +75,7 @@
<file>
ui/modules/Common/Styles/qmldir
</file>
<file>
ui/modules/Common/Styles/qmldir
</file>
<file>
ui/modules/Common/Styles/SearchBoxStyle.qml
</file>
<file>
ui/modules/Common/Styles/SearchBoxStyle.qml
</file>
<file>
ui/modules/Common/View/ScrollableListView.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/Chat.qml
</file>
<file>
ui/modules/Linphone/Chat/Event.qml
</file>
<file>
ui/modules/Linphone/Chat/Event.qml
</file>
<file>
ui/modules/Linphone/Chat/IncomingMessage.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
...
@@ -7,8 +7,6 @@ import QtQuick 2.7
// ===================================================================
// ===================================================================
Item
{
Item
{
default
property
alias
content
:
content
.
data
property
var
borderColor
property
var
borderColor
property
var
borderWidth
property
var
borderWidth
...
@@ -22,6 +20,8 @@ Item {
...
@@ -22,6 +20,8 @@ Item {
property
int
rightWidth
:
0
property
int
rightWidth
:
0
property
int
topWidth
:
0
property
int
topWidth
:
0
default
property
alias
_content
:
content
.
data
Rectangle
{
Rectangle
{
id
:
bottomBorder
id
:
bottomBorder
...
...
tests/ui/modules/Common/Dialog/DialogPlus.qml
View file @
88e0688e
...
@@ -9,11 +9,11 @@ import Common.Styles 1.0
...
@@ -9,11 +9,11 @@ import Common.Styles 1.0
// ===================================================================
// ===================================================================
Window
{
Window
{
default
property
alias
content
:
content
.
data
// Required.
property
alias
buttons
:
buttons
.
data
// Optionnal.
property
alias
buttons
:
buttons
.
data
// Optionnal.
property
alias
descriptionText
:
description
.
text
// Optionnal.
property
alias
descriptionText
:
description
.
text
// Optionnal.
property
bool
centeredButtons
:
false
property
bool
centeredButtons
:
false
default
property
alias
_content
:
content
.
data
// Required.
property
bool
_disableExitStatus
property
bool
_disableExitStatus
signal
exitStatus
(
int
status
)
signal
exitStatus
(
int
status
)
...
...
tests/ui/modules/Common/Image/RoundedImage.qml
View file @
88e0688e
...
@@ -22,26 +22,30 @@ Item {
...
@@ -22,26 +22,30 @@ Item {
Rectangle
{
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
layer.enabled
:
true
layer.samplerName
:
'
mask
'
radius
:
parent
.
width
/
2
layer.effect
:
ShaderEffect
{
layer
{
property
var
image
:
imageContainer
effect
:
ShaderEffect
{
property
var
image
:
imageContainer
fragmentShader
:
"
uniform lowp sampler2D image;
uniform lowp sampler2D mask;
uniform lowp float qt_Opacity;
fragmentShader
:
"
varying highp vec2 qt_TexCoord0;
uniform lowp sampler2D image;
uniform lowp sampler2D mask;
uniform lowp float qt_Opacity;
varying highp vec2 qt_TexCoord0;
void main () {
gl_FragColor = texture2D(image, qt_TexCoord0) *
texture2D(mask, qt_TexCoord0).a *
qt_Opacity;
}
"
}
void main () {
enabled
:
true
gl_FragColor = texture2D(image, qt_TexCoord0) *
samplerName
:
'
mask
'
texture2D(mask, qt_TexCoord0).a *
qt_Opacity;
}
"
}
}
radius
:
parent
.
width
/
2
}
}
}
}
tests/ui/modules/Common/InvertedMouseArea.qml
View file @
88e0688e
...
@@ -19,15 +19,7 @@ Item {
...
@@ -19,15 +19,7 @@ Item {
_mouseArea
=
builder
.
createObject
()
_mouseArea
=
builder
.
createObject
()
}
}
_mouseArea
.
parent
=
(
function
()
{
_mouseArea
.
parent
=
Utils
.
getTopParent
(
item
)
var
root
=
item
while
(
root
.
parent
!=
null
)
{
root
=
root
.
parent
}
return
root
})()
}
}
function
_deleteMouseArea
()
{
function
_deleteMouseArea
()
{
...
...
tests/ui/modules/Common/Popup/DropDownMenu.qml
View file @
88e0688e
...
@@ -2,17 +2,26 @@ import QtQuick 2.7
...
@@ -2,17 +2,26 @@ import QtQuick 2.7
import
Common
1.0
import
Common
1.0
import
Common
.
Styles
1.0
import
Common
.
Styles
1.0
import
Utils
1.0
// ===================================================================
// ===================================================================
// Low component to display a list/menu in a popup.
// Low component to display a list/menu in a popup.
// ===================================================================
// ===================================================================
Rectangle
{
Rectangle
{
default
property
alias
content
:
content
.
data
property
bool
drawOnRoot
:
false
property
int
entryHeight
property
int
entryHeight
// Only with a ListView child.
property
int
maxMenuHeight
property
int
maxMenuHeight
// Only with a ListView child.
property
var
relativeTo
default
property
alias
_content
:
content
.
data
function
show
()
{
function
show
()
{
if
(
drawOnRoot
)
{
this
.
x
=
relativeTo
.
mapToItem
(
null
,
relativeTo
.
width
,
0
).
x
this
.
y
=
relativeTo
.
mapToItem
(
null
,
relativeTo
.
width
,
0
).
y
}
visible
=
true
visible
=
true
}
}
...
@@ -20,16 +29,28 @@ Rectangle {
...
@@ -20,16 +29,28 @@ Rectangle {
visible
=
false
visible
=
false
}
}
// Ugly. Just ugly.
function
_computeHeight
()
{
// `model` is a reference on a unknown component!
var
model
=
_content
[
0
].
model
// See usage with SearchBox.
if
(
model
==
null
)
{
implicitHeight
:
{
return
content
.
height
}
var
height
=
model
.
count
*
entryHeight
var
height
=
model
.
count
*
entryHeight
return
height
>
maxMenuHeight
?
maxMenuHeight
:
height
return
(
maxMenuHeight
!==
undefined
&&
height
>
maxMenuHeight
)
?
maxMenuHeight
:
height
}
}
implicitHeight
:
_computeHeight
()
visible
:
false
visible
:
false
z
:
Constants
.
zPopup
z
:
Constants
.
zPopup
Component.onCompleted
:
{
if
(
drawOnRoot
)
{
parent
=
Utils
.
getTopParent
(
this
)
}
}
Rectangle
{
Rectangle
{
id
:
content
id
:
content
...
...
tests/ui/modules/Common/Styles/PanedStyle.qml
View file @
88e0688e
...
@@ -9,7 +9,7 @@ QtObject {
...
@@ -9,7 +9,7 @@ QtObject {
property
int
transitionDuration
:
200
property
int
transitionDuration
:
200
property
QtObject
handle
:
QtObject
{
property
QtObject
handle
:
QtObject
{
property
int
width
:
10
property
int
width
:
5
property
QtObject
color
:
QtObject
{
property
QtObject
color
:
QtObject
{
property
color
hovered
:
Colors
.
h
property
color
hovered
:
Colors
.
h
...
...
tests/ui/modules/Common/View/ScrollableListView.qml
View file @
88e0688e
...
@@ -6,8 +6,12 @@ import Common 1.0
...
@@ -6,8 +6,12 @@ import Common 1.0
// ===================================================================
// ===================================================================
ListView
{
ListView
{
ScrollBar.vertical
:
ForceScrollBar
{}
ScrollBar.vertical
:
ForceScrollBar
{
id
:
scrollBar
}
boundsBehavior
:
Flickable
.
StopAtBounds
boundsBehavior
:
Flickable
.
StopAtBounds
clip
:
true
clip
:
true
contentWidth
:
width
-
scrollBar
.
width
spacing
:
0
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
...
@@ -5,9 +5,10 @@ import QtQuick 2.7
Item
{
Item
{
id
:
container
id
:
container
default
property
alias
content
:
content
.
data
property
alias
backgroundColor
:
rectangle
.
color
property
alias
backgroundColor
:
rectangle
.
color
default
property
alias
_content
:
content
.
data
implicitHeight
:
text
.
contentHeight
+
text
.
padding
*
2
implicitHeight
:
text
.
contentHeight
+
text
.
padding
*
2
Rectangle
{
Rectangle
{
...
...
tests/ui/modules/Linphone/Chat/OutgoingMessage.qml
View file @
88e0688e
import
QtQuick
2.7
import
Common
1.0
import
Common
1.0
import
Linphone
1.0
import
Linphone
1.0
Item
{
Message
{
implicitHeight
:
message
.
height
id
:
message
width
:
parent
.
width
-
16
Message
{
id
:
message
anchors
{
left
:
parent
.
left
right
:
parent
.
right
}
backgroundColor
:
'
#E4E4E4
'
backgroundColor
:
'
#E4E4E4
'
// TODO: Success and re-send icon.
// TODO: Success and re-send icon.
Icon
{
Icon
{
iconSize
:
16
iconSize
:
16
icon
:
'
valid
'
icon
:
'
valid
'
}
}
}
}
}
tests/ui/modules/Linphone/Contact/Contact.qml
View file @
88e0688e
...
@@ -12,7 +12,9 @@ Item {
...
@@ -12,7 +12,9 @@ Item {
property
alias
image
:
avatar
.
image
property
alias
image
:
avatar
.
image
property
alias
presenceLevel
:
avatar
.
presenceLevel
property
alias
presenceLevel
:
avatar
.
presenceLevel
property
alias
sipAddress
:
description
.
sipAddress
property
alias
sipAddress
:
description
.
sipAddress
property
alias
sipAddressColor
:
description
.
sipAddressColor
property
alias
username
:
avatar
.
username
property
alias
username
:
avatar
.
username
property
alias
usernameColor
:
description
.
usernameColor
height
:
ContactStyle
.
height
height
:
ContactStyle
.
height
...
...
tests/ui/modules/Linphone/Contact/ContactDescription.qml
View file @
88e0688e
...
@@ -7,6 +7,8 @@ import Linphone.Styles 1.0
...
@@ -7,6 +7,8 @@ import Linphone.Styles 1.0
Column
{
Column
{
property
alias
sipAddress
:
sipAddress
.
text
property
alias
sipAddress
:
sipAddress
.
text
property
alias
username
:
username
.
text
property
alias
username
:
username
.
text
property
color
sipAddressColor
:
ContactDescriptionStyle
.
sipAddress
.
color
property
color
usernameColor
:
ContactDescriptionStyle
.
username
.
color
property
int
horizontalTextAlignment
property
int
horizontalTextAlignment
// Username.
// Username.
...
@@ -14,7 +16,8 @@ Column {
...
@@ -14,7 +16,8 @@ Column {
id
:
username
id
:
username
clip
:
true
clip
:
true
color
:
ContactDescriptionStyle
.
username
.
color
color
:
usernameColor
elide
:
Text
.
ElideRight
font.bold
:
true
font.bold
:
true
font.pointSize
:
ContactDescriptionStyle
.
username
.
fontSize
font.pointSize
:
ContactDescriptionStyle
.
username
.
fontSize
height
:
parent
.
height
/
2
height
:
parent
.
height
/
2
...
@@ -27,8 +30,8 @@ Column {
...
@@ -27,8 +30,8 @@ Column {
Text
{
Text
{
id
:
sipAddress
id
:
sipAddress
c
lip
:
true
c
olor
:
sipAddressColor
color
:
ContactDescriptionStyle
.
sipAddress
.
color
elide
:
Text
.
ElideRight
font.pointSize
:
ContactDescriptionStyle
.
sipAddress
.
fontSize
font.pointSize
:
ContactDescriptionStyle
.
sipAddress
.
fontSize
height
:
parent
.
height
/
2
height
:
parent
.
height
/
2
horizontalAlignment
:
horizontalTextAlignment
horizontalAlignment
:
horizontalTextAlignment
...
...
tests/ui/modules/Linphone/qmldir
View file @
88e0688e
...
@@ -6,6 +6,9 @@ module Linphone
...
@@ -6,6 +6,9 @@ module Linphone
# Components ---------------------------------------------------------
# Components ---------------------------------------------------------
# Call
CallControls 1.0 Call/CallControls.qml
# Chat
# Chat
Chat 1.0 Chat/Chat.qml
Chat 1.0 Chat/Chat.qml
...
...
tests/ui/scripts/Utils/utils.js
View file @
88e0688e
...
@@ -106,6 +106,19 @@ function clearTimeout (timer) {
...
@@ -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[`.
// Invoke a `cb` function with each value of the interval: `[0, n[`.
// Return a mapped array created with the returned values of `cb`.
// Return a mapped array created with the returned values of `cb`.
function
times
(
n
,
cb
,
context
)
{
function
times
(
n
,
cb
,
context
)
{
...
@@ -144,7 +157,7 @@ function genRandomNumberBetweenIntervals (intervals) {
...
@@ -144,7 +157,7 @@ function genRandomNumberBetweenIntervals (intervals) {
return
genRandomNumber
(
intervals
[
0
][
0
],
intervals
[
0
][
1
])
return
genRandomNumber
(
intervals
[
0
][
0
],
intervals
[
0
][
1
])
}
}
// Compute the
number of values
.
// Compute the
intervals size
.
var
size
=
0
var
size
=
0
intervals
.
forEach
(
function
(
interval
)
{
intervals
.
forEach
(
function
(
interval
)
{
size
+=
interval
[
1
]
-
interval
[
0
]
size
+=
interval
[
1
]
-
interval
[
0
]
...
...
tests/ui/views/Calls/Calls.qml
View file @
88e0688e
...
@@ -16,7 +16,7 @@ Window {
...
@@ -16,7 +16,7 @@ Window {
anchors.fill
:
parent
anchors.fill
:
parent
defaultChildAWidth
:
250
defaultChildAWidth
:
250
maximumLeftLimit
:
300
maximumLeftLimit
:
300
minimumLeftLimit
:
50
minimumLeftLimit
:
1
50
// Calls list.
// Calls list.
childA
:
ColumnLayout
{
childA
:
ColumnLayout
{
...
@@ -45,10 +45,95 @@ Window {
...
@@ -45,10 +45,95 @@ Window {
}
}
}
}
Rectangle
{
ScrollableListView
{
Layout.fillWidth
:
true
Layout.fillWidth
:
true
Layout.fillHeight
:
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
...
@@ -5,12 +5,13 @@ import Common 1.0
import
Linphone
1.0
import
Linphone
1.0
Rectangle
{
Rectangle
{
default
property
alias
actionArea
:
actionArea
.
data
property
alias
callType
:
callType
.
text
property
alias
callType
:
callType
.
text
property
alias
sipAddress
:
contactDescription
.
sipAddress
property
alias
sipAddress
:
contactDescription
.
sipAddress
property
alias
username
:
contactDescription
.
username
property
alias
username
:
contactDescription
.
username
property
alias
avatarImage
:
image
.
source
property
alias
avatarImage
:
image
.
source
default
property
alias
_actionArea
:
actionArea
.
data
color
:
'
#EAEAEA
'
color
:
'
#EAEAEA
'
ColumnLayout
{
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