panels.hpp
Go to the documentation of this file.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 "qt4.hpp"
00032 #include "components/playlist/playlist.hpp"
00033
00034 #include <QModelIndex>
00035 #include <QWidget>
00036 #include <QString>
00037
00038 #include <vlc_playlist.h>
00039
00040 class QSignalMapper;
00041 class QTreeView;
00042 class PLModel;
00043 class QPushButton;
00044 class QKeyEvent;
00045
00046 class PLPanel: public QWidget
00047 {
00048 Q_OBJECT;
00049 public:
00050 PLPanel( PlaylistWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
00051 {
00052 p_intf = _p_intf;
00053 parent = p;
00054 }
00055 virtual ~PLPanel() {};
00056 protected:
00057 intf_thread_t *p_intf;
00058 QFrame *parent;
00059 public slots:
00060 virtual void setRoot( playlist_item_t * ) = 0;
00061 };
00062
00063
00064 class StandardPLPanel: public PLPanel
00065 {
00066 Q_OBJECT;
00067 public:
00068 StandardPLPanel( PlaylistWidget *, intf_thread_t *,
00069 playlist_t *,playlist_item_t * );
00070 virtual ~StandardPLPanel();
00071 protected:
00072 virtual void keyPressEvent( QKeyEvent *e );
00073 protected:
00074 PLModel *model;
00075 friend class PlaylistWidget;
00076 private:
00077 QLabel *title;
00078 QTreeView *view;
00079 QPushButton *repeatButton, *randomButton, *addButton, *gotoPlayingButton;
00080 int currentRootId;
00081 QSignalMapper *selectColumnsSigMapper;
00082 public slots:
00083 void removeItem( int );
00084 virtual void setRoot( playlist_item_t * );
00085 private slots:
00086 void deleteSelection();
00087 void handleExpansion( const QModelIndex& );
00088 void toggleRandom();
00089 void toggleRepeat();
00090 void gotoPlayingItem();
00091 void doPopup( QModelIndex index, QPoint point );
00092 void search( const QString& searchText );
00093 void popupAdd();
00094 void popupSelectColumn( QPoint );
00095 void toggleColumnShown( int );
00096 };
00097
00098 #endif