mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Added leaver/enter conference button in conference view
This commit is contained in:
parent
2b093cb604
commit
6184e43531
3 changed files with 33 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ ConferenceModel::ConferenceModel (QObject *parent) : QSortFilterProxyModel(paren
|
|||
});
|
||||
|
||||
setSourceModel(CoreManager::getInstance()->getCallsListModel());
|
||||
emit conferenceChanged(true);
|
||||
}
|
||||
|
||||
bool ConferenceModel::filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const {
|
||||
|
|
@ -114,3 +115,20 @@ void ConferenceModel::setMicroMuted (bool status) {
|
|||
bool ConferenceModel::getRecording () const {
|
||||
return mRecording;
|
||||
}
|
||||
|
||||
void ConferenceModel::leave() {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
core->leaveConference();
|
||||
emit conferenceChanged(false);
|
||||
}
|
||||
|
||||
void ConferenceModel::join() {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
core->enterConference();
|
||||
emit conferenceChanged(true);
|
||||
}
|
||||
|
||||
bool ConferenceModel::isInConference () const {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
return core->isInConference();
|
||||
}
|
||||
|
|
@ -36,6 +36,7 @@ class ConferenceModel : public QSortFilterProxyModel {
|
|||
|
||||
Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
|
||||
Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
|
||||
Q_PROPERTY(bool isInConf READ isInConference NOTIFY conferenceChanged);
|
||||
|
||||
public:
|
||||
ConferenceModel (QObject *parent = Q_NULLPTR);
|
||||
|
|
@ -48,12 +49,16 @@ protected:
|
|||
|
||||
Q_INVOKABLE void startRecording ();
|
||||
Q_INVOKABLE void stopRecording ();
|
||||
|
||||
Q_INVOKABLE void join ();
|
||||
Q_INVOKABLE void leave ();
|
||||
|
||||
signals:
|
||||
void countChanged (int count);
|
||||
|
||||
void microMutedChanged (bool status);
|
||||
void recordingChanged (bool status);
|
||||
void conferenceChanged(bool status);
|
||||
|
||||
private:
|
||||
int getCount () const {
|
||||
|
|
@ -63,6 +68,8 @@ private:
|
|||
bool getMicroMuted () const;
|
||||
void setMicroMuted (bool status);
|
||||
|
||||
bool isInConference () const;
|
||||
|
||||
bool getRecording () const;
|
||||
|
||||
bool mRecording = false;
|
||||
|
|
|
|||
|
|
@ -207,6 +207,14 @@ Rectangle {
|
|||
}
|
||||
iconSize: CallStyle.actionArea.iconSize
|
||||
|
||||
ActionSwitch {
|
||||
icon: 'pause'
|
||||
|
||||
onClicked: {
|
||||
conference.conferenceModel.isInConf ? conference.conferenceModel.leave() : conference.conferenceModel.join()
|
||||
}
|
||||
}
|
||||
|
||||
ActionButton {
|
||||
icon: 'hangup'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue