| 35 | #include <utils/GlobalSignals.h> |
| 36 | |
| 37 | SystemControl::SystemControl(HyperHdrInstance* hyperhdr) |
| 38 | : QObject(hyperhdr) |
| 39 | , _hyperhdr(hyperhdr) |
| 40 | , _sysCaptEnabled(false) |
| 41 | , _alive(false) |
| 42 | , _sysCaptPrio(0) |
| 43 | , _sysCaptName() |
| 44 | , _sysInactiveTimer(new QTimer(this)) |
| 45 | , _isCEC(false) |
| 46 | { |
| 47 | // settings changes |
| 48 | connect(_hyperhdr, &HyperHdrInstance::SignalInstanceSettingsChanged, this, &SystemControl::handleSettingsUpdate); |
| 49 | |
| 50 | // comp changes |
| 51 | connect(_hyperhdr, &HyperHdrInstance::SignalRequestComponent, this, &SystemControl::handleCompStateChangeRequest); |
| 52 | |
| 53 | // inactive timer system grabber |
| 54 | connect(_sysInactiveTimer, &QTimer::timeout, this, &SystemControl::setSysInactive); |
| 55 | _sysInactiveTimer->setInterval(800); |
| 56 | |
| 57 | // init |
| 58 | QJsonDocument settings = _hyperhdr->getSetting(settings::type::SYSTEMCONTROL); |
| 59 | QUEUE_CALL_2(this, handleSettingsUpdate, settings::type, settings::type::SYSTEMCONTROL, QJsonDocument, settings); |
| 60 | } |
| 61 | |
| 62 | SystemControl::~SystemControl() |
| 63 | { |
nothing calls this directly
no test coverage detected