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();
276 m_clickPoint = QPoint();
277 m_draggedEffect = NULL;
282 m_draggedGroup = qobject_cast<CollapsibleGroup*>(o);
283 if (m_draggedGroup) {
284 QMouseEvent *me = static_cast<QMouseEvent *>(e);
285 if (me->button() == Qt::LeftButton && (m_draggedGroup->framegroup->underMouse() || m_draggedGroup->title()->underMouse()))
286 m_clickPoint = me->globalPos();
288 m_clickPoint = QPoint();
289 m_draggedGroup = NULL;
295 if (e->type() == QEvent::MouseMove) {
296 if (qobject_cast<CollapsibleEffect*>(o)) {
297 QMouseEvent *me = static_cast<QMouseEvent *>(e);
298 if (me->buttons() != Qt::LeftButton) {
308 return QWidget::eventFilter(o, e);
311 void EffectStackView2::mouseMoveEvent(QMouseEvent * event)
313 if (m_draggedEffect || m_draggedGroup) {
314 if ((event->buttons() & Qt::LeftButton) && (m_clickPoint != QPoint()) && ((event->globalPos() - m_clickPoint).manhattanLength() >= QApplication::startDragDistance())) {
320 void EffectStackView2::mouseReleaseEvent(QMouseEvent * event)
322 m_draggedEffect = NULL;
323 m_draggedGroup = NULL;
324 QWidget::mouseReleaseEvent(event);
327 void EffectStackView2::startDrag()
329 // The data to be transferred by the drag and drop operation is contained in a QMimeData object
332 if (m_draggedEffect) {
333 QDomElement effect = m_draggedEffect->effect().cloneNode().toElement();
334 doc.appendChild(doc.importNode(effect, true));
335 pixmap = QPixmap::grabWidget(m_draggedEffect->title);
337 else if (m_draggedGroup) {
338 doc = m_draggedGroup->effectsData();
339 pixmap = QPixmap::grabWidget(m_draggedGroup->title());
342 QDrag *drag = new QDrag(this);
343 drag->setPixmap(pixmap);
344 QMimeData *mime = new QMimeData;
346 data.append(doc.toString().toUtf8());
347 mime->setData("kdenlive/effectslist", data);
349 // Assign ownership of the QMimeData object to the QDrag object.
350 drag->setMimeData(mime);
351 // Start the drag and drop operation
352 drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::CopyAction);
356 void EffectStackView2::slotUpdateEffectState(bool disable, int index)
358 if (m_effectMetaInfo.trackMode)
359 emit changeEffectState(NULL, m_trackindex, index, disable);
361 emit changeEffectState(m_clipref, -1, index, disable);
362 slotUpdateCheckAllButton();
366 void EffectStackView2::raiseWindow(QWidget* dock)
368 if ((m_clipref || m_effectMetaInfo.trackMode) && dock)
373 void EffectStackView2::slotSeekTimeline(int pos)
375 if (m_effectMetaInfo.trackMode) {
376 emit seekTimeline(pos);
377 } else if (m_clipref) {
378 emit seekTimeline(m_clipref->startPos().frames(KdenliveSettings::project_fps()) + pos);
383 /*void EffectStackView2::slotRegionChanged()
385 if (!m_trackMode) emit updateClipRegion(m_clipref, m_ui.effectlist->currentRow(), m_ui.region_url->text());
388 void EffectStackView2::slotCheckMonitorPosition(int renderPos)
390 if (m_effectMetaInfo.trackMode || (m_clipref && renderPos >= m_clipref->startPos().frames(KdenliveSettings::project_fps()) && renderPos <= m_clipref->endPos().frames(KdenliveSettings::project_fps()))) {
391 if (!m_effectMetaInfo.monitor->getEffectEdit()->getScene()->views().at(0)->isVisible())
392 m_effectMetaInfo.monitor->slotEffectScene(true);
394 m_effectMetaInfo.monitor->slotEffectScene(false);
398 int EffectStackView2::isTrackMode(bool *ok) const
400 *ok = m_effectMetaInfo.trackMode;
404 void EffectStackView2::clear()
407 QWidget *view = m_ui.container->takeWidget();
411 m_ui.checkAll->setToolTip(QString());
412 m_ui.checkAll->setText(QString());
413 m_ui.checkAll->setEnabled(false);
414 m_ui.labelComment->setText(QString());
418 void EffectStackView2::slotCheckAll(int state)
422 m_ui.checkAll->blockSignals(true);
423 m_ui.checkAll->setCheckState(Qt::Checked);
424 m_ui.checkAll->blockSignals(false);
427 bool disabled = (state != 2);
428 for (int i = 0; i < m_effects.count(); i++) {
429 if (!m_effects.at(i)->isGroup()) {
430 m_effects.at(i)->slotEnable(!disabled);
435 void EffectStackView2::slotUpdateCheckAllButton()
437 bool hasEnabled = false;
438 bool hasDisabled = false;
440 for (int i = 0; i < m_effects.count(); i++) {
441 if (m_effects.at(i)->enabledBox->isChecked()) hasEnabled = true;
442 else hasDisabled = true;
445 m_ui.checkAll->blockSignals(true);
446 if (hasEnabled && hasDisabled)
447 m_ui.checkAll->setCheckState(Qt::PartiallyChecked);
449 m_ui.checkAll->setCheckState(Qt::Checked);
451 m_ui.checkAll->setCheckState(Qt::Unchecked);
452 m_ui.checkAll->blockSignals(false);
455 void EffectStackView2::deleteCurrentEffect()
457 for (int i = 0; i < m_effects.count(); i++) {
458 if (m_effects.at(i)->isActive()) {
459 slotDeleteEffect(m_effects.at(i)->effect());
465 void EffectStackView2::updateProjectFormat(MltVideoProfile profile, Timecode t)
467 m_effectMetaInfo.profile = profile;
468 m_effectMetaInfo.timecode = t;
471 void EffectStackView2::updateTimecodeFormat()
473 for (int i = 0; i< m_effects.count(); i++)
474 m_effects.at(i)->updateTimecodeFormat();
477 CollapsibleEffect *EffectStackView2::getEffectByIndex(int ix)
479 for (int i = 0; i< m_effects.count(); i++) {
480 if (m_effects.at(i)->effectIndex() == ix) {
481 return m_effects.at(i);
487 void EffectStackView2::slotUpdateEffectParams(const QDomElement old, const QDomElement e, int ix)
489 if (m_effectMetaInfo.trackMode)
490 emit updateEffect(NULL, m_trackindex, old, e, ix);
491 else if (m_clipref) {
492 emit updateEffect(m_clipref, -1, old, e, ix);
493 // Make sure the changed effect is currently displayed
494 slotSetCurrentEffect(ix);
496 QTimer::singleShot(200, this, SLOT(slotCheckWheelEventFilter()));
499 void EffectStackView2::slotSetCurrentEffect(int ix)
501 if (m_clipref && ix != m_clipref->selectedEffectIndex())
502 m_clipref->setSelectedEffect(ix);
503 for (int i = 0; i < m_effects.count(); i++) {
504 if (m_effects.at(i)->effectIndex() == ix) {
505 m_effects.at(i)->setActive(true);
506 m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
507 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
509 else m_effects.at(i)->setActive(false);
513 void EffectStackView2::slotDeleteEffect(const QDomElement effect)
515 if (m_effectMetaInfo.trackMode)
516 emit removeEffect(NULL, m_trackindex, effect);
518 emit removeEffect(m_clipref, -1, effect);
521 void EffectStackView2::slotAddEffect(QDomElement effect)
523 emit addEffect(m_clipref, effect);
526 void EffectStackView2::slotMoveEffectUp(int index, bool up)
528 if (up && index <= 1) return;
529 if (!up && index >= m_currentEffectList.count()) return;
537 if (m_effectMetaInfo.trackMode) emit changeEffectPosition(NULL, m_trackindex, index, endPos);
538 else emit changeEffectPosition(m_clipref, -1, index, endPos);
541 void EffectStackView2::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties)
543 if (!m_clipref) return;
544 emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties);
547 void EffectStackView2::slotResetEffect(int ix)
549 QDomElement old = m_currentEffectList.itemFromIndex(ix);
551 QString effectId = old.attribute("id");
552 QMap<QString, EffectsList*> effectLists;
553 effectLists["audio"] = &MainWindow::audioEffects;
554 effectLists["video"] = &MainWindow::videoEffects;
555 effectLists["custom"] = &MainWindow::customEffects;
556 foreach(const QString &type, effectLists.keys()) {
557 EffectsList *list = effectLists[type];
558 dom = list->getEffectByTag(QString(), effectId).cloneNode().toElement();
559 if (!dom.isNull()) break;
562 dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
563 if (m_effectMetaInfo.trackMode) {
564 EffectsList::setParameter(dom, "in", QString::number(0));
565 EffectsList::setParameter(dom, "out", QString::number(m_trackInfo.duration));
567 info.track = m_trackInfo.type;
568 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
569 info.cropStart = GenTime(0);
570 info.startPos = GenTime(-1);
572 m_effects.at(ix)->updateWidget(info, dom, &m_effectMetaInfo);
573 emit updateEffect(NULL, m_trackindex, old, dom, ix);
575 m_clipref->initEffect(dom);
576 m_effects.at(ix)->updateWidget(m_clipref->info(), dom, &m_effectMetaInfo);
577 //m_ui.region_url->setUrl(KUrl(dom.attribute("region")));
578 emit updateEffect(m_clipref, -1, old, dom, ix);
582 emit showComments(m_ui.buttonShowComments->isChecked());
583 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
586 void EffectStackView2::slotShowComments()
588 m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
589 emit showComments(m_ui.buttonShowComments->isChecked());
592 void EffectStackView2::slotCreateGroup(int ix)
594 QDomElement oldeffect = m_currentEffectList.itemFromIndex(ix);
595 QDomElement neweffect = oldeffect.cloneNode().toElement();
596 EffectInfo effectinfo;
597 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
598 effectinfo.groupIndex = m_groupIndex;
599 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
602 if (m_effectMetaInfo.trackMode) {
603 info.track = m_trackInfo.type;
604 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
605 info.cropStart = GenTime(0);
606 info.startPos = GenTime(-1);
608 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, ix);
610 emit updateEffect(m_clipref, -1, oldeffect, neweffect, ix);
613 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
615 CollapsibleEffect *effectToMove = NULL;
616 for (int i = 0; i < m_effects.count(); i++) {
617 if (m_effects.at(i)->effectIndex() == ix) {
618 effectToMove = m_effects.at(i);
619 groupPos = l->indexOf(effectToMove);
620 l->removeWidget(effectToMove);
625 CollapsibleGroup *group = new CollapsibleGroup(m_groupIndex, ix == 1, ix == m_currentEffectList.count() - 2, QString(), m_ui.container->widget());
627 connect(group, SIGNAL(moveEffect(int,int,int,QString)), this , SLOT(slotMoveEffect(int,int,int,QString)));
628 connect(group, SIGNAL(unGroup(CollapsibleGroup*)), this , SLOT(slotUnGroup(CollapsibleGroup*)));
629 connect(group, SIGNAL(groupRenamed(CollapsibleGroup *)), this , SLOT(slotRenameGroup(CollapsibleGroup*)));
630 l->insertWidget(groupPos, group);
631 group->installEventFilter( this );
632 group->addGroupEffect(effectToMove);
635 void EffectStackView2::slotMoveEffect(int currentIndex, int newIndex, int groupIndex, QString groupName)
637 CollapsibleEffect *effectToMove = getEffectByIndex(currentIndex);
638 if (effectToMove == NULL) return;
640 QDomElement oldeffect = effectToMove->effect();
641 QDomElement neweffect = oldeffect.cloneNode().toElement();
643 EffectInfo effectinfo;
644 effectinfo.fromString(oldeffect.attribute("kdenlive_info"));
645 effectinfo.groupIndex = groupIndex;
646 effectinfo.groupName = groupName;
647 neweffect.setAttribute("kdenlive_info", effectinfo.toString());
650 if (m_effectMetaInfo.trackMode) {
651 info.track = m_trackInfo.type;
652 info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
653 info.cropStart = GenTime(0);
654 info.startPos = GenTime(-1);
656 emit updateEffect(NULL, m_trackindex, oldeffect, neweffect, effectToMove->effectIndex());
658 emit updateEffect(m_clipref, -1, oldeffect, neweffect, effectToMove->effectIndex());
661 //if (currentIndex == newIndex) return;
662 // Update effect index with new position
663 if (m_effectMetaInfo.trackMode) {
664 emit changeEffectPosition(NULL, m_trackindex, currentIndex, newIndex);
667 emit changeEffectPosition(m_clipref, -1, currentIndex, newIndex);
671 void EffectStackView2::slotUnGroup(CollapsibleGroup* group)
673 QVBoxLayout *l = static_cast<QVBoxLayout *>(m_ui.container->widget()->layout());
674 int ix = l->indexOf(group);
675 group->removeGroup(ix, l);
676 group->deleteLater();
679 void EffectStackView2::slotRenameGroup(CollapsibleGroup *group)
681 QList <CollapsibleEffect*> effects = group->effects();
682 for (int i = 0; i < effects.count(); i++) {
683 QDomElement origin = effects.at(i)->effect();
684 QDomElement changed = origin.cloneNode().toElement();
685 changed.setAttribute("kdenlive_info", effects.at(i)->infoString());
686 if (m_effectMetaInfo.trackMode) {
687 emit updateEffect(NULL, m_trackindex, origin, changed, effects.at(i)->effectIndex());
689 emit updateEffect(m_clipref, -1, origin, changed, effects.at(i)->effectIndex());
694 #include "effectstackview2.moc"