#ifndef _PLPANELS_H_
#define _PLPANELS_H_
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "qt4.hpp"
+#include "components/playlist/playlist.hpp"
+
#include <QModelIndex>
#include <QWidget>
#include <QString>
+#include <vlc_playlist.h>
+
+class QSignalMapper;
class QTreeView;
class PLModel;
class QPushButton;
-
-/**
- * \todo Share a single model between views using a filterproxy
- */
+class QKeyEvent;
class PLPanel: public QWidget
{
Q_OBJECT;
public:
- PLPanel( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
+ PLPanel( PlaylistWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
{
p_intf = _p_intf;
+ parent = p;
}
virtual ~PLPanel() {};
protected:
intf_thread_t *p_intf;
+ QFrame *parent;
public slots:
virtual void setRoot( int ) = 0;
+ virtual void setRoot( playlist_item_t * ) = 0;
};
{
Q_OBJECT;
public:
- StandardPLPanel( QWidget *, intf_thread_t *,
+ StandardPLPanel( PlaylistWidget *, 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;
+ QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton;
+ int currentRootId;
+ QSignalMapper *selectColumnsSigMapper;
public slots:
+ void removeItem( int );
virtual void setRoot( int );
+ virtual void setRoot( playlist_item_t * );
private slots:
+ void deleteSelection();
void handleExpansion( const QModelIndex& );
void toggleRandom();
void toggleRepeat();
+ void gotoPlayingItem();
+ void doPopup( QModelIndex index, QPoint point );
+ void search( const QString& searchText );
+ void setCurrentRootId( playlist_item_t * );
+ void popupAdd();
+ void popupSelectColumn( QPoint );
+ void toggleColumnShown( int );
};
#endif