]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/playlist.cpp
Qt: rename playlist root* functions and getters for clarity
[vlc] / modules / gui / qt4 / components / playlist / playlist.cpp
index 296d117d1131341c7db2af300def2e109ae7f168..382a7efc7d15d50d399ed0c86aaa0984198c644f 100644 (file)
@@ -41,6 +41,7 @@
 #include <QMenu>
 #include <QSignalMapper>
 #include <QSlider>
+#include <QStackedWidget>
 
 /**********************************************************************
  * Playlist Widget. The embedded playlist
@@ -67,16 +68,13 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
 
     /* Create a Container for the Art Label
        in order to have a beautiful resizing for the selector above it */
-    QWidget *artContainer = new QWidget;
-    QHBoxLayout *artContLay = new QHBoxLayout( artContainer );
-    artContLay->setMargin( 0 );
-    artContLay->setSpacing( 0 );
+    artContainer = new QStackedWidget;
     artContainer->setMaximumHeight( 128 );
 
     /* Art label */
     CoverArtLabel *art = new CoverArtLabel( artContainer, p_intf );
     art->setToolTip( qtr( "Double click to get media information" ) );
-    artContLay->addWidget( art, 1 );
+    artContainer->addWidget( art );
 
     CONNECT( THEMIM->getIM(), artChanged( QString ),
              art, showArtUpdate( const QString& ) );
@@ -159,19 +157,10 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
     CONNECT( mainView, viewChanged( const QModelIndex& ),
              this, changeView( const QModelIndex &) );
 
-    /* Zoom */
-    QSlider *zoomSlider = new QSlider( Qt::Horizontal, this );
-    zoomSlider->setRange( -10, 10);
-    zoomSlider->setPageStep( 3 );
-    zoomSlider->setValue( model->getZoom() );
-    zoomSlider->setToolTip( qtr("Zoom playlist") );
-    CONNECT( zoomSlider, valueChanged( int ), model, changeZoom( int ) );
-    topbarLayout->addWidget( zoomSlider );
-
     /* Connect the activation of the selector to a redefining of the PL */
     DCONNECT( selector, categoryActivated( playlist_item_t *, bool ),
-              mainView, setRoot( playlist_item_t *, bool ) );
-    mainView->setRoot( p_root, false );
+              mainView, setRootItem( playlist_item_t *, bool ) );
+    mainView->setRootItem( p_root, false );
 
     /* */
     split = new PlaylistSplitter( this );