connect(geometry, SIGNAL(parameterChanged()), this, SLOT(collectAllParameters()));
connect(geometry, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
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)
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
m_keyframeEditor = NULL;
blockSignals(false);
}
+
+void EffectStackEdit::slotSyncEffectsPos(int pos)
+{
+ emit syncEffectsPos(pos);
+}
*
* Transfers all Dynamic gui parameter settings into m_params(??) */
void collectAllParameters();
+ void slotSyncEffectsPos(int pos);
signals:
void parameterChanged(const QDomElement, const QDomElement);
void seekTimeline(int);
void displayMessage(const QString&, int);
void checkMonitorPosition(int);
+ void syncEffectsPos(int pos);
};
#endif
connect(m_effectedit, SIGNAL(seekTimeline(int)), this , SLOT(slotSeekTimeline(int)));
connect(m_effectedit, SIGNAL(displayMessage(const QString&, int)), this, SIGNAL(displayMessage(const QString&, int)));
connect(m_effectedit, SIGNAL(checkMonitorPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
+ connect(monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
m_effectLists["audio"] = &MainWindow::audioEffects;
m_effectLists["video"] = &MainWindow::videoEffects;
m_effectLists["custom"] = &MainWindow::customEffects;
}
}
+void EffectStackView::slotRenderPos(int pos)
+{
+ if (m_clipref)
+ m_effectedit->slotSyncEffectsPos(pos - m_clipref->startPos().frames(KdenliveSettings::project_fps()));
+}
+
#include "effectstackview.moc"
/** @brief Define the region filter for current effect. */
void slotRegionChanged();
+ /** @brief Checks whether the monitor scene has to be displayed. */
void slotCheckMonitorPosition(int renderPos);
+ /** @brief Pass position changes in project monitor/timline to the effects to keep their local timelines in sync. */
+ void slotRenderPos(int pos);
+
signals:
void removeEffect(ClipItem*, QDomElement);
/** Parameters for an effect changed, update the filter in playlist */
connect(spinTransp, SIGNAL(valueChanged(int)), this , SLOT(slotTransparencyChanged(int)));
}
+void Geometryval::slotSyncPosition(int relTimelinePos)
+{
+ if (m_timePos.maximum() > 0 && KdenliveSettings::transitionfollowcursor()) {
+ relTimelinePos = qMax(0, relTimelinePos);
+ relTimelinePos = qMin(relTimelinePos, m_timePos.maximum());
+ if (relTimelinePos != m_timePos.getValue())
+ slotPositionChanged(relTimelinePos, false);
+ }
+}
+
void Geometryval::updateTransitionPath()
{
if (m_fixedMode) return;
public slots:
void setupParam(const QDomElement, int minframe, int maxframe);
+ /** @brief Updates position of the local timeline to @param relTimelinePos. */
+ void slotSyncPosition(int relTimelinePos);
private slots:
void slotNextFrame();
m_scene = monitor->getEffectScene();
connect(m_scene, SIGNAL(actionFinished()), this, SLOT(slotUpdateGeometry()));
- connect(m_monitor->render, SIGNAL(rendererPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
+ connect(m_monitor, SIGNAL(renderPosition(int)), this, SLOT(slotCheckMonitorPosition(int)));
connect(this, SIGNAL(parameterChanged()), this, SLOT(slotUpdateProperties()));
}
// Keyframes are disabled
m_ui.widgetTimeWrapper->setHidden(true);
} else {
+ m_ui.widgetTimeWrapper->setHidden(false);
m_timeline->setKeyGeometry(m_geometry, m_outPoint - m_inPoint - 1);
m_timeline->update();
m_timePos->setRange(0, m_outPoint - m_inPoint - 1);
slotCheckMonitorPosition(m_monitor->render->seekFramePosition());
}
+void GeometryWidget::slotSyncPosition(int relTimelinePos)
+{
+ if (m_timePos->maximum() > 0 && KdenliveSettings::transitionfollowcursor()) {
+ relTimelinePos = qMax(0, relTimelinePos);
+ relTimelinePos = qMin(relTimelinePos, m_timePos->maximum());
+ if (relTimelinePos != m_timePos->getValue())
+ slotPositionChanged(relTimelinePos, false);
+ }
+}
+
void GeometryWidget::slotPositionChanged(int pos, bool seek)
{
* @param minframe In point of the clip
* @param maxframe Out point of the clip */
void setupParam(const QDomElement elem, int minframe, int maxframe);
+ /** @brief Updates position of the local timeline to @param relTimelinePos. */
+ void slotSyncPosition(int relTimelinePos);
private:
Ui::GeometryWidget_UI m_ui;
connect(transitionList, SIGNAL(activated(int)), this, SLOT(slotTransitionChanged()));
connect(transitionTrack, SIGNAL(activated(int)), this, SLOT(slotTransitionTrackChanged()));
connect(m_effectEdit, SIGNAL(parameterChanged(const QDomElement&, const QDomElement&)), this , SLOT(slotUpdateEffectParams(const QDomElement&, const QDomElement&)));
+ connect(monitor, SIGNAL(renderPosition(int)), this, SLOT(slotRenderPos(int)));
}
void TransitionSettings::updateProjectFormat(MltVideoProfile profile, Timecode t, const QList <TrackInfo> info)
}
+void TransitionSettings::slotRenderPos(int pos)
+{
+ if (m_usedTransition)
+ m_effectEdit->slotSyncEffectsPos(pos - m_usedTransition->startPos().frames(KdenliveSettings::project_fps()));
+}
+
+#include "transitionsettings.moc"
void slotUpdateEffectParams(const QDomElement&, const QDomElement&);
private slots:
-
/** @brief Sets the new B track for the transition (automatic or forced). */
void slotTransitionTrackChanged();
+ /** @brief Pass position changes in project monitor/timline to the effects to keep their local timelines in sync. */
+ void slotRenderPos(int pos);
signals:
void transitionUpdated(Transition *, QDomElement);