[vlc-devel] commit: Qt: use the new PlIconView class (Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Jan 25 01:28:05 CET 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jan 25 00:59:19 2010 +0100| [27f5e6a9abc2657ff6cb2b203d18ceea8edeae77] | committer: Jean-Baptiste Kempf 

Qt: use the new PlIconView class

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27f5e6a9abc2657ff6cb2b203d18ceea8edeae77
---

 .../gui/qt4/components/playlist/standardpanel.cpp  |    8 +++-----
 .../gui/qt4/components/playlist/standardpanel.hpp  |    3 ++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index aaeb0d1..c29fc94 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -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 );
         }
diff --git a/modules/gui/qt4/components/playlist/standardpanel.hpp b/modules/gui/qt4/components/playlist/standardpanel.hpp
index 7e1a620..63be4e0 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.hpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.hpp
@@ -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;




More information about the vlc-devel mailing list