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

@@ -5,6 +5,7 @@
#include <utils/VideoMode.h>
#include <utils/settings.h>
#include <utils/Components.h>
#include <events/Event.h>
// qt
#include <QMap>
@@ -74,26 +75,10 @@ public slots:
bool stopInstance(quint8 inst);
///
/// @brief Suspend (disable) all Hyperion instances
/// @brief Handle an Hyperion Event
/// @param event Event to be processed
///
void suspend();
///
/// @brief Resume (resume) all Hyperion instances
///
void resume();
///
/// @brief Toggle the state of all Hyperion instances for a suspend sceanrio (user is not interacting with the system)
/// @param isSuspend, If true all instances toggle to suspend, else to resume
///
void toggleSuspend(bool isSuspend);
///
/// @brief Toggle the state of all Hyperion instances for an idle sceanrio
/// @param isIdle, If true all instances toggle to idle, else to resume
///
void toggleIdle(bool isIdle);
void handleEvent(Event event);
///
/// @brief Toggle the state of all Hyperion instances
@@ -147,10 +132,6 @@ signals:
///
void startInstanceResponse(QObject *caller, const int &tan);
void triggerSuspend(bool isSuspend);
void triggerToggleSuspend();
void triggerIdle(bool isIdle);
void triggerToggleIdle();
signals:
///////////////////////////////////////
@@ -192,6 +173,18 @@ private slots:
///
void handleFinished();
///
/// @brief Toggle the state of all Hyperion instances for a suspend sceanrio (user is not interacting with the system)
/// @param isSuspend, If true all instances toggle to suspend, else to resume
///
void toggleSuspend(bool isSuspend);
///
/// @brief Toggle the state of all Hyperion instances for an idle sceanrio
/// @param isIdle, If true all instances toggle to idle, else to resume
///
void toggleIdle(bool isIdle);
private:
friend class HyperionDaemon;
///