Пример #1
0
/**
 * Tools, like Media Information, Preferences or Messages
 **/
QMenu *QVLCMenu::ToolsMenu( QMenu *menu )
{
    addDPStaticEntry( menu, qtr( "&Effects and Filters"), ":/menu/settings",
            SLOT( extendedDialog() ), "Ctrl+E" );

    addDPStaticEntry( menu, qtr( "&Track Synchronization"), ":/menu/settings",
            SLOT( synchroDialog() ), "" );

    addDPStaticEntry( menu, qtr( I_MENU_INFO ) , ":/menu/info",
        SLOT( mediaInfoDialog() ), "Ctrl+I" );
    addDPStaticEntry( menu, qtr( I_MENU_CODECINFO ) ,
        ":/menu/info", SLOT( mediaCodecDialog() ), "Ctrl+J" );

    addDPStaticEntry( menu, qtr( I_MENU_BOOKMARK ),"",
                      SLOT( bookmarksDialog() ), "Ctrl+B" );
#ifdef ENABLE_VLM
    addDPStaticEntry( menu, qtr( I_MENU_VLM ), "", SLOT( vlmDialog() ),
        "Ctrl+W" );
#endif

    addDPStaticEntry( menu, qtr( I_MENU_MSG ),
        ":/menu/messages", SLOT( messagesDialog() ),
        "Ctrl+M" );

    addDPStaticEntry( menu, qtr( "Plu&gins and extensions" ),
        "", SLOT( pluginDialog() ) );
    menu->addSeparator();

    addDPStaticEntry( menu, qtr( "&Preferences" ),
        ":/menu/preferences", SLOT( prefsDialog() ), "Ctrl+P" );

    return menu;
}
Пример #2
0
/**
 * Help/About Menu
**/
QMenu *QVLCMenu::HelpMenu( QWidget *parent )
{
    QMenu *menu = new QMenu( parent );
    addDPStaticEntry( menu, qtr( "&Help..." ) ,
        ":/menu/help", SLOT( helpDialog() ), "F1" );
#ifdef UPDATE_CHECK
    addDPStaticEntry( menu, qtr( "Check for &Updates..." ) , "",
                      SLOT( updateDialog() ) );
#endif
    menu->addSeparator();
    addDPStaticEntry( menu, qtr( I_MENU_ABOUT ), ":/menu/info",
            SLOT( aboutDialog() ), "Shift+F1" );
    return menu;
}
Пример #3
0
void QVLCMenu::PopupMenuStaticEntries( QMenu *menu )
{
    QMenu *openmenu = new QMenu( qtr( "Open Media" ), menu );
    addDPStaticEntry( openmenu, qtr( "&Open File..." ),
        ":/type/file-asym", SLOT( openFileDialog() ) );
    addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ),
        ":/type/folder-grey", SLOT( PLOpenDir() ) );
    addDPStaticEntry( openmenu, qtr( "Open &Disc..." ),
        ":/type/disc", SLOT( openDiscDialog() ) );
    addDPStaticEntry( openmenu, qtr( "Open &Network..." ),
        ":/type/network", SLOT( openNetDialog() ) );
    addDPStaticEntry( openmenu, qtr( "Open &Capture Device..." ),
        ":/type/capture-card", SLOT( openCaptureDialog() ) );
    menu->addMenu( openmenu );

    menu->addSeparator();
#if 0
    QMenu *helpmenu = HelpMenu( menu );
    helpmenu->setTitle( qtr( "Help" ) );
    menu->addMenu( helpmenu );
#endif

    addDPStaticEntry( menu, qtr( "Quit" ), ":/menu/quit",
                      SLOT( quit() ), "Ctrl+Q" );
}
Пример #4
0
void QVLCMenu::updateSystrayMenu( MainInterface *mi,
                                  intf_thread_t *p_intf,
                                  bool b_force_visible )
{
    POPUP_BOILERPLATE;

    /* Get the systray menu and clean it */
    QMenu *sysMenu = mi->getSysTrayMenu();
    sysMenu->clear();

    /* Hide / Show VLC and cone */
    if( mi->isVisible() || b_force_visible )
    {
        sysMenu->addAction( QIcon( ":/logo/vlc16.png" ),
                            qtr( "Hide VLC media player in taskbar" ), mi,
                            SLOT( toggleUpdateSystrayMenu() ) );
    }
    else
    {
        sysMenu->addAction( QIcon( ":/logo/vlc16.png" ),
                            qtr( "Show VLC media player" ), mi,
                            SLOT( toggleUpdateSystrayMenu() ) );
    }

    sysMenu->addSeparator();
    PopupPlayEntries( sysMenu, p_intf, p_input );
    PopupMenuPlaylistControlEntries( sysMenu, p_intf);
    PopupMenuControlEntries( sysMenu, p_intf);

    sysMenu->addSeparator();
    addDPStaticEntry( sysMenu, qtr( "&Open Media" ),
            ":/type/file-wide", SLOT( openFileDialog() ) );
    addDPStaticEntry( sysMenu, qtr( "&Quit" ) ,
            ":/menu/quit", SLOT( quit() ) );

    /* Set the menu */
    mi->getSysTray()->setContextMenu( sysMenu );
}
Пример #5
0
/**
 * Tools, like Media Information, Preferences or Messages
 **/
QMenu *VLCMenuBar::ToolsMenu( QMenu *menu )
{
    addDPStaticEntry( menu, qtr( "&Effects and Filters"), ":/menu/settings",
            SLOT( extendedDialog() ), "Ctrl+E" );

    addDPStaticEntry( menu, qtr( "&Track Synchronization"), ":/menu/settings",
            SLOT( synchroDialog() ), "" );

    addDPStaticEntry( menu, qtr( I_MENU_INFO ) , ":/menu/info",
        SLOT( mediaInfoDialog() ), "Ctrl+I" );
    addDPStaticEntry( menu, qtr( I_MENU_CODECINFO ) ,
        ":/menu/info", SLOT( mediaCodecDialog() ), "Ctrl+J" );

#ifdef ENABLE_VLM
    addDPStaticEntry( menu, qtr( I_MENU_VLM ), "", SLOT( vlmDialog() ),
        "Ctrl+Shift+W" );
#endif

    addDPStaticEntry( menu, qtr( "Program Guide" ), "", SLOT( epgDialog() ),
        "" );

    addDPStaticEntry( menu, qtr( I_MENU_MSG ),
        ":/menu/messages", SLOT( messagesDialog() ), "Ctrl+M" );

    addDPStaticEntry( menu, qtr( "Plu&gins and extensions" ),
        "", SLOT( pluginDialog() ) );
    menu->addSeparator();

    addDPStaticEntry( menu, qtr( "Customi&ze Interface..." ),
        ":/menu/preferences", SLOT( toolbarDialog() ) );

    addDPStaticEntry( menu, qtr( "&Preferences" ),
        ":/menu/preferences", SLOT( prefsDialog() ), "Ctrl+P", QAction::PreferencesRole );

    return menu;
}
Пример #6
0
/**
 * Main Video Menu
 * Subtitles are part of Video.
 **/
QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
{
    vout_thread_t *p_vout;
    input_thread_t *p_input;
    vector<vlc_object_t *> objects;
    vector<const char *> varnames;

    if( current->isEmpty() )
    {
        ACT_ADDMENU( current, "video-es", qtr( "Video &Track" ) );

        QAction *action;
        QMenu *submenu = new QMenu( qtr( "&Subtitles Track" ), current );
        action = current->addMenu( submenu );
        action->setData( "spu-es" );
        addDPStaticEntry( submenu, qtr( "Open File..." ), "",
                          SLOT( loadSubtitlesFile() ) );
        submenu->addSeparator();
        current->addSeparator();

        ACT_ADDCHECK( current, "fullscreen", qtr( "&Fullscreen" ) );
        ACT_ADDCHECK( current, "video-on-top", qtr( "Always &On Top" ) );
#ifdef WIN32
        ACT_ADDCHECK( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) );
#endif
        ACT_ADD( current, "video-snapshot", qtr( "Sna&pshot" ) );

        current->addSeparator();

        ACT_ADDMENU( current, "zoom", qtr( "&Zoom" ) );
        ACT_ADDCHECK( current, "autoscale", qtr( "Sca&le" ) );
        ACT_ADDMENU( current, "aspect-ratio", qtr( "&Aspect Ratio" ) );
        ACT_ADDMENU( current, "crop", qtr( "&Crop" ) );
        ACT_ADDMENU( current, "deinterlace", qtr( "&Deinterlace" ) );
        ACT_ADDMENU( current, "postprocess", qtr( "&Post processing" ) );
    }

    p_input = THEMIM->getInput();

    p_vout = THEMIM->getVout();
    VideoAutoMenuBuilder( p_vout, p_input, objects, varnames );

    if( p_vout )
        vlc_object_release( p_vout );

    return Populate( p_intf, current, varnames, objects );
}
Пример #7
0
void QVLCMenu::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf )
{
    QAction *action;

    /* Faster/Slower */
    action = menu->addAction( qtr( "&Faster" ), THEMIM->getIM(),
                              SLOT( faster() ) );
    action->setIcon( QIcon( ":/toolbar/faster") );
    action->setData( STATIC_ENTRY );

    action = menu->addAction( qtr( "Faster (fine)" ), THEMIM->getIM(),
                              SLOT( littlefaster() ) );
    action->setData( STATIC_ENTRY );

    action = menu->addAction( qtr( "N&ormal Speed" ), THEMIM->getIM(),
                              SLOT( normalRate() ) );
    action->setData( STATIC_ENTRY );

    action = menu->addAction( qtr( "Slower (fine)" ), THEMIM->getIM(),
                              SLOT( littleslower() ) );
    action->setData( STATIC_ENTRY );

    action = menu->addAction( qtr( "Slo&wer" ), THEMIM->getIM(),
                              SLOT( slower() ) );
    action->setIcon( QIcon( ":/toolbar/slower") );
    action->setData( STATIC_ENTRY );

    menu->addSeparator();

    action = menu->addAction( qtr( "&Jump Forward" ), THEMIM->getIM(),
             SLOT( jumpFwd() ) );
    action->setIcon( QIcon( ":/toolbar/skip_fw") );
    action->setData( STATIC_ENTRY );

    action = menu->addAction( qtr( "Jump Bac&kward" ), THEMIM->getIM(),
             SLOT( jumpBwd() ) );
    action->setIcon( QIcon( ":/toolbar/skip_back") );
    action->setData( STATIC_ENTRY );
    addDPStaticEntry( menu, qtr( I_MENU_GOTOTIME ),"",
                      SLOT( gotoTimeDialog() ), "Ctrl+T" );
    menu->addSeparator();
}
Пример #8
0
/**
 * Navigation Menu
 * For DVD, MP4, MOV and other chapter based format
 **/
QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
{
    QAction *action;

    QMenu *submenu = new QMenu( qtr( "&Bookmarks" ), menu );
    addDPStaticEntry( submenu, qtr( "Manage &bookmarks" ), "",
                      SLOT( bookmarksDialog() ) );
    submenu->addSeparator();
    action = menu->addMenu( submenu );
    action->setData( "bookmark" );

    ACT_ADDMENU( menu, "title", qtr( "T&itle" ) );
    ACT_ADDMENU( menu, "chapter", qtr( "&Chapter" ) );
    ACT_ADDMENU( menu, "navigation", qtr( "&Navigation" ) );
    ACT_ADDMENU( menu, "program", qtr( "&Program" ) );

    menu->addSeparator();
    PopupMenuPlaylistControlEntries( menu, p_intf );
    PopupMenuControlEntries( menu, p_intf );

    EnableStaticEntries( menu, ( THEMIM->getInput() != NULL ) );
    return RebuildNavigMenu( p_intf, menu );
}
Пример #9
0
/**
 * Media ( File ) Menu
 * Opening, streaming and quit
 **/
QMenu *VLCMenuBar::FileMenu( intf_thread_t *p_intf, QWidget *parent, MainInterface *mi )
{
    QMenu *menu = new QMenu( parent );
    QAction *action;

    addDPStaticEntry( menu, qtr( "Open &File..." ),
        ":/type/file-asym", SLOT( simpleOpenDialog() ), "Ctrl+O" );
    addDPStaticEntry( menu, qtr( I_OP_OPDIR ),
        ":/type/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
    addDPStaticEntry( menu, qtr( "Open &Disc..." ),
        ":/type/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
    addDPStaticEntry( menu, qtr( "Open &Network Stream..." ),
        ":/type/network", SLOT( openNetDialog() ), "Ctrl+N" );
    addDPStaticEntry( menu, qtr( "Open &Capture Device..." ),
        ":/type/capture-card", SLOT( openCaptureDialog() ), "Ctrl+C" );

    menu->addSeparator();

    addDPStaticEntry( menu, qtr( "&Open (advanced)..." ),
        ":/type/file-asym", SLOT( openFileDialog() ), "Ctrl+Shift+O" );
    menu->addSeparator();

    addDPStaticEntry( menu, qtr( "Open &Location from clipboard" ),
                      NULL, SLOT( openUrlDialog() ), "Ctrl+V" );

    if( var_InheritBool( p_intf, "qt-recentplay" ) )
    {
        recentsMenu = new QMenu( qtr( "Open &Recent Media" ), menu );
        updateRecents( p_intf );
        menu->addMenu( recentsMenu );
    }
    menu->addSeparator();

    addDPStaticEntry( menu, qtr( I_PL_SAVE ), "", SLOT( saveAPlaylist() ),
        "Ctrl+Y" );
    menu->addSeparator();

#ifdef ENABLE_SOUT
    addDPStaticEntry( menu, qtr( "Conve&rt / Save..." ), "",
        SLOT( openAndTranscodingDialogs() ), "Ctrl+R" );
    addDPStaticEntry( menu, qtr( "&Stream..." ),
        ":/menu/stream", SLOT( openAndStreamingDialogs() ), "Ctrl+S" );
    menu->addSeparator();
#endif

    action = addMIMStaticEntry( p_intf, menu, qtr( "Quit at the end of playlist" ), "",
                               SLOT( activatePlayQuit( bool ) ) );
    action->setCheckable( true );
    action->setChecked( THEMIM->getPlayExitState() );

    if( mi->getSysTray() )
    {
        action = menu->addAction( qtr( "Close to systray"), mi,
                                 SLOT( toggleUpdateSystrayMenu() ) );
    }

    addDPStaticEntry( menu, qtr( "&Quit" ) ,
        ":/menu/quit", SLOT( quit() ), "Ctrl+Q" );
    return menu;
}
Пример #10
0
/**
 * View Menu
 * Interface Modification
 **/
QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
                            MainInterface *mi,
                            bool with_intf )
{
    assert( mi );

    QMenu *menu = new QMenu( qtr( "V&iew" ), mi );

    QAction *act = menu->addAction( QIcon( ":/menu/playlist_menu" ),
            qtr( "Play&list" ), mi,
            SLOT( togglePlaylist() ), qtr( "Ctrl+L" ) );

    /*menu->addSeparator();
    menu->addAction( qtr( "Undock from Interface" ), mi,
                     SLOT( undockPlaylist() ), qtr( "Ctrl+U" ) );*/

    menu->addSeparator();

    if( with_intf )
    {
        QMenu *intfmenu = InterfacesMenu( p_intf, menu );
        MenuFunc *f = new MenuFunc( intfmenu, 4 );
        CONNECT( intfmenu, aboutToShow(), THEDP->menusUpdateMapper, map() );
        THEDP->menusUpdateMapper->setMapping( intfmenu, f );
        menu->addSeparator();
    }

    /* Minimal View */
    QAction *action = menu->addAction( qtr( "Mi&nimal View" ) );
    action->setShortcut( qtr( "Ctrl+H" ) );
    action->setCheckable( true );
    action->setChecked( !with_intf &&
            (mi->getControlsVisibilityStatus() & CONTROLS_HIDDEN ) );

    CONNECT( action, triggered( bool ), mi, toggleMinimalView( bool ) );
    CONNECT( mi, minimalViewToggled( bool ), action, setChecked( bool ) );

    /* FullScreen View */
    action = menu->addAction( qtr( "&Fullscreen Interface" ), mi,
            SLOT( toggleFullScreen() ), QString( "F11" ) );
    action->setCheckable( true );
    action->setChecked( mi->isFullScreen() );
    CONNECT( mi, fullscreenInterfaceToggled( bool ),
             action, setChecked( bool ) );

    /* Advanced Controls */
    action = menu->addAction( qtr( "&Advanced Controls" ), mi,
            SLOT( toggleAdvanced() ) );
    action->setCheckable( true );
    if( mi->getControlsVisibilityStatus() & CONTROLS_ADVANCED )
        action->setChecked( true );

    if( with_intf )
    // I don't want to manage consistency between menus, so no popup-menu
    {
        action = menu->addAction( qtr( "Quit after Playback" ) );
        action->setCheckable( true );
        CONNECT( action, triggered( bool ), THEMIM, activatePlayQuit( bool ) );
    }

#if 0 /* For Visualisations. Not yet working */
    adv = menu->addAction( qtr( "Visualizations selector" ),
            mi, SLOT( visual() ) );
    adv->setCheckable( true );
    if( visual_selector_enabled ) adv->setChecked( true );
#endif

    menu->addSeparator();
    addDPStaticEntry( menu, qtr( "Customi&ze Interface..." ),
        ":/menu/preferences", SLOT( toolbarDialog() ) );
    menu->addSeparator();

    return menu;
}
Пример #11
0
/**
 * Media ( File ) Menu
 * Opening, streaming and quit
 **/
QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf, QWidget *parent )
{
    QMenu *menu = new QMenu( parent );

    addDPStaticEntry( menu, qtr( "&Open File..." ),
        ":/type/file-asym", SLOT( simpleOpenDialog() ), "Ctrl+O" );
    addDPStaticEntry( menu, qtr( "Advanced Open File..." ),
        ":/type/file-asym", SLOT( openFileDialog() ), "Ctrl+Shift+O" );
    addDPStaticEntry( menu, qtr( I_OPEN_FOLDER ),
        ":/type/folder-grey", SLOT( PLOpenDir() ), "Ctrl+F" );
    addDPStaticEntry( menu, qtr( "Open &Disc..." ),
        ":/type/disc", SLOT( openDiscDialog() ), "Ctrl+D" );
    addDPStaticEntry( menu, qtr( "Open &Network Stream..." ),
        ":/type/network", SLOT( openNetDialog() ), "Ctrl+N" );
    addDPStaticEntry( menu, qtr( "Open &Capture Device..." ),
        ":/type/capture-card", SLOT( openCaptureDialog() ),
        "Ctrl+C" );

    menu->addSeparator();
    addDPStaticEntry( menu, qtr( "Open &Location from clipboard" ),
                      NULL, SLOT( openUrlDialog() ), "Ctrl+V" );

    if( config_GetInt( p_intf, "qt-recentplay" ) )
    {
        recentsMenu = new QMenu( qtr( "&Recent Media" ), menu );
        updateRecents( p_intf );
        menu->addMenu( recentsMenu );
    }
    menu->addMenu( SDMenu( p_intf, menu ) );
    menu->addSeparator();

    addDPStaticEntry( menu, qtr( I_PL_SAVE ), "", SLOT( saveAPlaylist() ),
        "Ctrl+Y" );
    menu->addSeparator();

#ifdef ENABLE_SOUT
    addDPStaticEntry( menu, qtr( "Conve&rt / Save..." ), "",
        SLOT( openAndTranscodingDialogs() ), "Ctrl+R" );
    addDPStaticEntry( menu, qtr( "&Streaming..." ),
        ":/menu/stream", SLOT( openAndStreamingDialogs() ),
        "Ctrl+S" );
    menu->addSeparator();
#endif

    addDPStaticEntry( menu, qtr( "&Quit" ) ,
        ":/menu/quit", SLOT( quit() ), "Ctrl+Q" );
    return menu;
}