bool added = false;
int exists = false;
// Only add the scope if it does not exist yet in the list
- for (int i = 0; i < m_audioScopes.size(); i++) {
+ for (int i = 0; i < m_audioScopes.size(); ++i) {
if (m_audioScopes[i].scope == audioScope) {
exists = true;
break;
{
bool added = false;
int exists = false;
- for (int i = 0; i < m_colorScopes.size(); i++) {
+ for (int i = 0; i < m_colorScopes.size(); ++i) {
if (m_colorScopes[i].scope == colorScope) {
exists = true;
break;
}
-void ScopeManager::slotDistributeAudio(QVector<int16_t> sampleData, int freq, int num_channels, int num_samples)
+void ScopeManager::slotDistributeAudio(const QVector<int16_t> &sampleData, int freq, int num_channels, int num_samples)
{
#ifdef DEBUG_SM
qDebug() << "ScopeManager: Starting to distribute audio.";
#endif
- for (int i = 0; i < m_audioScopes.size(); i++) {
+ for (int i = 0; i < m_audioScopes.size(); ++i) {
// Distribute audio to all scopes that are visible and want to be refreshed
if (!m_audioScopes[i].scope->visibleRegion().isEmpty()) {
if (m_audioScopes[i].scope->autoRefreshEnabled()) {
checkActiveAudioScopes();
}
-void ScopeManager::slotDistributeFrame(const QImage image)
+void ScopeManager::slotDistributeFrame(const QImage &image)
{
#ifdef DEBUG_SM
qDebug() << "ScopeManager: Starting to distribute frame.";
#endif
- for (int i = 0; i < m_colorScopes.size(); i++) {
+ for (int i = 0; i < m_colorScopes.size(); ++i) {
if (!m_colorScopes[i].scope->visibleRegion().isEmpty()) {
if (m_colorScopes[i].scope->autoRefreshEnabled()) {
m_colorScopes[i].scope->slotRenderZoneUpdated(image);
}
-void ScopeManager::slotRequestFrame(const QString widgetName)
+void ScopeManager::slotRequestFrame(const QString &widgetName)
{
#ifdef DEBUG_SM
qDebug() << "ScopeManager: New frame was requested by " << widgetName;
// Search for the scope in the lists and tag it to trigger a forced update
// in the distribution slots
- for (int i = 0; i < m_colorScopes.size(); i++) {
+ for (int i = 0; i < m_colorScopes.size(); ++i) {
if (m_colorScopes[i].scope->widgetName() == widgetName) {
m_colorScopes[i].singleFrameRequested = true;
break;
}
}
- for (int i = 0; i < m_audioScopes.size(); i++) {
+ for (int i = 0; i < m_audioScopes.size(); ++i) {
if (m_audioScopes[i].scope->widgetName() == widgetName) {
m_audioScopes[i].singleFrameRequested = true;
break;
m_lastConnectedRenderer = m_monitorManager->activeRenderer();
// DVD monitor shouldn't be monitored or will cause crash on deletion
- if (m_monitorManager->isActive(Kdenlive::dvdMonitor)) m_lastConnectedRenderer = NULL;
+ if (m_monitorManager->isActive(Kdenlive::DvdMonitor)) m_lastConnectedRenderer = NULL;
// Connect new renderer
if (m_lastConnectedRenderer != NULL) {
- b &= connect(m_lastConnectedRenderer, SIGNAL(frameUpdated(const QImage)),
- this, SLOT(slotDistributeFrame(const QImage)), Qt::UniqueConnection);
+ b &= connect(m_lastConnectedRenderer, SIGNAL(frameUpdated(QImage)),
+ this, SLOT(slotDistributeFrame(QImage)), Qt::UniqueConnection);
b &= connect(m_lastConnectedRenderer, SIGNAL(audioSamplesSignal(QVector<int16_t>,int,int,int)),
this, SLOT(slotDistributeAudio(QVector<int16_t>,int,int,int)), Qt::UniqueConnection);
Q_ASSERT(b);
bool ScopeManager::audioAcceptedByScopes() const
{
bool accepted = false;
- for (int i = 0; i < m_audioScopes.size(); i++) {
+ for (int i = 0; i < m_audioScopes.size(); ++i) {
if (!m_audioScopes[i].scope->visibleRegion().isEmpty() && m_audioScopes[i].scope->autoRefreshEnabled()) {
accepted = true;
break;
bool ScopeManager::imagesAcceptedByScopes() const
{
bool accepted = false;
- for (int i = 0; i < m_colorScopes.size(); i++) {
+ for (int i = 0; i < m_colorScopes.size(); ++i) {
if (!m_colorScopes[i].scope->visibleRegion().isEmpty() && m_colorScopes[i].scope->autoRefreshEnabled()) {
accepted = true;
break;
// Notify monitors whether frames are still required
Monitor *monitor;
- monitor = static_cast<Monitor*>( m_monitorManager->monitor(Kdenlive::projectMonitor) );
+ monitor = static_cast<Monitor*>( m_monitorManager->monitor(Kdenlive::ProjectMonitor) );
if (monitor != NULL) {
if (monitor->effectSceneDisplayed()) monitor->render->sendFrameForAnalysis = true;
else monitor->render->sendFrameForAnalysis = imageStillRequested;
}
- monitor = static_cast<Monitor*>( m_monitorManager->monitor(Kdenlive::clipMonitor) );
+ monitor = static_cast<Monitor*>( m_monitorManager->monitor(Kdenlive::ClipMonitor) );
if (monitor != NULL) { monitor->render->sendFrameForAnalysis = imageStillRequested; }
- RecMonitor *recMonitor = static_cast<RecMonitor*>( m_monitorManager->monitor(Kdenlive::recordMonitor) );
+ RecMonitor *recMonitor = static_cast<RecMonitor*>( m_monitorManager->monitor(Kdenlive::RecordMonitor) );
if (recMonitor != NULL) { recMonitor->analyseFrames(imageStillRequested); }
}
+
+#include "scopemanager.moc"