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

Method initGrabManager

Software/src/LightpackApplication.cpp:585–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583
584
585void LightpackApplication::initGrabManager()
586{
587 DEBUG_LOW_LEVEL << Q_FUNC_INFO;
588 m_grabManager = new GrabManager(NULL);
589 m_moodlampManager = new MoodLampManager(NULL);
590
591 m_moodlampManager->initFromSettings();
592
593 connect(settings(), SIGNAL(grabberTypeChanged(const Grab::GrabberType &)), m_grabManager, SLOT(onGrabberTypeChanged(const Grab::GrabberType &)), Qt::QueuedConnection);
594 connect(settings(), SIGNAL(grabSlowdownChanged(int)), m_grabManager, SLOT(onGrabSlowdownChanged(int)), Qt::QueuedConnection);
595 connect(settings(), SIGNAL(grabAvgColorsEnabledChanged(bool)), m_grabManager, SLOT(onGrabAvgColorsEnabledChanged(bool)), Qt::QueuedConnection);
596
597 connect(settings(), SIGNAL(profileLoaded(const QString &)), m_grabManager, SLOT(settingsProfileChanged(const QString &)), Qt::QueuedConnection);
598 connect(settings(), SIGNAL(currentProfileInited(const QString &)), m_grabManager, SLOT(settingsProfileChanged(const QString &)), Qt::QueuedConnection);
599// connect(settings(), SIGNAL(profileLoaded(const QString &)), m_moodlampManager, SLOT(settingsProfileChanged(const QString &)), Qt::QueuedConnection);
600// connect(settings(), SIGNAL(currentProfileInited(const QString &)), m_moodlampManager, SLOT(settingsProfileChanged(const QString &)), Qt::QueuedConnection);
601 // Connections to signals which will be connected to ILedDevice
602 if (!m_noGui)
603 {
604// connect(m_settingsWindow, SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
605
606 connect(m_settingsWindow, SIGNAL(showLedWidgets(bool)), this, SLOT(showLedWidgets(bool)));
607 connect(m_settingsWindow, SIGNAL(setColoredLedWidget(bool)), this, SLOT(setColoredLedWidget(bool)));
608
609 // GrabManager to this
610 connect(m_grabManager, SIGNAL(ambilightTimeOfUpdatingColors(double)), m_settingsWindow, SLOT(refreshAmbilightEvaluated(double)));
611 }
612
613 connect(m_grabManager, SIGNAL(updateLedsColors(const QList<QRgb> &)), m_ledDeviceManager, SLOT(setColors(QList<QRgb>)), Qt::QueuedConnection);
614 connect(m_moodlampManager, SIGNAL(updateLedsColors(const QList<QRgb> &)), m_ledDeviceManager, SLOT(setColors(QList<QRgb>)), Qt::QueuedConnection);
615 connect(m_grabManager, SIGNAL(updateLedsColors(const QList<QRgb> &)), m_pluginInterface, SLOT(updateColors(const QList<QRgb> &)), Qt::QueuedConnection);
616 connect(m_moodlampManager, SIGNAL(updateLedsColors(const QList<QRgb> &)), m_pluginInterface, SLOT(updateColors(const QList<QRgb> &)), Qt::QueuedConnection);
617 connect(m_grabManager, SIGNAL(ambilightTimeOfUpdatingColors(double)), m_pluginInterface, SLOT(refreshAmbilightEvaluated(double)));
618 connect(m_grabManager,SIGNAL(changeScreen(QRect)),m_pluginInterface,SLOT(refreshScreenRect(QRect)));
619
620}
621
622void LightpackApplication::connectApiServerAndLedDeviceSignalsSlots()
623{

Callers

nothing calls this directly

Calls 1

initFromSettingsMethod · 0.80

Tested by

no test coverage detected