svn path=/trunk/kdenlive/; revision=5042
void DoubleParameterWidget::slotReset()
{
void DoubleParameterWidget::slotReset()
{
- m_spinBox->setValue(m_default);
}
#include "doubleparameterwidget.moc"
}
#include "doubleparameterwidget.moc"
/** @brief Sets the value to @param value. */
void setValue(int value);
/** @brief Sets the value to @param value. */
void setValue(int value);
/** @brief Sets value to m_default. */
void slotReset();
/** @brief Sets value to m_default. */
void slotReset();
button_add->setToolTip(i18n("Add keyframe"));
button_delete->setIcon(KIcon("list-remove"));
button_delete->setToolTip(i18n("Delete keyframe"));
button_add->setToolTip(i18n("Add keyframe"));
button_delete->setIcon(KIcon("list-remove"));
button_delete->setToolTip(i18n("Delete keyframe"));
+ buttonResetKeyframe->setIcon(KIcon("edit-undo"));
connect(keyframe_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotAdjustKeyframeInfo()));
connect(keyframe_list, SIGNAL(cellChanged(int, int)), this, SLOT(slotGenerateParams(int, int)));
setupParam();
connect(keyframe_list, SIGNAL(itemSelectionChanged()), this, SLOT(slotAdjustKeyframeInfo()));
connect(keyframe_list, SIGNAL(cellChanged(int, int)), this, SLOT(slotGenerateParams(int, int)));
setupParam();
connect(button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteKeyframe()));
connect(button_add, SIGNAL(clicked()), this, SLOT(slotAddKeyframe()));
connect(buttonKeyframes, SIGNAL(clicked()), this, SLOT(slotKeyframeMode()));
connect(button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteKeyframe()));
connect(button_add, SIGNAL(clicked()), this, SLOT(slotAddKeyframe()));
connect(buttonKeyframes, SIGNAL(clicked()), this, SLOT(slotKeyframeMode()));
+ connect(buttonResetKeyframe, SIGNAL(clicked()), this, SLOT(slotResetKeyframe()));
//connect(keyframe_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotSaveCurrentParam(QTreeWidgetItem *, int)));
connect(keyframe_pos, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframePos(int)));
//connect(keyframe_val, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int)));
//connect(keyframe_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotSaveCurrentParam(QTreeWidgetItem *, int)));
connect(keyframe_pos, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframePos(int)));
//connect(keyframe_val, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int)));
+void KeyframeEdit::slotResetKeyframe()
+{
+ for (int col = 0; col < keyframe_list->columnCount(); ++col) {
+ DoubleParameterWidget *doubleparam = qobject_cast<DoubleParameterWidget*>(m_slidersLayout->itemAtPosition(col, 0)->widget());
+ if (doubleparam)
+ doubleparam->slotReset();
+ }
+}
+
+
/*void KeyframeEdit::slotSaveCurrentParam(QTreeWidgetItem *item, int column)
{
if (item && column == 0) m_previousPos = m_timecode.getFrameCount(item->text(0));
/*void KeyframeEdit::slotSaveCurrentParam(QTreeWidgetItem *item, int column)
{
if (item && column == 0) m_previousPos = m_timecode.getFrameCount(item->text(0));
/** @brief Shows the keyframe table and adds a second keyframe. */
void slotKeyframeMode();
/** @brief Shows the keyframe table and adds a second keyframe. */
void slotKeyframeMode();
+
+ /** @brief Resets all parameters of the selected keyframe to their default values. */
+ void slotResetKeyframe();
+
//void slotSaveCurrentParam(QTreeWidgetItem *item, int column);
signals:
//void slotSaveCurrentParam(QTreeWidgetItem *item, int column);
signals:
<property name="margin">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
- <item row="3" column="0" colspan="3">
+ <item row="3" column="0" colspan="4">
<widget class="QTableWidget" name="keyframe_list">
<property name="alternatingRowColors">
<bool>true</bool>
<widget class="QTableWidget" name="keyframe_list">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
</widget>
</item>
</property>
</widget>
</item>
- <item row="4" column="2">
+ <item row="4" column="3">
<widget class="QCheckBox" name="keyframe_seek">
<property name="text">
<string>Seek to active keyframe</string>
<widget class="QCheckBox" name="keyframe_seek">
<property name="text">
<string>Seek to active keyframe</string>
</property>
</widget>
</item>
</property>
</widget>
</item>
- <item row="5" column="2">
+ <item row="5" column="2" colspan="2">
<widget class="QSlider" name="keyframe_pos">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<widget class="QSlider" name="keyframe_pos">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</property>
</widget>
</item>
+ <item row="4" column="2">
+ <widget class="QToolButton" name="buttonResetKeyframe">
+ <property name="toolTip">
+ <string>Reset the parameters to their default values</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>