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
fedf0cae
Commit
fedf0cae
authored
Feb 07, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/IncallFullscreen): escape quit fullscreen
parent
ffd3b4b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
150 additions
and
144 deletions
+150
-144
IncallFullscreen.qml
linphone-desktop/ui/views/App/IncallFullscreen.qml
+150
-144
No files found.
linphone-desktop/ui/views/App/IncallFullscreen.qml
View file @
fedf0cae
...
...
@@ -30,6 +30,9 @@ Window {
// ---------------------------------------------------------------------------
height
:
Screen
.
height
width
:
Screen
.
width
visible
:
true
visibility
:
Window
.
FullScreen
...
...
@@ -40,193 +43,196 @@ Window {
Rectangle
{
anchors.fill
:
parent
color
:
'
#000000
'
// Not a style.
}
focus
:
true
Camera
{
id
:
camera
Keys.onEscapePressed
:
incall
.
close
()
anchors.fill
:
parent
call
:
incall
.
call
}
Camera
{
id
:
camera
ColumnLayout
{
anchors
{
fill
:
parent
topMargin
:
CallStyle
.
header
.
topMargin
anchors.fill
:
parent
call
:
incall
.
call
}
spacing
:
0
// -------------------------------------------------------------------------
// Call info.
// -------------------------------------------------------------------------
Item
{
id
:
info
Layout.alignment
:
Qt
.
AlignTop
Layout.fillWidth
:
true
Layout.leftMargin
:
CallStyle
.
header
.
leftMargin
Layout.rightMargin
:
CallStyle
.
header
.
rightMargin
Layout.preferredHeight
:
CallStyle
.
header
.
contactDescription
.
height
Icon
{
id
:
callQuality
anchors.left
:
parent
.
left
icon
:
'
call_quality_0
'
iconSize
:
CallStyle
.
header
.
iconSize
// See: http://www.linphone.org/docs/liblinphone/group__call__misc.html#ga62c7d3d08531b0cc634b797e273a0a73
Timer
{
interval
:
5000
repeat
:
true
running
:
true
triggeredOnStart
:
true
onTriggered
:
{
var
quality
=
call
.
quality
callQuality
.
icon
=
'
call_quality_
'
+
(
// Note: `quality` is in the [0, 5] interval.
// It's necessary to map in the `call_quality_` interval. ([0, 3])
quality
>=
0
?
Math
.
round
(
quality
/
(
5
/
3
))
:
0
)
}
}
ColumnLayout
{
anchors
{
fill
:
parent
topMargin
:
CallStyle
.
header
.
topMargin
}
spacing
:
0
// -----------------------------------------------------------------------
//
Timer
.
//
Call info
.
// -----------------------------------------------------------------------
Text
{
id
:
elapsedTime
Item
{
id
:
info
Layout.alignment
:
Qt
.
AlignTop
Layout.fillWidth
:
true
Layout.leftMargin
:
CallStyle
.
header
.
leftMargin
Layout.rightMargin
:
CallStyle
.
header
.
rightMargin
Layout.preferredHeight
:
CallStyle
.
header
.
contactDescription
.
height
Icon
{
id
:
callQuality
anchors.left
:
parent
.
left
icon
:
'
call_quality_0
'
iconSize
:
CallStyle
.
header
.
iconSize
// See: http://www.linphone.org/docs/liblinphone/group__call__misc.html#ga62c7d3d08531b0cc634b797e273a0a73
Timer
{
interval
:
5000
repeat
:
true
running
:
true
triggeredOnStart
:
true
onTriggered
:
{
var
quality
=
call
.
quality
callQuality
.
icon
=
'
call_quality_
'
+
(
// Note: `quality` is in the [0, 5] interval.
// It's necessary to map in the `call_quality_` interval. ([0, 3])
quality
>=
0
?
Math
.
round
(
quality
/
(
5
/
3
))
:
0
)
}
}
}
anchors.fill
:
parent
// ---------------------------------------------------------------------
// Timer.
// ---------------------------------------------------------------------
font.pointSize
:
CallStyle
.
header
.
elapsedTime
.
fullscreenFontSize
Text
{
id
:
elapsedTime
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
anchors.fill
:
parent
// Not a customizable style.
color
:
'
white
'
style
:
Text
.
Raised
styleColor
:
'
black
'
font.pointSize
:
CallStyle
.
header
.
elapsedTime
.
fullscreenFontSize
Component.onCompleted
:
{
var
updateDuration
=
function
()
{
text
=
Utils
.
formatElapsedTime
(
call
.
duration
)
Utils
.
setTimeout
(
elapsedTime
,
1000
,
updateDuration
)
}
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
// Not a customizable style.
color
:
'
white
'
style
:
Text
.
Raised
styleColor
:
'
black
'
updateDuration
()
Component.onCompleted
:
{
var
updateDuration
=
function
()
{
text
=
Utils
.
formatElapsedTime
(
call
.
duration
)
Utils
.
setTimeout
(
elapsedTime
,
1000
,
updateDuration
)
}
updateDuration
()
}
}
}
// --
---------------------------------------------------------------------
// Video actions.
// --
---------------------------------------------------------------------
//
---------------------------------------------------------------------
// Video actions.
//
---------------------------------------------------------------------
ActionBar
{
anchors.right
:
parent
.
right
iconSize
:
CallStyle
.
header
.
iconSize
ActionBar
{
anchors.right
:
parent
.
right
iconSize
:
CallStyle
.
header
.
iconSize
ActionButton
{
icon
:
'
screenshot
'
ActionButton
{
icon
:
'
screenshot
'
onClicked
:
call
.
takeSnapshot
()
}
onClicked
:
call
.
takeSnapshot
()
}
ActionSwitch
{
enabled
:
call
.
recording
icon
:
'
record
'
useStates
:
false
ActionSwitch
{
enabled
:
call
.
recording
icon
:
'
record
'
useStates
:
false
onClicked
:
!
enabled
?
call
.
startRecording
()
:
call
.
stopRecording
()
}
onClicked
:
!
enabled
?
call
.
startRecording
()
:
call
.
stopRecording
()
}
ActionButton
{
icon
:
'
fullscreen
'
ActionButton
{
icon
:
'
fullscreen
'
onClicked
:
_exit
()
}
}
}
onClicked
:
_exit
()
}
}
}
// --
-----------------------------------------------------------------------
// Action Buttons.
// --
-----------------------------------------------------------------------
//
-----------------------------------------------------------------------
// Action Buttons.
//
-----------------------------------------------------------------------
Item
{
Layout.alignment
:
Qt
.
AlignBottom
Layout.fillWidth
:
true
Layout.preferredHeight
:
CallStyle
.
actionArea
.
height
Item
{
Layout.alignment
:
Qt
.
AlignBottom
Layout.fillWidth
:
true
Layout.preferredHeight
:
CallStyle
.
actionArea
.
height
GridLayout
{
anchors
{
left
:
parent
.
left
leftMargin
:
CallStyle
.
actionArea
.
leftButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
GridLayout
{
anchors
{
left
:
parent
.
left
leftMargin
:
CallStyle
.
actionArea
.
leftButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
rowSpacing
:
ActionBarStyle
.
spacing
rowSpacing
:
ActionBarStyle
.
spacing
ActionSwitch
{
enabled
:
!
call
.
microMuted
icon
:
'
micro
'
iconSize
:
CallStyle
.
actionArea
.
iconSize
ActionSwitch
{
enabled
:
!
call
.
microMuted
icon
:
'
micro
'
iconSize
:
CallStyle
.
actionArea
.
iconSize
onClicked
:
call
.
microMuted
=
enabled
}
onClicked
:
call
.
microMuted
=
enabled
}
ActionSwitch
{
enabled
:
true
icon
:
'
camera
'
iconSize
:
CallStyle
.
actionArea
.
iconSize
updating
:
call
.
updating
ActionSwitch
{
enabled
:
true
icon
:
'
camera
'
iconSize
:
CallStyle
.
actionArea
.
iconSize
updating
:
call
.
updating
onClicked
:
_exit
(
function
()
{
call
.
videoEnabled
=
false
})
}
onClicked
:
_exit
(
function
()
{
call
.
videoEnabled
=
false
})
}
ActionButton
{
Layout.preferredHeight
:
CallStyle
.
actionArea
.
iconSize
Layout.preferredWidth
:
CallStyle
.
actionArea
.
iconSize
icon
:
'
options
'
// TODO: display options.
iconSize
:
CallStyle
.
actionArea
.
iconSize
ActionButton
{
Layout.preferredHeight
:
CallStyle
.
actionArea
.
iconSize
Layout.preferredWidth
:
CallStyle
.
actionArea
.
iconSize
icon
:
'
options
'
// TODO: display options.
iconSize
:
CallStyle
.
actionArea
.
iconSize
}
}
}
Camera
{
anchors.centerIn
:
parent
height
:
CallStyle
.
actionArea
.
userVideo
.
height
width
:
CallStyle
.
actionArea
.
userVideo
.
width
Camera
{
anchors.centerIn
:
parent
height
:
CallStyle
.
actionArea
.
userVideo
.
height
width
:
CallStyle
.
actionArea
.
userVideo
.
width
isPreview
:
true
isPreview
:
true
call
:
incall
.
call
}
ActionBar
{
anchors
{
right
:
parent
.
right
rightMargin
:
CallStyle
.
actionArea
.
rightButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
call
:
incall
.
call
}
iconSize
:
CallStyle
.
actionArea
.
iconSize
ActionSwitch
{
enabled
:
!
call
.
pausedByUser
icon
:
'
pause
'
updating
:
call
.
updating
ActionBar
{
anchors
{
right
:
parent
.
right
rightMargin
:
CallStyle
.
actionArea
.
rightButtonsGroupMargin
verticalCenter
:
parent
.
verticalCenter
}
iconSize
:
CallStyle
.
actionArea
.
iconSize
ActionSwitch
{
enabled
:
!
call
.
pausedByUser
icon
:
'
pause
'
updating
:
call
.
updating
onClicked
:
_exit
(
function
()
{
call
.
pausedByUser
=
enabled
})
}
onClicked
:
_exit
(
function
()
{
call
.
pausedByUser
=
enabled
})
}
ActionButton
{
icon
:
'
hangup
'
ActionButton
{
icon
:
'
hangup
'
onClicked
:
_exit
(
call
.
terminate
)
onClicked
:
_exit
(
call
.
terminate
)
}
}
}
}
...
...
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