]> git.sesse.net Git - vlc/commitdiff
Qt: use the new PlIconView class
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 24 Jan 2010 23:59:19 +0000 (00:59 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 25 Jan 2010 00:15:27 +0000 (01:15 +0100)
modules/gui/qt4/components/playlist/standardpanel.cpp
modules/gui/qt4/components/playlist/standardpanel.hpp

index aaeb0d16cb6918a8ccc46bdff011396d2620e79a..c29fc9484edd9130af3855dd3eefdd4d73dc91d7 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "components/playlist/playlist_model.hpp"
 #include "components/playlist/standardpanel.hpp"
+#include "components/playlist/icon_view.hpp"
 #include "util/customwidgets.hpp"
 
 #include <vlc_intf_strings.h>
@@ -101,7 +102,7 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
     getSettings()->endGroup();
 
     /* Connections for the TreeView */
-    CONNECT( view, activated( const QModelIndex& ) ,
+    CONNECT( view, activated( const QModelIndex& ),
              model,activateItem( const QModelIndex& ) );
     CONNECT( view->header(), customContextMenuRequested( const QPoint & ),
              this, popupSelectColumn( QPoint ) );
@@ -299,10 +300,7 @@ void StandardPLPanel::toggleView()
     {
         if( view2 == NULL )
         {
-            view2 = new QListView;
-            view2->setModel( model );
-            view2->setViewMode( QListView::IconMode );
-            view2->setMovement( QListView::Snap );
+            view2 = new PlIconView( model, this );
             layout->addWidget( view2, 1, 0, 1, -1 );
             installEventFilter( view2 );
         }
index 7e1a620b0027be330c9dc19c78246ac3fe51d356..63be4e0b8074f734512813a516d8402f4ebf582f 100644 (file)
@@ -44,6 +44,7 @@ class PLModel;
 class QPushButton;
 class QKeyEvent;
 class QWheelEvent;
+class PlIconView;
 
 class StandardPLPanel: public QWidget
 {
@@ -71,7 +72,7 @@ private:
     QGridLayout *layout;
 
     QTreeView   *view;
-    QListView   *view2;
+    PlIconView  *view2;
 
     int currentRootId;
     QSignalMapper *selectColumnsSigMapper;