Refactor event handling incl.CEC

This commit is contained in:
LordGrey
2023-11-06 21:40:12 +01:00
parent b1c8534cb7
commit 0d9a8b8a3a
39 changed files with 1306 additions and 1158 deletions

View File

@@ -1,8 +0,0 @@
#pragma once
enum class CECEvent
{
On,
Off
};

View File

@@ -7,7 +7,10 @@
#include <libcec/cec.h>
#include <cec/CECEvent.h>
#include <utils/settings.h>
//#include <cec/CECEvent.h>
#include <events/Event.h>
using CECCallbacks = CEC::ICECCallbacks;
using CECAdapter = CEC::ICECAdapter;
@@ -39,8 +42,12 @@ public slots:
bool start();
void stop();
virtual void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
signals:
void cecEvent(CECEvent event);
//void cecEvent(CECEvent event);
void signalEvent(Event event);
private:
/* CEC Callbacks */
@@ -65,5 +72,7 @@ private:
CECCallbacks _cecCallbacks {};
CECConfig _cecConfig {};
bool _isEnabled;
Logger * _logger {};
};