[vlc-devel] commit: Qt: Prevent volume up/down on mouseWheel events inside StdPLPanel ( Jean-Philippe André )
git version control
git at videolan.org
Sun Jan 17 16:57:31 CET 2010
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Sun Jan 17 13:16:55 2010 +0100| [87bb0a07b99ad6c320080c15f04793dcc032ad62] | committer: Jean-Philippe André
Qt: Prevent volume up/down on mouseWheel events inside StdPLPanel
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87bb0a07b99ad6c320080c15f04793dcc032ad62
---
.../gui/qt4/components/playlist/standardpanel.cpp | 7 +++++++
.../gui/qt4/components/playlist/standardpanel.hpp | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 53da40d..aaeb0d1 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -42,6 +42,7 @@
#include <QLabel>
#include <QMenu>
#include <QSignalMapper>
+#include <QWheelEvent>
#include <assert.h>
@@ -354,3 +355,9 @@ bool StandardPLPanel::eventFilter( QObject *obj, QEvent *event )
}
return true;
}
+
+void StandardPLPanel::wheelEvent( QWheelEvent *e )
+{
+ // Accept this event in order to prevent unwanted volume up/down changes
+ e->accept();
+}
diff --git a/modules/gui/qt4/components/playlist/standardpanel.hpp b/modules/gui/qt4/components/playlist/standardpanel.hpp
index b350af7..7e1a620 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.hpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.hpp
@@ -43,6 +43,7 @@ class QListView;
class PLModel;
class QPushButton;
class QKeyEvent;
+class QWheelEvent;
class StandardPLPanel: public QWidget
{
@@ -56,6 +57,7 @@ protected:
friend class PlaylistWidget;
virtual void keyPressEvent( QKeyEvent *e );
+ virtual void wheelEvent( QWheelEvent *e );
bool eventFilter(QObject *obj, QEvent *event);
More information about the vlc-devel
mailing list