Schedule meeting from chat room

This commit is contained in:
Christophe Deschamps 2025-06-17 14:57:28 +02:00
parent cbe29c66ee
commit 4a042392ac
7 changed files with 44 additions and 4 deletions

View file

@ -546,6 +546,14 @@ QVariantList ChatCore::getParticipantsGui() const {
return result;
}
QStringList ChatCore::getParticipantsAddresses() const {
QStringList result;
for (auto participantCore : mParticipants) {
result.append(participantCore->getSipAddress());
}
return result;
}
QList<QSharedPointer<ParticipantCore>>
ChatCore::buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom) const {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));

View file

@ -128,6 +128,8 @@ public:
QList<QSharedPointer<ParticipantCore>> buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom) const;
QVariantList getParticipantsGui() const;
Q_INVOKABLE QStringList getParticipantsAddresses() const;
signals:
// used to close all the notifications when one is clicked

View file

@ -69,7 +69,7 @@ FocusScope {
Layout.fillWidth: true
//: "Ajouter un titre"
property string defaultText: qsTr("meeting_schedule_subject_hint")
text: defaultText
text: conferenceInfoGui.core.subject ? conferenceInfoGui.core.subject : defaultText
color: DefaultStyle.main2_600
font {
pixelSize: Math.round(20 * DefaultStyle.dp)

View file

@ -120,6 +120,7 @@ ColumnLayout {
}
}
LabelButton {
visible: !SettingsCpp.disableMeetingsFeature
width: Math.round(56 * DefaultStyle.dp)
height: Math.round(56 * DefaultStyle.dp)
button.icon.width: Math.round(24 * DefaultStyle.dp)
@ -130,6 +131,7 @@ ColumnLayout {
button.onClicked: parentView.groupCall()
}
LabelButton {
visible: !SettingsCpp.disableMeetingsFeature
width: Math.round(56 * DefaultStyle.dp)
height: Math.round(56 * DefaultStyle.dp)
button.icon.width: Math.round(24 * DefaultStyle.dp)
@ -138,7 +140,7 @@ ColumnLayout {
//: "Réunion"
label: qsTr("group_infos_meeting")
button.onClicked: {
//TODO
UtilsCpp.getMainWindow().scheduleMeeting(mainItem.chatCore.title, mainItem.chatCore.getParticipantsAddresses())
}
}
}

View file

@ -29,6 +29,7 @@ Item {
signal displayChatRequested(string contactAddress)
signal openChatRequested(ChatGui chat)
signal createContactRequested(string name, string address)
signal scheduleMeetingRequested(string subject, list<string> addresses)
signal accountRemoved
function goToNewCall() {
@ -51,11 +52,14 @@ Item {
tabbar.currentIndex = 2
mainItem.openChatRequested(chat)
}
function createContact(name, address) {
tabbar.currentIndex = 1
mainItem.createContactRequested(name, address)
}
function scheduleMeeting(subject, addresses) {
tabbar.currentIndex = 3
mainItem.scheduleMeetingRequested(subject, addresses)
}
function openContextualMenuComponent(component) {
if (mainItem.contextualMenuOpenedComponent
@ -647,7 +651,15 @@ Item {
}
}
}
MeetingPage {}
MeetingPage {
id: meetingPage
Connections {
target: mainItem
function onScheduleMeetingRequested(subject, addresses) {
meetingPage.createPreFilledMeeting(subject, addresses)
}
}
}
}
}
Component {

View file

@ -23,6 +23,17 @@ AbstractMainPage {
showDefaultItem: leftPanelStackView.currentItem?.objectName === "listLayout" && meetingListCount === 0
function createPreFilledMeeting(subject, addresses) {
mainItem.selectedConference = Qt.createQmlObject('import Linphone
ConferenceInfoGui{
}', mainItem)
mainItem.selectedConference.core.resetParticipants(addresses)
mainItem.selectedConference.core.subject = subject
var item = leftPanelStackView.push(createConf, {"conferenceInfoGui": mainItem.selectedConference, "isCreation": true})
item.forceActiveFocus()
}
function editConference(confInfoGui = null) {
var isCreation = !confInfoGui
var item

View file

@ -91,6 +91,11 @@ AbstractWindow {
mainWindowStackView.replace(loginPage)
}
function scheduleMeeting(subject, addresses) {
openMainPage()
mainWindowStackView.currentItem.scheduleMeeting(subject, addresses)
}
property bool authenticationPopupOpened: false
Component {
id: authenticationPopupComp