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 < m_effects.count(); i++) {
185 if (m_effects.at(i)->groupIndex() == effectInfo.groupIndex) {
186 group = m_effects.at(i);
192 group = new CollapsibleEffect(QDomElement(), QDomElement(), ItemInfo(), effectInfo.groupIndex, &m_effectMetaInfo, false, true, m_ui.container->widget());
193 if (!effectInfo.groupName.isEmpty()) group->title->setText(effectInfo.groupName);
194 connect(group, SIGNAL(moveEffect(int,int,CollapsibleEffect*)), this, SLOT(slotMoveEffect(int,int,CollapsibleEffect*)));
195 connect(group, SIGNAL(unGroup(CollapsibleEffect*)), this , SLOT(slotUnGroup(CollapsibleEffect*)));
196 vbox1->addWidget(group);
198 if (effectInfo.groupIndex >= m_groupIndex) m_groupIndex = effectInfo.groupIndex + 1;
202 doc.appendChild(doc.importNode(d, true));
203 kDebug() << "IMPORTED STK: " << doc.toString();*/
206 if (m_effectMetaInfo.trackMode) {
207 info.track = m_trackInfo.type;
208 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
209 info.cropStart = GenTime(0);
210 info.startPos = GenTime(-1);
213 else info = m_clipref->info();
215 CollapsibleEffect *currentEffect = new CollapsibleEffect(d, m_currentEffectList.at(i), info, i, &m_effectMetaInfo, i == m_currentEffectList.count() - 1, false, view);
216 m_effects.append(currentEffect);
218 group->addGroupEffect(currentEffect);
220 vbox1->addWidget(currentEffect);
222 if (currentEffect->effectIndex() == ix) currentEffect->setActive(true);
225 currentEffect->installEventFilter( this );
227 connect(currentEffect, SIGNAL(parameterChanged(const QDomElement, const QDomElement, int)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement, int)));
228 connect(currentEffect, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,QString,QString)));
229 connect(currentEffect, SIGNAL(deleteEffect(const QDomElement)), this , SLOT(slotDeleteEffect(const QDomElement)));
230 connect(currentEffect, SIGNAL(reloadEffects()), this , SIGNAL(reloadEffects()));
231 connect(currentEffect, SIGNAL(resetEffect(int)), this , SLOT(slotResetEffect(int)));
232 connect(currentEffect, SIGNAL(changeEffectPosition(int,bool)), this , SLOT(slotMoveEffectUp(int , bool)));
233 connect(currentEffect, SIGNAL(effectStateChanged(bool, int)), this, SLOT(slotUpdateEffectState(bool, int)));
234 connect(currentEffect, SIGNAL(activateEffect(int)), this, SLOT(slotSetCurrentEffect(int)));
235 connect(currentEffect, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
236 connect(currentEffect, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
237 connect(currentEffect, SIGNAL(createGroup(int)), this , SLOT(slotCreateGroup(int)));
238 connect(currentEffect, SIGNAL(moveEffect(int,int,CollapsibleEffect*)), this , SLOT(slotMoveEffect(int,int,CollapsibleEffect*)));
239 connect(currentEffect, SIGNAL(addEffect(QDomElement)), this , SLOT(slotAddEffect(QDomElement)));
241 //ui.title->setPixmap(icon.pixmap(QSize(12, 12)));
243 vbox1->addStretch(10);
244 slotUpdateCheckAllButton();
245 connect(m_effectMetaInfo.monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
247 // Wait a little bit for the new layout to be ready, then check if we have a scrollbar
248 QTimer::singleShot(200, this, SLOT(slotCheckWheelEventFilter()));
252 void EffectStackView2::slotCheckWheelEventFilter()
254 // If the effect stack widget has no scrollbar, we will not filter the
255 // mouse wheel events, so that user can easily adjust effect params
256 bool filterWheelEvent = false;
257 if (m_ui.container->verticalScrollBar() && m_ui.container->verticalScrollBar()->isVisible()) {
258 // widget has scroll bar,
259 filterWheelEvent = true;
261 for (int i = 0; i < m_effects.count(); i++) {
262 m_effects.at(i)->filterWheelEvent = filterWheelEvent;
266 void EffectStackView2::resizeEvent ( QResizeEvent * event )
268 slotCheckWheelEventFilter();
269 QWidget::resizeEvent(event);
272 bool EffectStackView2::eventFilter( QObject * o, QEvent * e )
274 // Check if user clicked in an effect's top bar to start dragging it
275 if (e->type() == QEvent::MouseButtonPress) {
276 m_draggedEffect = qobject_cast<CollapsibleEffect*>(o);
277 if (m_draggedEffect) {
278 QMouseEvent *me = static_cast<QMouseEvent *>(e);
279 if (me->button() == Qt::LeftButton && (m_draggedEffect->frame->underMouse() || m_draggedEffect->title->underMouse()))
280 m_clickPoint = me->globalPos();
282 m_clickPoint = QPoint();
283 m_draggedEffect = NULL;
289 if (e->type() == QEvent::MouseMove) {
290 if (qobject_cast<CollapsibleEffect*>(o)) {
291 QMouseEvent *me = static_cast<QMouseEvent *>(e);
292 if (me->buttons() != Qt::LeftButton) {
302 return QWidget::eventFilter(o, e);
305 void EffectStackView2::mouseMoveEvent(QMouseEvent * event)
307 if (m_draggedEffect && (event->buttons() & Qt::LeftButton) && (m_clickPoint != QPoint()) && ((event->globalPos() - m_clickPoint).manhattanLength() >= QApplication::startDragDistance())) {
312 void EffectStackView2::mouseReleaseEvent(QMouseEvent * event)
314 m_draggedEffect = NULL;
315 QWidget::mouseReleaseEvent(event);
318 void EffectStackView2::startDrag()
320 QDrag *drag = new QDrag(this);
321 // The data to be transferred by the drag and drop operation is contained in a QMimeData object
322 QDomElement effect = m_draggedEffect->effect().cloneNode().toElement();
323 QPixmap pixmap = QPixmap::grabWidget(m_draggedEffect->title);
324 drag->setPixmap(pixmap);
326 doc.appendChild(doc.importNode(effect, true));
327 QMimeData *mime = new QMimeData;
329 data.append(doc.toString().toUtf8());
330 mime->setData("kdenlive/effectslist", data);
332 // Assign ownership of the QMimeData object to the QDrag object.
333 drag->setMimeData(mime);
334 // Start the drag and drop operation
335 drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction);
339 void EffectStackView2::slotUpdateEffectState(bool disable, int index)
341 if (m_effectMetaInfo.trackMode)
342 emit changeEffectState(NULL, m_trackindex, index, disable);
344 emit changeEffectState(m_clipref, -1, index, disable);
345 slotUpdateCheckAllButton();
349 void EffectStackView2::raiseWindow(QWidget* dock)
351 if ((m_clipref || m_effectMetaInfo.trackMode) && dock)
356 void EffectStackView2::slotSeekTimeline(int pos)
358 if (m_effectMetaInfo.trackMode) {
359 emit seekTimeline(pos);
360 } else if (m_clipref) {
361 emit seekTimeline(m_clipref->startPos().frames(KdenliveSettings::project_fps()) + pos);
366 /*void EffectStackView2::slotRegionChanged()
368 if (!m_trackMode) emit updateClipRegion(m_clipref, m_ui.effectlist->currentRow(), m_ui.region_url->text());
371 void EffectStackView2::slotCheckMonitorPosition(int renderPos)
373 if (m_effectMetaInfo.trackMode || (m_clipref && renderPos >= m_clipref->startPos().frames(KdenliveSettings::project_fps()) && renderPos <= m_clipref->endPos().frames(KdenliveSettings::project_fps()))) {
374 if (!m_effectMetaInfo.monitor->getEffectEdit()->getScene()->views().at(0)->isVisible())
375 m_effectMetaInfo.monitor->slotEffectScene(true);
377 m_effectMetaInfo.monitor->slotEffectScene(false);
381 int EffectStackView2::isTrackMode(bool *ok) const
383 *ok = m_effectMetaInfo.trackMode;
387 void EffectStackView2::clear()
390 QWidget *view = m_ui.container->takeWidget();
394 m_ui.checkAll->setToolTip(QString());
395 m_ui.checkAll->setText(QString());
396 m_ui.checkAll->setEnabled(false);
397 m_ui.labelComment->setText(QString());
401 void EffectStackView2::slotCheckAll(int state)
405 m_ui.checkAll->blockSignals(true);
406 m_ui.checkAll->setCheckState(Qt::Checked);
407 m_ui.checkAll->blockSignals(false);
410 bool disabled = (state != 2);
411 for (int i = 0; i < m_effects.count(); i++) {
412 if (!m_effects.at(i)->isGroup()) {
413 m_effects.at(i)->slotEnable(!disabled);
418 void EffectStackView2::slotUpdateCheckAllButton()
420 bool hasEnabled = false;
421 bool hasDisabled = false;
423 for (int i = 0; i < m_effects.count(); i++) {
424 if (m_effects.at(i)->enabledBox->isChecked()) hasEnabled = true;
425 else hasDisabled = true;
428 m_ui.checkAll->blockSignals(true);
429 if (hasEnabled && hasDisabled)
430 m_ui.checkAll->setCheckState(Qt::PartiallyChecked);
432 m_ui.checkAll->setCheckState(Qt::Checked);
434 m_ui.checkAll->setCheckState(Qt::Unchecked);
435 m_ui.checkAll->blockSignals(false);
438 void EffectStackView2::deleteCurrentEffect()
440 for (int i = 0; i < m_effects.count(); i++) {
441 if (m_effects.at(i)->isActive()) {
442 slotDeleteEffect(m_effects.at(i)->effect());
448 void EffectStackView2::updateProjectFormat(MltVideoProfile profile, Timecode t)
450 m_effectMetaInfo.profile = profile;
451 m_effectMetaInfo.timecode = t;
454 void EffectStackView2::updateTimecodeFormat()
456 for (int i = 0; i< m_effects.count(); i++)
457 m_effects.at(i)->updateTimecodeFormat();
460 CollapsibleEffect *EffectStackView2::getEffectByIndex(int ix)
462 for (int i = 0; i< m_effects.count(); i++) {
463 if (m_effects.at(i)->effectIndex() == ix) {
464 return m_effects.at(i);
470 void EffectStackView2::slotUpdateEffectParams(const QDomElement old, const QDomElement e, int ix)
472 if (m_effectMetaInfo.trackMode)
473 emit updateEffect(NULL, m_trackindex, old, e, ix);
474 else if (m_clipref) {
475 emit updateEffect(m_clipref, -1, old, e, ix);
476 // Make sure the changed effect is currently displayed
477 slotSetCurrentEffect(ix);
479 QTimer::singleShot(200, this, SLOT(slotCheckWheelEventFilter()));
482 void EffectStackView2::slotSetCurrentEffect(int ix)
484 if (m_clipref && ix != m_clipref->selectedEffectIndex())
485 m_clipref->setSelectedEffect(ix);
486 for (int i = 0; i < m_effects.count(); i++) {
487 if (m_effects.at(i)->effectIndex() == ix) {
488 m_effects.at(i)->setActive(true);
489 m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
490 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
492 else m_effects.at(i)->setActive(false);
496 void EffectStackView2::slotDeleteEffect(const QDomElement effect)
498 if (m_effectMetaInfo.trackMode)
499 emit removeEffect(NULL, m_trackindex, effect);
501 emit removeEffect(m_clipref, -1, effect);
504 void EffectStackView2::slotAddEffect(QDomElement effect)
506 emit addEffect(m_clipref, effect);
509 void EffectStackView2::slotMoveEffectUp(int index, bool up)
511 if (up && index <= 1) return;
512 if (!up && index >= m_currentEffectList.count()) return;
520 if (m_effectMetaInfo.trackMode) emit changeEffectPosition(NULL, m_trackindex, index, endPos);
521 else emit changeEffectPosition(m_clipref, -1, index, endPos);
524 void EffectStackView2::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties)
526 if (!m_clipref) return;
527 emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties);
530 void EffectStackView2::slotResetEffect(int ix)
532 QDomElement old = m_currentEffectList.itemFromIndex(ix);
534 QString effectId = old.attribute("id");
535 QMap<QString, EffectsList*> effectLists;
536 effectLists["audio"] = &MainWindow::audioEffects;
537 effectLists["video"] = &MainWindow::videoEffects;
538 effectLists["custom"] = &MainWindow::customEffects;
539 foreach(const QString &type, effectLists.keys()) {
540 EffectsList *list = effectLists[type];
541 dom = list->getEffectByTag(QString(), effectId).cloneNode().toElement();
542 if (!dom.isNull()) break;
545 dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
546 if (m_effectMetaInfo.trackMode) {
547 EffectsList::setParameter(dom, "in", QString::number(0));
548 EffectsList::setParameter(dom, "out", QString::number(m_trackInfo.duration));
550 info.track = m_trackInfo.type;
551 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
552 info.cropStart = GenTime(0);
553 info.startPos = GenTime(-1);
555 m_effects.at(ix)->updateWidget(info, ix, dom, &m_effectMetaInfo);
556 emit updateEffect(NULL, m_trackindex, old, dom, ix);
558 m_clipref->initEffect(dom);
559 m_effects.at(ix)->updateWidget(m_clipref->info(), ix, dom, &m_effectMetaInfo);
560 //m_ui.region_url->setUrl(KUrl(dom.attribute("region")));
561 emit updateEffect(m_clipref, -1, old, dom, ix);
565 emit showComments(m_ui.buttonShowComments->isChecked());
566 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
569 void EffectStackView2::slotShowComments()
571 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
572 emit showComments(m_ui.buttonShowComments->isChecked());
575 void EffectStackView2::slotCreateGroup(int ix)
577 QDomElement oldeffect = m_currentEffectList.itemFromIndex(ix);
578 QDomElement neweffect = oldeffect.cloneNode().toElement();
579 EffectInfo effectinfo;
580 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
581 effectinfo.groupIndex = m_groupIndex;
582 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
585 if (m_effectMetaInfo.trackMode) {
586 info.track = m_trackInfo.type;
587 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
588 info.cropStart = GenTime(0);
589 info.startPos = GenTime(-1);
591 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, ix);
593 emit updateEffect(m_clipref, -1, oldeffect, neweffect, ix);
596 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
598 CollapsibleEffect *effectToMove = NULL;
599 for (int i = 0; i < m_effects.count(); i++) {
600 if (m_effects.at(i)->effectIndex() == ix) {
601 effectToMove = m_effects.at(i);
602 groupPos = l->indexOf(effectToMove);
603 l->removeWidget(effectToMove);
608 CollapsibleEffect *group = new CollapsibleEffect(QDomElement(), QDomElement(), ItemInfo(), m_groupIndex, &m_effectMetaInfo, false, true, m_ui.container->widget());
610 connect(group, SIGNAL(moveEffect(int,int,CollapsibleEffect*)), this , SLOT(slotMoveEffect(int,int,CollapsibleEffect*)));
611 connect(group, SIGNAL(unGroup(CollapsibleEffect*)), this , SLOT(slotUnGroup(CollapsibleEffect*)));
612 l->insertWidget(groupPos, group);
613 group->addGroupEffect(effectToMove);
616 void EffectStackView2::slotMoveEffect(int currentIndex, int newIndex, CollapsibleEffect* target)
618 CollapsibleEffect *effectToMove = getEffectByIndex(currentIndex);
619 if (effectToMove == NULL) return;
621 QDomElement oldeffect = effectToMove->effect();
622 QDomElement neweffect = oldeffect.cloneNode().toElement();
624 EffectInfo effectinfo;
625 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
626 effectinfo.groupIndex = target->groupIndex();
627 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
630 if (m_effectMetaInfo.trackMode) {
631 info.track = m_trackInfo.type;
632 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
633 info.cropStart = GenTime(0);
634 info.startPos = GenTime(-1);
636 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, effectToMove->index());
638 emit updateEffect(m_clipref, -1, oldeffect, neweffect, effectToMove->index());
641 if (currentIndex == newIndex) return;
642 // Update effect index with new position
643 if (m_effectMetaInfo.trackMode) {
644 emit changeEffectPosition(NULL, m_trackindex, currentIndex, newIndex);
647 emit changeEffectPosition(m_clipref, -1, currentIndex, newIndex);
651 void EffectStackView2::slotUnGroup(CollapsibleEffect* group)
653 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
654 int ix = l->indexOf(group);
655 group->removeGroup(ix, l);
656 group->deleteLater();
659 #include "effectstackview2.moc"