+void MainWindow::slotMonitorRequestRenderFrame(bool request)
+{
+ if (request) {
+ m_projectMonitor->render->sendFrameForAnalysis = true;
+ return;
+ } else {
+ for (int i = 0; i < m_scopesList.count(); i++) {
+ if (m_scopesList.at(i)->isVisible() && tabifiedDockWidgets(m_scopesList.at(i)).isEmpty() && static_cast<AbstractScopeWidget *>(m_scopesList.at(i)->widget())->autoRefreshEnabled()) {
+ request = true;
+ break;
+ }
+ }
+ }
+ if (!request) {
+ m_projectMonitor->render->sendFrameForAnalysis = false;
+ }
+}
+
+void MainWindow::slotUpdateScopeFrameRequest()
+{
+ // We need a delay to make sure widgets are hidden after a close event for example
+ QTimer::singleShot(500, this, SLOT(slotDoUpdateScopeFrameRequest()));
+}
+
+void MainWindow::slotDoUpdateScopeFrameRequest()
+{
+ // Check scopes
+ bool request = false;
+ for (int i = 0; i < m_scopesList.count(); i++) {
+ if (!m_scopesList.at(i)->widget()->visibleRegion().isEmpty() && static_cast<AbstractScopeWidget *>(m_scopesList.at(i)->widget())->autoRefreshEnabled()) {
+ kDebug() << "SCOPE VISIBLE: " << static_cast<AbstractScopeWidget *>(m_scopesList.at(i)->widget())->widgetName();
+ request = true;
+ break;
+ }
+ }
+ if (!request) {
+ if (!m_projectMonitor->effectSceneDisplayed())
+ m_projectMonitor->render->sendFrameForAnalysis = false;
+ m_clipMonitor->render->sendFrameForAnalysis = false;
+ } else {
+ m_projectMonitor->render->sendFrameForAnalysis = true;
+ m_clipMonitor->render->sendFrameForAnalysis = true;
+ }
+}
+