//m_ui.region_url->fileDialog()->setFilter(ProjectList::getExtensions());
//m_ui.effectlist->horizontalHeader()->setVisible(false);
//m_ui.effectlist->verticalHeader()->setVisible(false);
+ int size = style()->pixelMetric(QStyle::PM_SmallIconSize);
+ QSize iconSize(size, size);
m_ui.buttonNew->setIcon(KIcon("document-new"));
m_ui.buttonNew->setToolTip(i18n("Add new effect"));
+ m_ui.buttonNew->setIconSize(iconSize);
m_ui.buttonUp->setIcon(KIcon("go-up"));
m_ui.buttonUp->setToolTip(i18n("Move effect up"));
+ m_ui.buttonUp->setIconSize(iconSize);
m_ui.buttonDown->setIcon(KIcon("go-down"));
m_ui.buttonDown->setToolTip(i18n("Move effect down"));
+ m_ui.buttonDown->setIconSize(iconSize);
m_ui.buttonDel->setIcon(KIcon("edit-delete"));
m_ui.buttonDel->setToolTip(i18n("Delete effect"));
+ m_ui.buttonDel->setIconSize(iconSize);
m_ui.buttonSave->setIcon(KIcon("document-save"));
m_ui.buttonSave->setToolTip(i18n("Save effect"));
+ m_ui.buttonSave->setIconSize(iconSize);
m_ui.buttonReset->setIcon(KIcon("view-refresh"));
m_ui.buttonReset->setToolTip(i18n("Reset effect"));
+ m_ui.buttonReset->setIconSize(iconSize);
m_ui.checkAll->setToolTip(i18n("Enable/Disable all effects"));
m_ui.buttonShowComments->setIcon(KIcon("help-about"));
m_ui.buttonShowComments->setToolTip(i18n("Show additional information for the parameters"));
connect(m_ui.buttonReset, SIGNAL(clicked()), this, SLOT(slotResetEffect()));
connect(m_ui.checkAll, SIGNAL(stateChanged(int)), this, SLOT(slotCheckAll(int)));
connect(m_ui.buttonShowComments, SIGNAL(clicked()), this, SLOT(slotShowComments()));
- connect(m_effectedit, SIGNAL(parameterChanged(const QDomElement, const QDomElement)), this , SLOT(slotUpdateEffectParams(const QDomElement, const QDomElement)));
+ connect(m_effectedit, SIGNAL(parameterChanged(const QDomElement &, const QDomElement &)), this , SLOT(slotUpdateEffectParams(const QDomElement &, const QDomElement &)));
+ connect(m_effectedit, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this , SLOT(slotStartFilterJob(QString,QString,QString,QString,QString,QString)));
connect(m_effectedit, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
connect(m_effectedit, SIGNAL(displayMessage(const QString&, int)), this, SIGNAL(displayMessage(const QString&, int)));
connect(m_effectedit, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
+
connect(monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
connect(this, SIGNAL(showComments(bool)), m_effectedit, SIGNAL(showComments(bool)));
m_effectLists["audio"] = &MainWindow::audioEffects;
emit reloadEffects();
}
-void EffectStackView::slotUpdateEffectParams(const QDomElement old, const QDomElement e)
+void EffectStackView::slotUpdateEffectParams(const QDomElement &old, const QDomElement &e)
{
if (m_trackMode)
emit updateEffect(NULL, m_trackindex, old, e, m_ui.effectlist->currentRow());
void EffectStackView::slotItemChanged(QListWidgetItem *item)
{
- bool disable = true;
- if (item->checkState() == Qt::Checked) disable = false;
- m_ui.buttonReset->setEnabled(!disable || !KdenliveSettings::disable_effect_parameters());
+ bool disable = item->checkState() == Qt::Unchecked;
+ int row = m_ui.effectlist->row(item);
int activeRow = m_ui.effectlist->currentRow();
- if (activeRow >= 0) {
+
+ if (row == activeRow) {
+ m_ui.buttonReset->setEnabled(!disable || !KdenliveSettings::disable_effect_parameters());
m_effectedit->updateParameter("disable", QString::number((int) disable));
- if (m_trackMode)
- emit changeEffectState(NULL, m_trackindex, activeRow, disable);
- else
- emit changeEffectState(m_clipref, -1, activeRow, disable);
}
+
+ if (m_trackMode)
+ emit changeEffectState(NULL, m_trackindex, row, disable);
+ else
+ emit changeEffectState(m_clipref, -1, row, disable);
+
slotUpdateCheckAllButton();
}
doc.appendChild(doc.importNode(d, true));
kDebug() << "IMPORTED STK: " << doc.toString();*/
- QDomNode namenode = d.elementsByTagName("name").item(0);
+ QDomElement namenode = d.firstChildElement("name");
if (!namenode.isNull()) {
// Issue 238: Add icons for effect type in effectstack.
// Logic more or less copied from initeffects.cpp
QString type = d.attribute("type", QString());
if ("audio" == type) {
- item = new QListWidgetItem(audioIcon, i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist);
+ item = new QListWidgetItem(audioIcon, i18n(namenode.text().toUtf8().data()), m_ui.effectlist);
} else if ("custom" == type) {
- item = new QListWidgetItem(customIcon, i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist);
+ item = new QListWidgetItem(customIcon, i18n(namenode.text().toUtf8().data()), m_ui.effectlist);
} else {
- item = new QListWidgetItem(videoIcon, i18n(namenode.toElement().text().toUtf8().data()), m_ui.effectlist);
+ item = new QListWidgetItem(videoIcon, i18n(namenode.text().toUtf8().data()), m_ui.effectlist);
}
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
if (d.attribute("disable") == "1")
ItemInfo info;
m_effectedit->transferParamDesc(QDomElement(), info);
//m_ui.region_url->clear();
+ m_clipref = NULL;
m_ui.buttonShowComments->setEnabled(false);
m_ui.labelComment->setText(QString());
m_ui.effectlist->blockSignals(false);
emit showComments(m_ui.buttonShowComments->isChecked());
}
+void EffectStackView::slotStartFilterJob(const QString&filterName, const QString&filterParams, const QString&finalFilterName, const QString&consumer, const QString&consumerParams, const QString&properties)
+{
+ if (!m_clipref) return;
+ emit startFilterJob(m_clipref->info(), m_clipref->clipProducer(), filterName, filterParams, finalFilterName, consumer, consumerParams, properties);
+}
+
#include "effectstackview.moc"