]> git.sesse.net Git - kdenlive/blobdiff - src/effectstackview.cpp
Introduce video thumbnail for each frame when zooming at max level (causes slowdown...
[kdenlive] / src / effectstackview.cpp
index a86983e65b70aa4090d969773f3c2a06ac36659a..dccceb75eeedac082f8db5418083c7e05d2317fa 100644 (file)
@@ -72,6 +72,7 @@ EffectStackView::EffectStackView(QWidget *parent) :
     connect(m_ui.buttonSave, SIGNAL(clicked()), this, SLOT(slotSaveEffect()));
     connect(m_ui.buttonReset, SIGNAL(clicked()), this, SLOT(slotResetEffect()));
     connect(m_effectedit, SIGNAL(parameterChanged(const QDomElement, const QDomElement)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement)));
+    connect(m_effectedit, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
     m_effectLists["audio"] = &MainWindow::audioEffects;
     m_effectLists["video"] = &MainWindow::videoEffects;
     m_effectLists["custom"] = &MainWindow::customEffects;
@@ -140,6 +141,7 @@ void EffectStackView::slotUpdateEffectParams(const QDomElement old, const QDomEl
 
 void EffectStackView::slotClipItemSelected(ClipItem* c, int ix)
 {
+    if (c && !c->isEnabled()) return;
     if (c && c == m_clipref) {
         if (ix == -1) ix = m_ui.effectlist->currentRow();
     } else {
@@ -173,7 +175,7 @@ void EffectStackView::slotItemChanged(QListWidgetItem *item)
     m_ui.buttonReset->setEnabled(!disable);
     int activeRow = m_ui.effectlist->currentRow();
     if (activeRow >= 0) {
-        m_effectedit->updateParameter("disabled", QString::number((int) disable));
+        m_effectedit->updateParameter("disable", QString::number((int) disable));
         emit changeEffectState(m_clipref, activeRow, disable);
     }
 }
@@ -214,7 +216,7 @@ void EffectStackView::setupListView(int ix)
                 item = new QListWidgetItem(videoIcon, i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist);
             }
             item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
-            if (d.attribute("disabled") == "1") item->setCheckState(Qt::Unchecked);
+            if (d.attribute("disable") == "1") item->setCheckState(Qt::Unchecked);
             else item->setCheckState(Qt::Checked);
         }
     }
@@ -316,4 +318,11 @@ void EffectStackView::clear()
     m_ui.effectlist->blockSignals(false);
 }
 
+
+void EffectStackView::slotSeekTimeline(int pos)
+{
+    if (!m_clipref) return;
+    emit seekTimeline(m_clipref->startPos().frames(KdenliveSettings::project_fps()) + pos);
+}
+
 #include "effectstackview.moc"