From 73ccc498819462d7de5f549037c3847e1cf0088d Mon Sep 17 00:00:00 2001 From: Loïc Collignon Date: Thu, 13 Dec 2018 09:46:10 +0100 Subject: Handle the volume_changed event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 4A's High Level API now raises event when volume of a role is changed. This handles it by subscribing to the event and update the corresponding slider. Bug: SPEC-2054 Change-Id: I137eaa461f0baa9206ee714c91e3ac998b9b2bf2 Signed-off-by: Loïc Collignon --- app/mixer.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'app/mixer.h') diff --git a/app/mixer.h b/app/mixer.h index 1eb6b76..5cbb819 100644 --- a/app/mixer.h +++ b/app/mixer.h @@ -23,7 +23,6 @@ #include #include #include "qafbwebsocketclient.h" -//#include "volumeslider.h" class Mixer : public QObject @@ -32,7 +31,10 @@ class Mixer Q_PROPERTY(QStringList roles READ roles NOTIFY rolesChanged) private: - QMap volumes_; + QUrl m_url; + QMap m_volumes; + QStringList m_roles; + QAfbWebsocketClient m_client; public: explicit Mixer(QObject* parent = nullptr); @@ -49,8 +51,8 @@ signals: private slots: void onClientConnected(); - -private: - QStringList m_roles; - QAfbWebsocketClient m_client; + void onClientDisconnected(); + void onClientError(QAbstractSocket::SocketError se); + void onRetryOpen(); + void onClientEventReceived(QString eventName, const QJsonValue& data); }; -- cgit 1.2.3-korg