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(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)));
slotAddKeyframe();
}
+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));
<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>
</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>
</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>
</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>