Commit b0a1cd50 authored by Ronan Abhamon's avatar Ronan Abhamon

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

parent 6931f4a0
......@@ -5,7 +5,7 @@
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="08-INCALL-02-Simple-Chiffrement" transform="translate(-301.000000, -64.000000)" fill="#FF5E00">
<g id="08-INCALL-02-Simple-Chiffrement" transform="translate(-301.000000, -64.000000)" fill="#6B7A86">
<g id="dialer_dtmf" transform="translate(301.000000, 64.000000)">
<g id="Group-2">
<rect id="Rectangle" x="0" y="0.295454545" width="3.52941176" height="3.64145658" rx="1"></rect>
......
......@@ -32,6 +32,13 @@ using namespace std;
// =============================================================================
ConferenceModel::ConferenceModel (QObject *parent) : QSortFilterProxyModel(parent) {
QObject::connect(this, &ConferenceModel::rowsRemoved, [this] {
emit countChanged(rowCount());
});
QObject::connect(this, &ConferenceModel::rowsInserted, [this] {
emit countChanged(rowCount());
});
setSourceModel(CoreManager::getInstance()->getCallsListModel());
}
......
......@@ -32,6 +32,8 @@ class CallModel;
class ConferenceModel : public QSortFilterProxyModel {
Q_OBJECT;
Q_PROPERTY(int count READ getCount NOTIFY countChanged);
Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
......@@ -48,10 +50,16 @@ protected:
Q_INVOKABLE void stopRecording ();
signals:
void countChanged (int count);
void microMutedChanged (bool status);
void recordingChanged (bool status);
private:
int getCount () const {
return rowCount();
}
bool getMicroMuted () const;
void setMicroMuted (bool status);
......
......@@ -15,6 +15,8 @@ ListView {
readonly property var selectedCall: calls._selectedCall
property var conferenceModel
property var _selectedCall
// ---------------------------------------------------------------------------
......@@ -91,7 +93,10 @@ ListView {
// ---------------------------------------------------------------------------
header: ConferenceControls {
height: visible ? ConferenceControlsStyle.height : 0
width: parent.width
visible: calls.conferenceModel.count > 0
}
// ---------------------------------------------------------------------------
......
......@@ -44,7 +44,7 @@ function openConferenceManager () {
function getContent () {
var call = window.call
if (call == null) {
return null
return conference
}
var status = call.status
......
......@@ -120,6 +120,7 @@ Window {
Layout.fillHeight: true
Layout.fillWidth: true
conferenceModel: ConferenceModel {}
model: CallsListProxyModel {}
}
}
......@@ -183,6 +184,14 @@ Window {
}
}
Component {
id: conference
Conference {
conferenceModel: calls.conferenceModel
}
}
// -----------------------------------------------------------------------
childA: Loader {
......
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