コード例 #1
0
ファイル: controller.cpp プロジェクト: r1k/vlc
/* Reemit some signals on status Change to activate some buttons */
void AbstractController::setStatus( int status )
{
    bool b_hasInput = THEMIM->getIM()->hasInput();
    /* Activate the interface buttons according to the presence of the input */
    emit inputExists( b_hasInput );

    emit inputPlaying( status == PLAYING_S );

    emit inputIsRecordable( b_hasInput &&
                            var_GetBool( THEMIM->getInput(), "can-record" ) );

    emit inputIsTrickPlayable( b_hasInput &&
                            var_GetBool( THEMIM->getInput(), "can-rewind" ) );
}
コード例 #2
0
int AbstractController::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QFrame::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: inputExists((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 1: inputPlaying((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 2: inputIsRecordable((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 3: inputIsTrickPlayable((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 4: setStatus((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 5;
    }
    return _id;
}