864 lines
29 KiB
QML
864 lines
29 KiB
QML
import QtQuick
|
|
import QtQuick.Effects
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls.Basic as Control
|
|
import Linphone
|
|
import UtilsCpp
|
|
|
|
// TODO : spacing
|
|
AbstractMainPage {
|
|
id: mainItem
|
|
|
|
property ConferenceInfoGui selectedConference
|
|
property int meetingListCount
|
|
signal returnRequested()
|
|
signal addParticipantsValidated(list<string> selectedParticipants)
|
|
|
|
noItemButtonText: qsTr("Créer une réunion")
|
|
emptyListText: qsTr("Aucune réunion")
|
|
newItemIconSource: AppIcons.plusCircle
|
|
rightPanelColor: selectedConference ? DefaultStyle.grey_0 : DefaultStyle.grey_100
|
|
showDefaultItem: leftPanelStackView.currentItem?.objectName === "listLayout" && meetingListCount === 0
|
|
|
|
|
|
function editConference(confInfoGui = null) {
|
|
var isCreation = !confInfoGui
|
|
var item
|
|
if (isCreation) {
|
|
confInfoGui = Qt.createQmlObject('import Linphone
|
|
ConferenceInfoGui{
|
|
}', mainItem)
|
|
mainItem.selectedConference = confInfoGui
|
|
item = leftPanelStackView.push(createConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
|
item.forceActiveFocus()
|
|
} else {
|
|
mainItem.selectedConference = confInfoGui
|
|
item = overridenRightPanelStackView.push(editConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": isCreation})
|
|
item.forceActiveFocus()
|
|
}
|
|
}
|
|
|
|
|
|
onVisibleChanged: if (!visible) {
|
|
leftPanelStackView.clear()
|
|
leftPanelStackView.push(leftPanelStackView.initialItem)
|
|
|
|
}
|
|
|
|
onSelectedConferenceChanged: {
|
|
overridenRightPanelStackView.clear()
|
|
if (selectedConference && selectedConference.core && selectedConference.core.haveModel) {
|
|
if (!overridenRightPanelStackView.currentItem || overridenRightPanelStackView.currentItem != meetingDetail) overridenRightPanelStackView.replace(meetingDetail, Control.StackView.Immediate)
|
|
}
|
|
}
|
|
|
|
onNoItemButtonPressed: editConference()
|
|
|
|
Component.onCompleted: rightPanelStackView.push(overridenRightPanel, Control.StackView.Immediate)
|
|
|
|
leftPanelContent: Control.StackView {
|
|
id: leftPanelStackView
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
Layout.leftMargin: 45 * DefaultStyle.dp
|
|
initialItem: listLayout
|
|
clip: true
|
|
}
|
|
|
|
Dialog {
|
|
id: cancelAndDeleteConfDialog
|
|
property bool cancel: false
|
|
signal cancelRequested()
|
|
// width: 278 * DefaultStyle.dp
|
|
text: cancel ? qsTr("Souhaitez-vous annuler et supprimer cette réunion ?") : qsTr("Souhaitez-vous supprimer cette réunion ?")
|
|
buttons: [
|
|
Button {
|
|
visible: cancelAndDeleteConfDialog.cancel
|
|
text: qsTr("Annuler et supprimer")
|
|
leftPadding: 20 * DefaultStyle.dp
|
|
rightPadding: 20 * DefaultStyle.dp
|
|
topPadding: 11 * DefaultStyle.dp
|
|
bottomPadding: 11 * DefaultStyle.dp
|
|
onClicked: {
|
|
cancelAndDeleteConfDialog.cancelRequested()
|
|
cancelAndDeleteConfDialog.accepted()
|
|
cancelAndDeleteConfDialog.close()
|
|
}
|
|
},
|
|
Button {
|
|
text: cancelAndDeleteConfDialog.cancel ? qsTr("Supprimer seulement") : qsTr("Supprimer")
|
|
leftPadding: 20 * DefaultStyle.dp
|
|
rightPadding: 20 * DefaultStyle.dp
|
|
topPadding: 11 * DefaultStyle.dp
|
|
bottomPadding: 11 * DefaultStyle.dp
|
|
onClicked: {
|
|
cancelAndDeleteConfDialog.accepted()
|
|
cancelAndDeleteConfDialog.close()
|
|
}
|
|
},
|
|
Button {
|
|
text: qsTr("Retour")
|
|
inversedColors: true
|
|
leftPadding: 20 * DefaultStyle.dp
|
|
rightPadding: 20 * DefaultStyle.dp
|
|
topPadding: 11 * DefaultStyle.dp
|
|
bottomPadding: 11 * DefaultStyle.dp
|
|
onClicked: {
|
|
cancelAndDeleteConfDialog.rejected()
|
|
cancelAndDeleteConfDialog.close()
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|
|
Item {
|
|
id: overridenRightPanel
|
|
Control.StackView {
|
|
id: overridenRightPanelStackView
|
|
width: 393 * DefaultStyle.dp
|
|
height: parent.height
|
|
anchors.top: parent.top
|
|
anchors.centerIn: parent
|
|
anchors.horizontalCenter: parent.horiztonalCenter
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: listLayout
|
|
FocusScope{
|
|
property string objectName: "listLayout"
|
|
Control.StackView.onDeactivated: {
|
|
mainItem.selectedConference = null
|
|
}
|
|
Control.StackView.onActivated: {
|
|
mainItem.selectedConference = conferenceList.selectedConference
|
|
}
|
|
|
|
ColumnLayout {
|
|
anchors.fill: parent
|
|
spacing: 0
|
|
RowLayout {
|
|
Layout.rightMargin: 38 * DefaultStyle.dp
|
|
spacing: 0
|
|
Text {
|
|
Layout.fillWidth: true
|
|
text: qsTr("Réunions")
|
|
color: DefaultStyle.main2_700
|
|
font.pixelSize: 29 * DefaultStyle.dp
|
|
font.weight: 800 * DefaultStyle.dp
|
|
}
|
|
Item{Layout.fillWidth: true}
|
|
Button {
|
|
background: Item {
|
|
}
|
|
icon.source: AppIcons.plusCircle
|
|
Layout.preferredWidth: 28 * DefaultStyle.dp
|
|
Layout.preferredHeight: 28 * DefaultStyle.dp
|
|
icon.width: 28 * DefaultStyle.dp
|
|
icon.height: 28 * DefaultStyle.dp
|
|
onClicked: {
|
|
mainItem.editConference()
|
|
}
|
|
}
|
|
}
|
|
SearchBar {
|
|
id: searchBar
|
|
Layout.fillWidth: true
|
|
Layout.topMargin: 18 * DefaultStyle.dp
|
|
Layout.rightMargin: 38 * DefaultStyle.dp
|
|
placeholderText: qsTr("Rechercher une réunion")
|
|
KeyNavigation.up: conferenceList
|
|
KeyNavigation.down: conferenceList
|
|
Binding {
|
|
target: mainItem
|
|
property: "showDefaultItem"
|
|
when: searchBar.text.length !== 0
|
|
value: false
|
|
}
|
|
}
|
|
Text {
|
|
visible: conferenceList.count === 0
|
|
Layout.topMargin: 137 * DefaultStyle.dp
|
|
Layout.fillHeight: true
|
|
Layout.alignment: Qt.AlignHCenter
|
|
text: qsTr("Aucune réunion%1").arg(searchBar.text.length !== 0 ? " correspondante" : "")
|
|
font {
|
|
pixelSize: 16 * DefaultStyle.dp
|
|
weight: 800 * DefaultStyle.dp
|
|
}
|
|
}
|
|
MeetingListView {
|
|
id: conferenceList
|
|
// Remove 24 from first section padding because we cannot know that it is the first section. 24 is the margins between sections.
|
|
Layout.topMargin: 38 * DefaultStyle.dp - 24 * DefaultStyle.dp
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
|
|
searchBarText: searchBar.text
|
|
|
|
onCountChanged: mainItem.meetingListCount = count
|
|
onSelectedConferenceChanged: {
|
|
mainItem.selectedConference = selectedConference
|
|
}
|
|
|
|
Keys.onPressed: (event) => {
|
|
if(event.key == Qt.Key_Escape){
|
|
searchBar.forceActiveFocus()
|
|
event.accepted = true
|
|
}else if(event.key == Qt.Key_Right){
|
|
overridenRightPanelStackView.currentItem.forceActiveFocus()
|
|
event.accepted = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: createConf
|
|
FocusScope{
|
|
id: createConfLayout
|
|
property ConferenceInfoGui conferenceInfoGui
|
|
property bool isCreation
|
|
ColumnLayout {
|
|
spacing: 33 * DefaultStyle.dp
|
|
anchors.fill: parent
|
|
RowLayout {
|
|
Layout.rightMargin: 35 * DefaultStyle.dp
|
|
spacing: 5 * DefaultStyle.dp
|
|
Button {
|
|
id: backButton
|
|
background: Item{}
|
|
icon.source: AppIcons.leftArrow
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
icon.width: 24 * DefaultStyle.dp
|
|
icon.height: 24 * DefaultStyle.dp
|
|
topPadding: 6 * DefaultStyle.dp
|
|
bottomPadding: 6 * DefaultStyle.dp
|
|
focus: true
|
|
KeyNavigation.right: createButton
|
|
KeyNavigation.down: meetingSetup
|
|
onClicked: {
|
|
meetingSetup.conferenceInfoGui.core.undo()
|
|
leftPanelStackView.pop()
|
|
}
|
|
}
|
|
Text {
|
|
text: qsTr("Nouvelle réunion")
|
|
color: DefaultStyle.main2_700
|
|
font {
|
|
pixelSize: 22 * DefaultStyle.dp
|
|
weight: 800 * DefaultStyle.dp
|
|
}
|
|
Layout.fillWidth: true
|
|
}
|
|
Item {Layout.fillWidth: true}
|
|
Button {
|
|
id: createButton
|
|
Layout.preferredWidth: 57 * DefaultStyle.dp
|
|
topPadding: 6 * DefaultStyle.dp
|
|
bottomPadding: 6 * DefaultStyle.dp
|
|
textSize: 13 * DefaultStyle.dp
|
|
text: qsTr("Créer")
|
|
KeyNavigation.left: backButton
|
|
KeyNavigation.down: meetingSetup
|
|
|
|
onClicked: {
|
|
if (meetingSetup.conferenceInfoGui.core.subject.length === 0) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
|
} else if (meetingSetup.conferenceInfoGui.core.duration <= 0) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
|
|
} else if (meetingSetup.conferenceInfoGui.core.participantCount === 0) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
|
|
} else {
|
|
meetingSetup.conferenceInfoGui.core.save()
|
|
mainWindow.showLoadingPopup(qsTr("Création de la réunion en cours ..."), true, function () {
|
|
meetingSetup.conferenceInfoGui.core.cancelCreation()
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
MeetingForm {
|
|
id: meetingSetup
|
|
conferenceInfoGui: createConfLayout.conferenceInfoGui
|
|
isCreation: createConfLayout.isCreation
|
|
Layout.fillHeight: true
|
|
Layout.fillWidth: true
|
|
Layout.rightMargin: 35 * DefaultStyle.dp
|
|
Connections {
|
|
target: meetingSetup.conferenceInfoGui ? meetingSetup.conferenceInfoGui.core : null
|
|
function onConferenceSchedulerStateChanged() {
|
|
var mainWin = UtilsCpp.getMainWindow()
|
|
if (meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.AllocationPending
|
|
|| meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Updating) {
|
|
mainWin.showLoadingPopup(qsTr("Création de la réunion en cours..."), true, function () {
|
|
leftPanelStackView.pop()
|
|
})
|
|
} else {
|
|
if (meetingSetup.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Error) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La création de la conférence a échoué"), false)
|
|
}
|
|
mainWin.closeLoadingPopup()
|
|
}
|
|
createConfLayout.enabled = meetingSetup.conferenceInfoGui.core.schedulerState != LinphoneEnums.ConferenceSchedulerState.AllocationPending
|
|
}
|
|
function onSaveFailed() {
|
|
var mainWin = UtilsCpp.getMainWindow()
|
|
mainWin.closeLoadingPopup()
|
|
}
|
|
}
|
|
onSaveSucceed: {
|
|
leftPanelStackView.pop()
|
|
UtilsCpp.showInformationPopup(qsTr("Nouvelle réunion"), qsTr("Réunion planifiée avec succès"), true)
|
|
mainWindow.closeLoadingPopup()
|
|
}
|
|
onAddParticipantsRequested: {
|
|
leftPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": leftPanelStackView})
|
|
}
|
|
Connections {
|
|
target: mainItem
|
|
onAddParticipantsValidated: (selectedParticipants) => {
|
|
meetingSetup.conferenceInfoGui.core.resetParticipants(selectedParticipants)
|
|
leftPanelStackView.pop()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: editConf
|
|
FocusScope{
|
|
id: editFocusScope
|
|
property bool isCreation
|
|
property ConferenceInfoGui conferenceInfoGui
|
|
width: overridenRightPanelStackView.width
|
|
height: editLayout.height
|
|
ColumnLayout {
|
|
id: editLayout
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.top: parent.top
|
|
anchors.topMargin: 58 * DefaultStyle.dp
|
|
spacing: 0
|
|
Section {
|
|
Layout.preferredWidth: 393 * DefaultStyle.dp
|
|
content: RowLayout {
|
|
spacing: 16 * DefaultStyle.dp
|
|
Layout.preferredWidth: overridenRightPanelStackView.width
|
|
Button {
|
|
id: backButton
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
icon.width: 24 * DefaultStyle.dp
|
|
icon.height: 24 * DefaultStyle.dp
|
|
icon.source: AppIcons.leftArrow
|
|
KeyNavigation.left: saveButton
|
|
KeyNavigation.right: titleText
|
|
KeyNavigation.down: conferenceEdit
|
|
KeyNavigation.up: conferenceEdit
|
|
onClicked: {
|
|
conferenceEdit.conferenceInfoGui.core.undo()
|
|
overridenRightPanelStackView.pop()
|
|
}
|
|
background: Item{}
|
|
}
|
|
RowLayout {
|
|
spacing: 8 * DefaultStyle.dp
|
|
EffectImage{
|
|
imageSource: AppIcons.usersThree
|
|
colorizationColor: DefaultStyle.main2_600
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
}
|
|
TextInput {
|
|
id: titleText
|
|
Layout.fillWidth: true
|
|
color: DefaultStyle.main2_600
|
|
clip: true
|
|
font {
|
|
pixelSize: 20 * DefaultStyle.dp
|
|
weight: 800 * DefaultStyle.dp
|
|
}
|
|
KeyNavigation.left: backButton
|
|
KeyNavigation.right: saveButton
|
|
KeyNavigation.down: conferenceEdit
|
|
KeyNavigation.up: conferenceEdit
|
|
onActiveFocusChanged: if(activeFocus==true) selectAll()
|
|
onEditingFinished: mainItem.selectedConference.core.subject = text
|
|
Component.onCompleted: {
|
|
text = mainItem.selectedConference.core.subject
|
|
}
|
|
}
|
|
Button {
|
|
id: saveButton
|
|
topPadding: 6 * DefaultStyle.dp
|
|
bottomPadding: 6 * DefaultStyle.dp
|
|
leftPadding: 12 * DefaultStyle.dp
|
|
rightPadding: 12 * DefaultStyle.dp
|
|
focus: true
|
|
text: qsTr("Enregistrer")
|
|
textSize: 13 * DefaultStyle.dp
|
|
KeyNavigation.left: titleText
|
|
KeyNavigation.right: backButton
|
|
KeyNavigation.down: conferenceEdit
|
|
KeyNavigation.up: conferenceEdit
|
|
onClicked: {
|
|
if (mainItem.selectedConference.core.subject.length === 0) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir un sujet"), false)
|
|
} else if (mainItem.selectedConference.core.duration <= 0) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La fin de la conférence doit être plus récente que son début"), false)
|
|
} else if (mainItem.selectedConference.core.participantCount === 0) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La conférence doit contenir au moins un participant"), false)
|
|
} else {
|
|
mainItem.selectedConference.core.save()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
MeetingForm {
|
|
id: conferenceEdit
|
|
property bool isCreation
|
|
isCreation: editFocusScope.isCreation
|
|
conferenceInfoGui: editFocusScope.conferenceInfoGui
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
Connections {
|
|
target: conferenceEdit.conferenceInfoGui ? conferenceEdit.conferenceInfoGui.core : null
|
|
function onConferenceSchedulerStateChanged() {
|
|
var mainWin = UtilsCpp.getMainWindow()
|
|
if (conferenceEdit.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.AllocationPending
|
|
|| conferenceEdit.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Updating) {
|
|
mainWin.showLoadingPopup(qsTr("Modification de la réunion en cours..."))
|
|
} else {
|
|
if (conferenceEdit.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Error) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("La modification de la conférence a échoué"), false)
|
|
}
|
|
mainWin.closeLoadingPopup()
|
|
}
|
|
editFocusScope.enabled = conferenceEdit.conferenceInfoGui.core.schedulerState != LinphoneEnums.ConferenceSchedulerState.AllocationPending
|
|
}
|
|
function onSaveFailed() {
|
|
var mainWin = UtilsCpp.getMainWindow()
|
|
mainWin.closeLoadingPopup()
|
|
}
|
|
}
|
|
onSaveSucceed: {
|
|
overridenRightPanelStackView.pop()
|
|
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Réunion modifiée avec succès"), true)
|
|
}
|
|
onAddParticipantsRequested: {
|
|
overridenRightPanelStackView.push(addParticipants, {"conferenceInfoGui": conferenceInfoGui, "container": overridenRightPanelStackView})
|
|
}
|
|
Connections {
|
|
target: mainItem
|
|
function onAddParticipantsValidated(selectedParticipants) {
|
|
conferenceEdit.conferenceInfoGui.core.resetParticipants(selectedParticipants)
|
|
overridenRightPanelStackView.pop()
|
|
}
|
|
}
|
|
Connections {
|
|
target: conferenceEdit.conferenceInfoGui ? conferenceEdit.conferenceInfoGui.core : null
|
|
function onConferenceSchedulerStateChanged() {
|
|
var mainWin = UtilsCpp.getMainWindow()
|
|
if (conferenceEdit.conferenceInfoGui.core.schedulerState == LinphoneEnums.ConferenceSchedulerState.Error) {
|
|
UtilsCpp.showInformationPopup(qsTr("Erreur"), qsTr("L'édition de la conférence a échoué"), false)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: addParticipants
|
|
ColumnLayout {
|
|
property Control.StackView container
|
|
property ConferenceInfoGui conferenceInfoGui
|
|
FocusScope{
|
|
Layout.fillWidth: true
|
|
Layout.preferredHeight: addParticipantsButtons.implicitHeight
|
|
RowLayout {
|
|
id: addParticipantsButtons
|
|
spacing: 5 * DefaultStyle.dp
|
|
Button {
|
|
id: removeButton
|
|
background: Item{}
|
|
icon.source: AppIcons.leftArrow
|
|
contentImageColor: DefaultStyle.main1_500_main
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
icon.width: 24 * DefaultStyle.dp
|
|
icon.height: 24 * DefaultStyle.dp
|
|
KeyNavigation.right: addButton
|
|
KeyNavigation.down: addParticipantLayout
|
|
onClicked: container.pop()
|
|
}
|
|
ColumnLayout {
|
|
spacing: 3 * DefaultStyle.dp
|
|
Text {
|
|
text: qsTr("Ajouter des participants")
|
|
color: DefaultStyle.main1_500_main
|
|
maximumLineCount: 1
|
|
font {
|
|
pixelSize: 18 * DefaultStyle.dp
|
|
weight: 800 * DefaultStyle.dp
|
|
}
|
|
Layout.fillWidth: true
|
|
}
|
|
Text {
|
|
text: qsTr("%1 participant%2 sélectionné%2").arg(addParticipantLayout.selectedParticipantsCount).arg(addParticipantLayout.selectedParticipantsCount > 1 ? "s" : "")
|
|
color: DefaultStyle.main2_500main
|
|
maximumLineCount: 1
|
|
font {
|
|
pixelSize: 12 * DefaultStyle.dp
|
|
weight: 300 * DefaultStyle.dp
|
|
}
|
|
Layout.fillWidth: true
|
|
}
|
|
}
|
|
Button {
|
|
id: addButton
|
|
enabled: addParticipantLayout.selectedParticipantsCount.length != 0
|
|
Layout.rightMargin: 21 * DefaultStyle.dp
|
|
topPadding: 6 * DefaultStyle.dp
|
|
bottomPadding: 6 * DefaultStyle.dp
|
|
leftPadding: 12 * DefaultStyle.dp
|
|
rightPadding: 12 * DefaultStyle.dp
|
|
focus: enabled
|
|
text: qsTr("Ajouter")
|
|
textSize: 13 * DefaultStyle.dp
|
|
KeyNavigation.left: removeButton
|
|
KeyNavigation.down: addParticipantLayout
|
|
onClicked: {
|
|
mainItem.addParticipantsValidated(addParticipantLayout.selectedParticipants)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
AddParticipantsForm {
|
|
id: addParticipantLayout
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
conferenceInfoGui: parent.conferenceInfoGui
|
|
}
|
|
}
|
|
}
|
|
|
|
Component {
|
|
id: meetingDetail
|
|
FocusScope{
|
|
width: overridenRightPanelStackView.width
|
|
height: meetingDetailsLayout.implicitHeight
|
|
ColumnLayout {
|
|
id: meetingDetailsLayout
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
anchors.top: parent.top
|
|
anchors.topMargin: 58 * DefaultStyle.dp
|
|
visible: mainItem.selectedConference
|
|
spacing: 25 * DefaultStyle.dp
|
|
Section {
|
|
visible: mainItem.selectedConference
|
|
Layout.fillWidth: true
|
|
content: RowLayout {
|
|
spacing: 8 * DefaultStyle.dp
|
|
EffectImage {
|
|
imageSource: AppIcons.usersThree
|
|
colorizationColor: DefaultStyle.main2_600
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
}
|
|
Text {
|
|
Layout.fillWidth: true
|
|
text: mainItem.selectedConference && mainItem.selectedConference.core? mainItem.selectedConference.core.subject : ""
|
|
maximumLineCount: 1
|
|
font {
|
|
pixelSize: 20 * DefaultStyle.dp
|
|
weight: 800 * DefaultStyle.dp
|
|
}
|
|
}
|
|
Item {
|
|
Layout.fillWidth: true
|
|
}
|
|
Button {
|
|
id: editButton
|
|
property var isMeObj: UtilsCpp.isMe(mainItem.selectedConference?.core?.organizerAddress)
|
|
visible: mainItem.selectedConference && isMeObj && isMeObj.value || false
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
icon.width: 24 * DefaultStyle.dp
|
|
icon.height: 24 * DefaultStyle.dp
|
|
icon.source: AppIcons.pencil
|
|
contentImageColor: DefaultStyle.main1_500_main
|
|
KeyNavigation.left: leftPanelStackView.currentItem
|
|
KeyNavigation.right: deletePopup
|
|
KeyNavigation.up: joinButton
|
|
KeyNavigation.down: shareNetworkButton
|
|
background: Item{}
|
|
onClicked: mainItem.editConference(mainItem.selectedConference)
|
|
}
|
|
PopupButton {
|
|
id: deletePopup
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
contentImageColor: DefaultStyle.main1_500_main
|
|
KeyNavigation.left: editButton.visible ? editButton : leftPanelStackView.currentItem
|
|
KeyNavigation.right: leftPanelStackView.currentItem
|
|
KeyNavigation.up: joinButton
|
|
KeyNavigation.down: shareNetworkButton
|
|
|
|
popup.contentItem: Button {
|
|
color: DefaultStyle.danger_500main
|
|
borderColor: deletePopup.popupBackgroundColor
|
|
textColor: DefaultStyle.danger_500main
|
|
contentImageColor: DefaultStyle.danger_500main
|
|
inversedColors: true
|
|
property var isMeObj: UtilsCpp.isMe(mainItem.selectedConference?.core?.organizerAddress)
|
|
property bool canCancel: isMeObj && isMeObj.value && mainItem.selectedConference?.core?.state !== LinphoneEnums.ConferenceInfoState.Cancelled
|
|
icon.source: AppIcons.trashCan
|
|
icon.width: 24 * DefaultStyle.dp
|
|
icon.height: 24 * DefaultStyle.dp
|
|
spacing: 10 * DefaultStyle.dp
|
|
textSize: 14 * DefaultStyle.dp
|
|
textWeight: 400 * DefaultStyle.dp
|
|
text: qsTr("Delete this meeting")
|
|
|
|
onClicked: {
|
|
if (mainItem.selectedConference) {
|
|
cancelAndDeleteConfDialog.cancel = canCancel
|
|
cancelAndDeleteConfDialog.open()
|
|
// mainItem.contactDeletionRequested(mainItem.selectedConference)
|
|
deletePopup.close()
|
|
}
|
|
}
|
|
Connections {
|
|
target: cancelAndDeleteConfDialog
|
|
function onCancelRequested() {
|
|
mainItem.selectedConference.core.lCancelConferenceInfo()
|
|
}
|
|
function onAccepted() {
|
|
mainItem.selectedConference.core.lDeleteConferenceInfo()
|
|
}
|
|
}
|
|
background: Item{}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Section {
|
|
content: ColumnLayout {
|
|
spacing: 15 * DefaultStyle.dp
|
|
width: parent.width
|
|
RowLayout {
|
|
spacing: 8 * DefaultStyle.dp
|
|
Layout.fillWidth: true
|
|
Image {
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
source: AppIcons.videoCamera
|
|
}
|
|
Button {
|
|
id: linkButton
|
|
Layout.fillWidth: true
|
|
font.bold: shadowEnabled
|
|
text: mainItem.selectedConference && mainItem.selectedConference.core ? mainItem.selectedConference.core.uri : ""
|
|
textSize: 14 * DefaultStyle.dp
|
|
textWeight: 400 * DefaultStyle.dp
|
|
underline: true
|
|
inversedColors: true
|
|
color: DefaultStyle.main2_600
|
|
background: Item{}
|
|
Keys.onPressed: (event)=> {
|
|
if (event.key == Qt.Key_Space || event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
|
|
clicked(undefined)
|
|
event.accepted = true;
|
|
}
|
|
}
|
|
KeyNavigation.left: shareNetworkButton
|
|
KeyNavigation.right: shareNetworkButton
|
|
KeyNavigation.up: deletePopup
|
|
KeyNavigation.down: joinButton
|
|
onClicked: {
|
|
// TODO : voir si c'est en audio only quand on clique sur le lien
|
|
UtilsCpp.createCall(mainItem.selectedConference.core.uri)
|
|
}
|
|
}
|
|
Button {
|
|
id: shareNetworkButton
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
icon.width: 24 * DefaultStyle.dp
|
|
icon.height: 24 * DefaultStyle.dp
|
|
background: Item{}
|
|
icon.source: AppIcons.shareNetwork
|
|
KeyNavigation.left: linkButton
|
|
KeyNavigation.right: linkButton
|
|
KeyNavigation.up: deletePopup
|
|
KeyNavigation.down: joinButton
|
|
onClicked: {
|
|
UtilsCpp.copyToClipboard(mainItem.selectedConference.core.uri)
|
|
UtilsCpp.showInformationPopup(qsTr("Enregistré"), qsTr("Le lien de la réunion a été copié dans le presse-papiers"))
|
|
}
|
|
}
|
|
}
|
|
RowLayout {
|
|
spacing: 8 * DefaultStyle.dp
|
|
Image {
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
source: AppIcons.clock
|
|
}
|
|
Text {
|
|
text: mainItem.selectedConference && mainItem.selectedConference.core
|
|
? UtilsCpp.toDateString(mainItem.selectedConference.core.dateTime)
|
|
+ " | " + UtilsCpp.toDateHourString(mainItem.selectedConference.core.dateTime)
|
|
+ " - "
|
|
+ UtilsCpp.toDateHourString(mainItem.selectedConference.core.endDateTime)
|
|
: ''
|
|
font {
|
|
pixelSize: 14 * DefaultStyle.dp
|
|
capitalization: Font.Capitalize
|
|
}
|
|
}
|
|
}
|
|
RowLayout {
|
|
spacing: 8 * DefaultStyle.dp
|
|
Image {
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
source: AppIcons.globe
|
|
}
|
|
Text {
|
|
text: qsTr("Time zone: ") + (mainItem.selectedConference && mainItem.selectedConference.core ? (mainItem.selectedConference.core.timeZoneModel.displayName + ", " + mainItem.selectedConference.core.timeZoneModel.countryName) : "")
|
|
font {
|
|
pixelSize: 14 * DefaultStyle.dp
|
|
capitalization: Font.Capitalize
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Section {
|
|
visible: mainItem.selectedConference && mainItem.selectedConference.core?.description.length != 0
|
|
content: RowLayout {
|
|
spacing: 8 * DefaultStyle.dp
|
|
EffectImage {
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
imageSource: AppIcons.note
|
|
colorizationColor: DefaultStyle.main2_600
|
|
}
|
|
Text {
|
|
text: mainItem.selectedConference && mainItem.selectedConference.core ? mainItem.selectedConference.core.description : ""
|
|
Layout.fillWidth: true
|
|
font {
|
|
pixelSize: 14 * DefaultStyle.dp
|
|
capitalization: Font.Capitalize
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Section {
|
|
content: RowLayout {
|
|
spacing: 8 * DefaultStyle.dp
|
|
EffectImage {
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
imageSource: AppIcons.userRectangle
|
|
colorizationColor: DefaultStyle.main2_600
|
|
}
|
|
Avatar {
|
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
|
_address: mainItem.selectedConference && mainItem.selectedConference.core ? mainItem.selectedConference.core.organizerAddress : ""
|
|
}
|
|
Text {
|
|
text: mainItem.selectedConference && mainItem.selectedConference.core ? mainItem.selectedConference.core.organizerName : ""
|
|
font {
|
|
pixelSize: 14 * DefaultStyle.dp
|
|
capitalization: Font.Capitalize
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Section {
|
|
visible: participantList.count > 0
|
|
content: RowLayout {
|
|
Layout.preferredHeight: participantList.height
|
|
width: 393 * DefaultStyle.dp
|
|
spacing: 8 * DefaultStyle.dp
|
|
Image {
|
|
Layout.preferredWidth: 24 * DefaultStyle.dp
|
|
Layout.preferredHeight: 24 * DefaultStyle.dp
|
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
|
Layout.topMargin: 20 * DefaultStyle.dp
|
|
source: AppIcons.usersTwo
|
|
}
|
|
ListView {
|
|
id: participantList
|
|
Layout.preferredHeight: Math.min(184 * DefaultStyle.dp, contentHeight)
|
|
Layout.fillWidth: true
|
|
model: mainItem.selectedConference && mainItem.selectedConference.core ? mainItem.selectedConference.core.participants : []
|
|
clip: true
|
|
delegate: RowLayout {
|
|
height: 56 * DefaultStyle.dp
|
|
width: participantList.width
|
|
Avatar {
|
|
Layout.preferredWidth: 45 * DefaultStyle.dp
|
|
Layout.preferredHeight: 45 * DefaultStyle.dp
|
|
_address: modelData.address
|
|
}
|
|
Text {
|
|
text: modelData.displayName
|
|
maximumLineCount: 1
|
|
Layout.fillWidth: true
|
|
font {
|
|
pixelSize: 14 * DefaultStyle.dp
|
|
capitalization: Font.Capitalize
|
|
}
|
|
}
|
|
Text {
|
|
text: qsTr("Organizer")
|
|
visible: mainItem.selectedConference && mainItem.selectedConference.core?.organizerAddress === modelData.address
|
|
color: DefaultStyle.main2_400
|
|
font {
|
|
pixelSize: 12 * DefaultStyle.dp
|
|
weight: 300 * DefaultStyle.dp
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Button {
|
|
id: joinButton
|
|
visible: mainItem.selectedConference && mainItem.selectedConference.core?.state !== LinphoneEnums.ConferenceInfoState.Cancelled
|
|
Layout.fillWidth: true
|
|
text: qsTr("Rejoindre la réunion")
|
|
topPadding: 11 * DefaultStyle.dp
|
|
bottomPadding: 11 * DefaultStyle.dp
|
|
focus: true
|
|
KeyNavigation.up: shareNetworkButton
|
|
KeyNavigation.down: deletePopup
|
|
KeyNavigation.left: leftPanelStackView.currentItem
|
|
KeyNavigation.right: leftPanelStackView.currentItem
|
|
onClicked: {
|
|
console.log(mainItem.selectedConference.core.uri)
|
|
var callsWindow = UtilsCpp.getCallsWindow()
|
|
callsWindow.setupConference(mainItem.selectedConference)
|
|
UtilsCpp.smartShowWindow(callsWindow)
|
|
}
|
|
}
|
|
Item { Layout.fillHeight: true}
|
|
}
|
|
}
|
|
}
|
|
}
|