Schedule meeting from chat room
This commit is contained in:
parent
cbe29c66ee
commit
4a042392ac
7 changed files with 44 additions and 4 deletions
|
|
@ -546,6 +546,14 @@ QVariantList ChatCore::getParticipantsGui() const {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList ChatCore::getParticipantsAddresses() const {
|
||||||
|
QStringList result;
|
||||||
|
for (auto participantCore : mParticipants) {
|
||||||
|
result.append(participantCore->getSipAddress());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
QList<QSharedPointer<ParticipantCore>>
|
QList<QSharedPointer<ParticipantCore>>
|
||||||
ChatCore::buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom) const {
|
ChatCore::buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom) const {
|
||||||
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,8 @@ public:
|
||||||
|
|
||||||
QList<QSharedPointer<ParticipantCore>> buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom) const;
|
QList<QSharedPointer<ParticipantCore>> buildParticipants(const std::shared_ptr<linphone::ChatRoom> &chatRoom) const;
|
||||||
QVariantList getParticipantsGui() const;
|
QVariantList getParticipantsGui() const;
|
||||||
|
Q_INVOKABLE QStringList getParticipantsAddresses() const;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
// used to close all the notifications when one is clicked
|
// used to close all the notifications when one is clicked
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ FocusScope {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
//: "Ajouter un titre"
|
//: "Ajouter un titre"
|
||||||
property string defaultText: qsTr("meeting_schedule_subject_hint")
|
property string defaultText: qsTr("meeting_schedule_subject_hint")
|
||||||
text: defaultText
|
text: conferenceInfoGui.core.subject ? conferenceInfoGui.core.subject : defaultText
|
||||||
color: DefaultStyle.main2_600
|
color: DefaultStyle.main2_600
|
||||||
font {
|
font {
|
||||||
pixelSize: Math.round(20 * DefaultStyle.dp)
|
pixelSize: Math.round(20 * DefaultStyle.dp)
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LabelButton {
|
LabelButton {
|
||||||
|
visible: !SettingsCpp.disableMeetingsFeature
|
||||||
width: Math.round(56 * DefaultStyle.dp)
|
width: Math.round(56 * DefaultStyle.dp)
|
||||||
height: Math.round(56 * DefaultStyle.dp)
|
height: Math.round(56 * DefaultStyle.dp)
|
||||||
button.icon.width: Math.round(24 * DefaultStyle.dp)
|
button.icon.width: Math.round(24 * DefaultStyle.dp)
|
||||||
|
|
@ -130,6 +131,7 @@ ColumnLayout {
|
||||||
button.onClicked: parentView.groupCall()
|
button.onClicked: parentView.groupCall()
|
||||||
}
|
}
|
||||||
LabelButton {
|
LabelButton {
|
||||||
|
visible: !SettingsCpp.disableMeetingsFeature
|
||||||
width: Math.round(56 * DefaultStyle.dp)
|
width: Math.round(56 * DefaultStyle.dp)
|
||||||
height: Math.round(56 * DefaultStyle.dp)
|
height: Math.round(56 * DefaultStyle.dp)
|
||||||
button.icon.width: Math.round(24 * DefaultStyle.dp)
|
button.icon.width: Math.round(24 * DefaultStyle.dp)
|
||||||
|
|
@ -138,7 +140,7 @@ ColumnLayout {
|
||||||
//: "Réunion"
|
//: "Réunion"
|
||||||
label: qsTr("group_infos_meeting")
|
label: qsTr("group_infos_meeting")
|
||||||
button.onClicked: {
|
button.onClicked: {
|
||||||
//TODO
|
UtilsCpp.getMainWindow().scheduleMeeting(mainItem.chatCore.title, mainItem.chatCore.getParticipantsAddresses())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ Item {
|
||||||
signal displayChatRequested(string contactAddress)
|
signal displayChatRequested(string contactAddress)
|
||||||
signal openChatRequested(ChatGui chat)
|
signal openChatRequested(ChatGui chat)
|
||||||
signal createContactRequested(string name, string address)
|
signal createContactRequested(string name, string address)
|
||||||
|
signal scheduleMeetingRequested(string subject, list<string> addresses)
|
||||||
signal accountRemoved
|
signal accountRemoved
|
||||||
|
|
||||||
function goToNewCall() {
|
function goToNewCall() {
|
||||||
|
|
@ -51,11 +52,14 @@ Item {
|
||||||
tabbar.currentIndex = 2
|
tabbar.currentIndex = 2
|
||||||
mainItem.openChatRequested(chat)
|
mainItem.openChatRequested(chat)
|
||||||
}
|
}
|
||||||
|
|
||||||
function createContact(name, address) {
|
function createContact(name, address) {
|
||||||
tabbar.currentIndex = 1
|
tabbar.currentIndex = 1
|
||||||
mainItem.createContactRequested(name, address)
|
mainItem.createContactRequested(name, address)
|
||||||
}
|
}
|
||||||
|
function scheduleMeeting(subject, addresses) {
|
||||||
|
tabbar.currentIndex = 3
|
||||||
|
mainItem.scheduleMeetingRequested(subject, addresses)
|
||||||
|
}
|
||||||
|
|
||||||
function openContextualMenuComponent(component) {
|
function openContextualMenuComponent(component) {
|
||||||
if (mainItem.contextualMenuOpenedComponent
|
if (mainItem.contextualMenuOpenedComponent
|
||||||
|
|
@ -647,7 +651,15 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MeetingPage {}
|
MeetingPage {
|
||||||
|
id: meetingPage
|
||||||
|
Connections {
|
||||||
|
target: mainItem
|
||||||
|
function onScheduleMeetingRequested(subject, addresses) {
|
||||||
|
meetingPage.createPreFilledMeeting(subject, addresses)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component {
|
Component {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,17 @@ AbstractMainPage {
|
||||||
showDefaultItem: leftPanelStackView.currentItem?.objectName === "listLayout" && meetingListCount === 0
|
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) {
|
function editConference(confInfoGui = null) {
|
||||||
var isCreation = !confInfoGui
|
var isCreation = !confInfoGui
|
||||||
var item
|
var item
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,11 @@ AbstractWindow {
|
||||||
mainWindowStackView.replace(loginPage)
|
mainWindowStackView.replace(loginPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function scheduleMeeting(subject, addresses) {
|
||||||
|
openMainPage()
|
||||||
|
mainWindowStackView.currentItem.scheduleMeeting(subject, addresses)
|
||||||
|
}
|
||||||
|
|
||||||
property bool authenticationPopupOpened: false
|
property bool authenticationPopupOpened: false
|
||||||
Component {
|
Component {
|
||||||
id: authenticationPopupComp
|
id: authenticationPopupComp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue