]> git.sesse.net Git - kdenlive/commitdiff
make mouse wheel effective on marker dialog
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 14 Jul 2008 10:13:27 +0000 (10:13 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 14 Jul 2008 10:13:27 +0000 (10:13 +0000)
svn path=/branches/KDE4/; revision=2311

src/markerdialog.cpp
src/markerdialog.h

index 143fa737c580df5b41524a3f6f6e391c8e82fccf..c7702b3b604cedef9df99429f94580be065c2c14 100644 (file)
@@ -17,7 +17,7 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
  ***************************************************************************/
 
-
+#include <QWheelEvent>
 #include <KDebug>
 
 #include "markerdialog.h"
@@ -116,6 +116,15 @@ CommentedTime MarkerDialog::newMarker() {
     return CommentedTime(GenTime(m_tc.getFrameCount(m_view.marker_position->text(), m_fps), m_fps), m_view.marker_comment->text());
 }
 
+void MarkerDialog::wheelEvent(QWheelEvent * event) {
+    if (m_view.marker_position->underMouse() || m_view.clip_thumb->underMouse()) {
+        if (event->delta() > 0)
+            slotTimeUp();
+        else
+            slotTimeDown();
+    }
+}
+
 #include "markerdialog.moc"
 
 
index 05225ccd1a4ab35fe7bb60ed27cd6117ff87b09e..aa7bbfcf984cfdcd7f728129849d8b8852c15f2f 100644 (file)
@@ -45,6 +45,9 @@ private slots:
     void slotTimeDown();
     void slotUpdateThumb();
 
+protected:
+    void wheelEvent(QWheelEvent * event);
+
 private:
     Mlt::Producer *m_producer;
     Mlt::Profile *m_profile;