]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/standardpanel.hpp
VLC supports .vro (DVD-VR) files
[vlc] / modules / gui / qt4 / components / playlist / standardpanel.hpp
index 7e1a620b0027be330c9dc19c78246ac3fe51d356..78c6920e6ccb5e2270af4dd54054fbff81d7f0db 100644 (file)
@@ -34,6 +34,7 @@
 #include <QModelIndex>
 #include <QWidget>
 #include <QString>
+#include <QToolBar>
 
 #include <vlc_playlist.h>
 
@@ -44,6 +45,8 @@ class PLModel;
 class QPushButton;
 class QKeyEvent;
 class QWheelEvent;
+class PlIconView;
+class LocationBar;
 
 class StandardPLPanel: public QWidget
 {
@@ -59,8 +62,6 @@ protected:
     virtual void keyPressEvent( QKeyEvent *e );
     virtual void wheelEvent( QWheelEvent *e );
 
-    bool eventFilter(QObject *obj, QEvent *event);
-
     PLModel *model;
 private:
     intf_thread_t *p_intf;
@@ -69,14 +70,28 @@ private:
     QLabel      *title;
     QPushButton *addButton;
     QGridLayout *layout;
+    LocationBar *locationBar;
 
-    QTreeView   *view;
-    QListView   *view2;
+    QTreeView   *treeView;
+    PlIconView  *iconView;
+    QAbstractItemView *currentView;
 
+    QAction *iconViewAction, *treeViewAction;
     int currentRootId;
     QSignalMapper *selectColumnsSigMapper;
+    QSignalMapper *viewSelectionMapper;
+
+    int last_activated_id;
+
+    enum {
+      TREE_VIEW = 0,
+      ICON_VIEW,
+      COVER_VIEW,
+    };
+
+    void createTreeView();
+    void createIconView();
 
-    void doPopup( QModelIndex index, QPoint point );
 public slots:
     void removeItem( int );
     virtual void setRoot( playlist_item_t * );
@@ -87,8 +102,27 @@ private slots:
     void search( const QString& searchText );
     void popupAdd();
     void popupSelectColumn( QPoint );
+    void popupPlView( const QPoint & );
     void toggleColumnShown( int );
-    void toggleView();
+    void showView( int );
+    void cycleViews();
+    void activate( const QModelIndex & );
+    void handleInputChange( input_thread_t * );
+};
+
+class LocationBar : public QToolBar
+{
+    Q_OBJECT;
+public:
+    LocationBar( PLModel * );
+    void setIndex( const QModelIndex & );
+signals:
+    void invoked( const QModelIndex & );
+private slots:
+    void invoke( int i_item_id );
+private:
+    PLModel *model;
+    QSignalMapper *mapper;
 };
 
 #endif