MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / setSysCaptureEnable

Method setSysCaptureEnable

sources/base/SystemControl.cpp:98–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void SystemControl::setSysCaptureEnable(bool enable)
99{
100 if (_sysCaptEnabled != enable)
101 {
102 if (enable)
103 {
104 _hyperhdr->registerInput(_sysCaptPrio, hyperhdr::COMP_SYSTEMGRABBER, "System", _sysCaptName);
105 connect(GlobalSignals::getInstance(), &GlobalSignals::SignalNewSystemImage, this, &SystemControl::handleSysImage, Qt::UniqueConnection);
106 }
107 else
108 {
109 disconnect(GlobalSignals::getInstance(), &GlobalSignals::SignalNewSystemImage, this, &SystemControl::handleSysImage);
110 _hyperhdr->clear(_sysCaptPrio);
111 _sysInactiveTimer->stop();
112 }
113
114 _sysCaptEnabled = enable;
115 _hyperhdr->setNewComponentState(hyperhdr::COMP_SYSTEMGRABBER, enable);
116 emit GlobalSignals::getInstance()->SignalRequestComponent(hyperhdr::COMP_SYSTEMGRABBER, int(_hyperhdr->getInstanceIndex()), enable);
117 }
118}
119
120void SystemControl::handleSettingsUpdate(settings::type type, const QJsonDocument& config)
121{

Callers 1

setSignalStateByCECMethod · 0.80

Calls 4

registerInputMethod · 0.45
clearMethod · 0.45
stopMethod · 0.45
setNewComponentStateMethod · 0.45

Tested by

no test coverage detected