vlc_linux/vlc-3.0.16/modules/gui/qt/input_manager.cpp
/* Convert the event from the callbacks in actions */
Convert the event from the callbacks in actions
Convert the event from the callbacks in actions
void InputManager::customEvent( QEvent *event )
{
    int i_type = event->type();
    IMEvent *ple = static_cast<IMEvent *>(event);
    if( i_type == IMEvent::ItemChanged )
        UpdateMeta( ple->item() );
    if( !hasInput() )
        return;
    switch( i_type )
    {
    case IMEvent::PositionUpdate:
        UpdatePosition();
        break;
    case IMEvent::StatisticsUpdate:
        UpdateStats();
        break;
    case IMEvent::ItemChanged:
        if( p_item == ple->item() )
        {
            UpdateStatus();
            UpdateName();
            UpdateArt();
            UpdateMeta();
        }
        break;
    case IMEvent::ItemStateChanged:
        UpdateStatus();
        break;
    case IMEvent::MetaChanged:
        UpdateMeta();
        UpdateName(); 
        UpdateArt(); 
        break;
    case IMEvent::InfoChanged:
        UpdateInfo();
        break;
    case IMEvent::ItemTitleChanged:
        UpdateNavigation();
        UpdateName(); 
        break;
    case IMEvent::ItemRateChanged:
        UpdateRate();
        break;
    case IMEvent::ItemEsChanged:
        UpdateTeletext();
        break;
    case IMEvent::ItemTeletextChanged:
        UpdateTeletext();
        break;
    case IMEvent::InterfaceVoutUpdate:
        UpdateVout();
        break;
    case IMEvent::SynchroChanged:
        emit synchroChanged();
        break;
    case IMEvent::CachingEvent:
        UpdateCaching();
        break;
    case IMEvent::BookmarksChanged:
        emit bookmarksChanged();
        break;
    case IMEvent::InterfaceAoutUpdate:
        UpdateAout();
        break;
    case IMEvent::RecordingEvent:
        UpdateRecord();
        break;
    case IMEvent::ProgramChanged:
        UpdateProgramEvent();
        break;
    case IMEvent::EPGEvent:
        UpdateEPG();
        break;
    default:
        msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
        vlc_assert_unreachable();
    }
}
void InputManager :: customEvent ( QEvent * event ) { int i_type = event -> type ( ) ; IMEvent * ple = static_cast < IMEvent * > ( event ) ; if ( i_type == IMEvent :: ItemChanged ) UpdateMeta ( ple -> item ( ) ) ; if ( ! hasInput ( ) ) return ; switch ( i_type ) { case IMEvent :: PositionUpdate : UpdatePosition ( ) ; break ; case IMEvent :: StatisticsUpdate : UpdateStats ( ) ; break ; case IMEvent :: ItemChanged : if ( p_item == ple -> item ( ) ) { UpdateStatus ( ) ; UpdateName ( ) ; UpdateArt ( ) ; UpdateMeta ( ) ; } break ; case IMEvent :: ItemStateChanged : UpdateStatus ( ) ; break ; case IMEvent :: MetaChanged : UpdateMeta ( ) ; UpdateName ( ) ; UpdateArt ( ) ; break ; case IMEvent :: InfoChanged : UpdateInfo ( ) ; break ; case IMEvent :: ItemTitleChanged : UpdateNavigation ( ) ; UpdateName ( ) ; break ; case IMEvent :: ItemRateChanged : UpdateRate ( ) ; break ; case IMEvent :: ItemEsChanged : UpdateTeletext ( ) ; break ; case IMEvent :: ItemTeletextChanged : UpdateTeletext ( ) ; break ; case IMEvent :: InterfaceVoutUpdate : UpdateVout ( ) ; break ; case IMEvent :: SynchroChanged : emit synchroChanged ( ) ; break ; case IMEvent :: CachingEvent : UpdateCaching ( ) ; break ; case IMEvent :: BookmarksChanged : emit bookmarksChanged ( ) ; break ; case IMEvent :: InterfaceAoutUpdate : UpdateAout ( ) ; break ; case IMEvent :: RecordingEvent : UpdateRecord ( ) ; break ; case IMEvent :: ProgramChanged : UpdateProgramEvent ( ) ; break ; case IMEvent :: EPGEvent : UpdateEPG ( ) ; break ; default : msg_Warn ( p_intf , " " , i_type ) ; vlc_assert_unreachable ( ) ; } }
Convert the event from the callbacks in actions
Convert the event from the callbacks in actions
/* Actions */ /* Ignore ItemChanged_Type event that does not apply to our input */ /* Update duration of file */ /* Needed for NowPlaying */ /* Art is part of meta in the core */ /* Display the name of the Chapter, if exists */ // We don't do anything ES related. Why ?