MCPcopy Create free account
hub / github.com/Atarity/Lightpack / settingsChanged

Method settingsChanged

Software/src/LightpackApplication.cpp:665–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663}
664
665void LightpackApplication::settingsChanged()
666{
667 DEBUG_LOW_LEVEL << Q_FUNC_INFO;
668
669 m_pluginInterface->changeProfile(Settings::getCurrentProfileName());
670
671 m_grabManager->onSendDataOnlyIfColorsEnabledChanged(Settings::isSendDataOnlyIfColorsChanges());
672
673 m_moodlampManager->setSendDataOnlyIfColorsChanged(Settings::isSendDataOnlyIfColorsChanges());
674
675 m_moodlampManager->setCurrentColor(Settings::getMoodLampColor());
676 m_moodlampManager->setLiquidModeSpeed(Settings::getMoodLampSpeed());
677 m_moodlampManager->setLiquidMode(Settings::isMoodLampLiquidMode());
678
679 bool isBacklightEnabled = Settings::isBacklightEnabled();
680 bool isCanStart =(isBacklightEnabled && m_deviceLockStatus == DeviceLocked::Unlocked);
681
682// numberOfLedsChanged(Settings::getNumberOfLeds(Settings::getConnectedDevice()));
683
684 switch (Settings::getLightpackMode())
685 {
686 case Lightpack::AmbilightMode:
687 m_grabManager->start(isCanStart);
688 m_moodlampManager->start(false);
689 break;
690
691 default:
692 m_grabManager->start(false);
693 m_moodlampManager->start(isCanStart);
694 break;
695 }
696
697 //Force update colors on device for start ping device
698 m_grabManager->reset();
699 m_moodlampManager->reset();
700
701}
702
703void LightpackApplication::showLedWidgets(bool visible)
704{

Callers 1

initializeAllMethod · 0.95

Calls 8

changeProfileMethod · 0.80
setCurrentColorMethod · 0.80
setLiquidModeSpeedMethod · 0.80
setLiquidModeMethod · 0.80
startMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected