bool MonitorManager::activateMonitor(Kdenlive::MonitorId name, bool forceRefresh) { if (m_clipMonitor == NULL || m_projectMonitor == NULL) return false; if (m_activeMonitor && m_activeMonitor->id() == name) { if (forceRefresh) m_activeMonitor->start(); return false; } m_activeMonitor = NULL; for (int i = 0; i < m_monitorsList.count(); ++i) { if (m_monitorsList.at(i)->id() == name) { m_activeMonitor = m_monitorsList.at(i); } else { m_monitorsList.at(i)->stop(); } } if (m_activeMonitor) { m_activeMonitor->blockSignals(true); m_activeMonitor->parentWidget()->raise(); m_activeMonitor->blockSignals(false); m_activeMonitor->start(); updateAudioIcons(); } emit checkColorScopes(); return (m_activeMonitor != NULL); }
ScopeManager::ScopeManager(MonitorManager *monitorManager) : m_monitorManager(monitorManager), m_lastConnectedRenderer(NULL) { m_signalMapper = new QSignalMapper(this); bool b = true; b &= connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateActiveRenderer())); b &= connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes())); b &= connect(m_signalMapper, SIGNAL(mapped(QString)), this, SLOT(slotRequestFrame(QString))); Q_ASSERT(b); slotUpdateActiveRenderer(); }
void MonitorManager::slotResetProfiles() { if (m_projectMonitor == NULL || m_clipMonitor == NULL) { return; } blockSignals(true); Kdenlive::MONITORID active = m_activeMonitor ? m_activeMonitor->id() : Kdenlive::noMonitor; m_clipMonitor->resetProfile(KdenliveSettings::current_profile()); m_projectMonitor->resetProfile(KdenliveSettings::current_profile()); if (active != Kdenlive::noMonitor) activateMonitor(active); blockSignals(false); if (m_activeMonitor) m_activeMonitor->parentWidget()->raise(); emit checkColorScopes(); }
ScopeManager::ScopeManager(QObject *parent) : QObject(parent), m_lastConnectedRenderer(NULL) { m_signalMapper = new QSignalMapper(this); connect(pCore->monitorManager(), SIGNAL(checkColorScopes()), SLOT(slotUpdateActiveRenderer())); connect(pCore->monitorManager(), SIGNAL(clearScopes()), SLOT(slotClearColorScopes())); connect(m_signalMapper, SIGNAL(mapped(QString)), SLOT(slotRequestFrame(QString))); slotUpdateActiveRenderer(); createScopes(); }
void MonitorManager::updateScopeSource() { emit checkColorScopes(); }