1 /***************************************************************************
2 effecstackview.cpp2 - description
5 copyright : (C) 2008 by Marco Gittler (g.marco@freenet.de)
6 copyright : (C) 2012 by Jean-Baptiste Mardelle (jb@kdenlive.org)
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"
29 #include "collapsibleeffect.h"
30 #include "collapsiblegroup.h"
34 #include <KMessageBox>
35 #include <KStandardDirs>
36 #include <KFileDialog>
37 #include <KColorScheme>
40 #include <QTextStream>
42 #include <QInputDialog>
46 EffectStackView2::EffectStackView2(Monitor *monitor, QWidget *parent) :
50 m_draggedEffect(NULL),
54 m_effectMetaInfo.trackMode = false;
55 m_effectMetaInfo.monitor = monitor;
56 m_effects = QList <CollapsibleEffect*>();
59 setFont(KGlobalSettings::smallestReadableFont());
60 m_ui.checkAll->setToolTip(i18n("Enable/Disable all effects"));
61 m_ui.buttonShowComments->setIcon(KIcon("help-about"));
62 m_ui.buttonShowComments->setToolTip(i18n("Show additional information for the parameters"));
64 connect(m_ui.checkAll, SIGNAL(stateChanged(int)), this, SLOT(slotCheckAll(int)));
65 connect(m_ui.buttonShowComments, SIGNAL(clicked()), this, SLOT(slotShowComments()));
66 m_ui.labelComment->setHidden(true);
71 setStyleSheet(CollapsibleEffect::getStyleSheet(palette()));
74 EffectStackView2::~EffectStackView2()
79 void EffectStackView2::slotRenderPos(int pos)
81 if (m_effects.isEmpty()) return;
82 if (!m_effectMetaInfo.trackMode && m_clipref) pos = pos - m_clipref->startPos().frames(KdenliveSettings::project_fps());
84 for (int i = 0; i< m_effects.count(); i++)
85 m_effects.at(i)->slotSyncEffectsPos(pos);
88 void EffectStackView2::slotClipItemSelected(ClipItem* c, int ix)
90 if (c && !c->isEnabled()) return;
91 if (c && c == m_clipref) {
96 QString cname = m_clipref->clipName();
97 if (cname.length() > 30) {
98 m_ui.checkAll->setToolTip(i18n("Effects for %1").arg(cname));
100 m_ui.checkAll->setText(i18n("Effects for %1").arg(cname) + "...");
102 m_ui.checkAll->setToolTip(QString());
103 m_ui.checkAll->setText(i18n("Effects for %1").arg(cname));
105 m_ui.checkAll->setEnabled(true);
106 ix = c->selectedEffectIndex();
107 QString size = c->baseClip()->getProperty("frame_size");
108 double factor = c->baseClip()->getProperty("aspect_ratio").toDouble();
109 m_effectMetaInfo.frameSize = QPoint((int)(size.section('x', 0, 0).toInt() * factor + 0.5), size.section('x', 1, 1).toInt());
114 if (m_clipref == NULL) {
115 //TODO: clear list, reset paramdesc and info
117 //m_effectedit->transferParamDesc(QDomElement(), info);
122 m_effectMetaInfo.trackMode = false;
123 m_currentEffectList = m_clipref->effectList();
127 void EffectStackView2::slotTrackItemSelected(int ix, const TrackInfo info)
130 m_effectMetaInfo.trackMode = true;
131 m_currentEffectList = info.effectsList;
134 m_ui.checkAll->setToolTip(QString());
135 m_ui.checkAll->setText(i18n("Effects for track %1").arg(info.trackName.isEmpty() ? QString::number(ix) : info.trackName));
141 void EffectStackView2::setupListView(int ix)
144 m_draggedEffect = NULL;
145 m_draggedGroup = NULL;
146 disconnect(m_effectMetaInfo.monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
149 QWidget *view = m_ui.container->takeWidget();
154 view = new QWidget(m_ui.container);
155 m_ui.container->setWidget(view);
157 QVBoxLayout *vbox1 = new QVBoxLayout(view);
158 vbox1->setContentsMargins(0, 0, 0, 0);
159 vbox1->setSpacing(0);
161 if (m_currentEffectList.isEmpty()) m_ui.labelComment->setHidden(true);
163 for (int i = 0; i < m_currentEffectList.count(); i++) {
164 QDomElement d = m_currentEffectList.at(i).cloneNode().toElement();
166 kDebug() << " . . . . WARNING, NULL EFFECT IN STACK!!!!!!!!!";
170 CollapsibleGroup *group = NULL;
171 EffectInfo effectInfo;
172 effectInfo.fromString(d.attribute("kdenlive_info"));
173 if (effectInfo.groupIndex >= 0) {
174 // effect is in a group
176 for (int j = 0; j < vbox1->count(); j++) {
177 CollapsibleGroup *eff = static_cast<CollapsibleGroup *>(vbox1->itemAt(j)->widget());
178 if (eff->isGroup() && eff->groupIndex() == effectInfo.groupIndex) {
185 group = new CollapsibleGroup(effectInfo.groupIndex, i == 0, i == m_currentEffectList.count() - 1, effectInfo.groupName, m_ui.container->widget());
186 connect(group, SIGNAL(moveEffect(int,int,int,QString)), this, SLOT(slotMoveEffect(int,int,int,QString)));
187 connect(group, SIGNAL(unGroup(CollapsibleGroup*)), this , SLOT(slotUnGroup(CollapsibleGroup*)));
188 connect(group, SIGNAL(groupRenamed(CollapsibleGroup *)), this, SLOT(slotRenameGroup(CollapsibleGroup*)));
189 vbox1->addWidget(group);
190 group->installEventFilter( this );
192 if (effectInfo.groupIndex >= m_groupIndex) m_groupIndex = effectInfo.groupIndex + 1;
196 doc.appendChild(doc.importNode(d, true));
197 kDebug() << "IMPORTED STK: " << doc.toString();*/
200 if (m_effectMetaInfo.trackMode) {
201 info.track = m_trackInfo.type;
202 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
203 info.cropStart = GenTime(0);
204 info.startPos = GenTime(-1);
207 else info = m_clipref->info();
209 CollapsibleEffect *currentEffect = new CollapsibleEffect(d, m_currentEffectList.at(i), info, &m_effectMetaInfo, i == m_currentEffectList.count() - 1, view);
210 m_effects.append(currentEffect);
212 group->addGroupEffect(currentEffect);
214 vbox1->addWidget(currentEffect);
216 if (currentEffect->effectIndex() == ix) currentEffect->setActive(true);
219 currentEffect->installEventFilter( this );
221 connect(currentEffect, SIGNAL(parameterChanged(const QDomElement, const QDomElement, int)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement, int)));
222 connect(currentEffect, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,QString,QString)));
223 connect(currentEffect, SIGNAL(deleteEffect(const QDomElement)), this , SLOT(slotDeleteEffect(const QDomElement)));
224 connect(currentEffect, SIGNAL(reloadEffects()), this , SIGNAL(reloadEffects()));
225 connect(currentEffect, SIGNAL(resetEffect(int)), this , SLOT(slotResetEffect(int)));
226 connect(currentEffect, SIGNAL(changeEffectPosition(int,bool)), this , SLOT(slotMoveEffectUp(int , bool)));
227 connect(currentEffect, SIGNAL(effectStateChanged(bool, int)), this, SLOT(slotUpdateEffectState(bool, int)));
228 connect(currentEffect, SIGNAL(activateEffect(int)), this, SLOT(slotSetCurrentEffect(int)));
229 connect(currentEffect, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
230 connect(currentEffect, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
231 connect(currentEffect, SIGNAL(createGroup(int)), this , SLOT(slotCreateGroup(int)));
232 connect(currentEffect, SIGNAL(moveEffect(int,int,int,QString)), this , SLOT(slotMoveEffect(int,int,int,QString)));
233 connect(currentEffect, SIGNAL(addEffect(QDomElement)), this , SLOT(slotAddEffect(QDomElement)));
235 //ui.title->setPixmap(icon.pixmap(QSize(12, 12)));
237 vbox1->addStretch(10);
238 slotUpdateCheckAllButton();
239 connect(m_effectMetaInfo.monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
241 // Wait a little bit for the new layout to be ready, then check if we have a scrollbar
242 QTimer::singleShot(200, this, SLOT(slotCheckWheelEventFilter()));
246 void EffectStackView2::slotCheckWheelEventFilter()
248 // If the effect stack widget has no scrollbar, we will not filter the
249 // mouse wheel events, so that user can easily adjust effect params
250 bool filterWheelEvent = false;
251 if (m_ui.container->verticalScrollBar() && m_ui.container->verticalScrollBar()->isVisible()) {
252 // widget has scroll bar,
253 filterWheelEvent = true;
255 for (int i = 0; i < m_effects.count(); i++) {
256 m_effects.at(i)->filterWheelEvent = filterWheelEvent;
260 void EffectStackView2::resizeEvent ( QResizeEvent * event )
262 slotCheckWheelEventFilter();
263 QWidget::resizeEvent(event);
266 bool EffectStackView2::eventFilter( QObject * o, QEvent * e )
268 // Check if user clicked in an effect's top bar to start dragging it
269 if (e->type() == QEvent::MouseButtonPress) {
270 m_draggedEffect = qobject_cast<CollapsibleEffect*>(o);
271 if (m_draggedEffect) {
272 QMouseEvent *me = static_cast<QMouseEvent *>(e);
273 if (me->button() == Qt::LeftButton && (m_draggedEffect->frame->underMouse() || m_draggedEffect->title->underMouse())) {
274 m_clickPoint = me->globalPos();
277 m_clickPoint = QPoint();
278 m_draggedEffect = NULL;
283 m_draggedGroup = qobject_cast<CollapsibleGroup*>(o);
284 if (m_draggedGroup) {
285 QMouseEvent *me = static_cast<QMouseEvent *>(e);
286 if (me->button() == Qt::LeftButton && (m_draggedGroup->framegroup->underMouse() || m_draggedGroup->title()->underMouse()))
287 m_clickPoint = me->globalPos();
289 m_clickPoint = QPoint();
290 m_draggedGroup = NULL;
296 /*if (e->type() == QEvent::MouseMove) {
297 if (qobject_cast<CollapsibleEffect*>(o)) {
298 QMouseEvent *me = static_cast<QMouseEvent *>(e);
299 if (me->buttons() != Qt::LeftButton) {
309 return QWidget::eventFilter(o, e);
312 void EffectStackView2::mouseMoveEvent(QMouseEvent * event)
314 if (m_draggedEffect || m_draggedGroup) {
315 if ((event->buttons() & Qt::LeftButton) && (m_clickPoint != QPoint()) && ((event->globalPos() - m_clickPoint).manhattanLength() >= QApplication::startDragDistance())) {
321 void EffectStackView2::mouseReleaseEvent(QMouseEvent * event)
323 m_draggedEffect = NULL;
324 m_draggedGroup = NULL;
325 QWidget::mouseReleaseEvent(event);
328 void EffectStackView2::startDrag()
330 // The data to be transferred by the drag and drop operation is contained in a QMimeData object
333 if (m_draggedEffect) {
334 QDomElement effect = m_draggedEffect->effect().cloneNode().toElement();
335 doc.appendChild(doc.importNode(effect, true));
336 pixmap = QPixmap::grabWidget(m_draggedEffect->title);
338 else if (m_draggedGroup) {
339 doc = m_draggedGroup->effectsData();
340 pixmap = QPixmap::grabWidget(m_draggedGroup->title());
343 QDrag *drag = new QDrag(this);
344 drag->setPixmap(pixmap);
345 QMimeData *mime = new QMimeData;
347 data.append(doc.toString().toUtf8());
348 mime->setData("kdenlive/effectslist", data);
350 // Assign ownership of the QMimeData object to the QDrag object.
351 drag->setMimeData(mime);
352 // Start the drag and drop operation
353 drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction);
357 void EffectStackView2::slotUpdateEffectState(bool disable, int index)
359 if (m_effectMetaInfo.trackMode)
360 emit changeEffectState(NULL, m_trackindex, index, disable);
362 emit changeEffectState(m_clipref, -1, index, disable);
363 slotUpdateCheckAllButton();
367 void EffectStackView2::raiseWindow(QWidget* dock)
369 if ((m_clipref || m_effectMetaInfo.trackMode) && dock)
374 void EffectStackView2::slotSeekTimeline(int pos)
376 if (m_effectMetaInfo.trackMode) {
377 emit seekTimeline(pos);
378 } else if (m_clipref) {
379 emit seekTimeline(m_clipref->startPos().frames(KdenliveSettings::project_fps()) + pos);
384 /*void EffectStackView2::slotRegionChanged()
386 if (!m_trackMode) emit updateClipRegion(m_clipref, m_ui.effectlist->currentRow(), m_ui.region_url->text());
389 void EffectStackView2::slotCheckMonitorPosition(int renderPos)
391 if (m_effectMetaInfo.trackMode || (m_clipref && renderPos >= m_clipref->startPos().frames(KdenliveSettings::project_fps()) && renderPos <= m_clipref->endPos().frames(KdenliveSettings::project_fps()))) {
392 if (!m_effectMetaInfo.monitor->getEffectEdit()->getScene()->views().at(0)->isVisible())
393 m_effectMetaInfo.monitor->slotEffectScene(true);
395 m_effectMetaInfo.monitor->slotEffectScene(false);
399 int EffectStackView2::isTrackMode(bool *ok) const
401 *ok = m_effectMetaInfo.trackMode;
405 void EffectStackView2::clear()
408 QWidget *view = m_ui.container->takeWidget();
412 m_ui.checkAll->setToolTip(QString());
413 m_ui.checkAll->setText(QString());
414 m_ui.checkAll->setEnabled(false);
415 m_ui.labelComment->setText(QString());
419 void EffectStackView2::slotCheckAll(int state)
423 m_ui.checkAll->blockSignals(true);
424 m_ui.checkAll->setCheckState(Qt::Checked);
425 m_ui.checkAll->blockSignals(false);
428 bool disabled = (state != 2);
429 for (int i = 0; i < m_effects.count(); i++) {
430 if (!m_effects.at(i)->isGroup()) {
431 m_effects.at(i)->slotEnable(!disabled);
436 void EffectStackView2::slotUpdateCheckAllButton()
438 bool hasEnabled = false;
439 bool hasDisabled = false;
441 for (int i = 0; i < m_effects.count(); i++) {
442 if (m_effects.at(i)->enabledBox->isChecked()) hasEnabled = true;
443 else hasDisabled = true;
446 m_ui.checkAll->blockSignals(true);
447 if (hasEnabled && hasDisabled)
448 m_ui.checkAll->setCheckState(Qt::PartiallyChecked);
450 m_ui.checkAll->setCheckState(Qt::Checked);
452 m_ui.checkAll->setCheckState(Qt::Unchecked);
453 m_ui.checkAll->blockSignals(false);
456 void EffectStackView2::deleteCurrentEffect()
458 for (int i = 0; i < m_effects.count(); i++) {
459 if (m_effects.at(i)->isActive()) {
460 slotDeleteEffect(m_effects.at(i)->effect());
466 void EffectStackView2::updateProjectFormat(MltVideoProfile profile, Timecode t)
468 m_effectMetaInfo.profile = profile;
469 m_effectMetaInfo.timecode = t;
472 void EffectStackView2::updateTimecodeFormat()
474 for (int i = 0; i< m_effects.count(); i++)
475 m_effects.at(i)->updateTimecodeFormat();
478 CollapsibleEffect *EffectStackView2::getEffectByIndex(int ix)
480 for (int i = 0; i< m_effects.count(); i++) {
481 if (m_effects.at(i)->effectIndex() == ix) {
482 return m_effects.at(i);
488 void EffectStackView2::slotUpdateEffectParams(const QDomElement old, const QDomElement e, int ix)
490 if (m_effectMetaInfo.trackMode)
491 emit updateEffect(NULL, m_trackindex, old, e, ix);
492 else if (m_clipref) {
493 emit updateEffect(m_clipref, -1, old, e, ix);
494 // Make sure the changed effect is currently displayed
495 slotSetCurrentEffect(ix);
497 QTimer::singleShot(200, this, SLOT(slotCheckWheelEventFilter()));
500 void EffectStackView2::slotSetCurrentEffect(int ix)
502 if (m_clipref && ix != m_clipref->selectedEffectIndex())
503 m_clipref->setSelectedEffect(ix);
504 for (int i = 0; i < m_effects.count(); i++) {
505 if (m_effects.at(i)->effectIndex() == ix) {
506 m_effects.at(i)->setActive(true);
507 m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
508 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
510 else m_effects.at(i)->setActive(false);
514 void EffectStackView2::slotDeleteEffect(const QDomElement effect)
516 if (m_effectMetaInfo.trackMode)
517 emit removeEffect(NULL, m_trackindex, effect);
519 emit removeEffect(m_clipref, -1, effect);
522 void EffectStackView2::slotAddEffect(QDomElement effect)
524 emit addEffect(m_clipref, effect);
527 void EffectStackView2::slotMoveEffectUp(int index, bool up)
529 if (up && index <= 1) return;
530 if (!up && index >= m_currentEffectList.count()) return;
538 if (m_effectMetaInfo.trackMode) emit changeEffectPosition(NULL, m_trackindex, index, endPos);
539 else emit changeEffectPosition(m_clipref, -1, index, endPos);
542 void EffectStackView2::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties)
544 if (!m_clipref) return;
545 emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties);
548 void EffectStackView2::slotResetEffect(int ix)
550 QDomElement old = m_currentEffectList.itemFromIndex(ix);
552 QString effectId = old.attribute("id");
553 QMap<QString, EffectsList*> effectLists;
554 effectLists["audio"] = &MainWindow::audioEffects;
555 effectLists["video"] = &MainWindow::videoEffects;
556 effectLists["custom"] = &MainWindow::customEffects;
557 foreach(const QString &type, effectLists.keys()) {
558 EffectsList *list = effectLists[type];
559 dom = list->getEffectByTag(QString(), effectId).cloneNode().toElement();
560 if (!dom.isNull()) break;
563 dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
564 if (m_effectMetaInfo.trackMode) {
565 EffectsList::setParameter(dom, "in", QString::number(0));
566 EffectsList::setParameter(dom, "out", QString::number(m_trackInfo.duration));
568 info.track = m_trackInfo.type;
569 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
570 info.cropStart = GenTime(0);
571 info.startPos = GenTime(-1);
573 m_effects.at(ix)->updateWidget(info, dom, &m_effectMetaInfo);
574 emit updateEffect(NULL, m_trackindex, old, dom, ix);
576 m_clipref->initEffect(dom);
577 m_effects.at(ix)->updateWidget(m_clipref->info(), dom, &m_effectMetaInfo);
578 //m_ui.region_url->setUrl(KUrl(dom.attribute("region")));
579 emit updateEffect(m_clipref, -1, old, dom, ix);
583 emit showComments(m_ui.buttonShowComments->isChecked());
584 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
587 void EffectStackView2::slotShowComments()
589 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
590 emit showComments(m_ui.buttonShowComments->isChecked());
593 void EffectStackView2::slotCreateGroup(int ix)
595 QDomElement oldeffect = m_currentEffectList.itemFromIndex(ix);
596 QDomElement neweffect = oldeffect.cloneNode().toElement();
597 EffectInfo effectinfo;
598 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
599 effectinfo.groupIndex = m_groupIndex;
600 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
603 if (m_effectMetaInfo.trackMode) {
604 info.track = m_trackInfo.type;
605 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
606 info.cropStart = GenTime(0);
607 info.startPos = GenTime(-1);
609 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, ix);
611 emit updateEffect(m_clipref, -1, oldeffect, neweffect, ix);
614 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
616 CollapsibleEffect *effectToMove = NULL;
617 for (int i = 0; i < m_effects.count(); i++) {
618 if (m_effects.at(i)->effectIndex() == ix) {
619 effectToMove = m_effects.at(i);
620 groupPos = l->indexOf(effectToMove);
621 l->removeWidget(effectToMove);
626 CollapsibleGroup *group = new CollapsibleGroup(m_groupIndex, ix == 1, ix == m_currentEffectList.count() - 2, QString(), m_ui.container->widget());
628 connect(group, SIGNAL(moveEffect(int,int,int,QString)), this , SLOT(slotMoveEffect(int,int,int,QString)));
629 connect(group, SIGNAL(unGroup(CollapsibleGroup*)), this , SLOT(slotUnGroup(CollapsibleGroup*)));
630 connect(group, SIGNAL(groupRenamed(CollapsibleGroup *)), this , SLOT(slotRenameGroup(CollapsibleGroup*)));
631 l->insertWidget(groupPos, group);
632 group->installEventFilter( this );
633 group->addGroupEffect(effectToMove);
636 void EffectStackView2::slotMoveEffect(int currentIndex, int newIndex, int groupIndex, QString groupName)
638 CollapsibleEffect *effectToMove = getEffectByIndex(currentIndex);
639 if (effectToMove == NULL) return;
641 QDomElement oldeffect = effectToMove->effect();
642 QDomElement neweffect = oldeffect.cloneNode().toElement();
644 EffectInfo effectinfo;
645 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
646 effectinfo.groupIndex = groupIndex;
647 effectinfo.groupName = groupName;
648 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
651 if (m_effectMetaInfo.trackMode) {
652 info.track = m_trackInfo.type;
653 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
654 info.cropStart = GenTime(0);
655 info.startPos = GenTime(-1);
657 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, effectToMove->effectIndex());
659 emit updateEffect(m_clipref, -1, oldeffect, neweffect, effectToMove->effectIndex());
662 //if (currentIndex == newIndex) return;
663 // Update effect index with new position
664 if (m_effectMetaInfo.trackMode) {
665 emit changeEffectPosition(NULL, m_trackindex, currentIndex, newIndex);
668 emit changeEffectPosition(m_clipref, -1, currentIndex, newIndex);
672 void EffectStackView2::slotUnGroup(CollapsibleGroup* group)
674 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
675 int ix = l->indexOf(group);
676 group->removeGroup(ix, l);
677 group->deleteLater();
680 void EffectStackView2::slotRenameGroup(CollapsibleGroup *group)
682 QList <CollapsibleEffect*> effects = group->effects();
683 for (int i = 0; i < effects.count(); i++) {
684 QDomElement origin = effects.at(i)->effect();
685 QDomElement changed = origin.cloneNode().toElement();
686 changed.setAttribute("kdenlive_info", effects.at(i)->infoString());
687 if (m_effectMetaInfo.trackMode) {
688 emit updateEffect(NULL, m_trackindex, origin, changed, effects.at(i)->effectIndex());
690 emit updateEffect(m_clipref, -1, origin, changed, effects.at(i)->effectIndex());
695 #include "effectstackview2.moc"