diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index f017455bb..e7d98f25c 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -564,6 +564,11 @@ Server url ikke konfigureret. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index 972da8377..3748f2531 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -564,6 +564,11 @@ Server URL ist nicht konfiguriert. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index c73ebc283..f6e3e9801 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -564,6 +564,11 @@ Server URL not configured. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. Do you really want do delete this meeting? + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + Do you really want do cancel this meeting? + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 56cb8e49e..e98a613eb 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -564,6 +564,11 @@ URL del servidor no configurada. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index eb1788e41..e4330217a 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -564,6 +564,11 @@ URL du serveur non configurée. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 452e2e128..e5beff33f 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -563,6 +563,11 @@ A kiszolgáló URL-je nincs konfigurálva. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 1e87818e8..4f9da14be 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -564,6 +564,11 @@ URL del server non configurato. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index 362c176ba..18484f554 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -563,6 +563,11 @@ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index 8b41b0138..0439ca732 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -565,6 +565,11 @@ Nesukonfigūruotas serverio url. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index 2ba4126dd..6b8d439a1 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -564,6 +564,11 @@ URL do servidor não configurado. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index b02abe23e..179d28fd4 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -565,6 +565,11 @@ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index c6f03fcc4..672ac3d67 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -564,6 +564,11 @@ Serverwebbadressen är inte konfigurerad. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index 2a29e04c1..93a15c90a 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -563,6 +563,11 @@ Sunucu url'si yapılandırılmadı. 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 46946d21b..26f46087a 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -565,6 +565,11 @@ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index 819661abf..83f86a156 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -563,6 +563,11 @@ 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. + + cancelConferenceInfo + 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + + ChatConferenceInvitationMessage diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp index f35fcc41f..e820a5cf9 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp @@ -314,6 +314,13 @@ void ConferenceInfoModel::createConference(const int& securityLevel) { mConferenceScheduler->getConferenceScheduler()->setInfo(mConferenceInfo); } +void ConferenceInfoModel::cancelConference(){ + mConferenceScheduler = ConferenceScheduler::create(); + connect(mConferenceScheduler.get(), &ConferenceScheduler::invitationsSent, this, &ConferenceInfoModel::onInvitationsSent); + connect(mConferenceScheduler.get(), &ConferenceScheduler::stateChanged, this, &ConferenceInfoModel::onStateChanged); + mConferenceScheduler->getConferenceScheduler()->cancelConference(mConferenceInfo); +} + void ConferenceInfoModel::deleteConferenceInfo(){ if(mConferenceInfo) { CoreManager::getInstance()->getCore()->deleteConferenceInformation(mConferenceInfo); diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp index 2d260983d..5cd074b14 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp @@ -91,6 +91,7 @@ public: // Tools Q_INVOKABLE void createConference(const int& securityLevel); + Q_INVOKABLE void cancelConference(); Q_INVOKABLE void deleteConferenceInfo();// Remove completly this conference info from DB // SCHEDULER diff --git a/linphone-app/src/components/other/colors/ColorListModel.hpp b/linphone-app/src/components/other/colors/ColorListModel.hpp index 7eb3e250b..4d9f25498 100644 --- a/linphone-app/src/components/other/colors/ColorListModel.hpp +++ b/linphone-app/src/components/other/colors/ColorListModel.hpp @@ -151,6 +151,8 @@ class ColorListModel : public ProxyListModel { ADD_COLOR_WITH_LINK("ics_fg", "", "Special text color for ICS", "j") ADD_COLOR("updated_ics_fg", "#EFAE00", "Special text color for updated ICS") ADD_COLOR("cancelled_ics_fg", "#FF0000", "Special text color for cancelled ICS") + ADD_COLOR("cancelled_ics_bg", "#fff5fa", "Background color for cancelled ICS") + // Keywords: 'mKeywordsMap' // s=standard, ma=main, l=list, sc=screen, me=menu diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml index 6e1d2f94a..4ae79f8fa 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatCalendarMessage.qml @@ -32,6 +32,8 @@ Loader{ property int gotoButtonMode: -1 //-1: hide, 0:goto, 1:MoreInfo property bool isExpanded : false + property bool isCancelled: conferenceInfoModel.state == LinphoneEnums.ConferenceInfoStateCancelled + signal expandToggle() signal conferenceUriCopied() signal conferenceRemoved() @@ -69,7 +71,7 @@ Loader{ expandedFitHeight = (expandedDescription.visible? expandedDescription.implicitHeight : 0) } - property int fitHeight: dateRow.implicitHeight + title.implicitHeight + participantsFitHeight + expandedFitHeight + property int fitHeight: dateRow.implicitHeight + statusLabel.implicitHeight + title.implicitHeight + participantsFitHeight + expandedFitHeight property int fitWidth: Layout.minimumWidth anchors.fill: parent spacing: 0 @@ -127,6 +129,24 @@ Loader{ text: qsTr('icsOrganizer') +' : ' +UtilsCpp.getDisplayName(mainItem.conferenceInfoModel.organizer) } } + + Text{ + id: statusLabel + Layout.fillWidth: true + Layout.preferredHeight: visible ? ChatCalendarMessageStyle.lineHeight : 0 + Layout.alignment: Qt.AlignTop + Layout.leftMargin: 10 + + visible: mainItem.isCancelled + + elide: Text.ElideRight + color: ChatCalendarMessageStyle.type.cancelledColor + font.pointSize: ChatCalendarMessageStyle.type.pointSize + font.weight: Font.Bold + text: 'You have cancelled the conference' + } + + Text{ id: title Layout.fillWidth: true @@ -279,6 +299,7 @@ Loader{ color: ChatCalendarMessageStyle.subject.color font.pointSize: ChatCalendarMessageStyle.subject.pointSize font.weight: Font.Bold + visible: !mainItem.isCancelled //: 'Conference address' : Title for the conference address. text: qsTr('icsconferenceAddressTitle') @@ -289,6 +310,7 @@ Loader{ Layout.leftMargin: 10 Layout.rightMargin: 10 spacing: 10 + visible: !mainItem.isCancelled TextField{ id: uriField readOnly: true @@ -314,6 +336,7 @@ Loader{ Layout.bottomMargin: 5 Layout.rightMargin: 10 spacing: 10 + Item{ Layout.fillWidth: true } @@ -322,12 +345,16 @@ Loader{ //: 'Join' : Action button to join the conference. text: qsTr('icsJoinButton').toUpperCase() onClicked: CallsListModel.prepareConferenceCall(mainItem.conferenceInfoModel) + visible: !mainItem.isCancelled } ActionButton{ + id: editButton isCustom: true colorSet: ChatCalendarMessageStyle.editButton backgroundRadius: width/2 - visible: UtilsCpp.isMe(mainItem.conferenceInfoModel.organizer) && mainItem.conferenceInfoModel.endDateTime >= new Date() + visible: UtilsCpp.isMe(mainItem.conferenceInfoModel.organizer) + && mainItem.conferenceInfoModel.endDateTime >= new Date() + && !mainItem.isCancelled onClicked: { window.detachVirtualWindow() window.attachVirtualWindow(Utils.buildAppDialogUri('NewConference') @@ -335,20 +362,32 @@ Loader{ } } ActionButton{ + property bool isCancellable: editButton.visible + isCustom: true colorSet: ChatCalendarMessageStyle.deleteButton backgroundRadius: width/2 onClicked: { window.attachVirtualWindow(Utils.buildCommonDialogUri('ConfirmDialog'), { + //: 'Do you really want do cancel this meeting?' : Warning message to confirm the cancellation of a meeting. + descriptionText: isCancellable + ? qsTr('cancelConferenceInfo') //: 'Do you really want do delete this meeting?' : Warning message to confirm the deletion of a meeting. - descriptionText: qsTr('deleteConferenceInfo'), + : qsTr('deleteConferenceInfo') + , }, function (status) { if (status) { - mainItem.conferenceInfoModel.deleteConferenceInfo() + if( isCancellable) + mainItem.conferenceInfoModel.cancelConference() + else + mainItem.conferenceInfoModel.deleteConferenceInfo() } }) } } + Item{ + Layout.fillWidth: mainItem.isCancelled + } } } } diff --git a/linphone-app/ui/views/App/Main/Conferences.qml b/linphone-app/ui/views/App/Main/Conferences.qml index 999601dcc..c663b29c0 100644 --- a/linphone-app/ui/views/App/Main/Conferences.qml +++ b/linphone-app/ui/views/App/Main/Conferences.qml @@ -167,8 +167,11 @@ Item{ width: parent.width / 2 height: calendarMessage.height radius: 6 - color: mainItem.filterType == ConferenceInfoProxyModel.Ended ? ConferencesStyle.conference.backgroundColor.ended - : ConferencesStyle.conference.backgroundColor.scheduled + color: calendarMessage.isCancelled + ? ConferencesStyle.conference.backgroundColor.cancelled + : mainItem.filterType == ConferenceInfoProxyModel.Ended + ? ConferencesStyle.conference.backgroundColor.ended + : ConferencesStyle.conference.backgroundColor.scheduled border.color: calendarMessage.containsMouse || calendarMessage.isExpanded ? ConferencesStyle.conference.selectedBorder.color : 'transparent' border.width: ConferencesStyle.conference.selectedBorder.width ChatCalendarMessage{ diff --git a/linphone-app/ui/views/App/Styles/Main/ConferencesStyle.qml b/linphone-app/ui/views/App/Styles/Main/ConferencesStyle.qml index d127cf593..2b921c935 100644 --- a/linphone-app/ui/views/App/Styles/Main/ConferencesStyle.qml +++ b/linphone-app/ui/views/App/Styles/Main/ConferencesStyle.qml @@ -57,6 +57,7 @@ QtObject { property color ended: ColorsList.add(sectionName+'_conference_ended_bg', 'conference_entry_bg').color property color scheduled: ColorsList.add(sectionName+'_conference_scheduled_bg', 'e').color property color hovered: ColorsList.add(sectionName+'_conference_bg_h', 'g10').color + property color cancelled: ColorsList.add(sectionName+'_conference_cancelled_bg', 'cancelled_ics_bg').color } property QtObject border: QtObject {