예제 #1
0
파일: controller.cpp 프로젝트: r1k/vlc
void FullscreenControllerWidget::restoreFSC()
{
    if( !isWideFSC )
    {
        /* Restore half-bar and re-centre if needed */
        setMinimumWidth( FSC_WIDTH );
        adjustSize();

        QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() );

        if( currentRes == screenRes &&
            QApplication::desktop()->screen()->geometry().contains( previousPosition, true ) )
        {
            /* Restore to the last known position */
            move( previousPosition );
        }
        else
        {
            /* FSC is out of screen or screen resolution changed */
            msg_Dbg( p_intf, "Recentering the Fullscreen Controller" );
            centerFSC( targetScreen() );
            screenRes = currentRes;
            previousPosition = pos();
        }
    }
    else
    {
        /* Dock at the bottom of the screen */
        updateFullwidthGeometry( targetScreen() );
    }
}
예제 #2
0
int FullscreenControllerWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = AbstractController::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: keyPressed((*reinterpret_cast< QKeyEvent*(*)>(_a[1]))); break;
        case 1: setVoutList((*reinterpret_cast< vout_thread_t**(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 2: showFSC(); break;
        case 3: planHideFSC(); break;
        case 4: hideFSC(); break;
        case 5: slowHideFSC(); break;
        case 6: centerFSC((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 7;
    }
    return _id;
}