Commit a52d0666 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(ui/views/App/Calls/ConferenceManager): in progress

parent a00a2cbf
...@@ -363,6 +363,14 @@ Server url not configured.</translation> ...@@ -363,6 +363,14 @@ Server url not configured.</translation>
<source>conferenceManagerDescription</source> <source>conferenceManagerDescription</source>
<translation>Manage participants to your conference.</translation> <translation>Manage participants to your conference.</translation>
</message> </message>
<message>
<source>cancel</source>
<translation>CANCEL</translation>
</message>
<message>
<source>confirm</source>
<translation>START</translation>
</message>
</context> </context>
<context> <context>
<name>ConfirmDialog</name> <name>ConfirmDialog</name>
......
...@@ -363,6 +363,14 @@ Url du serveur non configurée.</translation> ...@@ -363,6 +363,14 @@ Url du serveur non configurée.</translation>
<source>conferenceManagerDescription</source> <source>conferenceManagerDescription</source>
<translation>Gérer les participants de votre conférence.</translation> <translation>Gérer les participants de votre conférence.</translation>
</message> </message>
<message>
<source>cancel</source>
<translation>ANNULER</translation>
</message>
<message>
<source>confirm</source>
<translation>LANCER</translation>
</message>
</context> </context>
<context> <context>
<name>ConfirmDialog</name> <name>ConfirmDialog</name>
......
...@@ -106,6 +106,19 @@ bool ConferenceAddModel::removeFromConference (const QString &sipAddress) { ...@@ -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) { void ConferenceAddModel::addToConference (const std::shared_ptr<linphone::Address> &linphoneAddress) {
QString sipAddress = ::Utils::linphoneStringToQString(linphoneAddress->asStringUriOnly()); QString sipAddress = ::Utils::linphoneStringToQString(linphoneAddress->asStringUriOnly());
QVariantMap map; QVariantMap map;
......
...@@ -50,6 +50,8 @@ public: ...@@ -50,6 +50,8 @@ public:
Q_INVOKABLE bool addToConference (const QString &sipAddress); Q_INVOKABLE bool addToConference (const QString &sipAddress);
Q_INVOKABLE bool removeFromConference (const QString &sipAddress); Q_INVOKABLE bool removeFromConference (const QString &sipAddress);
Q_INVOKABLE void update ();
bool contains (const QString &sipAddress) const { bool contains (const QString &sipAddress) const {
return mSipAddresses.contains(sipAddress); return mSipAddresses.contains(sipAddress);
} }
......
...@@ -37,6 +37,8 @@ namespace linphone { ...@@ -37,6 +37,8 @@ namespace linphone {
} }
class ConferenceHelperModel : public QSortFilterProxyModel { class ConferenceHelperModel : public QSortFilterProxyModel {
friend class ConferenceAddModel;
Q_OBJECT; Q_OBJECT;
Q_PROPERTY(ConferenceAddModel * toAdd READ getConferenceAddModel CONSTANT); Q_PROPERTY(ConferenceAddModel * toAdd READ getConferenceAddModel CONSTANT);
...@@ -47,8 +49,6 @@ public: ...@@ -47,8 +49,6 @@ public:
QHash<int, QByteArray> roleNames () const override; QHash<int, QByteArray> roleNames () const override;
void update ();
Q_INVOKABLE void setFilter (const QString &pattern); Q_INVOKABLE void setFilter (const QString &pattern);
protected: protected:
......
...@@ -8,7 +8,24 @@ import App.Styles 1.0 ...@@ -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') descriptionText: qsTr('conferenceManagerDescription')
height: ConferenceManagerStyle.height height: ConferenceManagerStyle.height
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment