X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectstack%2Feffectstackview2.cpp;h=5b7610d4e40ec0eb65b83996fa3b05de37ec6dec;hb=378edb5c077e4738c2b158a9dce90725b1ad4b88;hp=740518c1fa232c157c59e2e2f461c61ddedc1c03;hpb=3ca6159194c305b8d3ed22400a7f1f1e86f9339c;p=kdenlive diff --git a/src/effectstack/effectstackview2.cpp b/src/effectstack/effectstackview2.cpp index 740518c1..5b7610d4 100644 --- a/src/effectstack/effectstackview2.cpp +++ b/src/effectstack/effectstackview2.cpp @@ -93,14 +93,24 @@ void EffectStackView2::slotRenderPos(int pos) m_effects.at(i)->slotSyncEffectsPos(pos); } +void EffectStackView2::slotClipItemUpdate() +{ + int inPoint = m_clipref->cropStart().frames(KdenliveSettings::project_fps()); + int outPoint = m_clipref->cropDuration().frames(KdenliveSettings::project_fps()) + inPoint; + for (int i = 0; i < m_effects.count(); i++) { + m_effects.at(i)->setRange(inPoint, outPoint); + } +} + void EffectStackView2::slotClipItemSelected(ClipItem* c) { if (c && !c->isEnabled()) return; if (c && c == m_clipref) { - } else { + if (m_clipref) disconnect(m_clipref, SIGNAL(updateRange()), this, SLOT(slotClipItemUpdate())); m_clipref = c; if (c) { + connect(m_clipref, SIGNAL(updateRange()), this, SLOT(slotClipItemUpdate())); QString cname = m_clipref->clipName(); if (cname.length() > 30) { m_ui.checkAll->setToolTip(i18n("Effects for %1", cname)); @@ -271,7 +281,7 @@ void EffectStackView2::connectEffect(CollapsibleEffect *currentEffect) // Check drag & drop currentEffect->installEventFilter( this ); connect(currentEffect, SIGNAL(parameterChanged(const QDomElement, const QDomElement, int)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement, int))); - connect(currentEffect, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,QString,QString))); + connect(currentEffect, SIGNAL(startFilterJob(QString,QString,QString,QString,const QMap )), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,const QMap ))); connect(currentEffect, SIGNAL(deleteEffect(const QDomElement)), this , SLOT(slotDeleteEffect(const QDomElement))); connect(currentEffect, SIGNAL(reloadEffects()), this , SIGNAL(reloadEffects())); connect(currentEffect, SIGNAL(resetEffect(int)), this , SLOT(slotResetEffect(int))); @@ -284,6 +294,7 @@ void EffectStackView2::connectEffect(CollapsibleEffect *currentEffect) connect(currentEffect, SIGNAL(addEffect(QDomElement)), this , SLOT(slotAddEffect(QDomElement))); connect(currentEffect, SIGNAL(createRegion(int,KUrl)), this, SLOT(slotCreateRegion(int,KUrl))); connect(currentEffect, SIGNAL(deleteGroup(QDomDocument)), this , SLOT(slotDeleteGroup(QDomDocument))); + connect(currentEffect, SIGNAL(importClipKeyframes()), this, SIGNAL(importClipKeyframes())); } void EffectStackView2::slotCheckWheelEventFilter() @@ -501,7 +512,7 @@ void EffectStackView2::slotCheckAll(int state) // Disable all effects QList indexes; for (int i = 0; i < m_effects.count(); i++) { - m_effects.at(i)->slotEnable(disabled, false); + m_effects.at(i)->slotDisable(disabled, false); indexes << m_effects.at(i)->effectIndex(); } // Take care of groups @@ -643,10 +654,10 @@ void EffectStackView2::slotMoveEffectUp(QList indexes, bool up) else emit changeEffectPosition(m_clipref, -1, indexes, endPos); } -void EffectStackView2::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties) +void EffectStackView2::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&consumer, const QString&consumerParams, const QMap &extraParams) { if (!m_clipref) return; - emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties); + emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, consumer, consumerParams, extraParams); } void EffectStackView2::slotResetEffect(int ix) @@ -941,6 +952,16 @@ void EffectStackView2::dropEvent(QDropEvent *event) processDroppedEffect(doc.documentElement(), event); } +void EffectStackView2::setKeyframes(const QString data, int maximum) +{ + for (int i = 0; i < m_effects.count(); i++) { + if (m_effects.at(i)->isActive()) { + m_effects.at(i)->setKeyframes(data, maximum); + break; + } + } +} + //static const QString EffectStackView2::getStyleSheet() {