EffectStackEdit::~EffectStackEdit()
{
iconCache.clear();
+ delete m_baseWidget;
}
void EffectStackEdit::setFrameSize(QPoint p)
void EffectStackEdit::transferParamDesc(const QDomElement d, int in, int out)
{
clearAllItems();
+ if (m_keyframeEditor) delete m_keyframeEditor;
m_keyframeEditor = NULL;
m_params = d;
m_in = in;
m_valueItems[paramName+"complex"] = pl;
connect(pl, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
} else if (type == "geometry") {
- Geometryval *geo = new Geometryval(m_profile, m_frameSize);
+ Geometryval *geo = new Geometryval(m_profile, m_frameSize, m_in);
geo->setupParam(pa, minFrame, maxFrame);
m_vbox->addWidget(geo);
m_valueItems[paramName+"geometry"] = geo;
// keyframe editor widget
kDebug() << "min: " << m_in << ", MAX: " << m_out;
if (m_keyframeEditor == NULL) {
- KeyframeEdit *geo = new KeyframeEdit(pa, m_in, m_in + m_out, pa.attribute("min").toInt(), pa.attribute("max").toInt(), m_timecode, paramName);
+ KeyframeEdit *geo = new KeyframeEdit(pa, m_in, m_in + m_out, pa.attribute("min").toInt(), pa.attribute("max").toInt(), m_timecode, e.attribute("active_keyframe", "-1").toInt());
m_vbox->addWidget(geo);
m_valueItems[paramName+"keyframe"] = geo;
m_keyframeEditor = geo;
connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
+ connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
} else {
// we already have a keyframe editor, so just add another column for the new param
m_keyframeEditor->addParameter(pa);
void EffectStackEdit::slotSeekToPos(int pos)
{
- emit seekTimeline(m_in + pos);
+ emit seekTimeline(pos);
}
wipeInfo EffectStackEdit::getWipeInfo(QString value)
else if (type == "position") paramName.append("position");
else if (type == "geometry") paramName.append("geometry");
else if (type == "keyframe") paramName.append("keyframe");
- if (!m_valueItems.contains(paramName)) {
- // kDebug() << "// Param: " << paramName << " NOT FOUND";
+ if (type != "simplekeyframe" && !m_valueItems.contains(paramName)) {
+ kDebug() << "// Param: " << paramName << " NOT FOUND";
continue;
}
else info.end = RIGHT;
info.endTransparency = wp->end_transp->value();
setValue = getWipeString(info);
+ } else if ((type == "simplekeyframe" || type == "keyframe") && m_keyframeEditor) {
+ QString realName = i18n(na.toElement().text().toUtf8().data());
+ QString val = m_keyframeEditor->getValue(realName);
+ kDebug() << "SET VALUE: " << val;
+ namenode.item(i).toElement().setAttribute("keyframes", val);
}
-
if (!setValue.isNull()) {
pa.attributes().namedItem("value").setNodeValue(setValue);
}
delete child;
if (wid) delete wid;
}
+ m_keyframeEditor = NULL;
blockSignals(false);
}