mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
feat(ui/views/App/Calls/ConferenceManager): in progress
This commit is contained in:
parent
ec2916f532
commit
853d46f15a
4 changed files with 31 additions and 81 deletions
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include "../../Utils.hpp"
|
||||
#include "../core/CoreManager.hpp"
|
||||
#include "ConferenceHelperModel.hpp"
|
||||
|
||||
#include "ConferenceModel.hpp"
|
||||
|
||||
|
|
@ -32,28 +31,13 @@ using namespace std;
|
|||
|
||||
// =============================================================================
|
||||
|
||||
ConferenceModel::ConferenceModel (QObject *parent) : QAbstractListModel(parent) {}
|
||||
ConferenceModel::ConferenceModel (QObject *parent) : QSortFilterProxyModel(parent) {}
|
||||
|
||||
int ConferenceModel::rowCount (const QModelIndex &index) const {
|
||||
return mSipAddresses.count();
|
||||
}
|
||||
bool ConferenceModel::filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const {
|
||||
const QModelIndex &index = sourceModel()->index(sourceRow, 0, sourceParent);
|
||||
const CallModel *callModel = index.data().value<CallModel *>();
|
||||
|
||||
QHash<int, QByteArray> ConferenceModel::roleNames () const {
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[Qt::DisplayRole] = "$sipAddress";
|
||||
return roles;
|
||||
}
|
||||
|
||||
QVariant ConferenceModel::data (const QModelIndex &index, int role) const {
|
||||
int row = index.row();
|
||||
|
||||
if (!index.isValid() || row < 0 || row >= mSipAddresses.count())
|
||||
return QVariant();
|
||||
|
||||
if (role == Qt::DisplayRole)
|
||||
return mSipAddresses[row];
|
||||
|
||||
return QVariant();
|
||||
return callModel->getCall()->getParams()->getLocalConferenceMode();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -23,11 +23,13 @@
|
|||
#ifndef CONFERENCE_MODEL_H_
|
||||
#define CONFERENCE_MODEL_H_
|
||||
|
||||
#include <QAbstractListModel>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
// =============================================================================
|
||||
|
||||
class ConferenceModel : public QAbstractListModel {
|
||||
class CallModel;
|
||||
|
||||
class ConferenceModel : public QSortFilterProxyModel {
|
||||
Q_OBJECT;
|
||||
|
||||
Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
|
||||
|
|
@ -38,10 +40,8 @@ public:
|
|||
ConferenceModel (QObject *parent = Q_NULLPTR);
|
||||
~ConferenceModel () = default;
|
||||
|
||||
int rowCount (const QModelIndex &index = QModelIndex()) const override;
|
||||
|
||||
QHash<int, QByteArray> roleNames () const override;
|
||||
QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||
protected:
|
||||
bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
|
||||
Q_INVOKABLE void terminate ();
|
||||
|
||||
|
|
@ -59,8 +59,6 @@ private:
|
|||
bool getRecording () const;
|
||||
|
||||
bool mRecording = false;
|
||||
|
||||
QStringList mSipAddresses;
|
||||
};
|
||||
|
||||
#endif // CONFERENCE_MODEL_H_
|
||||
|
|
|
|||
|
|
@ -11,15 +11,13 @@ import App.Styles 1.0
|
|||
// =============================================================================
|
||||
|
||||
Rectangle {
|
||||
property var call: null // TODO: Remove me
|
||||
|
||||
color: CallStyle.backgroundColor
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
ConferenceModel {
|
||||
id: conference
|
||||
}
|
||||
ConferenceModel {
|
||||
id: conference
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors {
|
||||
|
|
@ -30,7 +28,7 @@ Rectangle {
|
|||
spacing: 0
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Call info.
|
||||
// Conference info.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
Item {
|
||||
|
|
@ -53,7 +51,14 @@ Rectangle {
|
|||
|
||||
anchors.centerIn: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: qsTr('conferenceTitle')
|
||||
text: qsTr('conferenceTitle')
|
||||
|
||||
color: CallStyle.header.conferenceDescription.color
|
||||
|
||||
font {
|
||||
bold: true
|
||||
pointSize: CallStyle.header.conferenceDescription.fontSize
|
||||
}
|
||||
|
||||
height: parent.height
|
||||
width: parent.width - rightActions.width - leftActions.width - CallStyle.header.conferenceDescription.width
|
||||
|
|
@ -75,30 +80,12 @@ Rectangle {
|
|||
useStates: false
|
||||
|
||||
onClicked: !enabled
|
||||
? conference.startRecording()
|
||||
? conference.startRecording()
|
||||
: conference.stopRecording()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: elapsedTime
|
||||
|
||||
Layout.fillWidth: true
|
||||
color: CallStyle.header.elapsedTime.color
|
||||
font.pointSize: CallStyle.header.elapsedTime.fontSize
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
repeat: true
|
||||
running: true
|
||||
triggeredOnStart: true
|
||||
|
||||
onTriggered: elapsedTime.text = Utils.formatElapsedTime(conference.duration)
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Contacts visual.
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
@ -153,32 +140,6 @@ Rectangle {
|
|||
onClicked: conference.microMuted = enabled
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: CallStyle.actionArea.vu.spacing
|
||||
|
||||
VuMeter {
|
||||
Timer {
|
||||
interval: 50
|
||||
repeat: true
|
||||
running: speaker.enabled
|
||||
|
||||
onTriggered: parent.value = conference.speakerVu
|
||||
}
|
||||
|
||||
enabled: speaker.enabled
|
||||
}
|
||||
|
||||
ActionSwitch {
|
||||
id: speaker
|
||||
|
||||
enabled: true
|
||||
icon: 'speaker'
|
||||
iconSize: CallStyle.actionArea.iconSize
|
||||
|
||||
onClicked: console.log('TODO')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ActionBar {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,13 @@ QtObject {
|
|||
property int width: 150
|
||||
}
|
||||
|
||||
property QtObject conferenceDescription: QtObject {
|
||||
property color color: Colors.x
|
||||
property int fontSize: 12
|
||||
property int height: 60
|
||||
property int width: 150
|
||||
}
|
||||
|
||||
property QtObject elapsedTime: QtObject {
|
||||
property color color: Colors.j
|
||||
property int fontSize: 10
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue