Commit b0a1cd50 authored by Ronan Abhamon's avatar Ronan Abhamon

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

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