mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
refactor: Led layout, clearAll (#703)
* add SSDP name field * YALL - yet another led layout * led layout migration * add initial vscode config * merge clearAll with clear, rename Hyperion::compStateChange * simpler components api * Corrected code formatting + triggered PR build * fix: regression from #636 * Support for color patterns Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ BlackBorderProcessor::BlackBorderProcessor(Hyperion* hyperion, QObject* parent)
|
||||
connect(_hyperion, &Hyperion::settingsChanged, this, &BlackBorderProcessor::handleSettingsUpdate);
|
||||
|
||||
// listen for component state changes
|
||||
connect(_hyperion, &Hyperion::componentStateChanged, this, &BlackBorderProcessor::componentStateChanged);
|
||||
connect(_hyperion, &Hyperion::compStateChangeRequest, this, &BlackBorderProcessor::handleCompStateChangeRequest);
|
||||
}
|
||||
|
||||
BlackBorderProcessor::~BlackBorderProcessor()
|
||||
@@ -65,11 +65,11 @@ void BlackBorderProcessor::handleSettingsUpdate(const settings::type& type, cons
|
||||
Debug(Logger::getInstance("BLACKBORDER"), "Set mode to: %s", QSTRING_CSTR(_detectionMode));
|
||||
|
||||
// eval the comp state
|
||||
componentStateChanged(hyperion::COMP_BLACKBORDER, obj["enable"].toBool(true));
|
||||
handleCompStateChangeRequest(hyperion::COMP_BLACKBORDER, obj["enable"].toBool(true));
|
||||
}
|
||||
}
|
||||
|
||||
void BlackBorderProcessor::componentStateChanged(const hyperion::Components component, bool enable)
|
||||
void BlackBorderProcessor::handleCompStateChangeRequest(const hyperion::Components component, bool enable)
|
||||
{
|
||||
if(component == hyperion::COMP_BLACKBORDER)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ void BlackBorderProcessor::componentStateChanged(const hyperion::Components comp
|
||||
_enabled = enable;
|
||||
}
|
||||
|
||||
_hyperion->getComponentRegister().componentStateChanged(hyperion::COMP_BLACKBORDER, enable);
|
||||
_hyperion->setNewComponentState(hyperion::COMP_BLACKBORDER, enable);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user