mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-28 17:29:19 +00:00
feat(ui/views/App/Calls/ConferenceManager): in progress
This commit is contained in:
parent
a00a2cbf4d
commit
a52d0666ad
6 changed files with 51 additions and 3 deletions
|
|
@ -363,6 +363,14 @@ Server url not configured.</translation>
|
|||
<source>conferenceManagerDescription</source>
|
||||
<translation>Manage participants to your conference.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation>CANCEL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>confirm</source>
|
||||
<translation>START</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ConfirmDialog</name>
|
||||
|
|
|
|||
|
|
@ -363,6 +363,14 @@ Url du serveur non configurée.</translation>
|
|||
<source>conferenceManagerDescription</source>
|
||||
<translation>Gérer les participants de votre conférence.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>cancel</source>
|
||||
<translation>ANNULER</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>confirm</source>
|
||||
<translation>LANCER</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ConfirmDialog</name>
|
||||
|
|
|
|||
|
|
@ -106,6 +106,19 @@ bool ConferenceAddModel::removeFromConference (const QString &sipAddress) {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void ConferenceAddModel::update () {
|
||||
list<shared_ptr<linphone::Address> > linphoneAddresses;
|
||||
for (const auto &map : mRefs)
|
||||
linphoneAddresses.push_back(map->value("__linphoneAddress").value<shared_ptr<linphone::Address> > ());
|
||||
|
||||
mConferenceHelperModel->mConference->inviteParticipants(
|
||||
linphoneAddresses,
|
||||
CoreManager::getInstance()->getCore()->createCallParams(nullptr)
|
||||
);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void ConferenceAddModel::addToConference (const std::shared_ptr<linphone::Address> &linphoneAddress) {
|
||||
QString sipAddress = ::Utils::linphoneStringToQString(linphoneAddress->asStringUriOnly());
|
||||
QVariantMap map;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ public:
|
|||
Q_INVOKABLE bool addToConference (const QString &sipAddress);
|
||||
Q_INVOKABLE bool removeFromConference (const QString &sipAddress);
|
||||
|
||||
Q_INVOKABLE void update ();
|
||||
|
||||
bool contains (const QString &sipAddress) const {
|
||||
return mSipAddresses.contains(sipAddress);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ namespace linphone {
|
|||
}
|
||||
|
||||
class ConferenceHelperModel : public QSortFilterProxyModel {
|
||||
friend class ConferenceAddModel;
|
||||
|
||||
Q_OBJECT;
|
||||
|
||||
Q_PROPERTY(ConferenceAddModel * toAdd READ getConferenceAddModel CONSTANT);
|
||||
|
|
@ -47,8 +49,6 @@ public:
|
|||
|
||||
QHash<int, QByteArray> roleNames () const override;
|
||||
|
||||
void update ();
|
||||
|
||||
Q_INVOKABLE void setFilter (const QString &pattern);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,24 @@ import App.Styles 1.0
|
|||
|
||||
// =============================================================================
|
||||
|
||||
ConfirmDialog {
|
||||
DialogPlus {
|
||||
buttons: [
|
||||
TextButtonA {
|
||||
text: qsTr('cancel')
|
||||
|
||||
onClicked: exit(0)
|
||||
},
|
||||
TextButtonB {
|
||||
text: qsTr('confirm')
|
||||
|
||||
onClicked: {
|
||||
conferenceHelperModel.toAdd.update()
|
||||
exit(1)
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
centeredButtons: true
|
||||
descriptionText: qsTr('conferenceManagerDescription')
|
||||
|
||||
height: ConferenceManagerStyle.height
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue