]> git.sesse.net Git - kdenlive/blobdiff - src/keyframeedit.cpp
Fix tooltip (show correct shorcut
[kdenlive] / src / keyframeedit.cpp
index 8014cd0e54364264e34173a7ebeb95a95691366a..a326d953f9398a30f2fdbb1957e47f0a6618cbf9 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <QHeaderView>
 
-KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
+KeyframeEdit::KeyframeEdit(const QDomElement &e, int minFrame, int maxFrame, Timecode tc, int activeKeyframe, QWidget* parent) :
         QWidget(parent),
         m_min(minFrame),
         m_max(maxFrame),
@@ -48,7 +48,7 @@ KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode t
     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)));
+    connect(keyframe_list, SIGNAL(cellChanged(int,int)), this, SLOT(slotGenerateParams(int,int)));
 
     m_position = new PositionEdit(i18n("Position"), 0, 0, 1, tc, widgetTable);
     ((QGridLayout*)widgetTable->layout())->addWidget(m_position, 3, 0, 1, -1);
@@ -70,7 +70,7 @@ KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, Timecode t
     connect(buttonResetKeyframe, SIGNAL(clicked()), this, SLOT(slotResetKeyframe()));
     connect(m_position, SIGNAL(parameterChanged(int)), this, SLOT(slotAdjustKeyframePos(int)));
 
-    //connect(keyframe_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotSaveCurrentParam(QTreeWidgetItem *, int)));
+    //connect(keyframe_list, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotSaveCurrentParam(QTreeWidgetItem*,int)));
 
     if (!keyframe_list->currentItem()) {
         keyframe_list->setCurrentCell(0, 0);
@@ -334,7 +334,7 @@ void KeyframeEdit::slotAdjustKeyframeInfo(bool seek)
         max = getPos(below->row()) - 1;
 
     m_position->blockSignals(true);
-    m_position->setRange(min, max);
+    m_position->setRange(min, max, true);
     m_position->setPosition(getPos(item->row()));
     m_position->blockSignals(false);
 
@@ -463,7 +463,7 @@ void KeyframeEdit::checkVisibleParam()
     if (m_params.count() == 0)
         return;
     
-    foreach(QDomElement elem, m_params) {
+    foreach(const QDomElement &elem, m_params) {
         if (elem.attribute("intimeline") == "1")
             return;
     }
@@ -471,4 +471,10 @@ void KeyframeEdit::checkVisibleParam()
     slotUpdateVisibleParameter(0);
 }
 
+void KeyframeEdit::slotUpdateRange(int inPoint, int outPoint)
+{
+    m_min = inPoint;
+    m_max = outPoint;
+}
+
 #include "keyframeedit.moc"