m_menu->addAction(KIcon("view-refresh"), i18n("Reset Effect"), this, SLOT(slotResetEffect()));
m_menu->addAction(KIcon("document-save"), i18n("Save Effect"), this, SLOT(slotSaveEffect()));
- QDomElement namenode = m_effect.firstChildElement("name");
- if (namenode.isNull()) return;
- QString effectname = i18n(namenode.text().toUtf8().data());
- if (m_regionEffect) effectname.append(":" + KUrl(EffectsList::parameter(m_effect, "resource")).fileName());
-
QHBoxLayout *l = static_cast <QHBoxLayout *>(frame->layout());
title = new QLabel(this);
l->insertWidget(2, title);
+ m_groupAction = new QAction(KIcon("folder-new"), i18n("Create Group"), this);
+ connect(m_groupAction, SIGNAL(triggered(bool)), this, SLOT(slotCreateGroup()));
+
+ QDomElement namenode = m_effect.firstChildElement("name");
+ if (namenode.isNull()) {
+ // Warning, broken effect?
+ kDebug()<<"// Could not create effect";
+ return;
+ }
+ QString effectname = i18n(namenode.text().toUtf8().data());
+ if (m_regionEffect) effectname.append(':' + KUrl(EffectsList::parameter(m_effect, "resource")).fileName());
title->setText(effectname);
/*
* Do not show icon, makes too much visual noise
else if (type == "custom") icon = KIcon("kdenlive-custom-effect");
else icon = KIcon("kdenlive-show-video");
effecticon->setPixmap(icon.pixmap(16,16));*/
- m_groupAction = new QAction(KIcon("folder-new"), i18n("Create Group"), this);
- connect(m_groupAction, SIGNAL(triggered(bool)), this, SLOT(slotCreateGroup()));
if (!m_regionEffect) {
if (m_info.groupIndex == -1) m_menu->addAction(m_groupAction);
- //TODO: re-enable region effect when the MLT feature is stabilized
- //m_menu->addAction(KIcon("folder-new"), i18n("Create Region"), this, SLOT(slotCreateRegion()));
+ m_menu->addAction(KIcon("folder-new"), i18n("Create Region"), this, SLOT(slotCreateRegion()));
}
setupWidget(info, metaInfo);
setAcceptDrops(true);
}
connect(collapseButton, SIGNAL(clicked()), this, SLOT(slotSwitch()));
- connect(enabledButton, SIGNAL(toggled(bool)), this, SLOT(slotEnable(bool)));
+ connect(enabledButton, SIGNAL(toggled(bool)), this, SLOT(slotDisable(bool)));
connect(buttonUp, SIGNAL(clicked()), this, SLOT(slotEffectUp()));
connect(buttonDown, SIGNAL(clicked()), this, SLOT(slotEffectDown()));
connect(buttonDel, SIGNAL(clicked()), this, SLOT(slotDeleteEffect()));
{
QString allExtensions = ProjectList::getExtensions();
const QString dialogFilter = allExtensions + ' ' + QLatin1Char('|') + i18n("All Supported Files") + "\n* " + QLatin1Char('|') + i18n("All Files");
- KFileDialog *d = new KFileDialog(KUrl("kfiledialog:///clipfolder"), dialogFilter, kapp->activeWindow());
+ QPointer<KFileDialog> d = new KFileDialog(KUrl("kfiledialog:///clipfolder"), dialogFilter, kapp->activeWindow());
d->setOperationMode(KFileDialog::Opening);
d->setMode(KFile::File);
if (d->exec() == QDialog::Accepted) {
QWidget::mouseReleaseEvent(event);
}
-void CollapsibleEffect::slotEnable(bool disable, bool emitInfo)
+void CollapsibleEffect::slotDisable(bool disable, bool emitInfo)
{
title->setEnabled(!disable);
enabledButton->blockSignals(true);
}
else {
m_paramWidget = new ParameterContainer(m_effect, info, metaInfo, widgetFrame);
+ connect(m_paramWidget, SIGNAL(disableCurrentFilter(bool)), this, SLOT(slotDisableEffect(bool)));
if (m_effect.firstChildElement("parameter").isNull()) {
// Effect has no parameter, don't allow expand
collapseButton->setEnabled(false);
}
connect (m_paramWidget, SIGNAL(parameterChanged(const QDomElement, const QDomElement, int)), this, SIGNAL(parameterChanged(const QDomElement, const QDomElement, int)));
- connect(m_paramWidget, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)), this, SIGNAL(startFilterJob(QString,QString,QString,QString,QString,QString)));
+ connect(m_paramWidget, SIGNAL(startFilterJob(QString,QString,QString,QString,const QMap <QString, QString>)), this, SIGNAL(startFilterJob(QString,QString,QString,QString,const QMap <QString, QString>)));
connect (this, SIGNAL(syncEffectsPos(int)), m_paramWidget, SIGNAL(syncEffectsPos(int)));
connect (m_paramWidget, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
connect (m_paramWidget, SIGNAL(seekTimeline(int)), this, SIGNAL(seekTimeline(int)));
+ connect(m_paramWidget, SIGNAL(importClipKeyframes()), this, SIGNAL(importClipKeyframes()));
}
+void CollapsibleEffect::slotDisableEffect(bool disable)
+{
+ title->setEnabled(!disable);
+ enabledButton->blockSignals(true);
+ enabledButton->setChecked(disable);
+ enabledButton->blockSignals(false);
+ enabledButton->setIcon(disable ? KIcon("novisible") : KIcon("visible"));
+ m_effect.setAttribute("disable", disable ? 1 : 0);
+ emit effectStateChanged(disable, effectIndex(), isActive() && needsMonitorEffectScene());
+}
+
bool CollapsibleEffect::isGroup() const
{
return false;
return m_paramWidget->needsMonitorEffectScene();
}
+void CollapsibleEffect::setRange(int inPoint , int outPoint)
+{
+ m_paramWidget->setRange(inPoint, outPoint);
+}
+
+void CollapsibleEffect::setKeyframes(const QString data, int maximum)
+{
+ m_paramWidget->setKeyframes(data, maximum);
+}