Commit 1982234f authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Calls/ConferenceManager): in progress

parent d7bd0229
...@@ -364,6 +364,13 @@ Server url not configured.</translation> ...@@ -364,6 +364,13 @@ Server url not configured.</translation>
<translation>CONFERENCE</translation> <translation>CONFERENCE</translation>
</message> </message>
</context> </context>
<context>
<name>ConferenceControls</name>
<message>
<source>conference</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>ConferenceManager</name> <name>ConferenceManager</name>
<message> <message>
......
...@@ -364,6 +364,13 @@ Url du serveur non configurée.</translation> ...@@ -364,6 +364,13 @@ Url du serveur non configurée.</translation>
<translation>CONFÉRENCE</translation> <translation>CONFÉRENCE</translation>
</message> </message>
</context> </context>
<context>
<name>ConferenceControls</name>
<message>
<source>conference</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>ConferenceManager</name> <name>ConferenceManager</name>
<message> <message>
......
...@@ -297,6 +297,7 @@ ...@@ -297,6 +297,7 @@
<file>ui/modules/Linphone/Calls/Calls.js</file> <file>ui/modules/Linphone/Calls/Calls.js</file>
<file>ui/modules/Linphone/Calls/Calls.qml</file> <file>ui/modules/Linphone/Calls/Calls.qml</file>
<file>ui/modules/Linphone/Calls/CallStatistics.qml</file> <file>ui/modules/Linphone/Calls/CallStatistics.qml</file>
<file>ui/modules/Linphone/Calls/ConferenceControls.qml</file>
<file>ui/modules/Linphone/Chat/Chat.js</file> <file>ui/modules/Linphone/Chat/Chat.js</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>
......
...@@ -27,7 +27,6 @@ Rectangle { ...@@ -27,7 +27,6 @@ Rectangle {
color: CallControlsStyle.color color: CallControlsStyle.color
height: CallControlsStyle.height height: CallControlsStyle.height
width: CallControlsStyle.width
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
...@@ -70,11 +69,7 @@ Rectangle { ...@@ -70,11 +69,7 @@ Rectangle {
id: content id: content
Layout.fillHeight: true Layout.fillHeight: true
Layout.preferredWidth: callControls._content[0].width
Component.onCompleted: Layout.preferredWidth = data[0].width
} }
} }
// ---------------------------------------------------------------------------
} }
...@@ -113,16 +113,14 @@ function setIndexWithCall (call) { ...@@ -113,16 +113,14 @@ function setIndexWithCall (call) {
return return
} }
} }
updateSelectedCall(call, -1)
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// View handlers. // View handlers.
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function handleSelectedCall (call) {
setIndexWithCall(call)
}
function handleCountChanged (count) { function handleCountChanged (count) {
if (count === 0) { if (count === 0) {
return return
...@@ -144,7 +142,7 @@ function handleCountChanged (count) { ...@@ -144,7 +142,7 @@ function handleCountChanged (count) {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function handleCallRunning (call) { function handleCallRunning (call) {
updateSelectedCall(call) setIndexWithCall(call)
} }
function handleRowsAboutToBeRemoved (_, first, last) { function handleRowsAboutToBeRemoved (_, first, last) {
......
...@@ -26,7 +26,6 @@ ListView { ...@@ -26,7 +26,6 @@ ListView {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
onCountChanged: Logic.handleCountChanged(count) onCountChanged: Logic.handleCountChanged(count)
onSelectedCall: Logic.handleSelectedCall(call)
Connections { Connections {
target: model target: model
...@@ -87,6 +86,14 @@ ListView { ...@@ -87,6 +86,14 @@ ListView {
} }
} }
// ---------------------------------------------------------------------------
// Conference.
// ---------------------------------------------------------------------------
header: ConferenceControls {
width: parent.width
}
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Calls. // Calls.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
......
import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
import Linphone 1.0
import Linphone.Styles 1.0
// =============================================================================
Rectangle {
id: callControls
// ---------------------------------------------------------------------------
property alias signIcon: signIcon.icon
property alias textColor: text.color
// ---------------------------------------------------------------------------
signal clicked
// ---------------------------------------------------------------------------
color: CallControlsStyle.color
height: CallControlsStyle.height
MouseArea {
anchors.fill: parent
onClicked: callControls.clicked()
}
Icon {
id: signIcon
anchors {
left: parent.left
top: parent.top
}
iconSize: CallControlsStyle.signSize
}
RowLayout {
anchors {
fill: parent
leftMargin: CallControlsStyle.leftMargin
rightMargin: CallControlsStyle.rightMargin
}
spacing: 0
Text {
id: text
Layout.fillHeight: true
Layout.fillWidth: true
text: qsTr('conference')
}
}
}
...@@ -11,5 +11,4 @@ QtObject { ...@@ -11,5 +11,4 @@ QtObject {
property int leftMargin: 12 property int leftMargin: 12
property int rightMargin: 12 property int rightMargin: 12
property int signSize: 40 property int signSize: 40
property int width: 240
} }
...@@ -74,8 +74,8 @@ Rectangle { ...@@ -74,8 +74,8 @@ Rectangle {
var width = container.width var width = container.width
var size = height < CallStyle.container.avatar.maxSize && height > 0 var size = height < CallStyle.container.avatar.maxSize && height > 0
? height ? height
: CallStyle.container.avatar.maxSize : CallStyle.container.avatar.maxSize
return size < width ? size : width return size < width ? size : width
} }
......
...@@ -33,6 +33,37 @@ function handleClosing (close) { ...@@ -33,6 +33,37 @@ function handleClosing (close) {
close.accepted = false close.accepted = false
} }
// -----------------------------------------------------------------------------
function openConferenceManager () { function openConferenceManager () {
window.attachVirtualWindow(Qt.resolvedUrl('ConferenceManager.qml')) window.attachVirtualWindow(Qt.resolvedUrl('ConferenceManager.qml'))
} }
// -----------------------------------------------------------------------------
function getContent () {
var call = window.call
if (call == null) {
return null
}
var status = call.status
if (status == null) {
return null
}
var CallModel = Linphone.CallModel
if (status === CallModel.CallStatusIncoming) {
return incomingCall
}
if (status === CallModel.CallStatusOutgoing) {
return outgoingCall
}
if (status === CallModel.CallStatusEnded) {
return endedCall
}
return incall
}
...@@ -18,7 +18,7 @@ Window { ...@@ -18,7 +18,7 @@ Window {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// `{}` is a workaround to avoid `TypeError: Cannot read property...`. // `{}` is a workaround to avoid `TypeError: Cannot read property...`.
property var call: calls.selectedCall || ({ readonly property var call: calls.selectedCall || ({
callError: '', callError: '',
isOutgoing: true, isOutgoing: true,
recording: false, recording: false,
...@@ -187,31 +187,7 @@ Window { ...@@ -187,31 +187,7 @@ Window {
childA: Loader { childA: Loader {
anchors.fill: parent anchors.fill: parent
sourceComponent: Logic.getContent()
sourceComponent: {
if (!window.call) {
return null
}
var status = window.call.status
if (status == null) {
return null
}
if (status === CallModel.CallStatusIncoming) {
return incomingCall
}
if (status === CallModel.CallStatusOutgoing) {
return outgoingCall
}
if (status === CallModel.CallStatusEnded) {
return endedCall
}
return incall
}
} }
childB: Loader { childB: Loader {
......
...@@ -11,6 +11,12 @@ import App.Styles 1.0 ...@@ -11,6 +11,12 @@ import App.Styles 1.0
// ============================================================================= // =============================================================================
Rectangle { Rectangle {
id: conference
property var conferenceModel
// ---------------------------------------------------------------------------
color: CallStyle.backgroundColor color: CallStyle.backgroundColor
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
...@@ -71,13 +77,13 @@ Rectangle { ...@@ -71,13 +77,13 @@ Rectangle {
iconSize: CallStyle.header.iconSize iconSize: CallStyle.header.iconSize
ActionSwitch { ActionSwitch {
enabled: conference.recording enabled: conference.conferenceModel.recording
icon: 'record' icon: 'record'
useStates: false useStates: false
onClicked: !enabled onClicked: !enabled
? conference.startRecording() ? conference.conferenceModel.startRecording()
: conference.stopRecording() : conference.conferenceModel.stopRecording()
} }
} }
} }
...@@ -101,9 +107,7 @@ Rectangle { ...@@ -101,9 +107,7 @@ Rectangle {
cellHeight: ConferenceStyle.grid.cell.height cellHeight: ConferenceStyle.grid.cell.height
cellWidth: ConferenceStyle.grid.cell.width cellWidth: ConferenceStyle.grid.cell.width
model: ConferenceModel { model: conference.conferenceModel
id: conference
}
delegate: Item { delegate: Item {
height: grid.cellHeight height: grid.cellHeight
...@@ -187,7 +191,7 @@ Rectangle { ...@@ -187,7 +191,7 @@ Rectangle {
ActionButton { ActionButton {
icon: 'hangup' icon: 'hangup'
onClicked: conference.terminate() onClicked: conference.conferenceModel.terminate()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment