]> git.sesse.net Git - kdenlive/blob - src/effectstackview.cpp
Effect stack update: enable / disable several effects now triggers only one refresh
[kdenlive] / src / effectstackview.cpp
1 /***************************************************************************
2                           effecstackview.cpp  -  description
3                              -------------------
4     begin                : Feb 15 2008
5     copyright            : (C) 2008 by Marco Gittler
6     email                : g.marco@freenet.de
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
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.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18
19 #include "effectstackview.h"
20 #include "effectslist.h"
21 #include "clipitem.h"
22 #include "mainwindow.h"
23 #include "docclipbase.h"
24 #include "projectlist.h"
25 #include "kthumb.h"
26 #include "monitoreditwidget.h"
27 #include "monitorscene.h"
28 #include "kdenlivesettings.h"
29
30 #include <KDebug>
31 #include <KLocale>
32 #include <KMessageBox>
33 #include <KStandardDirs>
34 #include <KFileDialog>
35
36 #include <QMenu>
37 #include <QTextStream>
38 #include <QFile>
39 #include <QInputDialog>
40
41
42 EffectStackView::EffectStackView(Monitor *monitor, QWidget *parent) :
43         QWidget(parent),
44         m_monitor(monitor),
45         m_clipref(NULL),
46         m_trackMode(false),
47         m_trackindex(-1)
48 {
49     m_ui.setupUi(this);
50     QVBoxLayout *vbox1 = new QVBoxLayout(m_ui.frame);
51     //m_effectedit = new EffectStackEdit(monitor, m_ui.frame);
52     m_ui.frame->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
53     vbox1->setContentsMargins(2, 0, 2, 0);
54     vbox1->setSpacing(0);
55     vbox1->addWidget(m_effectedit);
56     m_ui.splitter->setStretchFactor(0, 1);
57     m_ui.splitter->setStretchFactor(1, 20);
58
59     //m_ui.region_url->fileDialog()->setFilter(ProjectList::getExtensions());
60     //m_ui.effectlist->horizontalHeader()->setVisible(false);
61     //m_ui.effectlist->verticalHeader()->setVisible(false);
62     int size = style()->pixelMetric(QStyle::PM_SmallIconSize);
63     QSize iconSize(size, size);
64
65     m_ui.buttonNew->setIcon(KIcon("document-new"));
66     m_ui.buttonNew->setToolTip(i18n("Add new effect"));
67     m_ui.buttonNew->setIconSize(iconSize);
68     m_ui.buttonUp->setIcon(KIcon("go-up"));
69     m_ui.buttonUp->setToolTip(i18n("Move effect up"));
70     m_ui.buttonUp->setIconSize(iconSize);
71     m_ui.buttonDown->setIcon(KIcon("go-down"));
72     m_ui.buttonDown->setToolTip(i18n("Move effect down"));
73     m_ui.buttonDown->setIconSize(iconSize);
74     m_ui.buttonDel->setIcon(KIcon("edit-delete"));
75     m_ui.buttonDel->setToolTip(i18n("Delete effect"));
76     m_ui.buttonDel->setIconSize(iconSize);
77     m_ui.buttonSave->setIcon(KIcon("document-save"));
78     m_ui.buttonSave->setToolTip(i18n("Save effect"));
79     m_ui.buttonSave->setIconSize(iconSize);
80     m_ui.buttonReset->setIcon(KIcon("view-refresh"));
81     m_ui.buttonReset->setToolTip(i18n("Reset effect"));
82     m_ui.buttonReset->setIconSize(iconSize);
83     m_ui.checkAll->setToolTip(i18n("Enable/Disable all effects"));
84     m_ui.buttonShowComments->setIcon(KIcon("help-about"));
85     m_ui.buttonShowComments->setToolTip(i18n("Show additional information for the parameters"));
86
87     m_ui.effectlist->setDragDropMode(QAbstractItemView::NoDragDrop); //use internal if drop is recognised right
88
89     m_ui.labelComment->setHidden(true);
90
91     //connect(m_ui.region_url, SIGNAL(urlSelected(const KUrl &)), this , SLOT(slotRegionChanged()));
92     //connect(m_ui.region_url, SIGNAL(returnPressed()), this , SLOT(slotRegionChanged()));
93     connect(m_ui.effectlist, SIGNAL(itemSelectionChanged()), this , SLOT(slotItemSelectionChanged()));
94     connect(m_ui.effectlist, SIGNAL(itemChanged(QListWidgetItem *)), this , SLOT(slotItemChanged(QListWidgetItem *)));
95     connect(m_ui.buttonUp, SIGNAL(clicked()), this, SLOT(slotItemUp()));
96     connect(m_ui.buttonDown, SIGNAL(clicked()), this, SLOT(slotItemDown()));
97     connect(m_ui.buttonDel, SIGNAL(clicked()), this, SLOT(slotItemDel()));
98     connect(m_ui.buttonSave, SIGNAL(clicked()), this, SLOT(slotSaveEffect()));
99     connect(m_ui.buttonReset, SIGNAL(clicked()), this, SLOT(slotResetEffect()));
100     connect(m_ui.checkAll, SIGNAL(stateChanged(int)), this, SLOT(slotCheckAll(int)));
101     connect(m_ui.buttonShowComments, SIGNAL(clicked()), this, SLOT(slotShowComments()));
102     connect(m_effectedit, SIGNAL(parameterChanged(const QDomElement &, const QDomElement &)), this , SLOT(slotUpdateEffectParams(const QDomElement &, const QDomElement &)));
103     connect(m_effectedit, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,QString,QString)));
104     connect(m_effectedit, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
105     connect(m_effectedit, SIGNAL(displayMessage(const QString&, int)), this, SIGNAL(displayMessage(const QString&, int)));
106     connect(m_effectedit, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
107     
108     connect(monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
109     connect(this, SIGNAL(showComments(bool)), m_effectedit, SIGNAL(showComments(bool)));
110     m_effectLists["audio"] = &MainWindow::audioEffects;
111     m_effectLists["video"] = &MainWindow::videoEffects;
112     m_effectLists["custom"] = &MainWindow::customEffects;
113     setEnabled(false);
114 }
115
116 EffectStackView::~EffectStackView()
117 {
118     m_effectLists.clear();
119     delete m_effectedit;
120 }
121
122 void EffectStackView::updateTimecodeFormat()
123 {
124     m_effectedit->updateTimecodeFormat();
125 }
126
127 void EffectStackView::setMenu(QMenu *menu)
128 {
129     m_ui.buttonNew->setMenu(menu);
130 }
131
132 void EffectStackView::updateProjectFormat(MltVideoProfile profile, Timecode t)
133 {
134     m_effectedit->updateProjectFormat(profile, t);
135 }
136
137 void EffectStackView::slotSaveEffect()
138 {
139     QString name = QInputDialog::getText(this, i18n("Save Effect"), i18n("Name for saved effect: "));
140     if (name.isEmpty()) return;
141     QString path = KStandardDirs::locateLocal("appdata", "effects/", true);
142     path = path + name + ".xml";
143     if (QFile::exists(path)) if (KMessageBox::questionYesNo(this, i18n("File %1 already exists.\nDo you want to overwrite it?", path)) == KMessageBox::No) return;
144
145     int i = m_ui.effectlist->currentRow();
146     QDomDocument doc;
147     QDomElement effect = m_currentEffectList.at(i).cloneNode().toElement();
148     doc.appendChild(doc.importNode(effect, true));
149     effect = doc.firstChild().toElement();
150     effect.removeAttribute("kdenlive_ix");
151     effect.setAttribute("id", name);
152     effect.setAttribute("type", "custom");
153     QDomElement effectname = effect.firstChildElement("name");
154     effect.removeChild(effectname);
155     effectname = doc.createElement("name");
156     QDomText nametext = doc.createTextNode(name);
157     effectname.appendChild(nametext);
158     effect.insertBefore(effectname, QDomNode());
159     QDomElement effectprops = effect.firstChildElement("properties");
160     effectprops.setAttribute("id", name);
161     effectprops.setAttribute("type", "custom");
162
163     QFile file(path);
164     if (file.open(QFile::WriteOnly | QFile::Truncate)) {
165         QTextStream out(&file);
166         out << doc.toString();
167     }
168     file.close();
169     emit reloadEffects();
170 }
171
172 void EffectStackView::slotUpdateEffectParams(const QDomElement &old, const QDomElement &e)
173 {
174     if (m_trackMode)
175         emit updateEffect(NULL, m_trackindex, old, e, m_ui.effectlist->currentRow());
176     else if (m_clipref)
177         emit updateEffect(m_clipref, -1, old, e, m_ui.effectlist->currentRow());
178 }
179
180 void EffectStackView::slotClipItemSelected(ClipItem* c, int ix)
181 {
182     if (c && !c->isEnabled()) return;
183     if (c && c == m_clipref) {
184         if (ix == -1) ix = m_ui.effectlist->currentRow();
185         //if (ix == -1 || ix == m_ui.effectlist->currentRow()) return;
186     } else {
187         m_clipref = c;
188         if (c) {
189             QString cname = m_clipref->clipName();
190             if (cname.length() > 30) {
191                 m_ui.checkAll->setToolTip(i18n("Effects for %1").arg(cname));
192                 cname.truncate(27);
193                 m_ui.checkAll->setText(i18n("Effects for %1").arg(cname) + "...");
194             } else {
195                 m_ui.checkAll->setToolTip(QString());
196                 m_ui.checkAll->setText(i18n("Effects for %1").arg(cname));
197             }
198             ix = c->selectedEffectIndex();
199             QString size = c->baseClip()->getProperty("frame_size");
200             double factor = c->baseClip()->getProperty("aspect_ratio").toDouble();
201             QPoint p((int)(size.section('x', 0, 0).toInt() * factor + 0.5), size.section('x', 1, 1).toInt());
202             m_effectedit->setFrameSize(p);
203         } else {
204             ix = 0;
205         }
206     }
207     if (m_clipref == NULL) {
208         m_ui.effectlist->blockSignals(true);
209         m_ui.effectlist->clear();
210         ItemInfo info;
211         m_effectedit->transferParamDesc(QDomElement(), info);
212         //m_ui.region_url->clear();
213         m_ui.effectlist->blockSignals(false);
214         m_ui.checkAll->setToolTip(QString());
215         m_ui.checkAll->setText(QString());
216         m_ui.labelComment->setText(QString());
217         setEnabled(false);
218         return;
219     }
220     setEnabled(true);
221     m_trackMode = false;
222     m_currentEffectList = m_clipref->effectList();
223     setupListView(ix);
224 }
225
226 void EffectStackView::slotTrackItemSelected(int ix, const TrackInfo info)
227 {
228     m_clipref = NULL;
229     m_trackMode = true;
230     m_currentEffectList = info.effectsList;
231     m_trackInfo = info;
232     kDebug() << "// TRACK; " << ix << ", EFFECTS: " << m_currentEffectList.count();
233     setEnabled(true);
234     m_ui.checkAll->setToolTip(QString());
235     m_ui.checkAll->setText(i18n("Effects for track %1").arg(info.trackName.isEmpty() ? QString::number(ix) : info.trackName));
236     m_trackindex = ix;
237     setupListView(0);
238 }
239
240 void EffectStackView::slotItemChanged(QListWidgetItem *item)
241 {
242     bool disable = item->checkState() == Qt::Unchecked;
243     int row = m_ui.effectlist->row(item);
244     int activeRow = m_ui.effectlist->currentRow();
245
246     if (row == activeRow) {
247         m_ui.buttonReset->setEnabled(!disable || !KdenliveSettings::disable_effect_parameters());
248         m_effectedit->updateParameter("disable", QString::number((int) disable));
249     }
250
251     if (m_trackMode)
252         emit changeEffectState(NULL, m_trackindex, row, disable);
253     else
254         emit changeEffectState(m_clipref, -1, row, disable);
255
256     slotUpdateCheckAllButton();
257 }
258
259
260 void EffectStackView::setupListView(int ix)
261 {
262     m_ui.effectlist->blockSignals(true);
263     m_ui.effectlist->clear();
264
265     // Issue 238: Add icons for effect type in effectstack.
266     KIcon videoIcon("kdenlive-show-video");
267     KIcon audioIcon("kdenlive-show-audio");
268     KIcon customIcon("kdenlive-custom-effect");
269     QListWidgetItem* item;
270
271     for (int i = 0; i < m_currentEffectList.count(); i++) {
272         const QDomElement d = m_currentEffectList.at(i).cloneNode().toElement();
273         if (d.isNull()) {
274             kDebug() << " . . . . WARNING, NULL EFFECT IN STACK!!!!!!!!!";
275             continue;
276         }
277
278         /*QDomDocument doc;
279         doc.appendChild(doc.importNode(d, true));
280         kDebug() << "IMPORTED STK: " << doc.toString();*/
281
282         QDomElement namenode = d.firstChildElement("name");
283         if (!namenode.isNull()) {
284             // Issue 238: Add icons for effect type in effectstack.
285             // Logic more or less copied from initeffects.cpp
286             QString type = d.attribute("type", QString());
287             if ("audio" == type) {
288                 item = new QListWidgetItem(audioIcon, i18n(namenode.text().toUtf8().data()), m_ui.effectlist);
289             } else if ("custom" == type) {
290                 item = new QListWidgetItem(customIcon, i18n(namenode.text().toUtf8().data()), m_ui.effectlist);
291             } else {
292                 item = new QListWidgetItem(videoIcon, i18n(namenode.text().toUtf8().data()), m_ui.effectlist);
293             }
294             item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
295             if (d.attribute("disable") == "1")
296                 item->setCheckState(Qt::Unchecked);
297             else
298                 item->setCheckState(Qt::Checked);
299         }
300     }
301     if (m_ui.effectlist->count() == 0) {
302         m_ui.buttonDel->setEnabled(false);
303         m_ui.buttonSave->setEnabled(false);
304         m_ui.buttonReset->setEnabled(false);
305         m_ui.buttonUp->setEnabled(false);
306         m_ui.buttonDown->setEnabled(false);
307         m_ui.checkAll->setEnabled(false);
308         m_ui.buttonShowComments->setEnabled(false);
309         m_ui.labelComment->setHidden(true);
310     } else {
311         ix = qBound(0, ix, m_ui.effectlist->count() - 1);
312         m_ui.effectlist->setCurrentRow(ix);
313         m_ui.checkAll->setEnabled(true);
314     }
315     m_ui.effectlist->blockSignals(false);
316     if (m_ui.effectlist->count() == 0) {
317         ItemInfo info;
318         m_effectedit->transferParamDesc(QDomElement(), info);
319         //m_ui.region_url->clear();
320     } else slotItemSelectionChanged(false);
321     slotUpdateCheckAllButton();
322 }
323
324 void EffectStackView::slotItemSelectionChanged(bool update)
325 {
326     bool hasItem = m_ui.effectlist->currentItem();
327     int activeRow = m_ui.effectlist->currentRow();
328     bool isChecked = false;
329     if (hasItem && m_ui.effectlist->currentItem()->checkState() == Qt::Checked) isChecked = true;
330     QDomElement eff;
331     if (hasItem && m_ui.effectlist->currentItem()->isSelected()) {
332         eff = m_currentEffectList.at(activeRow);
333         if (m_trackMode) {
334             // showing track effects
335             ItemInfo info;
336             info.track = m_trackInfo.type;
337             info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
338             info.cropStart = GenTime(0);
339             info.startPos = GenTime(-1);
340             info.track = 0;
341             m_effectedit->transferParamDesc(eff, info);
342         } else {
343             m_effectedit->transferParamDesc(eff, m_clipref->info());
344         }
345         //m_ui.region_url->setUrl(KUrl(eff.attribute("region")));
346         m_ui.labelComment->setText(i18n(eff.firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
347     }
348     if (!m_trackMode && m_clipref && update) m_clipref->setSelectedEffect(activeRow);
349     m_ui.buttonDel->setEnabled(hasItem);
350     m_ui.buttonSave->setEnabled(hasItem);
351     m_ui.buttonReset->setEnabled(hasItem && (isChecked || !KdenliveSettings::disable_effect_parameters()));
352     m_ui.buttonUp->setEnabled(activeRow > 0);
353     m_ui.buttonDown->setEnabled((activeRow < m_ui.effectlist->count() - 1) && hasItem);
354     m_ui.buttonShowComments->setEnabled(hasItem);
355
356     emit showComments(m_ui.buttonShowComments->isChecked());
357     m_ui.labelComment->setVisible(hasItem && m_ui.labelComment->text().count() && (m_ui.buttonShowComments->isChecked() || !eff.elementsByTagName("parameter").count()));
358 }
359
360 void EffectStackView::slotItemUp()
361 {
362     int activeRow = m_ui.effectlist->currentRow();
363     if (activeRow <= 0) return;
364     if (m_trackMode) emit changeEffectPosition(NULL, m_trackindex, activeRow + 1, activeRow);
365     else emit changeEffectPosition(m_clipref, -1, activeRow + 1, activeRow);
366 }
367
368 void EffectStackView::slotItemDown()
369 {
370     int activeRow = m_ui.effectlist->currentRow();
371     if (activeRow >= m_ui.effectlist->count() - 1) return;
372     if (m_trackMode) emit changeEffectPosition(NULL, m_trackindex, activeRow + 1, activeRow + 2);
373     else emit changeEffectPosition(m_clipref, -1, activeRow + 1, activeRow + 2);
374 }
375
376 void EffectStackView::slotItemDel()
377 {
378     int activeRow = m_ui.effectlist->currentRow();
379     if (activeRow >= 0) {
380         if (m_trackMode)
381             emit removeEffect(NULL, m_trackindex, m_currentEffectList.at(activeRow).cloneNode().toElement());
382         else
383             emit removeEffect(m_clipref, -1, m_clipref->effectAt(activeRow));
384         slotUpdateCheckAllButton();
385     }
386 }
387
388 void EffectStackView::slotResetEffect()
389 {
390     int activeRow = m_ui.effectlist->currentRow();
391     if (activeRow < 0) return;
392     QDomElement old = m_currentEffectList.at(activeRow).cloneNode().toElement();
393     QDomElement dom;
394     QString effectName = m_ui.effectlist->currentItem()->text();
395     foreach(const QString &type, m_effectLists.keys()) {
396         EffectsList *list = m_effectLists[type];
397         if (list->effectNames().contains(effectName)) {
398             dom = list->getEffectByName(effectName).cloneNode().toElement();
399             break;
400         }
401     }
402     if (!dom.isNull()) {
403         dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
404         if (m_trackMode) {
405             EffectsList::setParameter(dom, "in", QString::number(0));
406             EffectsList::setParameter(dom, "out", QString::number(m_trackInfo.duration));
407             ItemInfo info;
408             info.track = m_trackInfo.type;
409             info.cropDuration = GenTime(m_trackInfo.duration, KdenliveSettings::project_fps());
410             info.cropStart = GenTime(0);
411             info.startPos = GenTime(-1);
412             info.track = 0;
413             m_effectedit->transferParamDesc(dom, info);
414             emit updateEffect(NULL, m_trackindex, old, dom, activeRow);
415         } else {
416             m_clipref->initEffect(dom);
417             m_effectedit->transferParamDesc(dom, m_clipref->info());
418             //m_ui.region_url->setUrl(KUrl(dom.attribute("region")));
419             emit updateEffect(m_clipref, -1, old, dom, activeRow);
420         }
421     }
422
423     emit showComments(m_ui.buttonShowComments->isChecked());
424     m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count());
425 }
426
427
428 void EffectStackView::raiseWindow(QWidget* dock)
429 {
430     if ((m_clipref || m_trackMode) && dock)
431         dock->raise();
432 }
433
434 void EffectStackView::clear()
435 {
436     m_ui.effectlist->blockSignals(true);
437     m_ui.effectlist->clear();
438     m_ui.buttonDel->setEnabled(false);
439     m_ui.buttonSave->setEnabled(false);
440     m_ui.buttonReset->setEnabled(false);
441     m_ui.buttonUp->setEnabled(false);
442     m_ui.buttonDown->setEnabled(false);
443     m_ui.checkAll->setEnabled(false);
444     ItemInfo info;
445     m_effectedit->transferParamDesc(QDomElement(), info);
446     //m_ui.region_url->clear();
447     m_clipref = NULL;
448     m_ui.buttonShowComments->setEnabled(false);
449     m_ui.labelComment->setText(QString());
450     m_ui.effectlist->blockSignals(false);
451 }
452
453
454 void EffectStackView::slotSeekTimeline(int pos)
455 {
456     if (m_trackMode) {
457         emit seekTimeline(pos);
458     } else if (m_clipref) {
459         emit seekTimeline(m_clipref->startPos().frames(KdenliveSettings::project_fps()) + pos);
460     }
461 }
462
463 void EffectStackView::slotUpdateCheckAllButton()
464 {
465     bool hasEnabled = false;
466     bool hasDisabled = false;
467     for (int i = 0; i < m_ui.effectlist->count(); ++i) {
468         if (m_ui.effectlist->item(i)->checkState() == Qt::Checked)
469             hasEnabled = true;
470         else
471             hasDisabled = true;
472     }
473
474     m_ui.checkAll->blockSignals(true);
475     if (hasEnabled && hasDisabled)
476         m_ui.checkAll->setCheckState(Qt::PartiallyChecked);
477     else if (hasEnabled)
478         m_ui.checkAll->setCheckState(Qt::Checked);
479     else
480         m_ui.checkAll->setCheckState(Qt::Unchecked);
481     m_ui.checkAll->blockSignals(false);
482 }
483
484 void EffectStackView::slotCheckAll(int state)
485 {
486     if (state == 1) {
487         state = 2;
488         m_ui.checkAll->blockSignals(true);
489         m_ui.checkAll->setCheckState(Qt::Checked);
490         m_ui.checkAll->blockSignals(false);
491     }
492
493     bool disabled = (state != 2);
494     m_effectedit->updateParameter("disable", QString::number((int) disabled));
495     for (int i = 0; i < m_ui.effectlist->count(); ++i) {
496         if (m_ui.effectlist->item(i)->checkState() != (Qt::CheckState)state) {
497             m_ui.effectlist->item(i)->setCheckState((Qt::CheckState)state);
498             if (m_trackMode)
499                 emit changeEffectState(NULL, m_trackindex, i, disabled);
500             else
501                 emit changeEffectState(m_clipref, -1, i, disabled);
502         }
503     }
504 }
505
506 /*void EffectStackView::slotRegionChanged()
507 {
508     if (!m_trackMode) emit updateClipRegion(m_clipref, m_ui.effectlist->currentRow(), m_ui.region_url->text());
509 }*/
510
511 void EffectStackView::slotCheckMonitorPosition(int renderPos)
512 {
513     if (m_trackMode || (m_clipref && renderPos >= m_clipref->startPos().frames(KdenliveSettings::project_fps()) && renderPos <= m_clipref->endPos().frames(KdenliveSettings::project_fps()))) {
514         if (!m_monitor->getEffectEdit()->getScene()->views().at(0)->isVisible())
515             m_monitor->slotShowEffectScene(true);
516     } else {
517         m_monitor->slotShowEffectScene(false);
518     }
519 }
520
521 void EffectStackView::slotRenderPos(int pos)
522 {
523     if (m_effectedit) {
524         if (m_trackMode) {
525             m_effectedit->slotSyncEffectsPos(pos);
526         } else if (m_clipref) {
527             m_effectedit->slotSyncEffectsPos(pos - m_clipref->startPos().frames(KdenliveSettings::project_fps()));
528         }
529     }
530 }
531
532 int EffectStackView::isTrackMode(bool *ok) const
533 {
534     *ok = m_trackMode;
535     return m_trackindex;
536 }
537
538 void EffectStackView::slotShowComments()
539 {
540     m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || !m_ui.labelComment->text().count());
541     emit showComments(m_ui.buttonShowComments->isChecked());
542 }
543
544 void EffectStackView::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties)
545 {
546     if (!m_clipref) return;
547     emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties);
548 }
549
550 #include "effectstackview.moc"