From 17c7a6494e9ea6887371cd3d87cc54b754d4df5b Mon Sep 17 00:00:00 2001 From: Till Theato Date: Sat, 30 Oct 2010 09:08:17 +0000 Subject: [PATCH] - Replace seeking checkbox in keyframe widget with a checkable add-link button - Add line on top of keyframe widget to make it clear where the add keyframe button belongs to svn path=/trunk/kdenlive/; revision=5063 --- src/keyframeedit.cpp | 12 +++++------ src/keyframeedit.h | 2 +- src/widgets/keyframeeditor_ui.ui | 35 ++++++++++++++++++++++---------- 3 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/keyframeedit.cpp b/src/keyframeedit.cpp index e93fd641..e3523691 100644 --- a/src/keyframeedit.cpp +++ b/src/keyframeedit.cpp @@ -38,15 +38,12 @@ KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, int minVal setupUi(this); if (m_max == -1) { // special case: keyframe for tracks, do not allow keyframes - button_add->setEnabled(false); - button_delete->setEnabled(false); - keyframe_seek->setEnabled(false); widgetTable->setHidden(true); } m_params.append(e.cloneNode().toElement()); keyframe_list->setFont(KGlobalSettings::generalFont()); - keyframe_seek->setChecked(KdenliveSettings::keyframeseek()); - connect(keyframe_seek, SIGNAL(stateChanged(int)), this, SLOT(slotSetSeeking(int))); + buttonSeek->setChecked(KdenliveSettings::keyframeseek()); + connect(buttonSeek, SIGNAL(toggled(bool)), this, SLOT(slotSetSeeking(bool))); buttonKeyframes->setIcon(KIcon("list-add")); button_add->setIcon(KIcon("list-add")); @@ -54,6 +51,7 @@ KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, int minVal button_delete->setIcon(KIcon("list-remove")); button_delete->setToolTip(i18n("Delete keyframe")); buttonResetKeyframe->setIcon(KIcon("edit-undo")); + buttonSeek->setIcon(KIcon("insert-link")); connect(keyframe_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotAdjustKeyframeInfo())); connect(keyframe_list, SIGNAL(cellChanged(int, int)), this, SLOT(slotGenerateParams(int, int))); setupParam(); @@ -411,9 +409,9 @@ QString KeyframeEdit::getPosString(int pos) return m_timecode.getTimecodeFromFrames(pos); } -void KeyframeEdit::slotSetSeeking(int state) +void KeyframeEdit::slotSetSeeking(bool seek) { - KdenliveSettings::setKeyframeseek(state == Qt::Checked); + KdenliveSettings::setKeyframeseek(seek); } void KeyframeEdit::updateTimecodeFormat() diff --git a/src/keyframeedit.h b/src/keyframeedit.h index 4df839d0..3069dd99 100644 --- a/src/keyframeedit.h +++ b/src/keyframeedit.h @@ -116,7 +116,7 @@ private slots: void slotAdjustKeyframeValue(int value); /** @brief Turns the seek to keyframe position setting on/off. * @param state State of the associated checkbox */ - void slotSetSeeking(int state); + void slotSetSeeking(bool seek); /** @brief Shows the keyframe table and adds a second keyframe. */ void slotKeyframeMode(); diff --git a/src/widgets/keyframeeditor_ui.ui b/src/widgets/keyframeeditor_ui.ui index f8d5d4ee..976b143a 100644 --- a/src/widgets/keyframeeditor_ui.ui +++ b/src/widgets/keyframeeditor_ui.ui @@ -6,8 +6,8 @@ 0 0 - 336 - 190 + 346 + 196 @@ -40,7 +40,7 @@ 0 - + true @@ -72,13 +72,6 @@ - - - - Seek to active keyframe - - - @@ -86,7 +79,7 @@ - + Qt::Horizontal @@ -113,6 +106,19 @@ + + + + Seek to active keyframe + + + ... + + + true + + + @@ -141,6 +147,13 @@ + + + + Qt::Horizontal + + + -- 2.39.2