Commit 251eeba2 authored by Francois Cartegnie's avatar Francois Cartegnie

Revert "Qt: handle special mouse buttons"

This reverts commit e3511f67.
parent fc2fa18e
......@@ -1614,11 +1614,3 @@ void KeyInputDialog::wheelEvent( QWheelEvent *e )
keyValue = i_vlck;
}
void KeyInputDialog::mousePressEvent( QMouseEvent *e )
{
int i_vlck = qtMouseEventToVLCKey( e );
selected->setText( qtr( "Key: " ) + VLCKeyToString( i_vlck ) );
checkForConflicts( i_vlck );
keyValue = i_vlck;
}
......@@ -485,7 +485,6 @@ private:
void checkForConflicts( int i_vlckey );
void keyPressEvent( QKeyEvent *);
void wheelEvent( QWheelEvent *);
void mousePressEvent( QMouseEvent * );
bool b_global;
};
#endif
......@@ -1314,18 +1314,6 @@ void MainInterface::wheelEvent( QWheelEvent *e )
e->accept();
}
void MainInterface::mousePressEvent( QMouseEvent *e )
{
int i_vlckey = qtMouseEventToVLCKey( e );
if( i_vlckey > 0 )
{
var_SetInteger( p_intf->p_libvlc, "key-pressed", i_vlckey );
e->accept();
}
else
e->ignore();
}
void MainInterface::closeEvent( QCloseEvent *e )
{
// hide();
......
......@@ -101,7 +101,6 @@ protected:
virtual void closeEvent( QCloseEvent *);
virtual void keyPressEvent( QKeyEvent *);
virtual void wheelEvent( QWheelEvent * );
virtual void mousePressEvent( QMouseEvent * );
private:
/* Main Widgets Creation */
......
......@@ -286,26 +286,6 @@ int qtWheelEventToVLCKey( QWheelEvent *e )
return i_vlck;
}
int qtMouseEventToVLCKey( QMouseEvent *e )
{
int i_vlck = 0;
switch( e->button() )
{
case Qt::MidButton:
i_vlck |= KEY_MOUSEBUTTON_MID;
break;
case Qt::XButton1:
i_vlck |= KEY_MOUSEBUTTON_X1;
break;
case Qt::XButton2:
i_vlck |= KEY_MOUSEBUTTON_X2;
default:
break;
}
if ( i_vlck > 0 ) i_vlck |= qtKeyModifiersToVLC( e );
return i_vlck;
}
QString VLCKeyToString( unsigned val )
{
char *base = vlc_keycode2str (val);
......
......@@ -179,7 +179,6 @@ class QInputEvent;
int qtKeyModifiersToVLC( QInputEvent* e );
int qtEventToVLCKey( QKeyEvent *e );
int qtWheelEventToVLCKey( QWheelEvent *e );
int qtMouseEventToVLCKey( QMouseEvent *e );
QString VLCKeyToString( unsigned val );
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment