Logo Search packages:      
Sourcecode: lastfm version File versions  Download package

void TrayIcon::mousePressEvent ( QMouseEvent *  e  )  [protected, virtual]

This event handler can be reimplemented in a subclass to receive mouse press events for the system tray entry.

See also:
mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), QMouseEvent

Definition at line 203 of file trayicon.cpp.

Referenced by event().

{
#ifndef Q_WS_WIN
// This is for X11, menus appear on mouse press
// I'm not sure whether Mac should be here or below.. Somebody check?
        switch ( e->button() ) {
                case Qt::RightButton:
                        if ( pop ) {
                                pop->popup( e->globalPos() );
                                e->accept();
                        }
                        break;
                case Qt::LeftButton:
                case Qt::MidButton:
                        emit clicked( e->globalPos(), e->button() );
                        break;
                default:
                        break;
        }
#endif
        e->ignore();
}


Generated by  Doxygen 1.6.0   Back to index