From 54fd7b3ff6a375feb4c4beb5f03e5a01398e6b3b Mon Sep 17 00:00:00 2001 From: Till Theato Date: Mon, 16 Aug 2010 16:31:55 +0000 Subject: [PATCH] Geometry Widget: - Use by default - Replace sync checkbox with button svn path=/trunk/kdenlive/; revision=4734 --- src/geometrywidget.cpp | 11 +++++--- src/kdenlivesettings.kcfg | 2 +- src/widgets/geometrywidget_ui.ui | 46 +++++++++++++++++++++----------- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/geometrywidget.cpp b/src/geometrywidget.cpp index 58e8cc29..ebeff038 100644 --- a/src/geometrywidget.cpp +++ b/src/geometrywidget.cpp @@ -52,7 +52,7 @@ GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, Setup of timeline and keyframe controls */ - ((QGridLayout *)(m_ui.widgetTimeWrapper->layout()))->addWidget(m_timePos, 1, 4); + ((QGridLayout *)(m_ui.widgetTimeWrapper->layout()))->addWidget(m_timePos, 1, 6); QVBoxLayout *layout = new QVBoxLayout(m_ui.frameTimeline); m_timeline = new KeyframeHelper(m_ui.frameTimeline); @@ -66,6 +66,11 @@ GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, m_ui.buttonAddDelete->setIcon(KIcon("document-new")); m_ui.buttonAddDelete->setToolTip(i18n("Add keyframe")); + m_ui.buttonSync->setIcon(KIcon("insert-link")); + m_ui.buttonSync->setToolTip(i18n("Synchronize with timeline cursor")); + m_ui.buttonSync->setCheckable(true); + m_ui.buttonSync->setChecked(KdenliveSettings::transitionfollowcursor()); + connect(m_timeline, SIGNAL(positionChanged(int)), this, SLOT(slotPositionChanged(int))); connect(m_timeline, SIGNAL(keyframeMoved(int)), this, SLOT(slotKeyframeMoved(int))); connect(m_timeline, SIGNAL(addKeyframe(int)), this, SLOT(slotAddKeyframe(int))); @@ -74,6 +79,7 @@ GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, connect(m_ui.buttonPrevious, SIGNAL(clicked()), this, SLOT(slotPreviousKeyframe())); connect(m_ui.buttonNext, SIGNAL(clicked()), this, SLOT(slotNextKeyframe())); connect(m_ui.buttonAddDelete, SIGNAL(clicked()), this, SLOT(slotAddDeleteKeyframe())); + connect(m_ui.buttonSync, SIGNAL(toggled(bool)), this, SLOT(slotSetSynchronize(bool))); /* @@ -119,12 +125,10 @@ GeometryWidget::GeometryWidget(Monitor* monitor, Timecode timecode, int clipPos, m_ui.buttonConfig->setToolTip(i18n("Show/Hide settings")); m_ui.buttonConfig->setCheckable(true); m_ui.groupSettings->setHidden(true); - m_ui.checkSync->setChecked(KdenliveSettings::transitionfollowcursor()); m_ui.checkDirectUpdate->setChecked(m_scene->getDirectUpdate()); connect(m_ui.buttonConfig, SIGNAL(toggled(bool)), m_ui.groupSettings, SLOT(setVisible(bool))); - connect(m_ui.checkSync, SIGNAL(toggled(bool)), this, SLOT(slotSetSynchronize(bool))); connect(m_ui.checkShowScene, SIGNAL(toggled(bool)), this, SLOT(slotShowScene(bool))); connect(m_ui.checkDirectUpdate, SIGNAL(toggled(bool)), m_scene, SLOT(slotSetDirectUpdate(bool))); @@ -201,6 +205,7 @@ void GeometryWidget::setupParam(const QDomElement elem, int minframe, int maxfra void GeometryWidget::slotSyncPosition(int relTimelinePos) { + // do only sync if this effect is keyframable if (m_timePos->maximum() > 0 && KdenliveSettings::transitionfollowcursor()) { relTimelinePos = qMax(0, relTimelinePos); relTimelinePos = qMin(relTimelinePos, m_timePos->maximum()); diff --git a/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg index c81bd7a3..5a3141e2 100644 --- a/src/kdenlivesettings.kcfg +++ b/src/kdenlivesettings.kcfg @@ -52,7 +52,7 @@ - false + true diff --git a/src/widgets/geometrywidget_ui.ui b/src/widgets/geometrywidget_ui.ui index a6e6695c..6dd9e690 100644 --- a/src/widgets/geometrywidget_ui.ui +++ b/src/widgets/geometrywidget_ui.ui @@ -6,8 +6,8 @@ 0 0 - 381 - 304 + 366 + 282 @@ -332,7 +332,7 @@ - + Qt::Horizontal @@ -345,7 +345,7 @@ - + @@ -367,9 +367,35 @@ - + + + + + ... + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 15 + 20 + + + + @@ -451,16 +477,6 @@ 4 - - - - Synchronize with timeline cursor - - - false - - - -- 2.39.2