From d3b4f7a3da02e89cf4a519c4ebdf5809bd3a328a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Mon, 14 Jul 2008 10:13:27 +0000 Subject: [PATCH] make mouse wheel effective on marker dialog svn path=/branches/KDE4/; revision=2311 --- src/markerdialog.cpp | 11 ++++++++++- src/markerdialog.h | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/markerdialog.cpp b/src/markerdialog.cpp index 143fa737..c7702b3b 100644 --- a/src/markerdialog.cpp +++ b/src/markerdialog.cpp @@ -17,7 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ - +#include #include #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" diff --git a/src/markerdialog.h b/src/markerdialog.h index 05225ccd..aa7bbfcf 100644 --- a/src/markerdialog.h +++ b/src/markerdialog.h @@ -45,6 +45,9 @@ private slots: void slotTimeDown(); void slotUpdateThumb(); +protected: + void wheelEvent(QWheelEvent * event); + private: Mlt::Producer *m_producer; Mlt::Profile *m_profile; -- 2.39.5