#include "ui_boolval_ui.h"
#include "ui_colorval_ui.h"
#include "ui_wipeval_ui.h"
+#include "ui_urlval_ui.h"
#include "complexparameter.h"
#include "geometryval.h"
#include "positionedit.h"
+#include "projectlist.h"
#include "effectslist.h"
#include "kdenlivesettings.h"
#include "profilesdialog.h"
#include <KDebug>
#include <KLocale>
+#include <KFileDialog>
#include <QVBoxLayout>
#include <QSlider>
{
};
+class Urlval: public QWidget, public Ui::Urlval_UI
+{
+};
QMap<QString, QImage> EffectStackEdit::iconCache;
geom->updateTimecodeFormat();
break;
}
+ if (type == "position") {
+ PositionEdit *posi = ((PositionEdit*)m_valueItems[paramName+"position"]);
+ posi->updateTimecodeFormat();
+ break;
+ }
}
}
m_params.setAttribute(name, value);
}
-void EffectStackEdit::transferParamDesc(const QDomElement d, int in, int out)
+void EffectStackEdit::transferParamDesc(const QDomElement d, int pos, int in, int out)
{
clearAllItems();
if (m_keyframeEditor) delete m_keyframeEditor;
m_valueItems[paramName+"complex"] = pl;
connect(pl, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
} else if (type == "geometry") {
- Geometryval *geo = new Geometryval(m_profile, m_timecode, m_frameSize, m_in);
- geo->setupParam(pa, minFrame, maxFrame);
+ Geometryval *geo = new Geometryval(m_profile, m_timecode, m_frameSize, pos);
+ if (minFrame == maxFrame) geo->setupParam(pa, m_in, m_out);
+ else geo->setupParam(pa, minFrame, maxFrame);
m_vbox->addWidget(geo);
m_valueItems[paramName+"geometry"] = geo;
connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
- connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
+ connect(geo, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
} else if (type == "keyframe" || type == "simplekeyframe") {
// keyframe editor widget
kDebug() << "min: " << m_in << ", MAX: " << m_out;
m_valueItems[paramName+"keyframe"] = geo;
m_keyframeEditor = geo;
connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
- connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
+ connect(geo, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
} else {
// we already have a keyframe editor, so just add another column for the new param
m_keyframeEditor->addParameter(pa);
connect(wpval->end_transp, SIGNAL(valueChanged(int)), this, SLOT(collectAllParameters()));
//wpval->title->setTitle(na.toElement().text());
m_uiItems.append(wpval);
+ } else if (type == "url") {
+ Urlval *cval = new Urlval;
+ cval->setupUi(toFillin);
+ cval->label->setText(paramName);
+ cval->urlwidget->fileDialog()->setFilter(ProjectList::getExtensions());
+ m_valueItems[paramName] = cval;
+ cval->urlwidget->setUrl(KUrl(value));
+ connect(cval->urlwidget, SIGNAL(returnPressed()) , this, SLOT(collectAllParameters()));
+ connect(cval->urlwidget, SIGNAL(urlSelected(const KUrl&)) , this, SLOT(collectAllParameters()));
+ m_uiItems.append(cval);
} else {
delete toFillin;
toFillin = NULL;
m_vbox->addStretch();
}
-void EffectStackEdit::slotSeekToPos(int pos)
-{
- emit seekTimeline(pos);
-}
-
wipeInfo EffectStackEdit::getWipeInfo(QString value)
{
wipeInfo info;
QString val = m_keyframeEditor->getValue(realName);
kDebug() << "SET VALUE: " << val;
namenode.item(i).toElement().setAttribute("keyframes", val);
+ } else if (type == "url") {
+ KUrlRequester *req = ((Urlval*)m_valueItems.value(paramName))->urlwidget;
+ setValue = req->url().path();
}
if (!setValue.isNull()) {
pa.attributes().namedItem("value").setNodeValue(setValue);