diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index f6af67114ab89ba88d757cc41d77f3bc1179a772..77198a653fe65d46f9ca05ceb69c4ecad235570e 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -65,7 +65,6 @@ libqt_plugin_la_SOURCES = \
 	gui/qt/dialogs/plugins/addons_manager.cpp gui/qt/dialogs/plugins/addons_manager.hpp \
 	gui/qt/dialogs/help/help.cpp gui/qt/dialogs/help/help.hpp \
 	gui/qt/dialogs/gototime/gototime.cpp gui/qt/dialogs/gototime/gototime.hpp \
-	gui/qt/dialogs/toolbar/toolbar.cpp gui/qt/dialogs/toolbar/toolbar.hpp \
 	gui/qt/dialogs/toolbar/toolbareditor.cpp gui/qt/dialogs/toolbar/toolbareditor.hpp \
 	gui/qt/dialogs/open/open.cpp gui/qt/dialogs/open/open.hpp \
 	gui/qt/dialogs/open/openurl.cpp gui/qt/dialogs/open/openurl.hpp \
@@ -102,9 +101,6 @@ libqt_plugin_la_SOURCES = \
 	gui/qt/dialogs/open/open_panels.cpp gui/qt/dialogs/open/open_panels.hpp \
 	gui/qt/components/interface_widgets.cpp \
 	gui/qt/components/interface_widgets.hpp \
-	gui/qt/components/controller.cpp gui/qt/components/controller.hpp \
-	gui/qt/components/controller_widget.cpp \
-	gui/qt/components/controller_widget.hpp \
 	gui/qt/components/recent_media_model.cpp  \
 	gui/qt/components/recent_media_model.hpp \
 	gui/qt/components/settings.cpp \
@@ -247,7 +243,6 @@ nodist_libqt_plugin_la_SOURCES = \
 	gui/qt/dialogs/plugins/plugins.moc.cpp \
 	gui/qt/dialogs/help/help.moc.cpp \
 	gui/qt/dialogs/gototime/gototime.moc.cpp \
-	gui/qt/dialogs/toolbar/toolbar.moc.cpp \
 	gui/qt/dialogs/toolbar/toolbareditor.moc.cpp \
 	gui/qt/dialogs/open/open.moc.cpp \
 	gui/qt/dialogs/open/openurl.moc.cpp \
@@ -270,8 +265,6 @@ nodist_libqt_plugin_la_SOURCES = \
 	gui/qt/dialogs/open/open_panels.moc.cpp \
 	gui/qt/components/interface_widgets.moc.cpp \
 	gui/qt/components/navigation_history.moc.cpp \
-	gui/qt/components/controller.moc.cpp \
-	gui/qt/components/controller_widget.moc.cpp \
 	gui/qt/menus/custom_menus.moc.cpp \
 	gui/qt/components/recent_media_model.moc.cpp \
 	gui/qt/components/selectable_list_model.moc.cpp \
diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp
deleted file mode 100644
index 6a7199872b972e8740ad49620e35bc08ffcf7c3a..0000000000000000000000000000000000000000
--- a/modules/gui/qt/components/controller.cpp
+++ /dev/null
@@ -1,1254 +0,0 @@
-/*****************************************************************************
- * controller.cpp : Controller for the main interface
- ****************************************************************************
- * Copyright (C) 2006-2009 the VideoLAN team
- *
- * Authors: Jean-Baptiste Kempf <jb@videolan.org>
- *          Ilkka Ollakka <ileoo@videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * ( at your option ) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-/* Widgets */
-#include "components/controller.hpp"
-#include "components/controller_widget.hpp"
-#include "components/interface_widgets.hpp"
-#include "util/buttons/DeckButtonsLayout.hpp"
-#include "util/buttons/BrowseButton.hpp"
-#include "util/buttons/RoundButton.hpp"
-
-#include "dialogs/dialogs_provider.hpp"                     /* Opening Dialogs */
-#include "playlist/playlist_controller.hpp"
-
-#include "util/input_slider.hpp"                         /* SeekSlider */
-#include "util/customwidgets.hpp"                       /* qEventToKey */
-
-#include <QToolButton>
-#include <QHBoxLayout>
-#include <QRegion>
-#include <QSignalMapper>
-#include <QTimer>
-#include <QApplication>
-#include <QWindow>
-#include <QScreen>
-
-//#define DEBUG_LAYOUT 1
-
-/**********************************************************************
- * TEH controls
- **********************************************************************/
-
-using namespace vlc::playlist;
-
-/******
- * This is an abstract Toolbar/Controller
- * This has helper to create any toolbar, any buttons and to manage the actions
- *
- *****/
-AbstractController::AbstractController( intf_thread_t * _p_i, QWidget *_parent )
-                   : QFrame( _parent )
-{
-    p_intf = _p_i;
-    advControls = NULL;
-    buttonGroupLayout = NULL;
-
-    connect( THEMIM, &PlayerController::playingStateChanged, this, &AbstractController::setStatus);
-
-    setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
-}
-
-/* Reemit some signals on status Change to activate some buttons */
-void AbstractController::setStatus( PlayerController::PlayingState status )
-{
-    bool b_hasInput = THEMIM->hasInput();
-    /* Activate the interface buttons according to the presence of the input */
-    emit inputExists( b_hasInput );
-
-    emit inputPlaying( status == PlayerController::PLAYING_STATE_PLAYING );
-
-    emit inputIsTrickPlayable( b_hasInput && THEMIM->isRewindable() );
-}
-
-void AbstractController::playAction()
-{
-    if( THEMPL->isEmpty() )
-        THEDP->openFileDialog();
-    else
-        THEMPL->togglePlayPause();
-}
-
-void AbstractController::playlistAction()
-{
-
-}
-
-void AbstractController::fullwidthAction()
-{
-
-}
-
-
-/* Generic button setup */
-void AbstractController::setupButton( QAbstractButton *aButton )
-{
-    static QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
-    sizePolicy.setHorizontalStretch( 0 );
-    sizePolicy.setVerticalStretch( 0 );
-
-    aButton->setSizePolicy( sizePolicy );
-    aButton->setFixedSize( QSize( 26, 26 ) );
-    aButton->setIconSize( QSize( 20, 20 ) );
-    aButton->setFocusPolicy( Qt::NoFocus );
-}
-
-/* Open the generic config line for the toolbar, parse it
- * and create the widgets accordingly */
-void AbstractController::parseAndCreate( const QString& config,
-                                         QBoxLayout *newControlLayout )
-{
-    QStringList list = config.split( ";", QString::SkipEmptyParts ) ;
-    for( int i = 0; i < list.count(); i++ )
-    {
-        QStringList list2 = list.at( i ).split( "-" );
-        if( list2.count() < 1 )
-        {
-            msg_Warn( p_intf, "Parsing error 1. Please, report this." );
-            continue;
-        }
-
-        bool ok;
-        int i_option = WIDGET_NORMAL;
-        buttonType_e i_type = (buttonType_e)list2.at( 0 ).toInt( &ok );
-        if( !ok )
-        {
-            msg_Warn( p_intf, "Parsing error 2. Please, report this." );
-            continue;
-        }
-
-        if( list2.count() > 1 )
-        {
-            i_option = list2.at( 1 ).toInt( &ok );
-            if( !ok )
-            {
-                msg_Warn( p_intf, "Parsing error 3. Please, report this." );
-                continue;
-            }
-        }
-
-        createAndAddWidget( newControlLayout, -1, i_type, i_option );
-    }
-
-    if( buttonGroupLayout )
-    {
-        newControlLayout->addLayout( buttonGroupLayout );
-        buttonGroupLayout = NULL;
-    }
-}
-
-void AbstractController::createAndAddWidget( QBoxLayout *controlLayout_,
-                                             int i_index,
-                                             buttonType_e i_type,
-                                             int i_option )
-{
-    VLC_UNUSED( i_index ); // i_index should only be required for edition
-
-    /* Close the current buttonGroup if we have a special widget or a spacer */
-    if( buttonGroupLayout && i_type > BUTTON_MAX )
-    {
-        controlLayout_->addLayout( buttonGroupLayout );
-        buttonGroupLayout = NULL;
-    }
-
-    /* Special case for SPACERS, who aren't QWidgets */
-    if( i_type == WIDGET_SPACER )
-    {
-        controlLayout_->addSpacing( 12 );
-    }
-    else if(  i_type == WIDGET_SPACER_EXTEND )
-    {
-        controlLayout_->addStretch( 12 );
-    }
-    else
-    {
-        /* Create the widget */
-        QWidget *widg = createWidget( i_type, i_option );
-        if( !widg ) return;
-
-        /* Buttons */
-        if( i_type < BUTTON_MAX )
-        {
-            if( !buttonGroupLayout )
-            {
-                buttonGroupLayout = new QHBoxLayout;
-
-            }
-            buttonGroupLayout->addWidget( widg );
-        }
-        else /* Special widgets */
-        {
-            controlLayout_->addWidget( widg );
-        }
-    }
-}
-
-#define BUTTON_SET_BAR( a_button ) \
-    a_button->setToolTip( qtr( tooltipL[button] ) ); \
-    a_button->setIcon( QIcon( iconL[button] ) );
-#define BUTTON_SET_BAR2( button, image, tooltip ) \
-    button->setToolTip( tooltip );          \
-    button->setIcon( QIcon( ":/"#image ".svg" ) );
-
-#define ENABLE_ON_VIDEO( a ) \
-    connect( THEMIM, &PlayerController::hasVideoOutputChanged, a, &QToolButton::setEnabled ); \
-    a->setEnabled( THEMIM->hasVideoOutput() ); /* TODO: is this necessary? when input is started before the interface? */
-
-#define ENABLE_ON_INPUT( a ) \
-    connect( this, &AbstractController::inputExists, a, &QToolButton::setEnabled ); \
-    a->setEnabled( THEMIM->hasInput() ); /* TODO: is this necessary? when input is started before the interface? */
-
-#define NORMAL_BUTTON( name, actionReceiver, actionSlot ) \
-    QToolButton * name ## Button = new QToolButton;     \
-    setupButton( name ## Button );                      \
-    connect( name ## Button, &QToolButton::clicked, actionReceiver, actionSlot ); \
-    BUTTON_SET_BAR( name ## Button );                   \
-    widget = name ## Button;
-
-QWidget *AbstractController::createWidget( buttonType_e button, int options )
-{
-    bool b_flat  = options & WIDGET_FLAT;
-    bool b_big   = options & WIDGET_BIG;
-    bool b_shiny = options & WIDGET_SHINY;
-    bool b_special = false;
-
-    QWidget *widget = NULL;
-    switch( button )
-    {
-    case PLAY_BUTTON: {
-        PlayButton *playButton = new PlayButton;
-        setupButton( playButton );
-        BUTTON_SET_BAR(  playButton );
-        connect( playButton, &PlayButton::clicked, this, &AbstractController::playAction  );
-        connect( this, &AbstractController::inputPlaying, playButton, &PlayButton::updateButtonIcons );
-        playButton->updateButtonIcons( THEMIM->getPlayingState() == PlayerController::PLAYING_STATE_PLAYING );
-        widget = playButton;
-        }
-        break;
-    case STOP_BUTTON:{
-        NORMAL_BUTTON( STOP, THEMPL, &PlaylistControllerModel::stop );
-        }
-        break;
-    case OPEN_BUTTON:{
-        NORMAL_BUTTON( OPEN, THEDP, QOverload<>::of(&DialogsProvider::openDialog));
-        }
-        break;
-    case OPEN_SUB_BUTTON:{
-        NORMAL_BUTTON( OPEN_SUB, THEDP, &DialogsProvider::loadSubtitlesFile);
-        }
-        break;
-    case PREVIOUS_BUTTON:{
-        NORMAL_BUTTON( PREVIOUS, THEMPL, &PlaylistControllerModel::prev );
-        }
-        break;
-    case NEXT_BUTTON: {
-        NORMAL_BUTTON( NEXT, THEMPL, &PlaylistControllerModel::next);
-        }
-        break;
-    case SLOWER_BUTTON:{
-        NORMAL_BUTTON( SLOWER, THEMIM, &PlayerController::slower );
-        ENABLE_ON_INPUT( SLOWERButton );
-        }
-        break;
-    case FASTER_BUTTON:{
-        NORMAL_BUTTON( FASTER, THEMIM, &PlayerController::faster );
-        ENABLE_ON_INPUT( FASTERButton );
-        }
-        break;
-    case PREV_SLOW_BUTTON:{
-        QToolButtonExt *but = new QToolButtonExt;
-        setupButton( but );
-        BUTTON_SET_BAR( but );
-        connect( but, &QToolButtonExt::shortClicked, THEMPL, &PlaylistControllerModel::prev );
-        connect( but, &QToolButtonExt::longClicked, THEMIM, &PlayerController::jumpBwd );
-        widget = but;
-        }
-        break;
-    case NEXT_FAST_BUTTON:{
-        QToolButtonExt *but = new QToolButtonExt;
-        setupButton( but );
-        BUTTON_SET_BAR( but );
-        connect( but, &QToolButtonExt::shortClicked, THEMPL, &PlaylistControllerModel::next );
-        connect( but, &QToolButtonExt::longClicked, THEMIM, &PlayerController::jumpFwd );
-        widget = but;
-        }
-        break;
-    case FRAME_BUTTON: {
-        NORMAL_BUTTON( FRAME, THEMIM, &PlayerController::frameNext );
-        ENABLE_ON_VIDEO( FRAMEButton );
-        }
-        break;
-    case FULLSCREEN_BUTTON:
-    case DEFULLSCREEN_BUTTON:
-        {
-        NORMAL_BUTTON( FULLSCREEN, THEMIM, &PlayerController::toggleFullscreen );
-        ENABLE_ON_VIDEO( FULLSCREENButton );
-        }
-        break;
-    case FULLWIDTH_BUTTON: {
-        NORMAL_BUTTON( FULLWIDTH,  this, &AbstractController::fullwidthAction );
-        }
-        break;
-    case EXTENDED_BUTTON:{
-        NORMAL_BUTTON( EXTENDED, THEDP, &DialogsProvider::extendedDialog );
-        }
-        break;
-    case PLAYLIST_BUTTON:{
-        NORMAL_BUTTON( PLAYLIST, this, &AbstractController::playlistAction );
-        }
-        break;
-    case SNAPSHOT_BUTTON:{
-        NORMAL_BUTTON( SNAPSHOT, THEMIM, &PlayerController::snapshot );
-        ENABLE_ON_VIDEO( SNAPSHOTButton );
-        }
-        break;
-    case RECORD_BUTTON:{
-        QToolButton *recordButton = new QToolButton;
-        setupButton( recordButton );
-        recordButton->setCheckable( true );
-        connect( recordButton, &QToolButton::toggled, THEMIM, &PlayerController::setRecording );
-        connect( THEMIM, &PlayerController::recordingChanged, recordButton, &QToolButton::setChecked );
-        BUTTON_SET_BAR(  recordButton );
-        ENABLE_ON_INPUT( recordButton );
-        widget = recordButton;
-        }
-        break;
-    case ATOB_BUTTON: {
-        AtoB_Button *ABButton = new AtoB_Button;
-        setupButton( ABButton );
-        ABButton->setShortcut( qtr("Shift+L") );
-        BUTTON_SET_BAR( ABButton );
-        ENABLE_ON_INPUT( ABButton );
-        connect( ABButton, &AtoB_Button::clicked, THEMIM, &PlayerController::toggleABloopState );
-        connect( THEMIM, &PlayerController::ABLoopStateChanged, ABButton, &AtoB_Button::updateButtonIcons );
-        widget = ABButton;
-        }
-        break;
-    case INPUT_SLIDER: {
-        SeekSlider *slider = new SeekSlider( p_intf, Qt::Horizontal, NULL, !b_shiny );
-
-        /* Update the position when the IM has changed */
-        connect( THEMIM, &PlayerController::positionUpdated,
-                slider, &SeekSlider::setPosition );
-        /* And update the IM, when the position has changed */
-        connect( slider, &SeekSlider::sliderDragged,
-                 THEMIM, &PlayerController::jumpToPos );
-        connect( THEMIM, &PlayerController::bufferingChanged,
-                 slider, &SeekSlider::updateBuffering );
-        /* Give hint to disable slider's interactivity when useless */
-        connect( THEMIM, &PlayerController::seekableChanged,
-                 slider, &SeekSlider::setSeekable );
-        widget = slider;
-        }
-        break;
-    case MENU_BUTTONS:
-        widget = discFrame();
-        break;
-    case TELETEXT_BUTTONS:
-        widget = telexFrame();
-        widget->hide();
-        break;
-    case VOLUME_SPECIAL:
-        b_special = true;
-        /* fallthrough */
-    case VOLUME:
-        {
-            SoundWidget *snd = new SoundWidget( this, p_intf, b_shiny, b_special );
-            widget = snd;
-        }
-        break;
-    case TIME_LABEL:
-        {
-            TimeLabel *timeLabel = new TimeLabel( p_intf );
-            widget = timeLabel;
-        }
-        break;
-    case SPLITTER:
-        {
-            QFrame *line = new QFrame;
-            line->setFrameShape( QFrame::VLine );
-            line->setFrameShadow( QFrame::Raised );
-            line->setLineWidth( 0 );
-            line->setMidLineWidth( 1 );
-            widget = line;
-        }
-        break;
-    case ADVANCED_CONTROLLER:
-        if( qobject_cast<AdvControlsWidget *>(this) == NULL )
-        {
-            advControls = new AdvControlsWidget( p_intf, this );
-            widget = advControls;
-        }
-        break;
-    case REVERSE_BUTTON:{
-        QToolButton *reverseButton = new QToolButton;
-        setupButton( reverseButton );
-        connect( reverseButton, &QToolButton::clicked, THEMIM, &PlayerController::reverse);
-        BUTTON_SET_BAR(  reverseButton );
-        reverseButton->setCheckable( true );
-        /* You should, of COURSE change this to the correct event,
-           when/if we have one, that tells us if trickplay is possible . */
-        connect( this, &AbstractController::inputIsTrickPlayable, reverseButton, &QToolButton::setVisible );
-        reverseButton->setVisible( false );
-        widget = reverseButton;
-        }
-        break;
-    case SKIP_BACK_BUTTON: {
-        NORMAL_BUTTON( SKIP_BACK, THEMIM, &PlayerController::jumpBwd );
-        ENABLE_ON_INPUT( SKIP_BACKButton );
-        }
-        break;
-    case SKIP_FW_BUTTON: {
-        NORMAL_BUTTON( SKIP_FW, THEMIM, &PlayerController::jumpFwd  );
-        ENABLE_ON_INPUT( SKIP_FWButton );
-        }
-        break;
-    case QUIT_BUTTON: {
-        NORMAL_BUTTON( QUIT, THEDP, &DialogsProvider::quit );
-        }
-        break;
-    case RANDOM_BUTTON: {
-        NORMAL_BUTTON( RANDOM, THEMPL, &PlaylistControllerModel::toggleRandom );
-        RANDOMButton->setCheckable( true );
-        RANDOMButton->setChecked( THEMPL->isRandom() );
-        connect( THEMPL, &PlaylistControllerModel::randomChanged, RANDOMButton, &QToolButton::setChecked );
-        }
-        break;
-    case LOOP_BUTTON:{
-        LoopButton *loopButton = new LoopButton;
-        setupButton( loopButton );
-        loopButton->setToolTip( qtr( "Click to toggle between loop all, loop one and no loop") );
-        loopButton->setCheckable( true );
-        loopButton->updateButtonIcons( THEMPL->getRepeatMode() );
-        connect( THEMPL, &PlaylistControllerModel::repeatModeChanged, loopButton, &LoopButton::updateButtonIcons );
-        connect( loopButton, &LoopButton::clicked, THEMPL, &PlaylistControllerModel::toggleRepeatMode );
-        widget = loopButton;
-        }
-        break;
-    case INFO_BUTTON: {
-        NORMAL_BUTTON( INFO, THEDP, &DialogsProvider::mediaInfoDialog );
-        }
-        break;
-    case PLAYBACK_BUTTONS:{
-        widget = new QWidget;
-        DeckButtonsLayout *layout = new DeckButtonsLayout( widget );
-        BrowseButton *prev = new BrowseButton( widget, BrowseButton::Backward );
-        BrowseButton *next = new BrowseButton( widget );
-        RoundButton *play = new RoundButton( widget );
-        layout->setBackwardButton( prev );
-        layout->setForwardButton( next );
-        layout->setRoundButton( play );
-        connect( prev, &BrowseButton::clicked, THEMPL, &PlaylistControllerModel::prev );
-        connect( next, &BrowseButton::clicked, THEMPL, &PlaylistControllerModel::next );
-        connect( play, &BrowseButton::clicked, this, &AbstractController::playAction );
-        }
-        break;
-    case ASPECT_RATIO_COMBOBOX:
-        widget = new AspectRatioComboBox( p_intf, THEMIM->getAspectRatio());
-        widget->setMinimumHeight( 26 );
-        break;
-    case SPEED_LABEL:
-        widget = new SpeedLabel( p_intf, this );
-        break;
-    case TIME_LABEL_ELAPSED:
-        widget = new TimeLabel( p_intf, TimeLabel::Elapsed );
-        break;
-    case TIME_LABEL_REMAINING:
-        widget = new TimeLabel( p_intf, TimeLabel::Remaining );
-        break;
-    default:
-        msg_Warn( p_intf, "This should not happen %i", button );
-        break;
-    }
-
-    /* Customize Buttons */
-    if( b_flat || b_big )
-    {
-        QFrame *frame = qobject_cast<QFrame *>(widget);
-        if( frame )
-        {
-            QList<QToolButton *> allTButtons = frame->findChildren<QToolButton *>();
-            for( int i = 0; i < allTButtons.count(); i++ )
-                applyAttributes( allTButtons[i], b_flat, b_big );
-        }
-        else
-        {
-            QToolButton *tmpButton = qobject_cast<QToolButton *>(widget);
-            if( tmpButton )
-                applyAttributes( tmpButton, b_flat, b_big );
-        }
-    }
-    return widget;
-}
-#undef NORMAL_BUTTON
-
-void AbstractController::applyAttributes( QToolButton *tmpButton, bool b_flat, bool b_big )
-{
-    if( tmpButton )
-    {
-        if( b_flat )
-            tmpButton->setAutoRaise( b_flat );
-        if( b_big )
-        {
-            tmpButton->setFixedSize( QSize( 32, 32 ) );
-            tmpButton->setIconSize( QSize( 26, 26 ) );
-        }
-    }
-}
-
-QFrame *AbstractController::discFrame()
-{
-    /** Disc and Menus handling */
-    QFrame *discFrame = new QFrame( this );
-
-    QHBoxLayout *discLayout = new QHBoxLayout( discFrame );
-    discLayout->setSpacing( 0 ); discLayout->setMargin( 0 );
-
-
-    QFrame *chapFrame = new QFrame( discFrame );
-    QHBoxLayout *chapLayout = new QHBoxLayout( chapFrame );
-    chapLayout->setSpacing( 0 ); chapLayout->setMargin( 0 );
-
-    QToolButton *prevSectionButton = new QToolButton( chapFrame );
-    setupButton( prevSectionButton );
-    BUTTON_SET_BAR2( prevSectionButton, toolbar/dvd_prev,
-            qtr("Previous Chapter/Title" ) );
-    chapLayout->addWidget( prevSectionButton );
-
-    QToolButton *nextSectionButton = new QToolButton( chapFrame );
-    setupButton( nextSectionButton );
-    BUTTON_SET_BAR2( nextSectionButton, toolbar/dvd_next,
-            qtr("Next Chapter/Title" ) );
-    chapLayout->addWidget( nextSectionButton );
-
-    discLayout->addWidget( chapFrame );
-    chapFrame->hide();
-
-    QFrame *menuFrame = new QFrame( discFrame );
-    QHBoxLayout *menuLayout = new QHBoxLayout( menuFrame );
-    menuLayout->setSpacing( 0 ); menuLayout->setMargin( 0 );
-
-    QToolButton *menuButton = new QToolButton( menuFrame );
-    setupButton( menuButton );
-    menuLayout->addWidget( menuButton );
-    BUTTON_SET_BAR2( menuButton, toolbar/dvd_menu, qtr( "Menu" ) );
-
-    discLayout->addWidget( menuFrame );
-    menuFrame->hide();
-
-    /* Change the navigation button display when the IM
-       navigation changes */
-    connect( THEMIM, &PlayerController::hasTitlesChanged, chapFrame, &QFrame::setVisible );
-    connect( THEMIM, &PlayerController::hasMenuChanged, menuFrame, &QFrame::setVisible );
-
-    /* Changes the IM navigation when triggered on the nav buttons */
-    connect( prevSectionButton, &QToolButton::clicked, THEMIM, &PlayerController::sectionPrev );
-    connect( nextSectionButton, &QToolButton::clicked, THEMIM, &PlayerController::sectionNext );
-    connect( menuButton, &QToolButton::clicked, THEMIM, &PlayerController::sectionMenu );
-
-    return discFrame;
-}
-
-QFrame *AbstractController::telexFrame()
-{
-    /**
-     * Telextext QFrame
-     **/
-    QFrame *telexFrame = new QFrame( this );
-    QHBoxLayout *telexLayout = new QHBoxLayout( telexFrame );
-    telexLayout->setSpacing( 0 ); telexLayout->setMargin( 0 );
-    connect( THEMIM,  &PlayerController::teletextAvailableChanged, telexFrame, &QFrame::setVisible );
-
-    /* On/Off button */
-    QToolButton *telexOn = new QToolButton;
-    setupButton( telexOn );
-    BUTTON_SET_BAR2( telexOn, toolbar/tv, qtr( "Teletext Activation" ) );
-    telexOn->setEnabled( true );
-    telexOn->setCheckable( true );
-
-    telexLayout->addWidget( telexOn );
-
-    /* Teletext Activation and set */
-    connect( telexOn, &QToolButton::clicked, THEMIM, &PlayerController::enableTeletext );
-    connect( THEMIM, &PlayerController::teletextEnabledChanged , telexOn, &QToolButton::setChecked );
-
-    /* Transparency button */
-    QToolButton *telexTransparent = new QToolButton;
-    setupButton( telexTransparent );
-    BUTTON_SET_BAR2( telexTransparent, toolbar/tvtelx,
-                     qtr( "Toggle Transparency" ) );
-    telexTransparent->setEnabled( false );
-    telexTransparent->setCheckable( true );
-    telexLayout->addWidget( telexTransparent );
-
-    /* Transparency change and set */
-    connect( telexTransparent, &QToolButton::clicked, THEMIM, &PlayerController::setTeletextTransparency );
-    connect( THEMIM, &PlayerController::teletextTransparencyChanged, telexTransparent, &QToolButton::setChecked );
-
-
-    /* Page setting */
-    QSpinBox *telexPage = new QSpinBox( telexFrame );
-    telexPage->setRange( 100, 899 );
-    telexPage->setValue( 100 );
-    telexPage->setAccelerated( true );
-    telexPage->setWrapping( true );
-    telexPage->setAlignment( Qt::AlignRight );
-    telexPage->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Minimum );
-    telexPage->setEnabled( false );
-    telexLayout->addWidget( telexPage );
-
-    /* Contextual & Index Buttons */
-    QSignalMapper *contextButtonMapper = new QSignalMapper( this );
-    QToolButton *contextButton = NULL;
-    int i_iconminsize = __MAX( 16, telexOn->minimumHeight() );
-
-#if HAS_QT56
-    qreal f_ratio = QApplication::primaryScreen()->devicePixelRatio();
-    QPixmap iconPixmap( i_iconminsize * f_ratio, i_iconminsize * f_ratio );
-#else
-    QPixmap iconPixmap( i_iconminsize, i_iconminsize );
-#endif
-
-    iconPixmap.fill( Qt::transparent );
-    QPainter iconPixmapPainter( &iconPixmap );
-    QLinearGradient iconPixmapPainterGradient( iconPixmap.rect().center() / 2,
-                                               iconPixmap.rect().center() );
-
-#define CREATE_CONTEXT_BUTTON(color, key) \
-    iconPixmapPainterGradient.setColorAt( 0, QColor( color ).lighter(150) );\
-    iconPixmapPainterGradient.setColorAt( 1.0, QColor( color ) );\
-    iconPixmapPainter.setBrush( iconPixmapPainterGradient );\
-    iconPixmapPainter.drawEllipse( iconPixmap.rect().adjusted( 4, 4, -5, -5 ) );\
-    contextButton = new QToolButton();\
-    setupButton( contextButton );\
-    contextButton->setIcon( iconPixmap );\
-    contextButton->setEnabled( false );\
-    contextButtonMapper->setMapping( contextButton, key << 16 );\
-    connect( contextButton, &QToolButton::clicked, contextButtonMapper, QOverload<>::of(&QSignalMapper::map) );\
-    connect( contextButtonMapper, QOverload<int>::of(&QSignalMapper::mapped), THEMIM, &PlayerController::setTeletextPage );\
-    connect( THEMIM, &PlayerController::teletextEnabledChanged, contextButton, &QToolButton::setEnabled );\
-    telexLayout->addWidget( contextButton )
-
-    CREATE_CONTEXT_BUTTON("grey", 'i'); /* index */
-    CREATE_CONTEXT_BUTTON("red", 'r');
-    CREATE_CONTEXT_BUTTON("green", 'g');
-    CREATE_CONTEXT_BUTTON("yellow", 'y');
-    CREATE_CONTEXT_BUTTON("blue", 'b');
-
-#undef CREATE_CONTEXT_BUTTON
-
-    /* Page change and set */
-    connect( telexPage, QOverload<int>::of(&QSpinBox::valueChanged), THEMIM, &PlayerController::setTeletextPage );
-    connect( THEMIM, &PlayerController::teletextPageChanged, telexPage, &QSpinBox::setValue);
-
-    connect( THEMIM, &PlayerController::teletextEnabledChanged, telexPage, &QSpinBox::setEnabled);
-    connect( THEMIM, &PlayerController::teletextEnabledChanged, telexTransparent, &QSpinBox::setEnabled );
-    return telexFrame;
-}
-#undef BUTTON_SET_BAR
-#undef BUTTON_SET_BAR2
-#undef ENABLE_ON_VIDEO
-#undef ENABLE_ON_INPUT
-
-#include <QHBoxLayout>
-/*****************************
- * DA Control Widget !
- *****************************/
-ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
-                                bool b_advControls,
-                                QWidget *_parent ) :
-                                AbstractController( _p_i, _parent )
-{
-    RTL_UNAFFECTED_WIDGET
-    /* advanced Controls handling */
-    b_advancedVisible = b_advControls;
-#ifdef DEBUG_LAYOUT
-    setStyleSheet( "background: red ");
-#endif
-    setAttribute( Qt::WA_MacBrushedMetal);
-    controlLayout = new QVBoxLayout( this );
-    controlLayout->setContentsMargins( 3, 1, 0, 1 );
-    controlLayout->setSpacing( 0 );
-    QHBoxLayout *controlLayout1 = new QHBoxLayout;
-    controlLayout1->setSpacing( 0 ); controlLayout1->setMargin( 0 );
-
-    QString line1 = getSettings()->value( "MainWindow/MainToolbar1", MAIN_TB1_DEFAULT )
-                                        .toString();
-    parseAndCreate( line1, controlLayout1 );
-
-    QHBoxLayout *controlLayout2 = new QHBoxLayout;
-    controlLayout2->setSpacing( 0 ); controlLayout2->setMargin( 0 );
-    QString line2 = getSettings()->value( "MainWindow/MainToolbar2", MAIN_TB2_DEFAULT )
-                                        .toString();
-    parseAndCreate( line2, controlLayout2 );
-
-    grip = new QSizeGrip( this );
-    controlLayout2->addWidget( grip, 0, Qt::AlignBottom|Qt::AlignRight );
-
-    if( !b_advancedVisible && advControls ) advControls->hide();
-
-    controlLayout->addLayout( controlLayout1 );
-    controlLayout->addLayout( controlLayout2 );
-}
-
-void ControlsWidget::toggleAdvanced()
-{
-    if( !advControls ) return;
-
-    advControls->setVisible( !b_advancedVisible );
-    b_advancedVisible = !b_advancedVisible;
-    emit advancedControlsToggled( b_advancedVisible );
-}
-
-AdvControlsWidget::AdvControlsWidget( intf_thread_t *_p_i, QWidget *_parent ) :
-                                     AbstractController( _p_i, _parent )
-{
-    RTL_UNAFFECTED_WIDGET
-    controlLayout = new QHBoxLayout( this );
-    controlLayout->setMargin( 0 );
-    controlLayout->setSpacing( 0 );
-#ifdef DEBUG_LAYOUT
-    setStyleSheet( "background: orange ");
-#endif
-
-
-    QString line = getSettings()->value( "MainWindow/AdvToolbar", ADV_TB_DEFAULT )
-        .toString();
-    parseAndCreate( line, controlLayout );
-}
-
-InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent ) :
-                                     AbstractController( _p_i, _parent )
-{
-    RTL_UNAFFECTED_WIDGET
-    controlLayout = new QHBoxLayout( this );
-    controlLayout->setMargin( 0 );
-    controlLayout->setSpacing( 0 );
-#ifdef DEBUG_LAYOUT
-    setStyleSheet( "background: green ");
-#endif
-
-    QString line = getSettings()->value( "MainWindow/InputToolbar", INPT_TB_DEFAULT ).toString();
-    parseAndCreate( line, controlLayout );
-}
-/**********************************************************************
- * Fullscrenn control widget
- **********************************************************************/
-FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWidget *_parent )
-                           : AbstractController( _p_i, _parent )
-{
-    RTL_UNAFFECTED_WIDGET
-    i_mouse_last_x      = -1;
-    i_mouse_last_y      = -1;
-    b_mouse_over        = false;
-    i_mouse_last_move_x = -1;
-    i_mouse_last_move_y = -1;
-    b_slow_hide_begin   = false;
-    i_slow_hide_timeout = 1;
-    b_fullscreen        = false;
-    i_hide_timeout      = 1;
-    i_screennumber      = -1;
-#ifdef QT5_HAS_WAYLAND
-    b_hasWayland = QGuiApplication::platformName()
-           .startsWith(QLatin1String("wayland"), Qt::CaseInsensitive);
-#endif
-
-    vout.clear();
-
-    setWindowFlags( Qt::Tool | Qt::FramelessWindowHint );
-    setAttribute( Qt::WA_ShowWithoutActivating );
-    setMinimumWidth( FSC_WIDTH );
-    isWideFSC = false;
-
-    setFrameShape( QFrame::StyledPanel );
-    setFrameStyle( QFrame::Sunken );
-    setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
-
-    QVBoxLayout *controlLayout2 = new QVBoxLayout( this );
-    controlLayout2->setContentsMargins( 4, 6, 4, 2 );
-
-    /* First line */
-    InputControlsWidget *inputC = new InputControlsWidget( p_intf, this );
-    controlLayout2->addWidget( inputC );
-
-    controlLayout = new QHBoxLayout;
-    QString line = getSettings()->value( "MainWindow/FSCtoolbar", FSC_TB_DEFAULT ).toString();
-    parseAndCreate( line, controlLayout );
-    controlLayout2->addLayout( controlLayout );
-
-    /* hiding timer */
-    p_hideTimer = new QTimer( this );
-    p_hideTimer->setSingleShot( true );
-    connect( p_hideTimer, &QTimer::timeout, this, &FullscreenControllerWidget::hideFSC );
-
-    /* slow hiding timer */
-    p_slowHideTimer = new QTimer( this );
-    connect( p_slowHideTimer, &QTimer::timeout, this, &FullscreenControllerWidget::slowHideFSC );
-    f_opacity = var_InheritFloat( p_intf, "qt-fs-opacity" );
-
-    i_sensitivity = var_InheritInteger( p_intf, "qt-fs-sensitivity" );
-
-    vlc_mutex_init_recursive( &lock );
-
-    connect( THEMIM, &PlayerController::voutListChanged,
-              this, &FullscreenControllerWidget::setVoutList, Qt::DirectConnection );
-
-    /* First Move */
-    previousPosition = getSettings()->value( "FullScreen/pos" ).toPoint();
-    screenRes = getSettings()->value( "FullScreen/screen" ).toRect();
-    isWideFSC = getSettings()->value( "FullScreen/wide" ).toBool();
-}
-
-FullscreenControllerWidget::~FullscreenControllerWidget()
-{
-    getSettings()->setValue( "FullScreen/pos", previousPosition );
-    getSettings()->setValue( "FullScreen/screen", screenRes );
-    getSettings()->setValue( "FullScreen/wide", isWideFSC );
-
-    setVoutList( NULL, 0 );
-    vlc_mutex_destroy( &lock );
-}
-
-void FullscreenControllerWidget::restoreFSC()
-{
-    if( !isWideFSC )
-    {
-        /* Restore half-bar and re-centre if needed */
-        setMinimumWidth( FSC_WIDTH );
-        adjustSize();
-
-        if ( targetScreen() < 0 )
-            return;
-
-        QRect currentRes = QApplication::desktop()->screenGeometry( targetScreen() );
-        QWindow *wh = windowHandle();
-        if ( wh != Q_NULLPTR )
-        {
-#ifdef QT5_HAS_WAYLAND
-            if ( !b_hasWayland )
-                wh->setScreen(QGuiApplication::screens()[targetScreen()]);
-#else
-            wh->setScreen(QGuiApplication::screens()[targetScreen()]);
-#endif
-        }
-
-        if( currentRes == screenRes &&
-            currentRes.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() );
-    }
-}
-
-void FullscreenControllerWidget::centerFSC( int number )
-{
-    QRect currentRes = QApplication::desktop()->screenGeometry( number );
-
-    /* screen has changed, calculate new position */
-    QPoint pos = QPoint( currentRes.x() + (currentRes.width() / 2) - (width() / 2),
-            currentRes.y() + currentRes.height() - height());
-    move( pos );
-}
-
-/**
- * Show fullscreen controller
- */
-void FullscreenControllerWidget::showFSC()
-{
-    restoreFSC();
-
-    setWindowOpacity( f_opacity );
-
-    show();
-}
-
-/**
- * Plane to hide fullscreen controller
- */
-void FullscreenControllerWidget::planHideFSC()
-{
-    vlc_mutex_lock( &lock );
-    int i_timeout = i_hide_timeout;
-    vlc_mutex_unlock( &lock );
-
-    p_hideTimer->start( i_timeout );
-
-    b_slow_hide_begin = true;
-    i_slow_hide_timeout = i_timeout;
-    p_slowHideTimer->start( i_slow_hide_timeout / 2 );
-}
-
-/**
- * Hidding fullscreen controller slowly
- * Linux: need composite manager
- * Windows: it is blinking, so it can be enabled by define TRASPARENCY
- */
-void FullscreenControllerWidget::slowHideFSC()
-{
-    if( b_slow_hide_begin )
-    {
-        b_slow_hide_begin = false;
-
-        p_slowHideTimer->stop();
-        /* the last part of time divided to 100 pieces */
-        p_slowHideTimer->start( (int)( i_slow_hide_timeout / 2 / ( windowOpacity() * 100 ) ) );
-
-    }
-    else
-    {
-         if ( windowOpacity() > 0.0 )
-         {
-             /* we should use 0.01 because of 100 pieces ^^^
-                but than it cannt be done in time */
-             setWindowOpacity( windowOpacity() - 0.02 );
-         }
-
-         if ( windowOpacity() <= 0.0 )
-             p_slowHideTimer->stop();
-    }
-}
-
-void FullscreenControllerWidget::updateFullwidthGeometry( int number )
-{
-    QRect screenGeometry = QApplication::desktop()->screenGeometry( number );
-    setMinimumWidth( screenGeometry.width() );
-    setGeometry( screenGeometry.x(), screenGeometry.y() + screenGeometry.height() - height(), screenGeometry.width(), height() );
-    adjustSize();
-}
-
-void FullscreenControllerWidget::toggleFullwidth()
-{
-    /* Toggle isWideFSC switch */
-    isWideFSC = !isWideFSC;
-
-    restoreFSC();
-}
-
-
-void FullscreenControllerWidget::setTargetScreen(int screennumber)
-{
-    i_screennumber = screennumber;
-}
-
-
-int FullscreenControllerWidget::targetScreen()
-{
-    if( i_screennumber < 0 || i_screennumber >= QApplication::desktop()->screenCount() )
-        return QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
-    return i_screennumber;
-}
-
-/**
- * event handling
- * events: show, hide, start timer for hiding
- */
-void FullscreenControllerWidget::customEvent( QEvent *event )
-{
-    bool b_fs;
-
-    switch( (int)event->type() )
-    {
-        /* This is used when the 'i' hotkey is used, to force quick toggle */
-        case IMEvent::FullscreenControlToggle:
-            vlc_mutex_lock( &lock );
-            b_fs = b_fullscreen;
-            vlc_mutex_unlock( &lock );
-
-            if( b_fs )
-            {
-                if( isHidden() )
-                {
-                    p_hideTimer->stop();
-                    showFSC();
-                }
-                else
-                    hideFSC();
-            }
-            break;
-        /* Event called to Show the FSC on mouseChanged() */
-        case IMEvent::FullscreenControlShow:
-            vlc_mutex_lock( &lock );
-            b_fs = b_fullscreen;
-            vlc_mutex_unlock( &lock );
-
-            if( b_fs && ( isHidden() || p_slowHideTimer->isActive() ) )
-                showFSC();
-
-            break;
-        /* Start the timer to hide later, called usually with above case */
-        case IMEvent::FullscreenControlPlanHide:
-            if( !b_mouse_over ) // Only if the mouse is not over FSC
-                planHideFSC();
-            break;
-        /* Hide */
-        case IMEvent::FullscreenControlHide:
-            hideFSC();
-            break;
-        default:
-            break;
-    }
-}
-
-/**
- * On mouse move
- * moving with FSC
- */
-void FullscreenControllerWidget::mouseMoveEvent( QMouseEvent *event )
-{
-    if( event->buttons() == Qt::LeftButton )
-    {
-        if( i_mouse_last_x == -1 || i_mouse_last_y == -1 )
-            return;
-
-        int i_moveX = event->globalX() - i_mouse_last_x;
-        int i_moveY = event->globalY() - i_mouse_last_y;
-
-        move( x() + i_moveX, y() + i_moveY );
-
-        i_mouse_last_x = event->globalX();
-        i_mouse_last_y = event->globalY();
-    }
-}
-
-/**
- * On mouse press
- * store position of cursor
- */
-void FullscreenControllerWidget::mousePressEvent( QMouseEvent *event )
-{
-    if( isWideFSC ) return;
-    i_mouse_last_x = event->globalX();
-    i_mouse_last_y = event->globalY();
-    event->accept();
-}
-
-void FullscreenControllerWidget::mouseReleaseEvent( QMouseEvent *event )
-{
-    if( isWideFSC ) return;
-    i_mouse_last_x = -1;
-    i_mouse_last_y = -1;
-    event->accept();
-
-    // Save the new FSC position
-    previousPosition = pos();
-}
-
-/**
- * On mouse go above FSC
- */
-void FullscreenControllerWidget::enterEvent( QEvent *event )
-{
-    b_mouse_over = true;
-
-    p_hideTimer->stop();
-    p_slowHideTimer->stop();
-    setWindowOpacity( f_opacity );
-    event->accept();
-}
-
-/**
- * On mouse go out from FSC
- */
-void FullscreenControllerWidget::leaveEvent( QEvent *event )
-{
-    planHideFSC();
-
-    b_mouse_over = false;
-    event->accept();
-}
-
-/**
- * When you get pressed key, send it to video output
- */
-void FullscreenControllerWidget::keyPressEvent( QKeyEvent *event )
-{
-    emit keyPressed( event );
-}
-
-/* */
-int FullscreenControllerWidget::FullscreenChanged( vlc_object_t *obj,
-        const char *, vlc_value_t, vlc_value_t new_val, void *data )
-{
-    vout_thread_t *p_vout = (vout_thread_t *) obj;
-
-    msg_Dbg( p_vout, "Qt: Fullscreen state changed" );
-    FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *)data;
-
-    p_fs->fullscreenChanged( p_vout, new_val.b_bool, var_GetInteger( p_vout, "mouse-hide-timeout" ) );
-    emit p_fs->fullscreenChanged( new_val.b_bool );
-
-    return VLC_SUCCESS;
-}
-/* */
-static int FullscreenControllerWidgetMouseMoved( vlc_object_t *obj,
-        const char *, vlc_value_t, vlc_value_t new_val, void *data )
-{
-    vout_thread_t *p_vout = (vout_thread_t *) obj;
-    FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *)data;
-
-    /* Get the value from the Vout - Trust the vout more than Qt */
-    p_fs->mouseChanged( p_vout, new_val.coords.x, new_val.coords.y );
-
-    return VLC_SUCCESS;
-}
-
-/**
- * It is call to update the list of vout handled by the fullscreen controller
- */
-void FullscreenControllerWidget::setVoutList( vout_thread_t **pp_vout, int i_vout )
-{
-    QList<vout_thread_t*> del;
-    QList<vout_thread_t*> add;
-
-    QList<vout_thread_t*> set;
-
-    /* */
-    for( int i = 0; i < i_vout; i++ )
-        set += pp_vout[i];
-
-    /* Vout to remove */
-    vlc_mutex_lock( &lock );
-    foreach( vout_thread_t *p_vout, vout )
-    {
-        if( !set.contains( p_vout ) )
-            del += p_vout;
-    }
-    vlc_mutex_unlock( &lock );
-
-    foreach( vout_thread_t *p_vout, del )
-    {
-        var_DelCallback( p_vout, "fullscreen",
-                         FullscreenControllerWidget::FullscreenChanged, this );
-        vlc_mutex_lock( &lock );
-        fullscreenChanged( p_vout, false, 0 );
-        vout.removeAll( p_vout );
-        vlc_mutex_unlock( &lock );
-
-        vout_Release(p_vout);
-    }
-
-    /* Vout to track */
-    vlc_mutex_lock( &lock );
-    foreach( vout_thread_t *p_vout, set )
-    {
-        if( !vout.contains( p_vout ) )
-            add += p_vout;
-    }
-    vlc_mutex_unlock( &lock );
-
-    foreach( vout_thread_t *p_vout, add )
-    {
-        vout_Hold(p_vout);
-
-        vlc_mutex_lock( &lock );
-        vout.append( p_vout );
-        var_AddCallback( p_vout, "fullscreen",
-                         FullscreenControllerWidget::FullscreenChanged, this );
-        /* I miss a add and fire */
-        emit fullscreenChanged( p_vout, var_InheritBool( p_vout, "fullscreen" ),
-                           var_GetInteger( p_vout, "mouse-hide-timeout" ) );
-        vlc_mutex_unlock( &lock );
-    }
-}
-/**
- * Register and unregister callback for mouse moving
- */
-void FullscreenControllerWidget::fullscreenChanged( vout_thread_t *p_vout,
-        bool b_fs, int i_timeout )
-{
-    /* FIXME - multiple vout (ie multiple mouse position ?) and thread safety if multiple vout ? */
-
-    vlc_mutex_lock( &lock );
-    /* Entering fullscreen, register callback */
-    if( b_fs && !b_fullscreen )
-    {
-        msg_Dbg( p_vout, "Qt: Entering Fullscreen" );
-        b_fullscreen = true;
-        i_hide_timeout = i_timeout;
-        var_AddCallback( p_vout, "mouse-moved",
-                FullscreenControllerWidgetMouseMoved, this );
-    }
-    /* Quitting fullscreen, unregistering callback */
-    else if( !b_fs && b_fullscreen )
-    {
-        msg_Dbg( p_vout, "Qt: Quitting Fullscreen" );
-        b_fullscreen = false;
-        i_hide_timeout = i_timeout;
-        var_DelCallback( p_vout, "mouse-moved",
-                FullscreenControllerWidgetMouseMoved, this );
-
-        /* Force fs hiding */
-        IMEvent *eHide = new IMEvent( IMEvent::FullscreenControlHide, 0 );
-        QApplication::postEvent( this, eHide );
-    }
-    vlc_mutex_unlock( &lock );
-}
-
-/**
- * Mouse change callback (show/hide the controller on mouse movement)
- */
-void FullscreenControllerWidget::mouseChanged( vout_thread_t *, int i_mousex, int i_mousey )
-{
-    bool b_toShow;
-
-    /* FIXME - multiple vout (ie multiple mouse position ?) and thread safety if multiple vout ? */
-
-    b_toShow = false;
-    if( ( i_mouse_last_move_x == -1 || i_mouse_last_move_y == -1 ) ||
-        ( abs( i_mouse_last_move_x - i_mousex ) > i_sensitivity ||
-          abs( i_mouse_last_move_y - i_mousey ) > i_sensitivity ) )
-    {
-        i_mouse_last_move_x = i_mousex;
-        i_mouse_last_move_y = i_mousey;
-        b_toShow = true;
-    }
-
-    if( b_toShow )
-    {
-        /* Show event */
-        IMEvent *eShow = new IMEvent( IMEvent::FullscreenControlShow, 0 );
-        QApplication::postEvent( this, eShow );
-
-        /* Plan hide event */
-        IMEvent *eHide = new IMEvent( IMEvent::FullscreenControlPlanHide, 0 );
-        QApplication::postEvent( this, eHide );
-    }
-}
diff --git a/modules/gui/qt/components/controller.hpp b/modules/gui/qt/components/controller.hpp
deleted file mode 100644
index ee6b633006b96b41260f52e4625c9a39c04de53d..0000000000000000000000000000000000000000
--- a/modules/gui/qt/components/controller.hpp
+++ /dev/null
@@ -1,321 +0,0 @@
-/*****************************************************************************
- * controller.hpp : Controller for the main interface
- ****************************************************************************
- * Copyright (C) 2006-2008 the VideoLAN team
- *
- * Authors: Jean-Baptiste Kempf <jb@videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef QVLC_CONTROLLER_H_
-#define QVLC_CONTROLLER_H_
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "qt.hpp"
-
-#include <QFrame>
-#include <QString>
-#include <QSizeGrip>
-#include "player/player_controller.hpp"
-
-#define MAIN_TB1_DEFAULT "64;39;64;38;65"
-#define MAIN_TB2_DEFAULT "0-2;64;3;1;4;64;7;9;64;10;20;19;64-4;37;65;35-4"
-#define ADV_TB_DEFAULT "12;11;13;14"
-#define INPT_TB_DEFAULT "43;33-4;44"
-#define FSC_TB_DEFAULT "0-2;64;3;1;4;64;37;64;38;64;8;65;25;35-4;34"
-
-#define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a medium")
-
-class QBoxLayout;
-class QHBoxLayout;
-
-class QAbstractButton;
-class QToolButton;
-
-class WidgetListing;
-
-class QSignalMapper;
-class QTimer;
-
-typedef enum buttonType_e
-{
-    PLAY_BUTTON,
-    STOP_BUTTON,
-    OPEN_BUTTON,
-    PREV_SLOW_BUTTON,
-    NEXT_FAST_BUTTON,
-    SLOWER_BUTTON,
-    FASTER_BUTTON,
-    FULLSCREEN_BUTTON,
-    DEFULLSCREEN_BUTTON,
-    EXTENDED_BUTTON,
-    PLAYLIST_BUTTON,
-    SNAPSHOT_BUTTON,
-    RECORD_BUTTON,
-    ATOB_BUTTON,
-    FRAME_BUTTON,
-    REVERSE_BUTTON,
-    SKIP_BACK_BUTTON,
-    SKIP_FW_BUTTON,
-    QUIT_BUTTON,
-    RANDOM_BUTTON,
-    LOOP_BUTTON,
-    INFO_BUTTON,
-    PREVIOUS_BUTTON,
-    NEXT_BUTTON,
-    OPEN_SUB_BUTTON,
-    FULLWIDTH_BUTTON,
-    BUTTON_MAX,
-
-    SPLITTER = 0x20,
-    INPUT_SLIDER,
-    TIME_LABEL,
-    VOLUME,
-    VOLUME_SPECIAL,
-    MENU_BUTTONS,
-    TELETEXT_BUTTONS,
-    ADVANCED_CONTROLLER,
-    PLAYBACK_BUTTONS,
-    ASPECT_RATIO_COMBOBOX,
-    SPEED_LABEL,
-    TIME_LABEL_ELAPSED,
-    TIME_LABEL_REMAINING,
-    SPECIAL_MAX,
-
-    WIDGET_SPACER = 0x40,
-    WIDGET_SPACER_EXTEND,
-    WIDGET_MAX,
-} buttonType_e;
-
-
-static const char* const nameL[BUTTON_MAX] = { N_("Play"), N_("Stop"), N_("Open"),
-    N_("Previous / Backward"), N_("Next / Forward"), N_("Slower"), N_("Faster"), N_("Fullscreen"),
-    N_("De-Fullscreen"), N_("Extended panel"), N_("Playlist"), N_("Snapshot"),
-    N_("Record"), N_("A→B Loop"), N_("Frame By Frame"), N_("Trickplay Reverse"),
-    N_("Step backward" ), N_("Step forward"), N_("Quit"), N_("Random"),
-    N_("Loop / Repeat"), N_("Information"), N_("Previous"), N_("Next"),
-    N_("Open subtitles"), N_("Dock fullscreen controller")
-};
-static const char* const tooltipL[BUTTON_MAX] = { I_PLAY_TOOLTIP,
-    N_("Stop playback"), N_("Open a medium"),
-    N_("Previous media in the playlist, skip backward when held"),
-    N_("Next media in the playlist, skip forward when held"), N_("Slower"), N_("Faster"),
-    N_("Toggle the video in fullscreen"), N_("Toggle the video out fullscreen"),
-    N_("Show extended settings" ), N_( "Toggle playlist" ),
-    N_( "Take a snapshot" ), N_( "Record" ),
-    N_( "Loop from point A to point B continuously." ), N_("Frame by frame"),
-    N_("Reverse"), N_("Step backward"), N_("Step forward"), N_("Quit"),
-    N_("Random"), N_("Change the loop and repeat modes"), N_("Information"),
-    N_("Previous media in the playlist"), N_("Next media in the playlist"),
-    N_("Open subtitle file"),
-    N_("Dock/undock fullscreen controller to/from bottom of screen"),
-};
-static const QString iconL[BUTTON_MAX] ={ ":/toolbar/play_b.svg", ":/toolbar/stop_b.svg",
-    ":/toolbar/eject.svg", ":/toolbar/previous_b.svg", ":/toolbar/next_b.svg",
-    ":/toolbar/slower.svg", ":/toolbar/faster.svg", ":/toolbar/fullscreen.svg",
-    ":/toolbar/defullscreen.svg", ":/toolbar/extended.svg", ":/toolbar/playlist.svg",
-    ":/toolbar/snapshot.svg", ":/toolbar/record.svg", ":/toolbar/atob_nob.svg",
-    ":/toolbar/frame.svg", ":/toolbar/reverse.svg", ":/toolbar/skip_back.svg",
-    ":/toolbar/skip_fw.svg", ":/toolbar/clear.svg", ":/buttons/playlist/shuffle_on.svg",
-    ":/buttons/playlist/repeat_all.svg", ":/menu/info.svg",
-    ":/toolbar/previous_b.svg", ":/toolbar/next_b.svg", ":/toolbar/eject.svg", ":/toolbar/space.svg"
-};
-
-enum
-{
-   WIDGET_NORMAL = 0x0,
-   WIDGET_FLAT   = 0x1,
-   WIDGET_BIG    = 0x2,
-   WIDGET_SHINY  = 0x4,
-};
-
-class AdvControlsWidget;
-class AbstractController : public QFrame
-{
-    friend class WidgetListing; /* For ToolBar Edition HACKS */
-
-    Q_OBJECT
-public:
-    AbstractController( intf_thread_t  *_p_i, QWidget *_parent = 0 );
-
-protected:
-    intf_thread_t       *p_intf;
-
-    QBoxLayout          *controlLayout;
-    /* Change to BoxLayout if both dir are needed */
-
-    AdvControlsWidget   *advControls;
-
-    void parseAndCreate( const QString& config, QBoxLayout *controlLayout );
-
-    virtual void createAndAddWidget( QBoxLayout *controlLayout, int i_index,
-                                     buttonType_e i_type, int i_option );
-
-    QWidget *createWidget( buttonType_e, int options = WIDGET_NORMAL );
-private:
-    static void setupButton( QAbstractButton * );
-    QFrame *discFrame();
-    QFrame *telexFrame();
-    void applyAttributes( QToolButton *, bool b_flat, bool b_big );
-
-    QHBoxLayout         *buttonGroupLayout;
-protected slots:
-    virtual void setStatus( PlayerController::PlayingState );
-
-    void playAction();
-    void playlistAction();
-    void fullwidthAction();
-
-signals:
-    void inputExists( bool ); /// This might be useful in the IM ?
-    void inputPlaying( bool ); /// This might be useful in the IM ?
-    void inputIsTrickPlayable( bool ); /// same ?
-};
-
-/* Advanced Button Bar */
-class AdvControlsWidget : public AbstractController
-{
-    Q_OBJECT
-public:
-    AdvControlsWidget( intf_thread_t *, QWidget *_parent = 0 );
-};
-
-/* Slider Bar */
-class InputControlsWidget : public AbstractController
-{
-    Q_OBJECT
-public:
-    InputControlsWidget( intf_thread_t * , QWidget *_parent = 0 );
-};
-
-/* Button Bar */
-class ControlsWidget : public AbstractController
-{
-    Q_OBJECT
-public:
-    /* p_intf, advanced control visible or not, blingbling or not */
-    ControlsWidget( intf_thread_t *_p_i, bool b_advControls,
-                    QWidget *_parent = 0 );
-
-    void setGripVisible( bool b_visible )
-    { grip->setVisible( b_visible ); }
-
-protected:
-    friend class MainInterface;
-
-    bool b_advancedVisible;
-
-private:
-    QSizeGrip *grip;
-
-protected slots:
-    void toggleAdvanced();
-
-signals:
-    void advancedControlsToggled( bool );
-};
-
-/* Default value of opacity for FS controller */
-#define DEFAULT_OPACITY 0.70
-
-/* Used to restore the minimum width after a full-width switch */
-#define FSC_WIDTH 800
-
-/***********************************
- * Fullscreen controller
- ***********************************/
-class FullscreenControllerWidget : public AbstractController
-{
-    Q_OBJECT
-public:
-    FullscreenControllerWidget( intf_thread_t *, QWidget *_parent = 0  );
-    virtual ~FullscreenControllerWidget();
-
-    /* Vout */
-    void fullscreenChanged( vout_thread_t *, bool b_fs, int i_timeout );
-    void mouseChanged( vout_thread_t *, int i_mousex, int i_mousey );
-    void toggleFullwidth();
-    void updateFullwidthGeometry( int number );
-    int targetScreen();
-    void setTargetScreen( int );
-
-private:
-    static int FullscreenChanged( vlc_object_t *obj,
-                    const char *, vlc_value_t, vlc_value_t new_val, void *data );
-
-signals:
-    void keyPressed( QKeyEvent * );
-    void fullscreenChanged( bool );
-
-public slots:
-    void setVoutList( vout_thread_t **, int );
-
-protected:
-    friend class MainInterface;
-
-    void mouseMoveEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
-    void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
-    void mouseReleaseEvent( QMouseEvent *event ) Q_DECL_OVERRIDE;
-    void enterEvent( QEvent *event ) Q_DECL_OVERRIDE;
-    void leaveEvent( QEvent *event ) Q_DECL_OVERRIDE;
-    void keyPressEvent( QKeyEvent *event ) Q_DECL_OVERRIDE;
-
-    void customEvent( QEvent *event ) Q_DECL_OVERRIDE;
-
-private slots:
-    void showFSC();
-    void planHideFSC();
-    void hideFSC() { hide(); }
-    void slowHideFSC();
-    void restoreFSC();
-    void centerFSC( int );
-
-private:
-    QTimer *p_hideTimer;
-    QTimer *p_slowHideTimer;
-    bool b_slow_hide_begin;
-    int  i_slow_hide_timeout;
-    float f_opacity;
-
-    int i_mouse_last_x, i_mouse_last_y;
-    bool b_mouse_over;
-    int i_screennumber;
-    QRect screenRes;
-    QRect previousScreenRes;
-    QPoint previousPosition;
-
-    /* List of vouts currently tracked */
-    QList<vout_thread_t *> vout;
-
-    /* Shared variable between FSC and VLC (protected by a lock) */
-    vlc_mutex_t lock;
-    bool        b_fullscreen;
-    int         i_hide_timeout;  /* FSC hiding timeout, same as mouse hiding timeout */
-    int i_mouse_last_move_x;
-    int i_mouse_last_move_y;
-
-    bool isWideFSC;
-    int i_sensitivity;
-
-#ifdef QT5_HAS_WAYLAND
-    bool b_hasWayland;
-#endif
-};
-
-#endif
diff --git a/modules/gui/qt/components/controller_widget.cpp b/modules/gui/qt/components/controller_widget.cpp
deleted file mode 100644
index 86396a717b9894403e91f11c493c276795e4551e..0000000000000000000000000000000000000000
--- a/modules/gui/qt/components/controller_widget.cpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/*****************************************************************************
- * controller_widget.cpp : Controller Widget for the controllers
- ****************************************************************************
- * Copyright (C) 2006-2008 the VideoLAN team
- *
- * Authors: Jean-Baptiste Kempf <jb@videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * ( at your option ) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "controller_widget.hpp"
-#include "controller.hpp"
-
-#include "playlist/playlist_controller.hpp"
-#include "player/player_controller.hpp"         /* Get notification of Volume Change */
-#include "util/input_slider.hpp"     /* SoundSlider */
-#include "util/imagehelper.hpp"
-#include "vlc_player.h"
-
-#include <math.h>
-
-#include <QLabel>
-#include <QHBoxLayout>
-#include <QMenu>
-#include <QWidgetAction>
-#include <QMouseEvent>
-
-#define VOLUME_MAX 125
-
-using namespace vlc::playlist;
-
-SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
-                          bool b_shiny, bool b_special )
-                         : QWidget( _parent ), p_intf( _p_intf),
-                           b_is_muted( false ), b_ignore_valuechanged( false )
-{
-    /* We need a layout for this widget */
-    QHBoxLayout *layout = new QHBoxLayout( this );
-    layout->setSpacing( 0 ); layout->setMargin( 0 );
-
-    /* We need a Label for the pix */
-    volMuteLabel = new QLabel;
-    volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/volume-medium.svg", 16, 16 ) );
-
-    /* We might need a subLayout too */
-    QVBoxLayout *subLayout;
-
-    volMuteLabel->installEventFilter( this );
-
-    /* Normal View, click on icon mutes */
-    if( !b_special )
-    {
-        volumeMenu = NULL; subLayout = NULL;
-        volumeControlWidget = NULL;
-
-        /* And add the label */
-        layout->addWidget( volMuteLabel, 0, b_shiny? Qt::AlignBottom : Qt::AlignCenter );
-    }
-    else
-    {
-        /* Special view, click on button shows the slider */
-        b_shiny = false;
-
-        volumeControlWidget = new QFrame( this );
-        subLayout = new QVBoxLayout( volumeControlWidget );
-        subLayout->setContentsMargins( 4, 4, 4, 4 );
-        volumeMenu = new QMenu( this );
-
-        QWidgetAction *widgetAction = new QWidgetAction( volumeControlWidget );
-        widgetAction->setDefaultWidget( volumeControlWidget );
-        volumeMenu->addAction( widgetAction );
-
-        /* And add the label */
-        layout->addWidget( volMuteLabel );
-    }
-
-    /* Slider creation: shiny or clean */
-    if( b_shiny )
-    {
-        volumeSlider = new SoundSlider( this,
-            config_GetFloat( "volume-step" ),
-            var_InheritString( p_intf, "qt-slider-colours" ),
-            var_InheritInteger( p_intf, "qt-max-volume") );
-    }
-    else
-    {
-        volumeSlider = new QSlider( NULL );
-        volumeSlider->setAttribute( Qt::WA_MacSmallSize);
-        volumeSlider->setOrientation( b_special ? Qt::Vertical
-                                                : Qt::Horizontal );
-        volumeSlider->setMaximum( 200 );
-    }
-
-    volumeSlider->setFocusPolicy( Qt::NoFocus );
-    if( b_special )
-        subLayout->addWidget( volumeSlider );
-    else
-        layout->addWidget( volumeSlider, 0, b_shiny? Qt::AlignBottom : Qt::AlignCenter );
-
-    /* Set the volume from the config */
-    float volume = THEMIM->getVolume();
-
-    libUpdateVolume( (volume >= 0.f) ? volume : 1.f );
-    /* Sync mute status */
-    if( THEMIM->isMuted() )
-        updateMuteStatus( true );
-
-    /* Volume control connection */
-    volumeSlider->setTracking( true );
-    CONNECT( volumeSlider, valueChanged( int ), this, valueChangedFilter( int ) );
-    CONNECT( this, valueReallyChanged( int ), this, userUpdateVolume( int ) );
-    CONNECT( THEMIM, volumeChanged( float ), this, libUpdateVolume( float ) );
-    CONNECT( THEMIM, soundMuteChanged( bool ), this, updateMuteStatus( bool ) );
-
-    setAccessibleName( qtr( "Volume slider" ) );
-}
-
-void SoundWidget::refreshLabels()
-{
-    int i_sliderVolume = volumeSlider->value();
-    const char *psz_icon = ":/toolbar/volume-muted.svg";
-
-    if( b_is_muted )
-    {
-        volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( psz_icon, 16, 16 ) );
-        volMuteLabel->setToolTip(qfu(vlc_pgettext("Tooltip|Unmute", "Unmute")));
-        return;
-    }
-
-    if( i_sliderVolume < VOLUME_MAX / 3 )
-        psz_icon = ":/toolbar/volume-low.svg";
-    else if( i_sliderVolume > (VOLUME_MAX * 2 / 3 ) )
-        psz_icon = ":/toolbar/volume-high.svg";
-    else
-        psz_icon = ":/toolbar/volume-medium.svg";
-
-    volMuteLabel->setPixmap( ImageHelper::loadSvgToPixmap( psz_icon, 16, 16 ) );
-    volMuteLabel->setToolTip( qfu(vlc_pgettext("Tooltip|Mute", "Mute")) );
-}
-
-/* volumeSlider changed value event slot */
-void SoundWidget::userUpdateVolume( int i_sliderVolume )
-{
-    /* Only if volume is set by user action on slider */
-    setMuted( false );
-    THEMIM->setVolume( i_sliderVolume / 100.f );
-    refreshLabels();
-}
-
-/* libvlc changed value event slot */
-void SoundWidget::libUpdateVolume( float volume )
-{
-    long i_volume = lroundf(volume * 100.f);
-    if( i_volume != volumeSlider->value()  )
-    {
-        b_ignore_valuechanged = true;
-        volumeSlider->setValue( i_volume );
-        b_ignore_valuechanged = false;
-    }
-    refreshLabels();
-}
-
-void SoundWidget::valueChangedFilter( int i_val )
-{
-    /* valueChanged is also emitted when the lib setValue() */
-    if ( !b_ignore_valuechanged ) emit valueReallyChanged( i_val );
-}
-
-/* libvlc mute/unmute event slot */
-void SoundWidget::updateMuteStatus( bool mute )
-{
-    b_is_muted = mute;
-
-    SoundSlider *soundSlider = qobject_cast<SoundSlider *>(volumeSlider);
-    if( soundSlider )
-        soundSlider->setMuted( mute );
-    refreshLabels();
-}
-
-void SoundWidget::showVolumeMenu( QPoint pos )
-{
-    volumeMenu->setFixedHeight( volumeMenu->sizeHint().height() );
-    volumeMenu->exec( QCursor::pos() - pos - QPoint( 0, volumeMenu->height()/2 )
-                          + QPoint( width(), height() /2) );
-}
-
-void SoundWidget::setMuted( bool mute )
-{
-    b_is_muted = mute;
-    THEMIM->setMuted(mute);
-}
-
-bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
-{
-    VLC_UNUSED( obj );
-    if( e->type() == QEvent::MouseButtonPress )
-    {
-        QMouseEvent *event = static_cast<QMouseEvent*>(e);
-        if( event->button() == Qt::LeftButton )
-        {
-            if( volumeSlider->orientation() ==  Qt::Vertical )
-            {
-                showVolumeMenu( event->pos() );
-            }
-            else
-            {
-                setMuted( !b_is_muted );
-            }
-            e->accept();
-            return true;
-        }
-    }
-    e->ignore();
-    return false;
-}
-
-/**
- * Play Button
- **/
-void PlayButton::updateButtonIcons( bool b_playing )
-{
-    setIcon( b_playing ? QIcon( ":/toolbar/pause_b.svg" ) : QIcon( ":/toolbar/play_b.svg" ) );
-    setToolTip( b_playing ? qtr( "Pause the playback" )
-                          : qtr( I_PLAY_TOOLTIP ) );
-}
-
-void AtoB_Button::updateButtonIcons( PlayerController::ABLoopState state )
-{
-    switch( state)
-    {
-    case PlayerController::ABLOOP_STATE_NONE:
-        setIcon( QIcon( ":/toolbar/atob_nob.svg" ) );
-        setToolTip( qtr( "Loop from point A to point B continuously\n"
-                         "Click to set point A" ) );
-        break;
-    case PlayerController::ABLOOP_STATE_A:
-        setIcon( QIcon( ":/toolbar/atob_noa.svg" ) );
-        setToolTip( qtr( "Click to set point B" ) );
-        break;
-    case PlayerController::ABLOOP_STATE_B:
-        setIcon( QIcon( ":/toolbar/atob.svg" ) );
-        setToolTip( qtr( "Stop the A to B loop" ) );
-        break;
-    }
-}
-
-void LoopButton::updateButtonIcons( PlaylistControllerModel::PlaybackRepeat value )
-{
-    setChecked( value != PlaylistControllerModel::PLAYBACK_REPEAT_NONE );
-    setIcon( ( value == PlaylistControllerModel::PLAYBACK_REPEAT_CURRENT ) ? QIcon( ":/buttons/playlist/repeat_one.svg" )
-                                     : QIcon( ":/buttons/playlist/repeat_all.svg" ) );
-}
-
-void AspectRatioComboBox::onRowInserted(const QModelIndex &, int first, int last)
-{
-    for (int i = first; i <= last; i++)
-    {
-        QModelIndex index = m_aspectRatioModel->index(i);
-        addItem(m_aspectRatioModel->data(index, Qt::DisplayRole).toString());
-        if (m_aspectRatioModel->data(index, Qt::CheckStateRole).toBool())
-            setCurrentIndex(i);
-    }
-}
-
-void AspectRatioComboBox::onRowRemoved(const QModelIndex &, int first, int last)
-{
-    for (int i = last; i >= first; i--)
-        removeItem(i);
-}
-
-void AspectRatioComboBox::onModelAboutToReset()
-{
-    clear();
-}
-
-void AspectRatioComboBox::onModelReset()
-{
-    if (m_aspectRatioModel->rowCount() == 0)
-    {
-        setEnabled(false);
-        addItem( qtr("Aspect Ratio") );
-    }
-    else
-    {
-        setEnabled(true);
-        for (int i = 0; i < m_aspectRatioModel->rowCount(); i++)
-            addItem(m_aspectRatioModel->data(m_aspectRatioModel->index(i), Qt::DisplayRole).toString());
-    }
-}
-
-void AspectRatioComboBox::onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &)
-{
-    for (int i = topLeft.row(); i <= bottomRight.row(); i++)
-    {
-        QModelIndex index=  m_aspectRatioModel->index(i);
-        setItemText(i, m_aspectRatioModel->data(index, Qt::DisplayRole).toString());
-        if (m_aspectRatioModel->data(index, Qt::CheckStateRole).toBool())
-            setCurrentIndex(i);
-    }
-}
-
-void AspectRatioComboBox::updateAspectRatio( int x )
-{
-    QModelIndex index = m_aspectRatioModel->index(x);
-    m_aspectRatioModel->setData(index, true, Qt::CheckStateRole);
-}
diff --git a/modules/gui/qt/components/controller_widget.hpp b/modules/gui/qt/components/controller_widget.hpp
deleted file mode 100644
index e9d173bd1581369ab42e9276419e3fbd554f1b14..0000000000000000000000000000000000000000
--- a/modules/gui/qt/components/controller_widget.hpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*****************************************************************************
- * controller_widget.hpp : Controller Widget for the controllers
- ****************************************************************************
- * Copyright (C) 2006-2008 the VideoLAN team
- *
- * Authors: Jean-Baptiste Kempf <jb@videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef VLC_QT_CONTROLLER_WIDGET_HPP_
-#define VLC_QT_CONTROLLER_WIDGET_HPP_
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "qt.hpp"
-#include "player/player_controller.hpp"
-#include "playlist/playlist_controller.hpp"
-
-#include <QWidget>
-#include <QToolButton>
-#include <QComboBox>
-
-class QLabel;
-class QFrame;
-class QAbstractSlider;
-
-/**
- * SPECIAL Widgets that are a bit more than just a ToolButton
- * and have an icon/behaviour that changes depending on the context:
- * - playButton
- * - A->B Button
- * - Teletext group buttons
- * - Sound Widget group
- **/
-class PlayButton : public QToolButton
-{
-    Q_OBJECT
-public slots:
-    void updateButtonIcons( bool );
-};
-
-class LoopButton : public QToolButton
-{
-    Q_OBJECT
-public slots:
-    void updateButtonIcons( vlc::playlist::PlaylistControllerModel::PlaybackRepeat );
-};
-
-class AtoB_Button : public QToolButton
-{
-    Q_OBJECT
-public slots:
-    void updateButtonIcons( PlayerController::ABLoopState state );
-};
-
-class AspectRatioComboBox : public QComboBox
-{
-    Q_OBJECT
-public:
-    AspectRatioComboBox( intf_thread_t* _p_intf, QAbstractListModel* model )
-        : p_intf( _p_intf )
-        , m_aspectRatioModel(model)
-    {
-        connect( model, &QAbstractListModel::rowsInserted, this, &AspectRatioComboBox::onRowInserted );
-        connect( model, &QAbstractListModel::rowsRemoved, this, &AspectRatioComboBox::onRowRemoved );
-        connect( model, &QAbstractListModel::modelAboutToBeReset, this, &AspectRatioComboBox::onModelAboutToReset);
-        connect( model, &QAbstractListModel::modelReset, this, &AspectRatioComboBox::onModelReset);
-        connect( model, &QAbstractListModel::dataChanged, this, &AspectRatioComboBox::onDataChanged);
-        connect( this,QOverload<int>::of(&AspectRatioComboBox::currentIndexChanged), this, &AspectRatioComboBox::updateAspectRatio );
-
-        onModelReset();
-    }
-
-public slots:
-    void onRowInserted(const QModelIndex &parent, int first, int last);
-    void onRowRemoved(const QModelIndex &parent, int first, int last);
-    void onModelAboutToReset();
-    void onModelReset();
-    void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles);
-
-    void updateAspectRatio( int );
-
-private:
-    intf_thread_t* p_intf;
-    QAbstractListModel* m_aspectRatioModel;
-};
-
-class SoundWidget : public QWidget
-{
-    Q_OBJECT
-
-public:
-    SoundWidget( QWidget *parent, intf_thread_t  *_p_i, bool,
-                 bool b_special = false );
-    void setMuted( bool );
-
-protected:
-    bool eventFilter( QObject *obj, QEvent *e ) Q_DECL_OVERRIDE;
-
-private:
-    intf_thread_t       *p_intf;
-    QLabel              *volMuteLabel;
-    QAbstractSlider     *volumeSlider;
-    QFrame              *volumeControlWidget;
-    QMenu               *volumeMenu;
-
-    bool                b_is_muted;
-    bool                b_ignore_valuechanged;
-
-protected slots:
-    void userUpdateVolume( int );
-    void libUpdateVolume( float );
-    void updateMuteStatus( bool );
-    void refreshLabels( void );
-    void showVolumeMenu( QPoint pos );
-    void valueChangedFilter( int );
-
-signals:
-    void valueReallyChanged( int );
-};
-
-#endif
diff --git a/modules/gui/qt/components/interface_widgets.cpp b/modules/gui/qt/components/interface_widgets.cpp
index c8b9c9e8de57fd8b6fd7ca023656ac2414c2997d..a3799e7be7e4a5f42e349ba7b9eb190da9173f4c 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -652,166 +652,6 @@ void EasterEggBackgroundWidget::paintEvent( QPaintEvent *e )
     BackgroundWidget::paintEvent( e );
 }
 
-SpeedLabel::SpeedLabel( intf_thread_t *_p_intf, QWidget *parent )
-           : QLabel( parent ), p_intf( _p_intf )
-{
-    tooltipStringPattern = qtr( "Current playback speed: %1\nClick to adjust" );
-
-    /* Create the Speed Control Widget */
-    speedControl = new SpeedControlWidget( p_intf, this );
-    speedControlMenu = new QMenu( this );
-
-    widgetAction = new QWidgetAction( speedControl );
-    widgetAction->setDefaultWidget( speedControl );
-    speedControlMenu->addAction( widgetAction );
-
-    /* Change the SpeedRate in the Label */
-    connect( THEMIM, &PlayerController::rateChanged, this, &SpeedLabel::setRate );
-
-    connect( THEMIM, &PlayerController::playingStateChanged, speedControl, &SpeedControlWidget::activateOnState );
-
-    setContentsMargins(4, 0, 4, 0);
-    setRate( THEMIM->getRate() );
-}
-
-SpeedLabel::~SpeedLabel()
-{
-    widgetAction->setParent( this );
-    delete speedControlMenu;
-}
-
-/****************************************************************************
- * Small right-click menu for rate control
- ****************************************************************************/
-
-void SpeedLabel::showSpeedMenu( QPoint pos )
-{
-    speedControlMenu->exec( QCursor::pos() - pos
-                            + QPoint( -70 + width()/2, height() ) );
-}
-
-void SpeedLabel::setRate( float rate )
-{
-    QString str;
-    str.setNum( rate, 'f', 2 );
-    str.append( "x" );
-    setText( str );
-    setToolTip( tooltipStringPattern.arg( str ) );
-    speedControl->updateControls( rate );
-}
-
-/**********************************************************************
- * Speed control widget
- **********************************************************************/
-SpeedControlWidget::SpeedControlWidget( intf_thread_t *_p_i, QWidget *_parent )
-                    : QFrame( _parent ), p_intf( _p_i )
-{
-    QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Maximum );
-    sizePolicy.setHorizontalStretch( 0 );
-    sizePolicy.setVerticalStretch( 0 );
-
-    speedSlider = new QSlider( this );
-    speedSlider->setSizePolicy( sizePolicy );
-    speedSlider->setMinimumSize( QSize( 140, 20 ) );
-    speedSlider->setOrientation( Qt::Horizontal );
-    speedSlider->setTickPosition( QSlider::TicksBelow );
-
-    speedSlider->setRange( -34, 34 );
-    speedSlider->setSingleStep( 1 );
-    speedSlider->setPageStep( 1 );
-    speedSlider->setTickInterval( 17 );
-
-    connect( speedSlider, &QSlider::valueChanged, this, &SpeedControlWidget::updateRate );
-    connect( THEMIM, &PlayerController::rateChanged, this, &SpeedControlWidget::updateControls);
-
-    QToolButton *normalSpeedButton = new QToolButton( this );
-    normalSpeedButton->setMaximumSize( QSize( 26, 16 ) );
-    normalSpeedButton->setAutoRaise( true );
-    normalSpeedButton->setText( "1x" );
-    normalSpeedButton->setToolTip( qtr( "Revert to normal play speed" ) );
-
-    connect( normalSpeedButton, &QToolButton::clicked, this, &SpeedControlWidget::resetRate );
-
-    QToolButton *slowerButton = new QToolButton( this );
-    slowerButton->setMaximumSize( QSize( 26, 16 ) );
-    slowerButton->setAutoRaise( true );
-    slowerButton->setToolTip( tooltipL[SLOWER_BUTTON] );
-    slowerButton->setIcon( QIcon( iconL[SLOWER_BUTTON] ) );
-    connect( slowerButton, &QToolButton::clicked, THEMIM, &PlayerController::slower);
-
-    QToolButton *fasterButton = new QToolButton( this );
-    fasterButton->setMaximumSize( QSize( 26, 16 ) );
-    fasterButton->setAutoRaise( true );
-    fasterButton->setToolTip( tooltipL[FASTER_BUTTON] );
-    fasterButton->setIcon( QIcon( iconL[FASTER_BUTTON] ) );
-    connect( fasterButton, &QToolButton::clicked, THEMIM, &PlayerController::faster );
-
-    QGridLayout* speedControlLayout = new QGridLayout( this );
-    speedControlLayout->addWidget( speedSlider, 0, 0, 1, 3 );
-    speedControlLayout->addWidget( slowerButton, 1, 0 );
-    speedControlLayout->addWidget( normalSpeedButton, 1, 1, 1, 1, Qt::AlignRight );
-    speedControlLayout->addWidget( fasterButton, 1, 2, 1, 1, Qt::AlignRight );
-    speedControlLayout->setContentsMargins( 0, 0, 0, 0 );
-    speedControlLayout->setSpacing( 0 );
-
-    lastValue = 0;
-
-    activateOnState( THEMIM->getPlayingState() );
-}
-
-void SpeedControlWidget::activateOnState( PlayerController::PlayingState state )
-{
-    speedSlider->setEnabled( state == PlayerController::PLAYING_STATE_PLAYING || state == PlayerController::PLAYING_STATE_PAUSED );
-}
-
-void SpeedControlWidget::updateControls( float rate )
-{
-    if( speedSlider->isSliderDown() )
-    {
-        //We don't want to change anything if the user is using the slider
-        return;
-    }
-
-    double value = 17 * log( rate ) / log( 2. );
-    int sliderValue = (int) ( ( value > 0 ) ? value + .5 : value - .5 );
-
-    if( sliderValue < speedSlider->minimum() )
-    {
-        sliderValue = speedSlider->minimum();
-    }
-    else if( sliderValue > speedSlider->maximum() )
-    {
-        sliderValue = speedSlider->maximum();
-    }
-    lastValue = sliderValue;
-
-    speedSlider->setValue( sliderValue );
-    //spinBox->setValue( rate );
-}
-
-void SpeedControlWidget::updateRate( int sliderValue )
-{
-    if( sliderValue == lastValue )
-        return;
-    lastValue = sliderValue;
-
-    double speed = pow( 2, (double)sliderValue / 17 );
-
-
-    THEMIM->setRate(speed);
-    //spinBox->setValue( var_InheritFloat( THEPL, "rate" ) );
-}
-
-void SpeedControlWidget::updateSpinBoxRate( double r )
-{
-    THEMIM->setRate(r);
-}
-
-void SpeedControlWidget::resetRate()
-{
-    THEMIM->normalRate();
-}
-
 CoverArtLabel::CoverArtLabel( QWidget *parent, intf_thread_t *_p_i )
     : QLabel( parent ), p_intf( _p_i ), p_item( NULL )
 {
@@ -907,141 +747,3 @@ void CoverArtLabel::clear()
 {
     showArtUpdate( "" );
 }
-
-TimeLabel::TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType  )
-    : ClickableQLabel()
-    , p_intf( _p_intf )
-    , cachedPos( -1 )
-    , cachedTime( 0 )
-    , cachedLength( 0 )
-    , displayType( _displayType )
-{
-    b_remainingTime = false;
-    if( _displayType != TimeLabel::Elapsed )
-        b_remainingTime = getSettings()->value( "MainWindow/ShowRemainingTime", false ).toBool();
-    switch( _displayType ) {
-        case TimeLabel::Elapsed:
-            setText( " --:-- " );
-            setToolTip( qtr("Elapsed time") );
-            break;
-        case TimeLabel::Remaining:
-            setText( " --:-- " );
-            setToolTip( qtr("Total/Remaining time")
-                        + QString("\n-")
-                        + qtr("Click to toggle between total and remaining time")
-                      );
-            break;
-        case TimeLabel::Both:
-            setText( " --:--/--:-- " );
-            setToolTip( QString( "- " )
-                + qtr( "Click to toggle between elapsed and remaining time" )
-                + QString( "\n- " )
-                + qtr( "Double click to jump to a chosen time position" ) );
-            break;
-    }
-    setAlignment( Qt::AlignRight | Qt::AlignVCenter );
-
-    connect( THEMIM, &PlayerController::seekRequested,
-             this, QOverload<float>::of(&TimeLabel::setDisplayPosition) );
-
-    connect( THEMIM, &PlayerController::positionUpdated,
-              this, QOverload<float , vlc_tick_t, int>::of(&TimeLabel::setDisplayPosition) );
-
-    connect( p_intf->p_sys->p_mi, &MainInterface::showRemainingTimeChanged,
-              this, &TimeLabel::setRemainingTime );
-
-    setStyleSheet( "QLabel { padding-left: 4px; padding-right: 4px; }" );
-}
-
-void TimeLabel::setRemainingTime( bool remainingTime )
-{
-    if( displayType != TimeLabel::Elapsed )
-    {
-        b_remainingTime = remainingTime;
-        refresh();
-    }
-}
-
-void TimeLabel::refresh()
-{
-    setDisplayPosition( cachedPos, cachedTime, cachedLength );
-}
-
-void TimeLabel::setDisplayPosition( float pos, vlc_tick_t t, int length )
-{
-    cachedPos = pos;
-    if( pos == -1.f )
-    {
-        setMinimumSize( QSize( 0, 0 ) );
-        if( displayType == TimeLabel::Both )
-            setText( "--:--/--:--" );
-        else
-            setText( "--:--" );
-        return;
-    }
-
-    int time = SEC_FROM_VLC_TICK(t);
-
-    secstotimestr( psz_length, length );
-    secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time
-                                                           : time );
-
-    // compute the minimum size that will be required for the psz_length
-    // and use it to enforce a minimal size to avoid "dancing" widgets
-    QSize minsize( 0, 0 );
-    if ( length > 0 )
-    {
-        QMargins margins = contentsMargins();
-        minsize += QSize(
-                  fontMetrics().size( 0, QString( psz_length ), 0, 0 ).width(),
-                  sizeHint().height()
-                );
-        minsize += QSize( margins.left() + margins.right() + 8, 0 ); /* +padding */
-
-        if ( b_remainingTime )
-            minsize += QSize( fontMetrics().size( 0, "-", 0, 0 ).width(), 0 );
-    }
-
-    switch( displayType )
-    {
-        case TimeLabel::Elapsed:
-            setMinimumSize( minsize );
-            setText( QString( psz_time ) );
-            break;
-        case TimeLabel::Remaining:
-            if( b_remainingTime )
-            {
-                setMinimumSize( minsize );
-                setText( QString("-") + QString( psz_time ) );
-            }
-            else
-            {
-                setMinimumSize( QSize( 0, 0 ) );
-                setText( QString( psz_length ) );
-            }
-            break;
-        case TimeLabel::Both:
-        default:
-            QString timestr = QString( "%1%2/%3" )
-            .arg( QString( (b_remainingTime && length) ? "-" : "" ) )
-            .arg( QString( psz_time ) )
-            .arg( QString( ( !length && time ) ? "--:--" : psz_length ) );
-
-            setText( timestr );
-            break;
-    }
-    cachedLength = length;
-    cachedTime = t;
-}
-
-void TimeLabel::setDisplayPosition( float pos )
-{
-    vlc_tick_t time = vlc_tick_from_sec(pos * cachedLength);
-    setDisplayPosition( pos, time, cachedLength );
-}
-
-void TimeLabel::toggleTimeDisplay()
-{
-    b_remainingTime = !b_remainingTime;
-    p_intf->p_sys->p_mi->setShowRemainingTime(b_remainingTime);
-}
diff --git a/modules/gui/qt/components/interface_widgets.hpp b/modules/gui/qt/components/interface_widgets.hpp
index 53a91a6b3b142f5524f1c17a29d3e0f893a12c53..a9e5a5cdf0c853957a91093efafb9da3af54e71c 100644
--- a/modules/gui/qt/components/interface_widgets.hpp
+++ b/modules/gui/qt/components/interface_widgets.hpp
@@ -32,8 +32,6 @@
 #include "main_interface.hpp" /* Interface integration */
 #include "player/player_controller.hpp"  /* Speed control */
 
-#include "components/controller.hpp"
-#include "components/controller_widget.hpp"
 #include "dialogs/dialogs_provider.hpp"
 #include "dialogs/mediainfo/info_panels.hpp"
 
@@ -162,108 +160,6 @@ private:
     static const int MAX_FLAKES = 1000;
 };
 
-class ClickableQLabel : public QLabel
-{
-    Q_OBJECT
-public:
-    void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
-    {
-        Q_UNUSED( event );
-        emit doubleClicked();
-    }
-signals:
-    void doubleClicked();
-};
-
-class TimeLabel : public ClickableQLabel
-{
-    Q_OBJECT
-public:
-    enum Display
-    {
-        Elapsed,
-        Remaining,
-        Both
-    };
-
-    TimeLabel( intf_thread_t *_p_intf, TimeLabel::Display _displayType = TimeLabel::Both );
-protected:
-    void mousePressEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
-    {
-        if( displayType == TimeLabel::Elapsed ) return;
-        toggleTimeDisplay();
-        event->accept();
-    }
-    void mouseDoubleClickEvent( QMouseEvent *event ) Q_DECL_OVERRIDE
-    {
-        if( displayType != TimeLabel::Both ) return;
-        event->accept();
-        toggleTimeDisplay();
-        ClickableQLabel::mouseDoubleClickEvent( event );
-    }
-private:
-    intf_thread_t *p_intf;
-    bool b_remainingTime;
-    float cachedPos;
-    vlc_tick_t cachedTime;
-    int cachedLength;
-    TimeLabel::Display displayType;
-
-    char psz_length[MSTRTIME_MAX_SIZE];
-    char psz_time[MSTRTIME_MAX_SIZE];
-    void toggleTimeDisplay();
-    void refresh();
-private slots:
-    void setRemainingTime( bool );
-    void setDisplayPosition( float pos, vlc_tick_t time, int length );
-    void setDisplayPosition( float pos );
-};
-
-class SpeedLabel : public QLabel
-{
-    Q_OBJECT
-public:
-    SpeedLabel( intf_thread_t *, QWidget * );
-    virtual ~SpeedLabel();
-
-protected:
-    void mousePressEvent ( QMouseEvent * event ) Q_DECL_OVERRIDE
-    {
-        showSpeedMenu( event->pos() );
-    }
-private slots:
-    void showSpeedMenu( QPoint );
-    void setRate( float );
-private:
-    intf_thread_t *p_intf;
-    QMenu *speedControlMenu;
-    QString tooltipStringPattern;
-    SpeedControlWidget *speedControl;
-    QWidgetAction *widgetAction;
-};
-
-/******************** Speed Control Widgets ****************/
-class SpeedControlWidget : public QFrame
-{
-    Q_OBJECT
-public:
-    SpeedControlWidget( intf_thread_t *, QWidget * );
-    void updateControls( float );
-private:
-    intf_thread_t* p_intf;
-    QSlider* speedSlider;
-    QDoubleSpinBox* spinBox;
-    int lastValue;
-
-public slots:
-    void activateOnState(PlayerController::PlayingState state);
-
-private slots:
-    void updateRate( int );
-    void updateSpinBoxRate( double );
-    void resetRate();
-};
-
 class CoverArtLabel : public QLabel
 {
     Q_OBJECT
diff --git a/modules/gui/qt/dialogs/dialogs_provider.cpp b/modules/gui/qt/dialogs/dialogs_provider.cpp
index 3eee46f404f1cad8b4d7d9d4cb7122b36f1d4d10..289f2be127247085a50c53514991307d3107b63b 100644
--- a/modules/gui/qt/dialogs/dialogs_provider.cpp
+++ b/modules/gui/qt/dialogs/dialogs_provider.cpp
@@ -51,7 +51,6 @@
 #include "dialogs/help/help.hpp"
 #include "dialogs/gototime/gototime.hpp"
 #include "dialogs/podcast/podcast_configuration.hpp"
-#include "dialogs/toolbar/toolbar.hpp"
 #include "dialogs/toolbar/toolbareditor.hpp"
 #include "dialogs/plugins/plugins.hpp"
 #include "dialogs/epg/epg.hpp"
diff --git a/modules/gui/qt/dialogs/toolbar/toolbar.cpp b/modules/gui/qt/dialogs/toolbar/toolbar.cpp
deleted file mode 100644
index f38f67d597dfef917529cadf4f698238b3c0cb1a..0000000000000000000000000000000000000000
--- a/modules/gui/qt/dialogs/toolbar/toolbar.cpp
+++ /dev/null
@@ -1,933 +0,0 @@
-/*****************************************************************************
- * toolbar.cpp : ToolbarEdit dialog
- ****************************************************************************
- * Copyright (C) 2008-2009 the VideoLAN team
- *
- * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "toolbar.hpp"
-
-/* Widgets */
-#include "util/input_slider.hpp"
-#include "util/customwidgets.hpp"
-#include "components/interface_widgets.hpp"
-#include "util/buttons/DeckButtonsLayout.hpp"
-#include "util/buttons/BrowseButton.hpp"
-#include "util/buttons/RoundButton.hpp"
-#include "util/imagehelper.hpp"
-
-#include "qt.hpp"
-#include "player/player_controller.hpp"
-
-#include <QGroupBox>
-#include <QLabel>
-#include <QComboBox>
-#include <QListWidget>
-#include <QSpinBox>
-#include <QRubberBand>
-#include <QDrag>
-#include <QDragEnterEvent>
-#include <QDialogButtonBox>
-#include <QInputDialog>
-#include <QMimeData>
-#include <QFormLayout>
-#include <QVBoxLayout>
-#include <QTabWidget>
-#include <QSignalMapper>
-
-#include <assert.h>
-
-ToolbarEditDialog::ToolbarEditDialog( QWidget *_w, intf_thread_t *_p_intf)
-                  : QVLCDialog( _w,  _p_intf )
-{
-    setWindowTitle( qtr( "Toolbars Editor" ) );
-    setWindowRole( "vlc-toolbars-editor" );
-    QGridLayout *mainLayout = new QGridLayout( this );
-    setMinimumWidth( 600 );
-    setAttribute( Qt::WA_DeleteOnClose );
-
-    /* main GroupBox */
-    QGroupBox *widgetBox = new QGroupBox( qtr( "Toolbar Elements") , this );
-    widgetBox->setSizePolicy( QSizePolicy::Preferred,
-                              QSizePolicy::MinimumExpanding );
-    QGridLayout *boxLayout = new QGridLayout( widgetBox );
-
-    flatBox = new QCheckBox( qtr( "Flat Button" ) );
-    flatBox->setToolTip( qtr( "Next widget style" ) );
-    bigBox = new QCheckBox( qtr( "Big Button" ) );
-    bigBox->setToolTip( flatBox->toolTip() );
-    shinyBox = new QCheckBox( qtr( "Native Slider" ) );
-    shinyBox->setToolTip( flatBox->toolTip() );
-
-    boxLayout->addWidget( new WidgetListing( p_intf, this ), 1, 0, 1, -1 );
-    boxLayout->addWidget( flatBox, 0, 0 );
-    boxLayout->addWidget( bigBox, 0, 1 );
-    boxLayout->addWidget( shinyBox, 0, 2 );
-    mainLayout->addWidget( widgetBox, 5, 0, 3, 6 );
-
-    QTabWidget *tabWidget = new QTabWidget();
-    mainLayout->addWidget( tabWidget, 1, 0, 4, 9 );
-
-    /* Main ToolBar */
-    QWidget *mainToolbarBox = new QWidget();
-    tabWidget->addTab( mainToolbarBox, qtr( "Main Toolbar" ) );
-    QFormLayout *mainTboxLayout = new QFormLayout( mainToolbarBox );
-
-    positionCheckbox = new QCheckBox( qtr( "Above the Video" ) );
-    positionCheckbox->setChecked(
-                getSettings()->value( "MainWindow/ToolbarPos", false ).toBool() );
-    mainTboxLayout->addRow( new QLabel( qtr( "Toolbar position:" ) ),
-                            positionCheckbox );
-
-    QString line1 = getSettings()->value( "MainWindow/MainToolbar1",
-                                          MAIN_TB1_DEFAULT ).toString();
-    controller1 = new DroppingController( p_intf, line1, this );
-    mainTboxLayout->addRow( new QLabel( qtr("Line 1:") ), controller1 );
-
-    QString line2 = getSettings()->value( "MainWindow/MainToolbar2",
-                                          MAIN_TB2_DEFAULT ).toString();
-    controller2 = new DroppingController( p_intf, line2, this );
-    mainTboxLayout->addRow( new QLabel( qtr("Line 2:") ), controller2 );
-
-    /* TimeToolBar */
-    QString line = getSettings()->value( "MainWindow/InputToolbar",
-                                         INPT_TB_DEFAULT ).toString();
-    controller = new DroppingController( p_intf, line, this );
-    QWidget *timeToolbarBox = new QWidget();
-    timeToolbarBox->setLayout( new QVBoxLayout() );
-    timeToolbarBox->layout()->addWidget( controller );
-    tabWidget->addTab( timeToolbarBox, qtr( "Time Toolbar" ) );
-
-    /* Advanced ToolBar */
-    QString lineA = getSettings()->value( "MainWindow/AdvToolbar",
-                                          ADV_TB_DEFAULT ).toString();
-    controllerA = new DroppingController( p_intf, lineA, this );
-    QWidget *advToolbarBox = new QWidget();
-    advToolbarBox->setLayout( new QVBoxLayout() );
-    advToolbarBox->layout()->addWidget( controllerA );
-    tabWidget->addTab( advToolbarBox, qtr( "Advanced Widget" ) );
-
-    /* FSCToolBar */
-    QString lineFSC = getSettings()->value( "MainWindow/FSCtoolbar",
-                                            FSC_TB_DEFAULT ).toString();
-    controllerFSC = new DroppingController( p_intf, lineFSC, this );
-    QWidget *FSCToolbarBox = new QWidget();
-    FSCToolbarBox->setLayout( new QVBoxLayout() );
-    FSCToolbarBox->layout()->addWidget( controllerFSC );
-    tabWidget->addTab( FSCToolbarBox, qtr( "Fullscreen Controller" ) );
-
-    /* Profile */
-    QGridLayout *profileBoxLayout = new QGridLayout();
-
-    profileCombo = new QComboBox;
-
-    QToolButton *newButton = new QToolButton;
-    newButton->setIcon( QIcon( ":/new.svg" ) );
-    newButton->setToolTip( qtr("New profile") );
-    QToolButton *deleteButton = new QToolButton;
-    deleteButton->setIcon( QIcon( ":/toolbar/clear.svg" ) );
-    deleteButton->setToolTip( qtr( "Delete the current profile" ) );
-
-    profileBoxLayout->addWidget( new QLabel( qtr( "Select profile:" ) ), 0, 0 );
-    profileBoxLayout->addWidget( profileCombo, 0, 1 );
-    profileBoxLayout->addWidget( newButton, 0, 2 );
-    profileBoxLayout->addWidget( deleteButton, 0, 3 );
-
-    mainLayout->addLayout( profileBoxLayout, 0, 0, 1, 9 );
-
-    /* Fill combos */
-    int i_size = getSettings()->beginReadArray( "ToolbarProfiles" );
-    for( int i = 0; i < i_size; i++ )
-    {
-        getSettings()->setArrayIndex(i);
-        profileCombo->addItem( getSettings()->value( "ProfileName" ).toString(),
-                               getSettings()->value( "Value" ).toString() );
-    }
-    getSettings()->endArray();
-
-    /* Load defaults ones if we have no combos */
-    /* We could decide that we load defaults on first launch of the dialog
-       or when the combo is back to 0. I choose the second solution, because some clueless
-       user might hit on delete a bit too much, but discussion is opened. -- jb */
-    if( i_size == 0 )
-    {
-        profileCombo->addItem( PROFILE_NAME_6, QString( VALUE_6 ) );
-        profileCombo->addItem( PROFILE_NAME_1, QString( VALUE_1 ) );
-        profileCombo->addItem( PROFILE_NAME_2, QString( VALUE_2 ) );
-        profileCombo->addItem( PROFILE_NAME_3, QString( VALUE_3 ) );
-        profileCombo->addItem( PROFILE_NAME_4, QString( VALUE_4 ) );
-        profileCombo->addItem( PROFILE_NAME_5, QString( VALUE_5 ) );
-    }
-    profileCombo->setCurrentIndex( -1 );
-
-    /* Build and prepare our preview */
-    PreviewWidget *previewWidget = new PreviewWidget( controller, controller1, controller2,
-                                                      positionCheckbox->isChecked() );
-    QGroupBox *previewBox = new QGroupBox( qtr("Preview"), this );
-    previewBox->setLayout( new QVBoxLayout() );
-    previewBox->layout()->addWidget( previewWidget );
-    mainLayout->addWidget( previewBox, 5, 6, 3, 3 );
-    CONNECT( positionCheckbox, stateChanged(int),
-             previewWidget, setBarsTopPosition(int) );
-
-    /* Buttons */
-    QDialogButtonBox *okCancel = new QDialogButtonBox;
-    QPushButton *okButton = new QPushButton( qtr( "Cl&ose" ), this );
-    okButton->setDefault( true );
-    QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ), this );
-    okCancel->addButton( okButton, QDialogButtonBox::AcceptRole );
-    okCancel->addButton( cancelButton, QDialogButtonBox::RejectRole );
-
-    BUTTONACT( deleteButton, deleteProfile() );
-    BUTTONACT( newButton, newProfile() );
-    CONNECT( profileCombo, currentIndexChanged( int ), this, changeProfile( int ) );
-    BUTTONACT( okButton, close() );
-    BUTTONACT( cancelButton, cancel() );
-    mainLayout->addWidget( okCancel, 8, 0, 1, 9 );
-}
-
-
-ToolbarEditDialog::~ToolbarEditDialog()
-{
-    getSettings()->beginWriteArray( "ToolbarProfiles" );
-    for( int i = 0; i < profileCombo->count(); i++ )
-    {
-        getSettings()->setArrayIndex(i);
-        getSettings()->setValue( "ProfileName", profileCombo->itemText( i ) );
-        getSettings()->setValue( "Value", profileCombo->itemData( i ) );
-    }
-    getSettings()->endArray();
-}
-
-void ToolbarEditDialog::newProfile()
-{
-    bool ok;
-    QString name =  QInputDialog::getText( this, qtr( "Profile Name" ),
-                 qtr( "Please enter the new profile name." ), QLineEdit::Normal, 0, &ok );
-    if( !ok ) return;
-
-    QString temp = QString::number( !!positionCheckbox->isChecked() );
-    temp += "|" + controller1->getValue();
-    temp += "|" + controller2->getValue();
-    temp += "|" + controllerA->getValue();
-    temp += "|" + controller->getValue();
-    temp += "|" + controllerFSC->getValue();
-
-    profileCombo->addItem( name, temp );
-    profileCombo->setCurrentIndex( profileCombo->count() - 1 );
-}
-
-void ToolbarEditDialog::deleteProfile()
-{
-    profileCombo->removeItem( profileCombo->currentIndex() );
-}
-
-void ToolbarEditDialog::changeProfile( int i )
-{
-    QStringList qs_list = profileCombo->itemData( i ).toString().split( "|" );
-    if( qs_list.count() < 6 )
-        return;
-
-    positionCheckbox->setChecked( qs_list[0].toInt() );
-    controller1->resetLine( qs_list[1] );
-    controller2->resetLine( qs_list[2] );
-    controllerA->resetLine( qs_list[3] );
-    controller->resetLine( qs_list[4] );
-    controllerFSC->resetLine( qs_list[5] );
-}
-
-void ToolbarEditDialog::close()
-{
-    bool isChecked = getSettings()->value( "MainWindow/ToolbarPos" ).toBool();
-    QString c1 = getSettings()->value( "MainWindow/MainToolbar1" ).toString();
-    QString c2 = getSettings()->value( "MainWindow/MainToolbar2" ).toString();
-    QString cA = getSettings()->value( "MainWindow/AdvToolbar" ).toString();
-    QString c = getSettings()->value( "MainWindow/InputToolbar" ).toString();
-    QString cFSC = getSettings()->value( "MainWindow/FSCToolbar" ).toString();
-
-    if ( isChecked == positionCheckbox->isChecked()
-         && c1 == controller1->getValue()
-         && c2 == controller2->getValue()
-         && cA == controllerA->getValue()
-         && c == controller->getValue()
-         && cFSC == controllerFSC->getValue() )
-    {
-        reject();
-        return;
-    }
-
-    getSettings()->setValue( "MainWindow/ToolbarPos", !!positionCheckbox->isChecked() );
-    getSettings()->setValue( "MainWindow/MainToolbar1", controller1->getValue() );
-    getSettings()->setValue( "MainWindow/MainToolbar2", controller2->getValue() );
-    getSettings()->setValue( "MainWindow/AdvToolbar", controllerA->getValue() );
-    getSettings()->setValue( "MainWindow/InputToolbar", controller->getValue() );
-    getSettings()->setValue( "MainWindow/FSCtoolbar", controllerFSC->getValue() );
-    getSettings()->sync();
-    accept();
-}
-
-void ToolbarEditDialog::cancel()
-{
-    reject();
-}
-
-
-PreviewWidget::PreviewWidget( QWidget *a, QWidget *b, QWidget *c, bool barsTopPosition )
-               : QWidget( a )
-{
-    bars[0] = a;
-    bars[1] = b;
-    bars[2] = c;
-    for ( int i=0; i<3; i++ ) bars[i]->installEventFilter( this );
-    setAutoFillBackground( true );
-    setBarsTopPosition( barsTopPosition );
-}
-
-void PreviewWidget::setBarsTopPosition( int b )
-{
-    b_top = b;
-    repaint();
-}
-
-void PreviewWidget::paintEvent( QPaintEvent * )
-{
-    int i_total = 0, i_offset = 0, i;
-    QPainter painter( this );
-    QPixmap pixmaps[3];
-
-    for( int i=0; i<3; i++ )
-    {
-        pixmaps[i] = bars[i]->grab( bars[i]->contentsRect() );
-        /* Because non shown widgets do not have their bitmap updated, we need
-           to force redraw to grab a pixmap matching layout size */
-        if( pixmaps[i].size() != bars[i]->contentsRect().size() )
-        {
-            bars[i]->layout()->invalidate();
-            pixmaps[i] = bars[i]->grab( bars[i]->contentsRect() );
-        }
-
-        for( int j=0; j < bars[i]->layout()->count(); j++ )
-        {
-            QLayoutItem *item = bars[i]->layout()->itemAt( j );
-            if ( !strcmp( item->widget()->metaObject()->className(), "QLabel" ) )
-            {
-                QPainter eraser( &pixmaps[i] );
-                eraser.fillRect( item->geometry(), palette().window() );
-                eraser.end();
-            }
-        }
-        pixmaps[i] = pixmaps[i].scaled( size(), Qt::KeepAspectRatio );
-    }
-
-    for( i=0; i<3; i++ )
-        i_total += pixmaps[i].size().height();
-
-    /* Draw top bars */
-    i = ( b_top ) ? 1 : 3;
-    for( ; i<3; i++ )
-    {
-        painter.drawPixmap( pixmaps[i].rect().translated( 0, i_offset ), pixmaps[i] );
-        i_offset += pixmaps[i].rect().height();
-    }
-
-    /* Draw central area */
-    QRect conearea( 0, i_offset, size().width(), size().height() - i_total );
-    painter.fillRect( conearea, Qt::black );
-    QPixmap cone = QPixmap( ":/logo/vlc128.png" );
-    if ( ( conearea.size() - QSize(10, 10) - cone.size() ).isEmpty() )
-        cone = cone.scaled( conearea.size() - QSize(10, 10), Qt::KeepAspectRatio );
-    if ( cone.size().isValid() )
-    {
-        painter.drawPixmap( ((conearea.size() - cone.size()) / 2).width(),
-                            i_offset + ((conearea.size() - cone.size()) / 2).height(),
-                            cone );
-    }
-
-    /* Draw bottom bars */
-    i_offset += conearea.height();
-    for( i = 0 ; i< ((b_top) ? 1 : 3); i++ )
-    {
-        painter.drawPixmap( pixmaps[i].rect().translated( 0, i_offset ), pixmaps[i] );
-        i_offset += pixmaps[i].rect().height();
-    }
-
-    /* Draw overlay */
-    painter.fillRect( rect(), QColor( 255, 255, 255, 128 ) );
-
-    painter.end();
-}
-
-bool PreviewWidget::eventFilter( QObject *obj, QEvent *event )
-{
-    if ( obj == this )
-        return QWidget::eventFilter( obj, event );
-
-    if ( event->type() == QEvent::LayoutRequest )
-        repaint();
-    return false;
-}
-
-/************************************************
- *  Widget Listing:
- * Creation of the list of drawed lovely buttons
- ************************************************/
-WidgetListing::WidgetListing( intf_thread_t *p_intf, QWidget *_parent )
-              : QListWidget( _parent )
-{
-    /* We need the parent to know the options checked */
-    parent = qobject_cast<ToolbarEditDialog *>(_parent);
-    assert( parent );
-
-    /* Normal options */
-    setViewMode( QListView::ListMode );
-    setTextElideMode( Qt::ElideNone );
-    setDragEnabled( true );
-    int icon_size = fontMetrics().height();
-    setIconSize( QSize( icon_size * 2, icon_size ) );
-    /* All the buttons do not need a special rendering */
-    for( int i = 0; i < BUTTON_MAX; i++ )
-    {
-        QListWidgetItem *widgetItem = new QListWidgetItem( this );
-        widgetItem->setText( qtr( nameL[i] ) );
-        widgetItem->setSizeHint( QSize( widgetItem->sizeHint().width(), 32 ) );
-
-        widgetItem->setIcon( QIcon( iconL[i] ) );
-        widgetItem->setData( Qt::UserRole, QVariant( i ) );
-        widgetItem->setToolTip( widgetItem->text() );
-        addItem( widgetItem );
-    }
-
-    /* Spacers are yet again a different thing */
-    QListWidgetItem *widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space.svg" ),
-            qtr( "Spacer" ), this );
-    widgetItem->setData( Qt::UserRole, WIDGET_SPACER );
-    widgetItem->setToolTip( widgetItem->text() );
-    widgetItem->setSizeHint( QSize( widgetItem->sizeHint().width(), 32 ) );
-    addItem( widgetItem );
-
-    widgetItem = new QListWidgetItem( QIcon( ":/toolbar/space.svg" ),
-            qtr( "Expanding Spacer" ), this );
-    widgetItem->setData( Qt::UserRole, WIDGET_SPACER_EXTEND );
-    widgetItem->setToolTip( widgetItem->text() );
-    widgetItem->setSizeHint( QSize( widgetItem->sizeHint().width(), 32 ) );
-    addItem( widgetItem );
-
-    /**
-     * For all other widgets, we create then, do a pseudo rendering in
-     * a pixmaps for the view, and delete the object
-     *
-     * A lot of code is retaken from the Abstract, but not exactly...
-     * So, rewrite.
-     * They are better ways to deal with this, but I doubt that this is
-     * necessary. If you feel like you have the time, be my guest.
-     * --
-     * jb
-     **/
-    for( int i = SPLITTER; i < SPECIAL_MAX; i++ )
-    {
-        QWidget *widget = NULL;
-        QListWidgetItem *widgetItem = new QListWidgetItem;
-        widgetItem->setSizeHint( QSize( widgetItem->sizeHint().width(), 32 ) );
-        switch( i )
-        {
-        case SPLITTER:
-            {
-                QFrame *line = new QFrame( this );
-                line->setFrameShape( QFrame::VLine );
-                line->setFrameShadow( QFrame::Raised );
-                line->setLineWidth( 0 ); line->setMidLineWidth( 1 );
-                widget = line;
-            }
-            widgetItem->setText( qtr("Splitter") );
-            break;
-        case INPUT_SLIDER:
-            {
-                SeekSlider *slider = new SeekSlider( p_intf, Qt::Horizontal, this );
-                widget = slider;
-            }
-            widgetItem->setText( qtr("Time Slider") );
-            break;
-        case VOLUME:
-            {
-                SoundWidget *snd = new SoundWidget( this, p_intf,
-                        parent->getOptions() & WIDGET_SHINY );
-                widget = snd;
-            }
-            widgetItem->setText( qtr("Volume") );
-            break;
-        case VOLUME_SPECIAL:
-            {
-                QListWidgetItem *widgetItem = new QListWidgetItem( this );
-                widgetItem->setText( qtr("Small Volume") );
-                widgetItem->setIcon( QIcon( ":/toolbar/volume-medium.svg" ) );
-                widgetItem->setData( Qt::UserRole, QVariant( i ) );
-                addItem( widgetItem );
-            }
-            continue;
-        case TIME_LABEL:
-            {
-                QLabel *timeLabel = new QLabel( "12:42/2:12:42", this );
-                widget = timeLabel;
-            }
-            widgetItem->setText( qtr("Time") );
-            break;
-        case MENU_BUTTONS:
-            {
-                QWidget *discFrame = new QWidget( this );
-                //discFrame->setLineWidth( 1 );
-                QHBoxLayout *discLayout = new QHBoxLayout( discFrame );
-                discLayout->setSpacing( 0 ); discLayout->setMargin( 0 );
-
-                QToolButton *prevSectionButton = new QToolButton( discFrame );
-                prevSectionButton->setIcon( QIcon( ":/toolbar/dvd_prev.svg" ) );
-                prevSectionButton->setToolTip( qtr("Previous Chapter/Title" ) );
-                discLayout->addWidget( prevSectionButton );
-
-                QToolButton *nextButton = new QToolButton( discFrame );
-                nextButton->setIcon( QIcon( ":/toolbar/dvd_next.svg" ) );
-                nextButton->setToolTip( qtr("Next Chapter/Title" ) );
-                discLayout->addWidget( nextButton );
-
-                QToolButton *menuButton = new QToolButton( discFrame );
-                menuButton->setIcon( QIcon( ":/toolbar/dvd_menu.svg" ) );
-                menuButton->setToolTip( qtr( "Menu" ) );
-                discLayout->addWidget( menuButton );
-
-                widget = discFrame;
-            }
-            widgetItem->setText( qtr("DVD menus") );
-            break;
-        case TELETEXT_BUTTONS:
-            {
-                QWidget *telexFrame = new QWidget( this );
-                QHBoxLayout *telexLayout = new QHBoxLayout( telexFrame );
-                telexLayout->setSpacing( 0 ); telexLayout->setMargin( 0 );
-
-                QToolButton *telexOn = new QToolButton( telexFrame );
-                telexOn->setIcon( QIcon( ":/toolbar/tv.svg" ) );
-                telexLayout->addWidget( telexOn );
-
-                QToolButton *telexTransparent = new QToolButton;
-                telexTransparent->setIcon( QIcon( ":/toolbar/tvtelx.svg" ) );
-                telexTransparent->setToolTip( qtr("Teletext transparency") );
-                telexLayout->addWidget( telexTransparent );
-
-                QSpinBox *telexPage = new QSpinBox;
-                telexLayout->addWidget( telexPage );
-
-                widget = telexFrame;
-            }
-            widgetItem->setText( qtr("Teletext") );
-            break;
-        case ADVANCED_CONTROLLER:
-            {
-                AdvControlsWidget *advControls = new AdvControlsWidget( p_intf, this );
-                widget = advControls;
-            }
-            widgetItem->setText( qtr("Advanced Buttons") );
-            break;
-        case PLAYBACK_BUTTONS:
-            {
-                widget = new QWidget;
-                DeckButtonsLayout *layout = new DeckButtonsLayout( widget );
-                BrowseButton *prev = new BrowseButton( widget, BrowseButton::Backward );
-                BrowseButton *next = new BrowseButton( widget );
-                RoundButton *play = new RoundButton( widget );
-                layout->setBackwardButton( prev );
-                layout->setForwardButton( next );
-                layout->setRoundButton( play );
-            }
-            widgetItem->setText( qtr("Playback Buttons") );
-            break;
-        case ASPECT_RATIO_COMBOBOX:
-            widget = new AspectRatioComboBox( p_intf, THEMIM->getAspectRatio() );
-            widgetItem->setText( qtr("Aspect ratio selector") );
-            break;
-        case SPEED_LABEL:
-            widget = new SpeedLabel( p_intf, this );
-            widgetItem->setText( qtr("Speed selector") );
-            break;
-        case TIME_LABEL_ELAPSED:
-            widget = new QLabel( "2:42", this );
-            widgetItem->setText( qtr("Elapsed time") );
-            break;
-        case TIME_LABEL_REMAINING:
-            widget = new QLabel( "-2:42", this );
-            widgetItem->setText( qtr("Total/Remaining time") );
-            break;
-        default:
-            msg_Warn( p_intf, "This should not happen %i", i );
-            break;
-        }
-
-        if( widget == NULL ) continue;
-
-
-        widgetItem->setIcon( QIcon( widget->grab() ) );
-        widgetItem->setToolTip( widgetItem->text() );
-        widget->hide();
-        widgetItem->setData( Qt::UserRole, QVariant( i ) );
-
-        addItem( widgetItem );
-        delete widget;
-    }
-}
-
-void WidgetListing::startDrag( Qt::DropActions /*supportedActions*/ )
-{
-    QListWidgetItem *item = currentItem();
-
-    QByteArray itemData;
-    QDataStream dataStream( &itemData, QIODevice::WriteOnly );
-
-    int i_type = item->data( Qt::UserRole ).toInt();
-    int i_option = parent->getOptions();
-    dataStream << i_type << i_option;
-
-    /* Create a new dragging event */
-    QDrag *drag = new QDrag( this );
-
-    /* With correct mimedata */
-    QMimeData *mimeData = new QMimeData;
-    mimeData->setData( "vlc/button-bar", itemData );
-    drag->setMimeData( mimeData );
-
-    /* And correct pixmap */
-    QPixmap aPixmap = item->icon().pixmap( QSize( 22, 22 ) );
-    drag->setPixmap( aPixmap );
-    drag->setHotSpot( QPoint( 20, 20 ) );
-
-    /* We want to keep a copy */
-    drag->exec( Qt::CopyAction | Qt::MoveAction );
-}
-
-/*
- * The special controller with drag'n drop abilities.
- * We don't do this in the main controller, since we don't want the OverHead
- * to propagate there too
- */
-DroppingController::DroppingController( intf_thread_t *_p_intf,
-                                        const QString& line,
-                                        QWidget *_parent )
-                   : AbstractController( _p_intf, _parent )
-{
-    RTL_UNAFFECTED_WIDGET
-    rubberband = NULL;
-    b_draging = false;
-    setAcceptDrops( true );
-    controlLayout = new QHBoxLayout( this );
-    controlLayout->setSpacing( 5 );
-    controlLayout->setMargin( 0 );
-    setFrameShape( QFrame::StyledPanel );
-    setFrameShadow( QFrame::Raised );
-    setMinimumHeight( 20 );
-
-    parseAndCreate( line, controlLayout );
-}
-
-void DroppingController::resetLine( const QString& line )
-{
-    hide();
-    QLayoutItem *child;
-    while( (child = controlLayout->takeAt( 0 ) ) != 0 )
-    {
-        child->widget()->hide();
-        delete child;
-    }
-
-    parseAndCreate( line, controlLayout );
-    show();
-}
-
-/* Overloading the AbstractController one, because we don't manage the
-   Spacing items in the same ways */
-void DroppingController::createAndAddWidget( QBoxLayout *newControlLayout,
-                                             int i_index,
-                                             buttonType_e i_type,
-                                             int i_option )
-{
-    /* Special case for SPACERS, who aren't QWidgets */
-    if( i_type == WIDGET_SPACER || i_type == WIDGET_SPACER_EXTEND )
-    {
-        QLabel *label = new QLabel( this );
-        label->setPixmap( ImageHelper::loadSvgToPixmap( ":/toolbar/space.svg", height(), height() ) );
-        if( i_type == WIDGET_SPACER_EXTEND )
-        {
-            label->setSizePolicy( QSizePolicy::MinimumExpanding,
-                    QSizePolicy::Preferred );
-
-            /* Create a box around it */
-            label->setFrameStyle( QFrame::Panel | QFrame::Sunken );
-            label->setLineWidth ( 1 );
-            label->setAlignment( Qt::AlignCenter );
-        }
-        else
-            label->setSizePolicy( QSizePolicy::Fixed,
-                    QSizePolicy::Preferred );
-
-        /* Install event Filter for drag'n drop */
-        label->installEventFilter( this );
-        newControlLayout->insertWidget( i_index, label );
-    }
-
-    /* Normal Widgets */
-    else
-    {
-        QWidget *widg = createWidget( i_type, i_option );
-        if( !widg ) return;
-
-        /* Install the Event Filter in order to catch the drag */
-        widg->setParent( this );
-        widg->installEventFilter( this );
-
-        /* We are in a complex widget, we need to stop events on children too */
-        if( i_type >= TIME_LABEL && i_type < SPECIAL_MAX )
-        {
-            QList<QObject *>children = widg->children();
-
-            QObject *child;
-            foreach( child, children )
-            {
-                QWidget *childWidg;
-                if( ( childWidg = qobject_cast<QWidget *>( child ) ) )
-                {
-                    child->installEventFilter( this );
-                    childWidg->setEnabled( true );
-                }
-            }
-
-            /* Decorating the frames when possible */
-            QFrame *frame;
-            if( (i_type >= MENU_BUTTONS || i_type == TIME_LABEL) /* Don't bother to check for volume */
-                && ( frame = qobject_cast<QFrame *>( widg ) ) != NULL )
-            {
-                frame->setFrameStyle( QFrame::Panel | QFrame::Raised );
-                frame->setLineWidth ( 1 );
-            }
-        }
-
-        /* Some Widgets are deactivated at creation */
-        widg->setEnabled( true );
-        widg->show();
-        newControlLayout->insertWidget( i_index, widg );
-    }
-
-    /* QList and QBoxLayout don't act the same with insert() */
-    if( i_index < 0 ) i_index = newControlLayout->count() - 1;
-
-    doubleInt *value = new doubleInt;
-    value->i_type = i_type;
-    value->i_option = i_option;
-
-    widgetList.insert( i_index, value );
-}
-
-DroppingController::~DroppingController()
-{
-    qDeleteAll( widgetList );
-    widgetList.clear();
-}
-
-QString DroppingController::getValue()
-{
-    QString qs = "";
-
-    for( int i = 0; i < controlLayout->count(); i++ )
-    {
-        doubleInt *dI = widgetList.at( i );
-        assert( dI );
-
-        qs.append( QString::number( dI->i_type ) );
-        if( dI->i_option ) qs.append( "-" + QString::number( dI->i_option ) );
-        qs.append( ';' );
-    }
-    return qs;
-}
-
-void DroppingController::dragEnterEvent( QDragEnterEvent * event )
-{
-    if( event->mimeData()->hasFormat( "vlc/button-bar" ) )
-        event->accept();
-    else
-        event->ignore();
-}
-
-void DroppingController::dragMoveEvent( QDragMoveEvent *event )
-{
-    QPoint origin = event->pos();
-
-    int i_pos = getParentPosInLayout( origin );
-    bool b_end = false;
-
-    /* Both sides of the frame */
-    if( i_pos == -1 )
-    {
-        if( rubberband ) rubberband->hide();
-        return;
-    }
-
-    /* Last item is special because of underlying items */
-    if( i_pos >= controlLayout->count() )
-    {
-        i_pos--;
-        b_end = true;
-    }
-
-    /* Query the underlying item for size && middles */
-    QLayoutItem *tempItem = controlLayout->itemAt( i_pos ); assert( tempItem );
-    QWidget *temp = tempItem->widget(); assert( temp );
-
-    /* Position assignment */
-    origin.ry() = 0;
-    origin.rx() = temp->x() - 2;
-
-    if( b_end ) origin.rx() += temp->width();
-
-    if( !rubberband )
-        rubberband = new QRubberBand( QRubberBand::Line, this );
-    rubberband->setGeometry( origin.x(), origin.y(), 4, height() );
-    rubberband->show();
-}
-
-inline int DroppingController::getParentPosInLayout( QPoint point )
-{
-    point.ry() = height() / 2 ;
-    QPoint origin = mapToGlobal ( point );
-
-    QWidget *tempWidg = QApplication::widgetAt( origin );
-    if( tempWidg == NULL )
-        return -1;
-
-    int i = controlLayout->indexOf( tempWidg );
-    if( i == -1 )
-    {
-        i = controlLayout->indexOf( tempWidg->parentWidget() );
-        tempWidg = tempWidg->parentWidget();
-    }
-
-    /* Return the nearest position */
-    if( ( point.x() - tempWidg->x()  > tempWidg->width() / 2 ) && i != -1 )
-        i++;
-
-    //    msg_Dbg( p_intf, "%i", i);
-    return i;
-}
-
-void DroppingController::dropEvent( QDropEvent *event )
-{
-    int i = getParentPosInLayout( event->pos() );
-
-    QByteArray data = event->mimeData()->data( "vlc/button-bar" );
-    QDataStream dataStream(&data, QIODevice::ReadOnly);
-
-    int i_option = 0, i_type = 0;
-    dataStream >> i_type >> i_option;
-
-    createAndAddWidget( controlLayout, i, (buttonType_e)i_type, i_option );
-
-    /* Hide by precaution, you don't exactly know what could have happened in
-       between */
-    if( rubberband ) rubberband->hide();
-}
-
-void DroppingController::dragLeaveEvent ( QDragLeaveEvent * event )
-{
-    if( rubberband ) rubberband->hide();
-    event->accept();
-}
-
-/**
- * Overloading doAction to block any action
- **/
-void DroppingController::doAction( int i )
-{
-    VLC_UNUSED( i );
-}
-
-bool DroppingController::eventFilter( QObject *obj, QEvent *event )
-{
-    switch( event->type() )
-    {
-        case QEvent::MouseButtonPress:
-            b_draging = true;
-            return true;
-        case QEvent::MouseButtonRelease:
-            b_draging = false;
-            return true;
-        case QEvent::MouseMove:
-            {
-            if( !b_draging ) return true;
-            QWidget *widg = static_cast<QWidget*>(obj);
-
-            QByteArray itemData;
-            QDataStream dataStream( &itemData, QIODevice::WriteOnly );
-
-            int i = -1;
-            i = controlLayout->indexOf( widg );
-            if( i == -1 )
-            {
-                i = controlLayout->indexOf( widg->parentWidget() );
-                widg = widg->parentWidget();
-                /* NOTE: be extra-careful Now with widg access */
-            }
-
-            if( i == -1 ) return true;
-            i_dragIndex = i;
-
-            doubleInt *dI = widgetList.at( i );
-
-            int i_type = dI->i_type;
-            int i_option = dI->i_option;
-            dataStream << i_type << i_option;
-
-            /* With correct mimedata */
-            QMimeData *mimeData = new QMimeData;
-            mimeData->setData( "vlc/button-bar", itemData );
-
-            QDrag *drag = new QDrag( widg );
-            drag->setMimeData( mimeData );
-
-            /* Remove before the drag to not mess DropEvent,
-               that will createAndAddWidget */
-            widgetList.removeAt( i );
-            controlLayout->removeWidget( widg );
-            widg->hide();
-
-            /* Start the effective drag */
-            drag->exec(Qt::CopyAction | Qt::MoveAction, Qt::MoveAction);
-            b_draging = false;
-
-            delete dI;
-            }
-            return true;
-
-        case QEvent::MouseButtonDblClick:
-        case QEvent::EnabledChange:
-        case QEvent::Hide:
-        case QEvent::HideToParent:
-        case QEvent::Move:
-        case QEvent::ZOrderChange:
-            return true;
-        default:
-            return false;
-    }
-}
diff --git a/modules/gui/qt/dialogs/toolbar/toolbar.hpp b/modules/gui/qt/dialogs/toolbar/toolbar.hpp
deleted file mode 100644
index 166f8a336758faf75c351192f8aa6f8bd11a16f7..0000000000000000000000000000000000000000
--- a/modules/gui/qt/dialogs/toolbar/toolbar.hpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/*****************************************************************************
- * toolbar.hpp : ToolbarEdit dialogs
- ****************************************************************************
- * Copyright (C) 2008-2011 the VideoLAN team
- *
- * Authors: Jean-Baptiste Kempf <jb (at) videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef QVLC_TOOLBAREDIT_DIALOG_H_
-#define QVLC_TOOLBAREDIT_DIALOG_H_ 1
-
-#include "util/qvlcframe.hpp"                                 /* QVLCDialog */
-#include "components/controller.hpp"                  /* AbstractController */
-
-#include <QListWidget>
-#include <QCheckBox>
-
-#define PROFILE_NAME_1 "VLC 1.1.x Style"
-#define VALUE_1 "0|64;39;64;38;65;|0-2;64;3;1;4;64;7;10;9;64-4;20;19;64-4;37;65;35-4;|12;11;13;14;|5-1;33;6-1;|0-2;64;3;1;4;64;37;64;38;64;8;65;25;35-4;34;"
-#define PROFILE_NAME_2 "VLC 0.8.x Style"
-#define VALUE_2 "1|64;39-1;64;38;|2-1;32-4;0-5;1-5;32-5;3-5;5-5;6-5;4-5;32-5;10-1;64-1;35-1;65;|12-1;11-1;13-1;14-1;|33;37-4;|0-5;1-5;32-1;1-5;5-1;6-1;4-5;32-1;12-5;11-1;65;34-4;35-1;"
-#define PROFILE_NAME_3 "Minimalist Style"
-#define VALUE_3 "0|64;65;|0-7;64;3-1;1-5;4-1;64;12-5;64-5;37-5;38-5;64-4;10-1;65;36-4;|11-5;13-5;14-5;|5-1;33;6-1;|0-5;64;3-5;1-5;4-5;64;12-5;65;34-4;35-1;"
-#define PROFILE_NAME_4 "One-Liner Style"
-#define VALUE_4 "0|64;38;65;|0-4;64;3;1;4;64;7;10;9;64-4;39;64-4;37;65;36-4;|12;11;14;13;|5-1;33;6-1;|0-2;64;3;1;4;64;37;64;38;64;8;65;25;35-4;34;"
-#define PROFILE_NAME_5 "Simplest Style"
-#define VALUE_5 "0||36-4;65-4;0-7;4-5;1-5;65-4;7-5;|12-4;11;13;||36-4;65-4;0-5;4-5;1-5;65;8-5;"
-#define PROFILE_NAME_6 "VLC 2.x.x Style"
-#define VALUE_6 "0|64;39;64;38;65;|0-2;64;3;1;4;64;7;9;64;10;20;19;64-4;37;65;35-4;|12;11;13;14;|43;33-4;44;|0-2;64;3;1;4;64;37;64;38;64;8;65;25;35-4;34;"
-
-class ToolbarEditDialog;
-class DroppingController;
-class QComboBox;
-class QRubberBand;
-
-class PreviewWidget : public QWidget
-{
-    Q_OBJECT
-
-public:
-    PreviewWidget( QWidget *, QWidget *, QWidget *, bool );
-
-public slots:
-    void setBarsTopPosition( int b );
-
-protected:
-    void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
-    bool eventFilter(QObject *obj, QEvent *event) Q_DECL_OVERRIDE;
-
-private:
-    QWidget * bars[3];
-    bool b_top;
-};
-
-class WidgetListing : public QListWidget
-{
-    Q_OBJECT
-public:
-    WidgetListing( intf_thread_t *, QWidget *_parent = 0 );
-protected:
-    void startDrag( Qt::DropActions /*supportedActions*/ ) Q_DECL_OVERRIDE;
-private:
-    ToolbarEditDialog *parent;
-};
-
-class ToolbarEditDialog : public QVLCDialog
-{
-    Q_OBJECT
-public:
-    ToolbarEditDialog( QWidget *, intf_thread_t * );
-    int getOptions() { return flatBox->isChecked() * WIDGET_FLAT +
-                        bigBox->isChecked() * WIDGET_BIG +
-                        !shinyBox->isChecked() * WIDGET_SHINY; }
-    virtual ~ToolbarEditDialog();
-
-private:
-    QCheckBox *flatBox, *bigBox, *shinyBox, *positionCheckbox;
-    QComboBox *profileCombo;
-
-    WidgetListing *widgetListing;
-    DroppingController *controller1, *controller2, *controllerA;
-    DroppingController *controllerFSC, *controller;
-
-private slots:
-    void newProfile();
-    void deleteProfile();
-    void changeProfile( int );
-    void cancel();
-    void close();
-};
-
-class DroppingController: public AbstractController
-{
-    Q_OBJECT
-public:
-    DroppingController( intf_thread_t *, const QString& line, QWidget *parent = 0 );
-    QString getValue();
-    virtual ~DroppingController();
-
-    void resetLine( const QString& );
-protected:
-    void createAndAddWidget( QBoxLayout *controlLayout, int i_index,
-                             buttonType_e i_type, int i_option ) Q_DECL_OVERRIDE;
-    void dragEnterEvent ( QDragEnterEvent * event ) Q_DECL_OVERRIDE;
-    void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
-    void dropEvent ( QDropEvent * event ) Q_DECL_OVERRIDE;
-    void dragLeaveEvent ( QDragLeaveEvent * event ) Q_DECL_OVERRIDE;
-
-    virtual void doAction( int );
-
-    bool eventFilter( QObject *, QEvent * ) Q_DECL_OVERRIDE;
-
-private:
-    struct doubleInt
-    {
-        int i_type;
-        int i_option;
-    };
-    QRubberBand *rubberband;
-    QList <doubleInt *> widgetList;
-
-    int i_dragIndex;
-    bool b_draging;
-
-    int getParentPosInLayout( QPoint point);
-};
-
-#endif
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index 26820051fc287e95760acd915f631dfd502f275c..4ab07b6945822f3fac2b1d6292e242c30daa4633 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -37,10 +37,10 @@
 #include "util/imagehelper.hpp"
 
 #include "components/interface_widgets.hpp"     // bgWidget, videoWidget
-#include "components/controller.hpp"            // controllers
 #include "dialogs/firstrun/firstrun.hpp"                 // First Run
 
 #include "playlist/playlist_model.hpp"
+#include "playlist/playlist_controller.hpp"
 #include <vlc_playlist.h>
 
 #include "medialibrary/medialib.hpp"
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ad4eaa25813e9c406cc45e5b7fc1675de3e5c89c..eebebc07c42d26ba84d3b5c6cf3164c55caa19e8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -674,10 +674,6 @@ modules/gui/qt/dialogs/fingerprint/chromaprint.cpp
 modules/gui/qt/dialogs/fingerprint/chromaprint.hpp
 modules/gui/qt/dialogs/preferences/complete_preferences.cpp
 modules/gui/qt/dialogs/preferences/complete_preferences.hpp
-modules/gui/qt/components/controller.cpp
-modules/gui/qt/components/controller.hpp
-modules/gui/qt/components/controller_widget.cpp
-modules/gui/qt/components/controller_widget.hpp
 modules/gui/qt/menus/custom_menus.cpp
 modules/gui/qt/menus/custom_menus.hpp
 modules/gui/qt/dialogs/epg/EPGChannels.cpp
@@ -747,8 +743,6 @@ modules/gui/qt/dialogs/preferences/preferences.cpp
 modules/gui/qt/dialogs/preferences/preferences.hpp
 modules/gui/qt/dialogs/sout/sout.cpp
 modules/gui/qt/dialogs/sout/sout.hpp
-modules/gui/qt/dialogs/toolbar/toolbar.cpp
-modules/gui/qt/dialogs/toolbar/toolbar.hpp
 modules/gui/qt/dialogs/vlm/vlm.cpp
 modules/gui/qt/dialogs/vlm/vlm.hpp
 modules/gui/qt/dialogs/dialogs_provider.cpp