]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/panels.hpp
Improve drag&drop handling
[vlc] / modules / gui / qt4 / components / playlist / panels.hpp
index 46ac1148104ff11a846cb7df2932dd636bccd818..6f21ffcb6e16dc5d27eb72b4e1b99ef2cb1ff04f 100644 (file)
 #define _PLPANELS_H_
 
 #include <vlc/vlc.h>
+
+#include "qt4.hpp"
+
+#include <QModelIndex>
 #include <QWidget>
 #include <QString>
 
 class QTreeView;
 class PLModel;
-
-/**
- * \todo Share a single model between views using a filterproxy
- */
+class QPushButton;
+class QKeyEvent;
+class ClickLineEdit;
 
 class PLPanel: public QWidget
 {
     Q_OBJECT;
 public:
-    PLPanel( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
+    PLPanel( BasePlaylistWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
     {
         p_intf = _p_intf;
+        parent = p;
     }
     virtual ~PLPanel() {};
 protected:
     intf_thread_t *p_intf;
+    BasePlaylistWidget *parent;
 public slots:
     virtual void setRoot( int ) = 0;
 };
 
+class PlaylistWidget;
 
 class StandardPLPanel: public PLPanel
 {
     Q_OBJECT;
 public:
-    StandardPLPanel( QWidget *, intf_thread_t *,
+    StandardPLPanel( BasePlaylistWidget *, intf_thread_t *,
                      playlist_t *,playlist_item_t * );
     virtual ~StandardPLPanel();
-private:
+protected:
+    virtual void keyPressEvent( QKeyEvent *e );
+protected:
     PLModel *model;
+    friend class PlaylistWidget;
+private:
     QTreeView *view;
+    QPushButton *repeatButton , *randomButton,*addButton;
+    ClickLineEdit *searchLine;
+    int currentRootId;
 public slots:
+    void removeItem( int );
     virtual void setRoot( int );
+private slots:
+    void deleteSelection();
+    void handleExpansion( const QModelIndex& );
+    void toggleRandom();
+    void toggleRepeat();
+    void doPopup( QModelIndex index, QPoint point );
+    void search( QString search );
+    void clearFilter();
+    void add();
+    void setCurrentRootId( int );
 };
 
 #endif