panels.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * panels.hpp : Panels for the playlist
00003  ****************************************************************************
00004  * Copyright (C) 2000-2005 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Clément Stenac <zorglub@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
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

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1