| 583 | |
| 584 | |
| 585 | void 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 | |
| 622 | void LightpackApplication::connectApiServerAndLedDeviceSignalsSlots() |
| 623 | { |
nothing calls this directly
no test coverage detected