- Geometryval *geo = new Geometryval(m_profile, m_frameSize);
- connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
- connect(geo, SIGNAL(seekToPos(int)), this, SLOT(slotSeekToPos(int)));
- geo->setupParam(pa, minFrame, maxFrame);
- m_vbox->addWidget(geo);
- m_valueItems[paramName+"geometry"] = geo;
- 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);
- connect(geo, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
- //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;
- m_items.append(geo);
+ if (KdenliveSettings::on_monitor_effects()) {
+ m_geometryWidget = new GeometryWidget(m_monitor, m_timecode, pos, isEffect, m_params.hasAttribute("showrotation"), this);
+ m_geometryWidget->setFrameSize(m_frameSize);
+ m_geometryWidget->slotShowScene(!disable);
+ // connect this before setupParam to make sure the monitor scene shows up at startup
+ connect(m_geometryWidget, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
+ connect(m_geometryWidget, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
+ if (minFrame == maxFrame)
+ m_geometryWidget->setupParam(pa, m_in, m_out);
+ else
+ m_geometryWidget->setupParam(pa, minFrame, maxFrame);
+ m_vbox->addWidget(m_geometryWidget);
+ m_valueItems[paramName+"geometry"] = m_geometryWidget;
+ connect(m_geometryWidget, SIGNAL(seekToPos(int)), this, SIGNAL(seekTimeline(int)));
+ connect(this, SIGNAL(syncEffectsPos(int)), m_geometryWidget, SLOT(slotSyncPosition(int)));
+ connect(this, SIGNAL(effectStateChanged(bool)), m_geometryWidget, SLOT(slotShowScene(bool)));
+ } 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 == "addedgeometry") {
+ // this is a parameter that should be linked to the geometry widget, for example rotation, shear, ...
+ if (m_geometryWidget) m_geometryWidget->addParameter(pa);
+ } else if (type == "keyframe" || type == "simplekeyframe") {
+ // keyframe editor widget
+ if (m_keyframeEditor == NULL) {
+ KeyframeEdit *geo;
+ if (pa.attribute("widget") == "corners") {
+ // we want a corners-keyframe-widget
+ CornersWidget *corners = new CornersWidget(m_monitor, pa, m_in, m_in + m_out, m_timecode, e.attribute("active_keyframe", "-1").toInt(), this);
+ corners->slotShowScene(!disable);
+ connect(corners, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
+ connect(this, SIGNAL(effectStateChanged(bool)), corners, SLOT(slotShowScene(bool)));
+ connect(this, SIGNAL(syncEffectsPos(int)), corners, SLOT(slotSyncPosition(int)));
+ geo = static_cast<KeyframeEdit *>(corners);
+ } else {
+ 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(bool)), geo, SIGNAL(showComments(bool)));
+ } else {
+ // we already have a keyframe editor, so just add another column for the new param
+ m_keyframeEditor->addParameter(pa);
+ }