Exemple #1
0
bool KWMThemeClient::eventFilter( QObject* o, QEvent* e )
{
	if ( o != widget() )
		return false;

	switch ( e->type() )
	{
		case QEvent::Resize:
			resizeEvent( static_cast< QResizeEvent* >( e ) );
			return true;

		case QEvent::Paint:
			paintEvent( static_cast< QPaintEvent* >( e ) );
			return true;

		case QEvent::MouseButtonDblClick:
			mouseDoubleClickEvent( static_cast< QMouseEvent* >( e ) );
			return true;

		case QEvent::MouseButtonPress:
			processMousePressEvent( static_cast< QMouseEvent* >( e ) );
			return true;

		case QEvent::Show:
			showEvent( static_cast< QShowEvent* >( e ) );
			return true;

		default:
	    		return false;
	}
}
Exemple #2
0
bool NextClient::eventFilter(TQObject *o, TQEvent *e)
{
    if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget()))
	return false;
    switch (e->type()) {
    case TQEvent::Resize:
	resizeEvent(TQT_TQRESIZEEVENT( e ));
	return true;
    case TQEvent::Paint:
	paintEvent(TQT_TQPAINTEVENT( e ));
	return true;
    case TQEvent::MouseButtonDblClick:
	mouseDoubleClickEvent(TQT_TQMOUSEEVENT( e ));
	return true;
    case TQEvent::Wheel:
	wheelEvent( TQT_TQWHEELEVENT( e ));
	return true;
    case TQEvent::MouseButtonPress:
	processMousePressEvent(TQT_TQMOUSEEVENT( e ));
	return true;
    case TQEvent::Show:
	showEvent(TQT_TQSHOWEVENT( e ));
	return true;
    default:
	break;
    }
    return false;
}
Exemple #3
0
bool KCommonDecoration::eventFilter( QObject* o, QEvent* e )
{
    if( o != widget())
        return false;
    switch( e->type())
    {
        case QEvent::Resize:
            resizeEvent(static_cast<QResizeEvent*>(e) );
            return true;
        case QEvent::Paint:
            paintEvent( static_cast< QPaintEvent* >( e ));
            return true;
        case QEvent::MouseButtonDblClick:
            mouseDoubleClickEvent( static_cast< QMouseEvent* >( e ));
            return true;
        case QEvent::MouseButtonPress:
            processMousePressEvent( static_cast< QMouseEvent* >( e ));
            return true;
        case QEvent::Wheel:
            wheelEvent( static_cast< QWheelEvent* >( e ));
            return true;
        default:
            return false;
    }
}
Exemple #4
0
void AuroraeClient::titlePressed(Qt::MouseButton button, Qt::MouseButtons buttons)
{
    QMouseEvent *event = new QMouseEvent(QEvent::MouseButtonPress, widget()->mapFromGlobal(QCursor::pos()),
                                         QCursor::pos(), button, buttons, Qt::NoModifier);
    processMousePressEvent(event);
    delete event;
    event = 0;
}
Exemple #5
0
bool Decoration::eventFilter( TQObject* o, TQEvent* e )
    {
    if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(widget()))
        {
        switch( e->type())
            {
            case TQEvent::MouseButtonPress:
	        { // FRAME
                processMousePressEvent( TQT_TQMOUSEEVENT( e ));
        	return true;
	        }
            case TQEvent::Show:
                break;
            case TQEvent::Hide:
                break;
            default:
                break;
            }
        }
    return false;
    }
Exemple #6
0
bool Decoration::eventFilter(QObject *o, QEvent *e)
{
    if(o == widget())
    {
        switch(e->type())
        {
            case QEvent::MouseButtonPress:
            { // FRAME
                processMousePressEvent(static_cast< QMouseEvent * >(e));
                return true;
            }
            case QEvent::Show:
                break;
            case QEvent::Hide:
                break;
            default:
                break;
        }
    }
    return false;
}