]> git.sesse.net Git - kdenlive/commitdiff
Fix pan_scan effect & first steps for effect region
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 19 Jun 2010 03:53:54 +0000 (03:53 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 19 Jun 2010 03:53:54 +0000 (03:53 +0000)
svn path=/trunk/kdenlive/; revision=4525

13 files changed:
src/clipitem.cpp
src/customtrackview.cpp
src/customtrackview.h
src/effectstackedit.cpp
src/effectstackedit.h
src/effectstackview.cpp
src/effectstackview.h
src/mainwindow.cpp
src/mainwindow.h
src/renderer.cpp
src/transitionsettings.cpp
src/transitionsettings.h
src/widgets/effectstack_ui.ui

index 9fe3bf4fb182ed9e52a0cffb8121c906d85d2f34..5e1a7503cfeaa01575d824fc9bdd12dd9e32cc2c 100644 (file)
@@ -1399,11 +1399,16 @@ EffectsParameterList ClipItem::addEffect(const QDomElement effect, bool /*animat
     if (effect.hasAttribute("src")) parameters.addParam("src", effect.attribute("src"));
     if (effect.hasAttribute("disable")) parameters.addParam("disable", effect.attribute("disable"));
 
-
     QString effectId = effect.attribute("id");
     if (effectId.isEmpty()) effectId = effect.attribute("tag");
     parameters.addParam("id", effectId);
 
+    // special case: the affine effect need in / out points
+    if (effectId == "pan_zoom") {
+        parameters.addParam("in", QString::number(cropStart().frames(m_fps)));
+        parameters.addParam("out", QString::number((cropStart() + cropDuration()).frames(m_fps)));
+    }
+
     QDomNodeList params = effect.elementsByTagName("parameter");
     int fade = 0;
     for (int i = 0; i < params.count(); i++) {
@@ -1507,10 +1512,13 @@ EffectsParameterList ClipItem::getEffectArgs(const QDomElement effect)
 {
     EffectsParameterList parameters;
     parameters.addParam("tag", effect.attribute("tag"));
+    if (effect.hasAttribute("region")) parameters.addParam("region", effect.attribute("region"));
     parameters.addParam("kdenlive_ix", effect.attribute("kdenlive_ix"));
     parameters.addParam("id", effect.attribute("id"));
     if (effect.hasAttribute("src")) parameters.addParam("src", effect.attribute("src"));
     if (effect.hasAttribute("disable")) parameters.addParam("disable", effect.attribute("disable"));
+    if (effect.hasAttribute("in")) parameters.addParam("in", effect.attribute("in"));
+    if (effect.hasAttribute("out")) parameters.addParam("out", effect.attribute("out"));
 
     QDomNodeList params = effect.elementsByTagName("parameter");
     for (int i = 0; i < params.count(); i++) {
index 27bdeddad6d11d188b3427b939321bed01bb141a..181d24d679c64bb72aac38bfcd640118b0dde858 100644 (file)
@@ -1924,6 +1924,15 @@ void CustomTrackView::slotUpdateClipEffect(ClipItem *clip, QDomElement oldeffect
     m_commandStack->push(command);
 }
 
+void CustomTrackView::slotUpdateClipRegion(ClipItem *clip, int ix, QString region)
+{
+    QDomElement effect = clip->getEffectAt(ix);
+    QDomElement oldeffect = effect.cloneNode().toElement();
+    effect.setAttribute("region", region);
+    EditEffectCommand *command = new EditEffectCommand(this, m_document->tracksCount() - clip->track(), clip->startPos(), oldeffect, effect, ix, true);
+    m_commandStack->push(command);
+}
+
 ClipItem *CustomTrackView::cutClip(ItemInfo info, GenTime cutTime, bool cut, bool execute)
 {
     if (cut) {
@@ -2916,6 +2925,7 @@ void CustomTrackView::deleteClip(const QString &clipId)
 
 void CustomTrackView::setCursorPos(int pos, bool seek)
 {
+    kDebug() << "SEEk TO: " << pos << ", SEEK: " << seek;
     if (pos == m_cursorPos) return;
     emit cursorMoved((int)(m_cursorPos), (int)(pos));
     m_cursorPos = pos;
@@ -4388,6 +4398,19 @@ void CustomTrackView::updatePositionEffects(ClipItem * item, ItemInfo info)
             }
         }
     }
+
+    effectPos = item->hasEffect("affine", "pan_zoom");
+    if (effectPos != -1) {
+        QDomElement oldeffect = item->effectAt(effectPos);
+        int start = item->cropStart().frames(m_document->fps());
+        int max = start + item->cropDuration().frames(m_document->fps());
+        oldeffect.setAttribute("in", start);
+        oldeffect.setAttribute("out", max);
+        if (!m_document->renderer()->mltEditEffect(m_document->tracksCount() - item->track(), item->startPos(), item->getEffectArgs(oldeffect)))
+            emit displayMessage(i18n("Problem editing effect"), ErrorMessage);
+        // if effect is displayed, update the effect edit widget with new clip duration
+        if (item->isSelected() && effectPos == item->selectedEffectIndex()) emit clipItemSelected(item, effectPos);
+    }
 }
 
 double CustomTrackView::getSnapPointForPos(double pos)
index a832b41552f8a386c1faaa6f55e575ebdde0b329..2b155a6a9075299105ab04bacafbaa00af3096c3 100644 (file)
@@ -135,7 +135,7 @@ public:
     void splitAudio();
 
     /** @brief Seperates the audio of a clip to a audio track.
-    * @param pos Position of the clip to split 
+    * @param pos Position of the clip to split
     * @param track Track of the clip
     * @param split Split or unsplit */
     void doSplitAudio(const GenTime &pos, int track, bool split);
@@ -183,6 +183,7 @@ public slots:
     void slotChangeEffectState(ClipItem *clip, int effectPos, bool disable);
     void slotChangeEffectPosition(ClipItem *clip, int currentPos, int newPos);
     void slotUpdateClipEffect(ClipItem *clip, QDomElement oldeffect, QDomElement effect, int ix);
+    void slotUpdateClipRegion(ClipItem *clip, int ix, QString region);
     void slotRefreshEffects(ClipItem *clip);
     void setDuration(int duration);
     void slotAddTransition(ClipItem* clip, ItemInfo transitionInfo, int endTrack, QDomElement transition = QDomElement());
index 1836f28532826466d21ddae2673950ec24639274..7c68f57cffbca6a55f510a769b78f044c962f3cf 100644 (file)
@@ -142,7 +142,7 @@ void EffectStackEdit::updateParameter(const QString &name, const QString &value)
     m_params.setAttribute(name, value);
 }
 
-void EffectStackEdit::transferParamDesc(const QDomElement d, int in, int out)
+void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, int out)
 {
     clearAllItems();
     if (m_keyframeEditor) delete m_keyframeEditor;
@@ -251,13 +251,13 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int in, int out)
             m_valueItems[paramName+"complex"] = pl;
             connect(pl, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
         } else if (type == "geometry") {
-            Geometryval *geo = new Geometryval(m_profile, m_timecode, m_frameSize, m_in);
+            Geometryval *geo = new Geometryval(m_profile, m_timecode, m_frameSize, pos);
             if (minFrame == maxFrame) geo->setupParam(pa, m_in, m_out);
             else geo->setupParam(pa, minFrame, maxFrame);
             m_vbox->addWidget(geo);
             m_valueItems[paramName+"geometry"] = geo;
             connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
-            connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
+            connect(geo, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
         } else if (type == "keyframe" || type == "simplekeyframe") {
             // keyframe editor widget
             kDebug() << "min: " << m_in << ", MAX: " << m_out;
@@ -267,7 +267,7 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int in, int out)
                 m_valueItems[paramName+"keyframe"] = geo;
                 m_keyframeEditor = geo;
                 connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
-                connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
+                connect(geo, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
             } else {
                 // we already have a keyframe editor, so just add another column for the new param
                 m_keyframeEditor->addParameter(pa);
@@ -388,11 +388,6 @@ void EffectStackEdit::transferParamDesc(const QDomElement d, int in, int out)
     m_vbox->addStretch();
 }
 
-void EffectStackEdit::slotSeekToPos(int pos)
-{
-    emit seekTimeline(pos);
-}
-
 wipeInfo EffectStackEdit::getWipeInfo(QString value)
 {
     wipeInfo info;
index c1fff7d9f5cd31115b139ac0621a608147ccdfd9..6ca2015966304cd4b0437918b940ef8858d60132 100644 (file)
@@ -70,16 +70,14 @@ private:
     KeyframeEdit *m_keyframeEditor;
 
 public slots:
-    void transferParamDesc(const QDomElement, int , int);
+    /** \brief Called when an effect is selected, builds the UI for this effect */
+    void transferParamDesc(const QDomElement, int, int , int);
     void slotSliderMoved(int);
     /** \brief Called whenever(?) some parameter is changed in the gui.
      *
      * Transfers all Dynamic gui parameter settings into m_params(??) */
     void collectAllParameters();
 
-private slots:
-    void slotSeekToPos(int);
-
 signals:
     void parameterChanged(const QDomElement, const QDomElement);
     void seekTimeline(int);
index 116f4e4dd066411a1fe9981c697fda1879b79b04..f9b8012333fa3f763d0a88c9aab6139d1521ca2d 100644 (file)
 #include "clipitem.h"
 #include "mainwindow.h"
 #include "docclipbase.h"
+#include "projectlist.h"
+#include "kthumb.h"
 #include "kdenlivesettings.h"
 
 #include <KDebug>
 #include <KLocale>
 #include <KMessageBox>
 #include <KStandardDirs>
+#include <KFileDialog>
 
 #include <QMenu>
 #include <QTextStream>
@@ -44,6 +47,7 @@ EffectStackView::EffectStackView(QWidget *parent) :
     vbox1->setSpacing(0);
     vbox1->addWidget(m_effectedit);
     m_ui.frame->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
+    m_ui.region_url->fileDialog()->setFilter(ProjectList::getExtensions());
     //m_ui.effectlist->horizontalHeader()->setVisible(false);
     //m_ui.effectlist->verticalHeader()->setVisible(false);
     m_clipref = NULL;
@@ -65,6 +69,8 @@ EffectStackView::EffectStackView(QWidget *parent) :
 
     m_ui.effectlist->setDragDropMode(QAbstractItemView::NoDragDrop); //use internal if drop is recognised right
 
+    connect(m_ui.region_url, SIGNAL(urlSelected(const KUrl &)), this , SLOT(slotRegionChanged()));
+    connect(m_ui.region_url, SIGNAL(returnPressed()), this , SLOT(slotRegionChanged()));
     connect(m_ui.effectlist, SIGNAL(itemSelectionChanged()), this , SLOT(slotItemSelectionChanged()));
     connect(m_ui.effectlist, SIGNAL(itemChanged(QListWidgetItem *)), this , SLOT(slotItemChanged(QListWidgetItem *)));
     connect(m_ui.buttonUp, SIGNAL(clicked()), this, SLOT(slotItemUp()));
@@ -165,7 +171,8 @@ void EffectStackView::slotClipItemSelected(ClipItem* c, int ix)
     if (m_clipref == NULL) {
         m_ui.effectlist->blockSignals(true);
         m_ui.effectlist->clear();
-        m_effectedit->transferParamDesc(QDomElement(), 0, 0);
+        m_effectedit->transferParamDesc(QDomElement(), 0, 0, 0);
+       m_ui.region_url->clear();
         m_ui.effectlist->blockSignals(false);
         setEnabled(false);
         return;
@@ -178,7 +185,7 @@ void EffectStackView::slotItemChanged(QListWidgetItem *item)
 {
     bool disable = true;
     if (item->checkState() == Qt::Checked) disable = false;
-    m_ui.frame->setEnabled(!disable);
+    m_ui.frame_layout->setEnabled(!disable);
     m_ui.buttonReset->setEnabled(!disable);
     int activeRow = m_ui.effectlist->currentRow();
     if (activeRow >= 0) {
@@ -242,7 +249,10 @@ void EffectStackView::setupListView(int ix)
         m_ui.checkAll->setEnabled(true);
     }
     m_ui.effectlist->blockSignals(false);
-    if (m_ui.effectlist->count() == 0) m_effectedit->transferParamDesc(QDomElement(), 0, 0);
+    if (m_ui.effectlist->count() == 0) {
+       m_effectedit->transferParamDesc(QDomElement(), 0, 0, 0);
+       m_ui.region_url->clear();
+    }
     else slotItemSelectionChanged(false);
     slotUpdateCheckAllButton();
 }
@@ -254,9 +264,12 @@ void EffectStackView::slotItemSelectionChanged(bool update)
     bool isChecked = false;
     if (hasItem && m_ui.effectlist->currentItem()->checkState() == Qt::Checked) isChecked = true;
     if (hasItem && m_ui.effectlist->currentItem()->isSelected()) {
-        m_effectedit->transferParamDesc(m_clipref->effectAt(activeRow),
+       QDomElement eff = m_clipref->effectAt(activeRow);
+        m_effectedit->transferParamDesc(eff,
+                                        0,
                                         m_clipref->cropStart().frames(KdenliveSettings::project_fps()),
-                                        m_clipref->cropDuration().frames(KdenliveSettings::project_fps())); //minx max frame
+                                        (m_clipref->cropStart() + m_clipref->cropDuration()).frames(KdenliveSettings::project_fps())); //minx max frame
+       m_ui.region_url->setText(eff.attribute("region"));
     }
     if (m_clipref && update) m_clipref->setSelectedEffect(activeRow);
     m_ui.buttonDel->setEnabled(hasItem);
@@ -264,7 +277,7 @@ void EffectStackView::slotItemSelectionChanged(bool update)
     m_ui.buttonReset->setEnabled(hasItem && isChecked);
     m_ui.buttonUp->setEnabled(activeRow > 0);
     m_ui.buttonDown->setEnabled((activeRow < m_ui.effectlist->count() - 1) && hasItem);
-    m_ui.frame->setEnabled(isChecked);
+    m_ui.frame_layout->setEnabled(isChecked);
 }
 
 void EffectStackView::slotItemUp()
@@ -307,7 +320,8 @@ void EffectStackView::slotResetEffect()
     if (!dom.isNull()) {
         dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
         m_clipref->initEffect(dom);
-        m_effectedit->transferParamDesc(dom, m_clipref->cropStart().frames(KdenliveSettings::project_fps()), m_clipref->cropDuration().frames(KdenliveSettings::project_fps()));//minx max frame
+        m_effectedit->transferParamDesc(dom, 0, m_clipref->cropStart().frames(KdenliveSettings::project_fps()), (m_clipref->cropStart() + m_clipref->cropDuration()).frames(KdenliveSettings::project_fps()));//minx max frame
+       m_ui.region_url->setText(dom.attribute("region"));
         emit updateClipEffect(m_clipref, old, dom, activeRow);
     }
 }
@@ -329,7 +343,8 @@ void EffectStackView::clear()
     m_ui.buttonUp->setEnabled(false);
     m_ui.buttonDown->setEnabled(false);
     m_ui.checkAll->setEnabled(false);
-    m_effectedit->transferParamDesc(QDomElement(), 0, 0);
+    m_effectedit->transferParamDesc(QDomElement(), 0, 0, 0);
+    m_ui.region_url->clear();
     m_ui.effectlist->blockSignals(false);
 }
 
@@ -374,4 +389,9 @@ void EffectStackView::slotCheckAll(int state)
         m_ui.effectlist->item(i)->setCheckState((Qt::CheckState)state);
 }
 
+void EffectStackView::slotRegionChanged()
+{
+    emit updateClipRegion(m_clipref, m_ui.effectlist->currentRow(), m_ui.region_url->text());
+}
+
 #include "effectstackview.moc"
index 7c66ca13a9ff50b4494d4fbac85419c3c1f3b48d..20d2a2440ad40313b30d5cace3813781fd708e43 100644 (file)
@@ -69,7 +69,7 @@ public slots:
     * @param c Clip whose effect list should be managed
     * @param ix Effect to preselect */
     void slotClipItemSelected(ClipItem* c, int ix);
-    
+
     /** @brief Emits updateClipEffect.
     * @param old Old effect information
     * @param e New effect information
@@ -111,6 +111,9 @@ private slots:
     /** @brief Sets the check state of all effects according to @param state. */
     void slotCheckAll(int state);
 
+    /** @brief Define the region filter for current effect. */
+    void slotRegionChanged();
+
 signals:
     void removeEffect(ClipItem*, QDomElement);
     /**  Parameters for an effect changed, update the filter in playlist */
@@ -126,6 +129,8 @@ signals:
     void reloadEffects();
     /** An effect with position parameter was changed, seek */
     void seekTimeline(int);
+    /** The region effect for current effect was changed */
+    void updateClipRegion(ClipItem*, int, QString);
 };
 
 #endif
index 1b4cb3973ab5bef3203f646293195c2292bfca3a..be1fafa56d5f72cf18d24848e9460986a368bc18 100644 (file)
@@ -2093,6 +2093,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc)   //cha
 
 
     connect(m_effectStack, SIGNAL(updateClipEffect(ClipItem*, QDomElement, QDomElement, int)), trackView->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, QDomElement, QDomElement, int)));
+    connect(m_effectStack, SIGNAL(updateClipRegion(ClipItem*, int, QString)), trackView->projectView(), SLOT(slotUpdateClipRegion(ClipItem*, int, QString)));
     connect(m_effectStack, SIGNAL(removeEffect(ClipItem*, QDomElement)), trackView->projectView(), SLOT(slotDeleteEffect(ClipItem*, QDomElement)));
     connect(m_effectStack, SIGNAL(changeEffectState(ClipItem*, int, bool)), trackView->projectView(), SLOT(slotChangeEffectState(ClipItem*, int, bool)));
     connect(m_effectStack, SIGNAL(changeEffectPosition(ClipItem*, int, int)), trackView->projectView(), SLOT(slotChangeEffectPosition(ClipItem*, int, int)));
@@ -2156,7 +2157,7 @@ void MainWindow::slotEditKeys()
     KShortcutsDialog dialog(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsAllowed, this);
     dialog.addCollection(actionCollection(), i18nc("general keyboard shortcuts", "General"));
     dialog.addCollection(m_effectsActionCollection, i18nc("effects and transitions keyboard shortcuts", "Effects & Transitions"));
-    dialog.configure(); 
+    dialog.configure();
 }
 
 void MainWindow::slotPreferences(int page, int option)
index 2732c2d88d9480a85c696df1102d100ad7d354ca..b458981dded4baff789d33a03f8bd28931c78517 100644 (file)
@@ -257,7 +257,7 @@ private slots:
     void queryQuit();
     void activateDocument();
     void connectDocument(TrackView*, KdenliveDoc*);
-    
+
     /** @brief Shows file open dialog. */
     void openFile();
     void openLastFile();
@@ -315,7 +315,7 @@ private slots:
     void slotUpdateZoomSliderToolTip(int zoomlevel);
 
     /** @brief Displays the zoom slider tooltip.
-    * @param zoomlevel (optional) The zoom level to show in the tooltip. 
+    * @param zoomlevel (optional) The zoom level to show in the tooltip.
     *
     * Adopted from Dolphin (src/statusbar/dolphinstatusbar.cpp) */
     void slotShowZoomSliderToolTip(int zoomlevel = -1);
index 6759eadd9994f78a1b08633cf7dfb1341228aac9..ab4c1db3e59d321e7dda87e4faea814cde53f8fc 100644 (file)
@@ -1430,9 +1430,9 @@ const QString & Render::rendererName() const
 
 void Render::emitFrameNumber(double position)
 {
+    if (position == m_framePosition) return;
     m_framePosition = position;
     emit rendererPosition((int) position);
-    //if (qApp->activeWindow()) QApplication::postEvent(qApp->activeWindow(), new PositionChangeEvent( GenTime((int) position, m_fps), m_monitorId));
 }
 
 void Render::emitConsumerStopped()
@@ -2383,11 +2383,16 @@ bool Render::mltAddEffect(int track, GenTime position, EffectsParameterList para
         if (filter && filter->is_valid()) {
             filter->set("kdenlive_id", filterId);
             if (!region.isEmpty()) {
-                char *filterResource = decodedString(region);
-                filter->set("resource", filterResource);
+                char *tmp = decodedString(region);
+                filter->set("resource", tmp);
+               tmp = decodedString(params.paramValue("kdenlive_ix"));
+               filter->set("kdenlive_ix", tmp);
                 filter->set("filter0", filterTag);
                 prefix = "filter0.";
-                delete[] filterResource;
+                delete[] tmp;
+               params.removeParam("id");
+               params.removeParam("region");
+               params.removeParam("kdenlive_ix");
             }
         } else {
             kDebug() << "filter is NULL";
@@ -2445,9 +2450,8 @@ bool Render::mltEditEffect(int track, GenTime position, EffectsParameterList par
 {
     QString index = params.paramValue("kdenlive_ix");
     QString tag =  params.paramValue("tag");
-    QString region =  params.paramValue("region");
 
-    if (!params.paramValue("keyframes").isEmpty() || /*it.key().startsWith("#") || */tag.startsWith("ladspa") || tag == "sox" || tag == "autotrack_rectangle" || !region.isEmpty()) {
+    if (!params.paramValue("keyframes").isEmpty() || /*it.key().startsWith("#") || */tag.startsWith("ladspa") || tag == "sox" || tag == "autotrack_rectangle" || params.hasParam("region")) {
         // This is a keyframe effect, to edit it, we remove it and re-add it.
         mltRemoveEffect(track, position, index, false);
         bool success = mltAddEffect(track, position, params);
@@ -2498,9 +2502,12 @@ bool Render::mltEditEffect(int track, GenTime position, EffectsParameterList par
         m_isBlocked = false;
         return success;
     }
+    QString prefix;
+    QString ser = filter->get("mlt_service");
+    if (ser == "region") prefix = "filter0.";
     mlt_service_lock(service.get_service());
     for (int j = 0; j < params.count(); j++) {
-        char *name = decodedString(params.at(j).name());
+        char *name = decodedString(prefix + params.at(j).name());
         char *value = decodedString(params.at(j).value());
         filter->set(name, value);
         delete[] name;
index 3d7f4358439c29a84ca3d6a06007000dfae184b2..8d7e014af5656e7ed36762474708dad539905591 100644 (file)
@@ -62,8 +62,6 @@ TransitionSettings::TransitionSettings(QWidget* parent) :
 
     connect(transitionList, SIGNAL(activated(int)), this, SLOT(slotTransitionChanged()));
     connect(transitionTrack, SIGNAL(activated(int)), this, SLOT(slotTransitionTrackChanged()));
-
-    connect(this, SIGNAL(transferParamDesc(const QDomElement&, int , int)), m_effectEdit , SLOT(transferParamDesc(const QDomElement&, int , int)));
     connect(m_effectEdit, SIGNAL(parameterChanged(const QDomElement&, const QDomElement&)), this , SLOT(slotUpdateEffectParams(const QDomElement&, const QDomElement&)));
 }
 
@@ -103,19 +101,21 @@ void TransitionSettings::updateTrackList()
 void TransitionSettings::slotTransitionChanged(bool reinit, bool updateCurrent)
 {
     QDomElement e = m_usedTransition->toXML().cloneNode().toElement();
+    int start = m_usedTransition->startPos().frames(KdenliveSettings::project_fps());
+    int end = m_usedTransition->endPos().frames(KdenliveSettings::project_fps());
     if (reinit) {
         // Reset the transition parameters to the default one
         QDomElement newTransition = MainWindow::transitions.getEffectByName(transitionList->currentText()).cloneNode().toElement();
         slotUpdateEffectParams(e, newTransition);
-        emit transferParamDesc(newTransition, m_usedTransition->startPos().frames(KdenliveSettings::project_fps()), m_usedTransition->endPos().frames(KdenliveSettings::project_fps()));
+        m_effectEdit->transferParamDesc(newTransition, start, start, end);
     } else if (!updateCurrent) {
         // Transition changed, update parameters dialog
         //slotUpdateEffectParams(e, e);
-        m_effectEdit->transferParamDesc(e, m_usedTransition->startPos().frames(KdenliveSettings::project_fps()), m_usedTransition->endPos().frames(KdenliveSettings::project_fps()));
+        m_effectEdit->transferParamDesc(e, start, start, end);
     } else {
         // Same transition, we just want to update the parameters value
         slotUpdateEffectParams(e, e);
-        if (m_usedTransition->hasGeometry()) emit transferParamDesc(m_usedTransition->toXML(), m_usedTransition->startPos().frames(KdenliveSettings::project_fps()), m_usedTransition->endPos().frames(KdenliveSettings::project_fps()));
+        if (m_usedTransition->hasGeometry()) m_effectEdit->transferParamDesc(m_usedTransition->toXML(), start, start, end);
     }
 }
 
@@ -177,7 +177,7 @@ void TransitionSettings::slotTransitionItemSelected(Transition* t, int nextTrack
     } else {
         // null transition selected
         m_usedTransition = NULL;
-        m_effectEdit->transferParamDesc(QDomElement(), 0, 0);
+        m_effectEdit->transferParamDesc(QDomElement(), 0, 0, 0);
     }
 
 }
index 3166a01c5e29484e6d5eb825c1071d4317e53de7..998045057d25eaeba706cd36e18965ac269c3de6 100644 (file)
@@ -58,7 +58,6 @@ private slots:
 
 signals:
     void transitionUpdated(Transition *, QDomElement);
-    void transferParamDesc(const QDomElement&, int , int);
     void seekTimeline(int);
 };
 
index 610588051d96baa2906712fc7280f0b9f891077a..18f9e96808cdbc27c04f1dca96a6c1975e2ccef1 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>415</width>
-    <height>344</height>
+    <width>448</width>
+    <height>248</height>
    </rect>
   </property>
   <property name="sizePolicy">
        </item>
       </layout>
      </widget>
-     <widget class="QFrame" name="frame">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
+     <widget class="QWidget" name="">
+      <layout class="QVBoxLayout" name="frame_layout">
+       <item>
+        <widget class="QFrame" name="frame">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KUrlRequester" name="region_url">
+         <property name="clickMessage">
+          <string>Set filter region</string>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </widget>
     </widget>
    </item>
   </layout>
  </widget>
  <customwidgets>
+  <customwidget>
+   <class>KUrlRequester</class>
+   <extends>QFrame</extends>
+   <header>kurlrequester.h</header>
+  </customwidget>
   <customwidget>
    <class>KListWidget</class>
    <extends>QListWidget</extends>