]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/standardpanel.hpp
Qt: kill a bunch of warnings
[vlc] / modules / gui / qt4 / components / playlist / standardpanel.hpp
index 4426292fd4c921e0154616c075b8033746432552..14c0791be8ded71669f595d20a702c2da3afc61c 100644 (file)
 #include "qt4.hpp"
 #include "components/playlist/playlist.hpp"
 
-#include <QModelIndex>
 #include <QWidget>
-#include <QString>
-#include <QToolBar>
 
-#include <vlc_playlist.h>
+#include <vlc_playlist.h> /* playlist_item_t */
 
 class QSignalMapper;
-class QTreeView;
-class QListView;
 class PLModel;
-class QPushButton;
+class MLModel;
 class QKeyEvent;
 class QWheelEvent;
 class QStackedLayout;
+class QModelIndex;
+
+class QAbstractItemView;
+class QTreeView;
 class PlIconView;
 class PlListView;
+class PicFlowView;
+
 class LocationBar;
 class PLSelector;
-class QAbstractItemView;
 class PlaylistWidget;
 
 class StandardPLPanel: public QWidget
@@ -59,34 +59,36 @@ class StandardPLPanel: public QWidget
 
 public:
     StandardPLPanel( PlaylistWidget *, intf_thread_t *,
-                     playlist_t *, playlist_item_t *, PLSelector * );
+                     playlist_item_t *, PLSelector *, PLModel *, MLModel * );
     virtual ~StandardPLPanel();
-protected:
-    friend class PlaylistWidget;
 
-    PLModel *model;
-private:
-    enum {
-      TREE_VIEW = 0,
-      ICON_VIEW,
-      LIST_VIEW,
+    enum { ICON_VIEW = 0,
+           TREE_VIEW ,
+           LIST_VIEW,
+           PICTUREFLOW_VIEW,
+           VIEW_COUNT };
 
-      VIEW_COUNT
-    };
+    int currentViewIndex() const;
 
+protected:
+    PLModel *model;
+    MLModel *mlmodel;
+    virtual void wheelEvent( QWheelEvent *e );
+
+private:
     intf_thread_t *p_intf;
 
-    QWidget     *parent;
-    QGridLayout *layout;
     PLSelector  *p_selector;
 
-    QTreeView   *treeView;
-    PlIconView  *iconView;
-    PlListView  *listView;
+    QTreeView         *treeView;
+    PlIconView        *iconView;
+    PlListView        *listView;
+    PicFlowView       *picFlowView;
+
     QAbstractItemView *currentView;
-    QStackedLayout *viewStack;
 
-    int currentRootId;
+    QStackedLayout    *viewStack;
+
     QSignalMapper *selectColumnsSigMapper;
 
     int lastActivatedId;
@@ -95,19 +97,20 @@ private:
     void createTreeView();
     void createIconView();
     void createListView();
-    void wheelEvent( QWheelEvent *e );
+    void createCoverView();
+    void changeModel ( bool b_ml );
     bool eventFilter ( QObject * watched, QEvent * event );
 
 public slots:
-    void setRoot( playlist_item_t * );
+    void setRoot( playlist_item_t *, bool );
     void browseInto( const QModelIndex& );
-    void browseInto( );
 
 private slots:
     void deleteSelection();
     void handleExpansion( const QModelIndex& );
-    void handleRootChange();
     void activate( const QModelIndex & );
+
+    void browseInto();
     void browseInto( input_item_t * );
 
     void gotoPlayingItem();
@@ -126,4 +129,11 @@ signals:
     void viewChanged( const QModelIndex& );
 };
 
+
+static const QString viewNames[ StandardPLPanel::VIEW_COUNT ]
+                                = { qtr( "Icon View" ),
+                                    qtr( "Detailed View" ),
+                                    qtr( "List View" ),
+                                    qtr( "PictureFlow View ") };
+
 #endif