]> git.sesse.net Git - kdenlive/blobdiff - src/effectstackview.cpp
MLT now supports rendering to another framerate, so allow it in render dialog
[kdenlive] / src / effectstackview.cpp
index d188762525d2bacf0343b390606e1a6d5f73cc8c..e20d68f9f30c50253a5cd358494d11338cdde789 100644 (file)
@@ -91,10 +91,12 @@ EffectStackView::EffectStackView(Monitor *monitor, QWidget *parent) :
     connect(m_ui.buttonReset, SIGNAL(clicked()), this, SLOT(slotResetEffect()));
     connect(m_ui.checkAll, SIGNAL(stateChanged(int)), this, SLOT(slotCheckAll(int)));
     connect(m_ui.buttonShowComments, SIGNAL(clicked()), this, SLOT(slotShowComments()));
-    connect(m_effectedit, SIGNAL(parameterChanged(const QDomElement, const QDomElement)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement)));
+    connect(m_effectedit, SIGNAL(parameterChanged(const QDomElement &, const QDomElement &)), this , SLOT(slotUpdateEffectParams(const QDomElement &, const QDomElement &)));
+    connect(m_effectedit, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,QString,QString)));
     connect(m_effectedit, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
     connect(m_effectedit, SIGNAL(displayMessage(const QString&, int)), this, SIGNAL(displayMessage(const QString&, int)));
     connect(m_effectedit, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
+    
     connect(monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
     connect(this, SIGNAL(showComments(bool)), m_effectedit, SIGNAL(showComments(bool)));
     m_effectLists["audio"] = &MainWindow::audioEffects;
@@ -159,7 +161,7 @@ void EffectStackView::slotSaveEffect()
     emit reloadEffects();
 }
 
-void EffectStackView::slotUpdateEffectParams(const QDomElement old, const QDomElement e)
+void EffectStackView::slotUpdateEffectParams(const QDomElement &old, const QDomElement &e)
 {
     if (m_trackMode)
         emit updateEffect(NULL, m_trackindex, old, e, m_ui.effectlist->currentRow());
@@ -229,17 +231,20 @@ void EffectStackView::slotTrackItemSelected(int ix, const TrackInfo info)
 
 void EffectStackView::slotItemChanged(QListWidgetItem *item)
 {
-    bool disable = true;
-    if (item->checkState() == Qt::Checked) disable = false;
-    m_ui.buttonReset->setEnabled(!disable || !KdenliveSettings::disable_effect_parameters());
+    bool disable = item->checkState() == Qt::Unchecked;
+    int row = m_ui.effectlist->row(item);
     int activeRow = m_ui.effectlist->currentRow();
-    if (activeRow >= 0) {
+
+    if (row == activeRow) {
+        m_ui.buttonReset->setEnabled(!disable || !KdenliveSettings::disable_effect_parameters());
         m_effectedit->updateParameter("disable", QString::number((int) disable));
-        if (m_trackMode)
-            emit changeEffectState(NULL, m_trackindex, activeRow, disable);
-        else
-            emit changeEffectState(m_clipref, -1, activeRow, disable);
     }
+
+    if (m_trackMode)
+        emit changeEffectState(NULL, m_trackindex, row, disable);
+    else
+        emit changeEffectState(m_clipref, -1, row, disable);
+
     slotUpdateCheckAllButton();
 }
 
@@ -431,6 +436,7 @@ void EffectStackView::clear()
     ItemInfo info;
     m_effectedit->transferParamDesc(QDomElement(), info);
     //m_ui.region_url->clear();
+    m_clipref = NULL;
     m_ui.buttonShowComments->setEnabled(false);
     m_ui.labelComment->setText(QString());
     m_ui.effectlist->blockSignals(false);
@@ -527,4 +533,10 @@ void EffectStackView::slotShowComments()
     emit showComments(m_ui.buttonShowComments->isChecked());
 }
 
+void EffectStackView::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties)
+{
+    if (!m_clipref) return;
+    emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties);
+}
+
 #include "effectstackview.moc"