[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/arts/kde
From: Carsten Pfeiffer <carpdjih () mailbox ! tu-berlin ! de>
Date: 2003-10-14 19:04:16
[Download RAW message or body]
CVS commit by pfeiffer:
patch by Cedric Pasteur <cedric.pasteur@m6net.fr>, a little modified
CCMAIL: Cedric Pasteur <cedric.pasteur@m6net.fr>
M +23 -6 kvideowidget.cpp 1.18
M +8 -1 kvideowidget.h 1.8
--- kdelibs/arts/kde/kvideowidget.cpp #1.17:1.18
@@ -305,6 +305,16 @@ int KVideoWidget::heightForWidth( int w
void KVideoWidget::mousePressEvent( QMouseEvent *event )
{
- if (event->button() == RightButton)
- emit rightButtonPressed( mapToGlobal( event->pos() ) );
+ QPoint pos = mapToGlobal( event->pos() );
+
+ emit mouseButtonPressed( event->button(), pos, event->state() );
+
+ // ### Remove in KDE4
+ if ( event->button() == RightButton )
+ emit rightButtonPressed( pos );
+}
+
+void KVideoWidget::mouseDoubleClickEvent( QMouseEvent *event )
+{
+ emit mouseButtonDoubleClick( mapToGlobal( event->pos() ), event->state() );
}
@@ -372,5 +382,12 @@ void KVideoWidget::fullscreenActivated()
fullscreenWidget = new KFullscreenVideoWidget( this );
- // Interconnect right mouse button signals
+ // Interconnect mouse button signals
+ connect( fullscreenWidget, SIGNAL(mouseButtonPressed( int, const QPoint &, int )),
+ this, SIGNAL(mouseButtonPressed( int, const QPoint &, int)) );
+
+ connect( fullscreenWidget, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )),
+ this, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )) );
+
+ // ### Remove in KDE4
connect( fullscreenWidget, SIGNAL(rightButtonPressed(const QPoint &)),
this, SIGNAL(rightButtonPressed(const QPoint &)) );
--- kdelibs/arts/kde/kvideowidget.h #1.7:1.8
@@ -43,4 +43,5 @@ public:
protected:
virtual void mousePressEvent( QMouseEvent *event );
+ virtual void mouseDoubleClickEvent( QMouseEvent *event);
virtual void resizeEvent( QResizeEvent *event );
virtual bool x11Event( XEvent *event );
@@ -63,4 +64,10 @@ protected slots:
signals:
void adaptSize( int width, int height );
+ void mouseButtonPressed( int type, const QPoint &, int state );
+ void mouseButtonDoubleClick( const QPoint &, int state );
+ /**
+ * @deprecated
+ * use mouseButtonPressed( int type, const QPoint & ) instead.
+ */
void rightButtonPressed( const QPoint & );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic