1 /***************************************************************************
2 effecstackview.cpp2 - description
5 copyright : (C) 2008 by Marco Gittler
6 email : g.marco@freenet.de
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
19 #include "effectstackview2.h"
20 #include "effectslist.h"
22 #include "mainwindow.h"
23 #include "docclipbase.h"
24 #include "projectlist.h"
26 #include "monitoreditwidget.h"
27 #include "monitorscene.h"
28 #include "kdenlivesettings.h"
32 #include <KMessageBox>
33 #include <KStandardDirs>
34 #include <KFileDialog>
35 #include <KColorScheme>
38 #include <QTextStream>
40 #include <QInputDialog>
44 EffectStackView2::EffectStackView2(Monitor *monitor, QWidget *parent) :
48 m_draggedEffect(NULL),
51 m_effectMetaInfo.trackMode = false;
52 m_effectMetaInfo.monitor = monitor;
53 m_effects = QList <CollapsibleEffect*>();
56 setFont(KGlobalSettings::smallestReadableFont());
57 m_ui.checkAll->setToolTip(i18n("Enable/Disable all effects"));
58 m_ui.buttonShowComments->setIcon(KIcon("help-about"));
59 m_ui.buttonShowComments->setToolTip(i18n("Show additional information for the parameters"));
61 connect(m_ui.checkAll, SIGNAL(stateChanged(int)), this, SLOT(slotCheckAll(int)));
62 connect(m_ui.buttonShowComments, SIGNAL(clicked()), this, SLOT(slotShowComments()));
63 m_ui.labelComment->setHidden(true);
67 QPalette p = palette();
68 KColorScheme scheme(p.currentColorGroup(), KColorScheme::View, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
69 QColor dark_bg = scheme.shade(KColorScheme::DarkShade);
70 QColor selected_bg = scheme.decoration(KColorScheme::FocusColor).color();
71 QColor hover_bg = scheme.decoration(KColorScheme::HoverColor).color();
72 QColor light_bg = scheme.shade(KColorScheme::LightShade);
74 QString stylesheet(QString("QProgressBar:horizontal {border: 1px solid %1;border-radius:0px;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right: 0px;background:%4;padding: 0px;text-align:left center}\
75 QProgressBar:horizontal#dragOnly {background: %1} QProgressBar:horizontal:hover#dragOnly {background: %3} QProgressBar:horizontal:hover {border: 1px solid %3;border-right: 0px;}\
76 QProgressBar::chunk:horizontal {background: %1;} QProgressBar::chunk:horizontal:hover {background: %3;}\
77 QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %4;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;}\
78 QAbstractSpinBox#dragBox {border: 1px solid %1;border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QAbstractSpinBox::down-button#dragBox {width:0px;padding:0px;}\
79 QAbstractSpinBox::up-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %2;} QAbstractSpinBox:hover#dragBox {border: 1px solid %3;} ")
80 .arg(dark_bg.name()).arg(selected_bg.name()).arg(hover_bg.name()).arg(light_bg.name()));
81 setStyleSheet(stylesheet);
84 EffectStackView2::~EffectStackView2()
89 void EffectStackView2::slotRenderPos(int pos)
91 if (m_effects.isEmpty()) return;
92 if (!m_effectMetaInfo.trackMode && m_clipref) pos = pos - m_clipref->startPos().frames(KdenliveSettings::project_fps());
94 for (int i = 0; i< m_effects.count(); i++)
95 m_effects.at(i)->slotSyncEffectsPos(pos);
98 void EffectStackView2::slotClipItemSelected(ClipItem* c, int ix)
100 if (c && !c->isEnabled()) return;
101 if (c && c == m_clipref) {
106 QString cname = m_clipref->clipName();
107 if (cname.length() > 30) {
108 m_ui.checkAll->setToolTip(i18n("Effects for %1").arg(cname));
110 m_ui.checkAll->setText(i18n("Effects for %1").arg(cname) + "...");
112 m_ui.checkAll->setToolTip(QString());
113 m_ui.checkAll->setText(i18n("Effects for %1").arg(cname));
115 m_ui.checkAll->setEnabled(true);
116 ix = c->selectedEffectIndex();
117 QString size = c->baseClip()->getProperty("frame_size");
118 double factor = c->baseClip()->getProperty("aspect_ratio").toDouble();
119 m_effectMetaInfo.frameSize = QPoint((int)(size.section('x', 0, 0).toInt() * factor + 0.5), size.section('x', 1, 1).toInt());
124 if (m_clipref == NULL) {
125 //TODO: clear list, reset paramdesc and info
127 //m_effectedit->transferParamDesc(QDomElement(), info);
132 m_effectMetaInfo.trackMode = false;
133 m_currentEffectList = m_clipref->effectList();
137 void EffectStackView2::slotTrackItemSelected(int ix, const TrackInfo info)
140 m_effectMetaInfo.trackMode = true;
141 m_currentEffectList = info.effectsList;
144 m_ui.checkAll->setToolTip(QString());
145 m_ui.checkAll->setText(i18n("Effects for track %1").arg(info.trackName.isEmpty() ? QString::number(ix) : info.trackName));
151 void EffectStackView2::setupListView(int ix)
154 m_draggedEffect = NULL;
155 disconnect(m_effectMetaInfo.monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
158 QWidget *view = m_ui.container->takeWidget();
163 view = new QWidget(m_ui.container);
164 m_ui.container->setWidget(view);
166 QVBoxLayout *vbox1 = new QVBoxLayout(view);
167 vbox1->setContentsMargins(0, 0, 0, 0);
168 vbox1->setSpacing(0);
170 if (m_currentEffectList.isEmpty()) m_ui.labelComment->setHidden(true);
172 for (int i = 0; i < m_currentEffectList.count(); i++) {
173 QDomElement d = m_currentEffectList.at(i).cloneNode().toElement();
175 kDebug() << " . . . . WARNING, NULL EFFECT IN STACK!!!!!!!!!";
179 CollapsibleEffect *group = NULL;
180 EffectInfo effectInfo;
181 effectInfo.fromString(d.attribute("kdenlive_info"));
182 if (effectInfo.groupIndex >= 0) {
183 // effect is in a group
184 for (int i = 0; i < vbox1->count(); i++) {
185 CollapsibleEffect *eff = static_cast<CollapsibleEffect *>(vbox1->itemAt(i)->widget());
186 if (eff->isGroup() && eff->groupIndex() == effectInfo.groupIndex) {
193 group = new CollapsibleEffect(QDomElement(), QDomElement(), ItemInfo(), effectInfo.groupIndex, &m_effectMetaInfo, false, true, m_ui.container->widget());
194 if (!effectInfo.groupName.isEmpty()) group->title->setText(effectInfo.groupName);
195 connect(group, SIGNAL(moveEffect(int,int,CollapsibleEffect*)), this, SLOT(slotMoveEffect(int,int,CollapsibleEffect*)));
196 connect(group, SIGNAL(unGroup(CollapsibleEffect*)), this , SLOT(slotUnGroup(CollapsibleEffect*)));
197 vbox1->addWidget(group);
199 if (effectInfo.groupIndex >= m_groupIndex) m_groupIndex = effectInfo.groupIndex + 1;
203 doc.appendChild(doc.importNode(d, true));
204 kDebug() << "IMPORTED STK: " << doc.toString();*/
207 if (m_effectMetaInfo.trackMode) {
208 info.track = m_trackInfo.type;
209 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
210 info.cropStart = GenTime(0);
211 info.startPos = GenTime(-1);
214 else info = m_clipref->info();
216 CollapsibleEffect *currentEffect = new CollapsibleEffect(d, m_currentEffectList.at(i), info, i, &m_effectMetaInfo, i == m_currentEffectList.count() - 1, false, view);
217 m_effects.append(currentEffect);
219 group->addGroupEffect(currentEffect);
221 vbox1->addWidget(currentEffect);
223 if (currentEffect->effectIndex() == ix) currentEffect->setActive(true);
226 currentEffect->installEventFilter( this );
228 connect(currentEffect, SIGNAL(parameterChanged(const QDomElement, const QDomElement, int)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement, int)));
229 connect(currentEffect, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,QString,QString)));
230 connect(currentEffect, SIGNAL(deleteEffect(const QDomElement)), this , SLOT(slotDeleteEffect(const QDomElement)));
231 connect(currentEffect, SIGNAL(reloadEffects()), this , SIGNAL(reloadEffects()));
232 connect(currentEffect, SIGNAL(resetEffect(int)), this , SLOT(slotResetEffect(int)));
233 connect(currentEffect, SIGNAL(changeEffectPosition(int,bool)), this , SLOT(slotMoveEffectUp(int , bool)));
234 connect(currentEffect, SIGNAL(effectStateChanged(bool, int)), this, SLOT(slotUpdateEffectState(bool, int)));
235 connect(currentEffect, SIGNAL(activateEffect(int)), this, SLOT(slotSetCurrentEffect(int)));
236 connect(currentEffect, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
237 connect(currentEffect, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
238 connect(currentEffect, SIGNAL(createGroup(int)), this , SLOT(slotCreateGroup(int)));
239 connect(currentEffect, SIGNAL(moveEffect(int,int,CollapsibleEffect*)), this , SLOT(slotMoveEffect(int,int,CollapsibleEffect*)));
240 connect(currentEffect, SIGNAL(addEffect(QDomElement)), this , SLOT(slotAddEffect(QDomElement)));
242 //ui.title->setPixmap(icon.pixmap(QSize(12, 12)));
244 vbox1->addStretch(10);
245 slotUpdateCheckAllButton();
246 connect(m_effectMetaInfo.monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
248 // Wait a little bit for the new layout to be ready, then check if we have a scrollbar
249 QTimer::singleShot(200, this, SLOT(slotCheckWheelEventFilter()));
253 void EffectStackView2::slotCheckWheelEventFilter()
255 // If the effect stack widget has no scrollbar, we will not filter the
256 // mouse wheel events, so that user can easily adjust effect params
257 bool filterWheelEvent = false;
258 if (m_ui.container->verticalScrollBar() && m_ui.container->verticalScrollBar()->isVisible()) {
259 // widget has scroll bar,
260 filterWheelEvent = true;
262 for (int i = 0; i < m_effects.count(); i++) {
263 m_effects.at(i)->filterWheelEvent = filterWheelEvent;
267 void EffectStackView2::resizeEvent ( QResizeEvent * event )
269 slotCheckWheelEventFilter();
270 QWidget::resizeEvent(event);
273 bool EffectStackView2::eventFilter( QObject * o, QEvent * e )
275 // Check if user clicked in an effect's top bar to start dragging it
276 if (e->type() == QEvent::MouseButtonPress) {
277 m_draggedEffect = qobject_cast<CollapsibleEffect*>(o);
278 if (m_draggedEffect) {
279 QMouseEvent *me = static_cast<QMouseEvent *>(e);
280 if (me->button() == Qt::LeftButton && (m_draggedEffect->frame->underMouse() || m_draggedEffect->title->underMouse()))
281 m_clickPoint = me->globalPos();
283 m_clickPoint = QPoint();
284 m_draggedEffect = NULL;
290 if (e->type() == QEvent::MouseMove) {
291 if (qobject_cast<CollapsibleEffect*>(o)) {
292 QMouseEvent *me = static_cast<QMouseEvent *>(e);
293 if (me->buttons() != Qt::LeftButton) {
303 return QWidget::eventFilter(o, e);
306 void EffectStackView2::mouseMoveEvent(QMouseEvent * event)
308 if (m_draggedEffect && (event->buttons() & Qt::LeftButton) && (m_clickPoint != QPoint()) && ((event->globalPos() - m_clickPoint).manhattanLength() >= QApplication::startDragDistance())) {
313 void EffectStackView2::mouseReleaseEvent(QMouseEvent * event)
315 m_draggedEffect = NULL;
316 QWidget::mouseReleaseEvent(event);
319 void EffectStackView2::startDrag()
321 QDrag *drag = new QDrag(this);
322 // The data to be transferred by the drag and drop operation is contained in a QMimeData object
323 QDomElement effect = m_draggedEffect->effect().cloneNode().toElement();
324 QPixmap pixmap = QPixmap::grabWidget(m_draggedEffect->title);
325 drag->setPixmap(pixmap);
327 doc.appendChild(doc.importNode(effect, true));
328 QMimeData *mime = new QMimeData;
330 data.append(doc.toString().toUtf8());
331 mime->setData("kdenlive/effectslist", data);
333 // Assign ownership of the QMimeData object to the QDrag object.
334 drag->setMimeData(mime);
335 // Start the drag and drop operation
336 drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction);
340 void EffectStackView2::slotUpdateEffectState(bool disable, int index)
342 if (m_effectMetaInfo.trackMode)
343 emit changeEffectState(NULL, m_trackindex, index, disable);
345 emit changeEffectState(m_clipref, -1, index, disable);
346 slotUpdateCheckAllButton();
350 void EffectStackView2::raiseWindow(QWidget* dock)
352 if ((m_clipref || m_effectMetaInfo.trackMode) && dock)
357 void EffectStackView2::slotSeekTimeline(int pos)
359 if (m_effectMetaInfo.trackMode) {
360 emit seekTimeline(pos);
361 } else if (m_clipref) {
362 emit seekTimeline(m_clipref->startPos().frames(KdenliveSettings::project_fps()) + pos);
367 /*void EffectStackView2::slotRegionChanged()
369 if (!m_trackMode) emit updateClipRegion(m_clipref, m_ui.effectlist->currentRow(), m_ui.region_url->text());
372 void EffectStackView2::slotCheckMonitorPosition(int renderPos)
374 if (m_effectMetaInfo.trackMode || (m_clipref && renderPos >= m_clipref->startPos().frames(KdenliveSettings::project_fps()) && renderPos <= m_clipref->endPos().frames(KdenliveSettings::project_fps()))) {
375 if (!m_effectMetaInfo.monitor->getEffectEdit()->getScene()->views().at(0)->isVisible())
376 m_effectMetaInfo.monitor->slotEffectScene(true);
378 m_effectMetaInfo.monitor->slotEffectScene(false);
382 int EffectStackView2::isTrackMode(bool *ok) const
384 *ok = m_effectMetaInfo.trackMode;
388 void EffectStackView2::clear()
391 QWidget *view = m_ui.container->takeWidget();
395 m_ui.checkAll->setToolTip(QString());
396 m_ui.checkAll->setText(QString());
397 m_ui.checkAll->setEnabled(false);
398 m_ui.labelComment->setText(QString());
402 void EffectStackView2::slotCheckAll(int state)
406 m_ui.checkAll->blockSignals(true);
407 m_ui.checkAll->setCheckState(Qt::Checked);
408 m_ui.checkAll->blockSignals(false);
411 bool disabled = (state != 2);
412 for (int i = 0; i < m_effects.count(); i++) {
413 if (!m_effects.at(i)->isGroup()) {
414 m_effects.at(i)->slotEnable(!disabled);
419 void EffectStackView2::slotUpdateCheckAllButton()
421 bool hasEnabled = false;
422 bool hasDisabled = false;
424 for (int i = 0; i < m_effects.count(); i++) {
425 if (m_effects.at(i)->enabledBox->isChecked()) hasEnabled = true;
426 else hasDisabled = true;
429 m_ui.checkAll->blockSignals(true);
430 if (hasEnabled && hasDisabled)
431 m_ui.checkAll->setCheckState(Qt::PartiallyChecked);
433 m_ui.checkAll->setCheckState(Qt::Checked);
435 m_ui.checkAll->setCheckState(Qt::Unchecked);
436 m_ui.checkAll->blockSignals(false);
439 void EffectStackView2::deleteCurrentEffect()
441 for (int i = 0; i < m_effects.count(); i++) {
442 if (m_effects.at(i)->isActive()) {
443 slotDeleteEffect(m_effects.at(i)->effect());
449 void EffectStackView2::updateProjectFormat(MltVideoProfile profile, Timecode t)
451 m_effectMetaInfo.profile = profile;
452 m_effectMetaInfo.timecode = t;
455 void EffectStackView2::updateTimecodeFormat()
457 for (int i = 0; i< m_effects.count(); i++)
458 m_effects.at(i)->updateTimecodeFormat();
461 CollapsibleEffect *EffectStackView2::getEffectByIndex(int ix)
463 for (int i = 0; i< m_effects.count(); i++) {
464 if (m_effects.at(i)->effectIndex() == ix) {
465 return m_effects.at(i);
471 void EffectStackView2::slotUpdateEffectParams(const QDomElement old, const QDomElement e, int ix)
473 if (m_effectMetaInfo.trackMode)
474 emit updateEffect(NULL, m_trackindex, old, e, ix);
475 else if (m_clipref) {
476 emit updateEffect(m_clipref, -1, old, e, ix);
477 // Make sure the changed effect is currently displayed
478 slotSetCurrentEffect(ix);
480 QTimer::singleShot(200, this, SLOT(slotCheckWheelEventFilter()));
483 void EffectStackView2::slotSetCurrentEffect(int ix)
485 if (m_clipref && ix != m_clipref->selectedEffectIndex())
486 m_clipref->setSelectedEffect(ix);
487 for (int i = 0; i < m_effects.count(); i++) {
488 if (m_effects.at(i)->effectIndex() == ix) {
489 m_effects.at(i)->setActive(true);
490 m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
491 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
493 else m_effects.at(i)->setActive(false);
497 void EffectStackView2::slotDeleteEffect(const QDomElement effect)
499 if (m_effectMetaInfo.trackMode)
500 emit removeEffect(NULL, m_trackindex, effect);
502 emit removeEffect(m_clipref, -1, effect);
505 void EffectStackView2::slotAddEffect(QDomElement effect)
507 emit addEffect(m_clipref, effect);
510 void EffectStackView2::slotMoveEffectUp(int index, bool up)
512 if (up && index <= 1) return;
513 if (!up && index >= m_currentEffectList.count()) return;
521 if (m_effectMetaInfo.trackMode) emit changeEffectPosition(NULL, m_trackindex, index, endPos);
522 else emit changeEffectPosition(m_clipref, -1, index, endPos);
525 void EffectStackView2::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties)
527 if (!m_clipref) return;
528 emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties);
531 void EffectStackView2::slotResetEffect(int ix)
533 QDomElement old = m_currentEffectList.itemFromIndex(ix);
535 QString effectId = old.attribute("id");
536 QMap<QString, EffectsList*> effectLists;
537 effectLists["audio"] = &MainWindow::audioEffects;
538 effectLists["video"] = &MainWindow::videoEffects;
539 effectLists["custom"] = &MainWindow::customEffects;
540 foreach(const QString &type, effectLists.keys()) {
541 EffectsList *list = effectLists[type];
542 dom = list->getEffectByTag(QString(), effectId).cloneNode().toElement();
543 if (!dom.isNull()) break;
546 dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
547 if (m_effectMetaInfo.trackMode) {
548 EffectsList::setParameter(dom, "in", QString::number(0));
549 EffectsList::setParameter(dom, "out", QString::number(m_trackInfo.duration));
551 info.track = m_trackInfo.type;
552 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
553 info.cropStart = GenTime(0);
554 info.startPos = GenTime(-1);
556 m_effects.at(ix)->updateWidget(info, ix, dom, &m_effectMetaInfo);
557 emit updateEffect(NULL, m_trackindex, old, dom, ix);
559 m_clipref->initEffect(dom);
560 m_effects.at(ix)->updateWidget(m_clipref->info(), ix, dom, &m_effectMetaInfo);
561 //m_ui.region_url->setUrl(KUrl(dom.attribute("region")));
562 emit updateEffect(m_clipref, -1, old, dom, ix);
566 emit showComments(m_ui.buttonShowComments->isChecked());
567 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
570 void EffectStackView2::slotShowComments()
572 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
573 emit showComments(m_ui.buttonShowComments->isChecked());
576 void EffectStackView2::slotCreateGroup(int ix)
578 QDomElement oldeffect = m_currentEffectList.itemFromIndex(ix);
579 QDomElement neweffect = oldeffect.cloneNode().toElement();
580 EffectInfo effectinfo;
581 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
582 effectinfo.groupIndex = m_groupIndex;
583 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
586 if (m_effectMetaInfo.trackMode) {
587 info.track = m_trackInfo.type;
588 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
589 info.cropStart = GenTime(0);
590 info.startPos = GenTime(-1);
592 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, ix);
594 emit updateEffect(m_clipref, -1, oldeffect, neweffect, ix);
597 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
599 CollapsibleEffect *effectToMove = NULL;
600 for (int i = 0; i < m_effects.count(); i++) {
601 if (m_effects.at(i)->effectIndex() == ix) {
602 effectToMove = m_effects.at(i);
603 groupPos = l->indexOf(effectToMove);
604 l->removeWidget(effectToMove);
609 CollapsibleEffect *group = new CollapsibleEffect(QDomElement(), QDomElement(), ItemInfo(), m_groupIndex, &m_effectMetaInfo, false, true, m_ui.container->widget());
611 connect(group, SIGNAL(moveEffect(int,int,CollapsibleEffect*)), this , SLOT(slotMoveEffect(int,int,CollapsibleEffect*)));
612 connect(group, SIGNAL(unGroup(CollapsibleEffect*)), this , SLOT(slotUnGroup(CollapsibleEffect*)));
613 l->insertWidget(groupPos, group);
614 group->addGroupEffect(effectToMove);
617 void EffectStackView2::slotMoveEffect(int currentIndex, int newIndex, CollapsibleEffect* target)
619 CollapsibleEffect *effectToMove = getEffectByIndex(currentIndex);
620 if (effectToMove == NULL) return;
622 QDomElement oldeffect = effectToMove->effect();
623 QDomElement neweffect = oldeffect.cloneNode().toElement();
625 EffectInfo effectinfo;
626 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
627 effectinfo.groupIndex = target->groupIndex();
628 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
631 if (m_effectMetaInfo.trackMode) {
632 info.track = m_trackInfo.type;
633 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
634 info.cropStart = GenTime(0);
635 info.startPos = GenTime(-1);
637 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, effectToMove->index());
639 emit updateEffect(m_clipref, -1, oldeffect, neweffect, effectToMove->index());
642 //if (currentIndex == newIndex) return;
643 // Update effect index with new position
644 if (m_effectMetaInfo.trackMode) {
645 emit changeEffectPosition(NULL, m_trackindex, currentIndex, newIndex);
648 emit changeEffectPosition(m_clipref, -1, currentIndex, newIndex);
652 void EffectStackView2::slotUnGroup(CollapsibleEffect* group)
654 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
655 int ix = l->indexOf(group);
656 group->removeGroup(ix, l);
657 group->deleteLater();
660 #include "effectstackview2.moc"