00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _PLPANELS_H_
00025 #define _PLPANELS_H_
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030
00031 #include <vlc_common.h>
00032
00033 #include "qt4.hpp"
00034 #include "components/playlist/playlist.hpp"
00035
00036 #include <QModelIndex>
00037 #include <QWidget>
00038 #include <QString>
00039
00040 class QSignalMapper;
00041 class QTreeView;
00042 class PLModel;
00043 class QPushButton;
00044 class QKeyEvent;
00045 class ClickLineEdit;
00046
00047 class PLPanel: public QWidget
00048 {
00049 Q_OBJECT;
00050 public:
00051 PLPanel( PlaylistWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
00052 {
00053 p_intf = _p_intf;
00054 parent = p;
00055 }
00056 virtual ~PLPanel() {};
00057 protected:
00058 intf_thread_t *p_intf;
00059 QFrame *parent;
00060 public slots:
00061 virtual void setRoot( int ) = 0;
00062 };
00063
00064
00065 class StandardPLPanel: public PLPanel
00066 {
00067 Q_OBJECT;
00068 public:
00069 StandardPLPanel( PlaylistWidget *, intf_thread_t *,
00070 playlist_t *,playlist_item_t * );
00071 virtual ~StandardPLPanel();
00072 protected:
00073 virtual void keyPressEvent( QKeyEvent *e );
00074 protected:
00075 PLModel *model;
00076 friend class PlaylistWidget;
00077 private:
00078 QTreeView *view;
00079 QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton;
00080 ClickLineEdit *searchLine;
00081 int currentRootId;
00082 QSignalMapper *ContextUpdateMapper;
00083 public slots:
00084 void removeItem( int );
00085 virtual void setRoot( int );
00086 private slots:
00087 void deleteSelection();
00088 void handleExpansion( const QModelIndex& );
00089 void toggleRandom();
00090 void toggleRepeat();
00091 void gotoPlayingItem();
00092 void doPopup( QModelIndex index, QPoint point );
00093 void search( QString search );
00094 void clearFilter();
00095 void setCurrentRootId( int );
00096 void popupAdd();
00097 void popupSelectColumn( QPoint );
00098 };
00099
00100 #endif