- Geometryval *geo = new Geometryval(m_profile, m_frameSize);
- 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)));
- m_items.append(geo);
- } else if (type == "keyframe") {
- //Â keyframe editor widget
- kDebug() << "min: " << m_in << ", MAX: " << m_out;
- KeyframeEdit *geo = new KeyframeEdit(pa, m_out - m_in, m_timecode);
- //geo->setupParam(100, pa.attribute("min").toInt(), pa.attribute("max").toInt(), pa.attribute("keyframes"));
- //connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
- //geo->setupParam(pa, minFrame, maxFrame);
- m_vbox->addWidget(geo);
- m_valueItems[paramName+"keyframe"] = geo;
- connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
- m_items.append(geo);
+ if (KdenliveSettings::on_monitor_effects()) {
+ GeometryWidget *geometry = new GeometryWidget(m_monitor, m_timecode, pos, isEffect, disable, this);
+ // connect this before setupParam to make sure the monitor scene shows up at startup
+ connect(geometry, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
+ connect(geometry, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
+ if (minFrame == maxFrame)
+ geometry->setupParam(pa, m_in, m_out);
+ else
+ geometry->setupParam(pa, minFrame, maxFrame);
+ m_vbox->addWidget(geometry);
+ m_valueItems[paramName+"geometry"] = geometry;
+ connect(geometry, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
+ connect(this, SIGNAL(syncEffectsPos(int)), geometry, SLOT(slotSyncPosition(int)));
+ } else {
+ 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, SIGNAL(seekTimeline(int)));
+ connect(this, SIGNAL(syncEffectsPos(int)), geo, SLOT(slotSyncPosition(int)));
+ }
+ } else if (type == "keyframe" || type == "simplekeyframe") {
+ // keyframe editor widget
+ if (m_keyframeEditor == NULL) {
+ KeyframeEdit *geo = new KeyframeEdit(pa, m_in, m_in + m_out, 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, SIGNAL(seekTimeline(int)));
+ connect(this, SIGNAL(showComments()), geo, SIGNAL(showComments()));
+ } else {
+ // we already have a keyframe editor, so just add another column for the new param
+ m_keyframeEditor->addParameter(pa);
+ }