]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/playlist/playlist.hpp
ee3dad65dd4771193ae8fb8523c3508fda47cb5d
[vlc] / modules / gui / qt4 / components / playlist / playlist.hpp
1 /*****************************************************************************
2  * interface_widgets.hpp : Playlist Widgets
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Clément Stenac <zorglub@videolan.org>
8  *          Jean-Baptiste Kempf <jb@videolan.org>
9  *          Rafaël Carré <funman@videolanorg>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 #ifndef _PLAYLISTWIDGET_H_
27 #define _PLAYLISTWIDGET_H_
28
29 #ifdef HAVE_CONFIG_H
30 # include "config.h"
31 #endif
32
33 #include "qt4.hpp"
34
35 #include "dialogs_provider.hpp" /* Media Info from ArtLabel */
36 #include "components/interface_widgets.hpp"
37
38 #include <QSplitter>
39 #include <QLabel>
40
41 class PLSelector;
42 class PLPanel;
43 class QPushButton;
44 class CoverArtLabel;
45 class ArtLabel;
46
47 class PlaylistWidget : public QSplitter
48 {
49     Q_OBJECT;
50 public:
51     PlaylistWidget( intf_thread_t *_p_i );
52     virtual ~PlaylistWidget();
53 private:
54     PLSelector *selector;
55     PLPanel *rightPanel;
56     QPushButton *addButton;
57     ArtLabel *art;
58 protected:
59     intf_thread_t *p_intf;
60     virtual void dropEvent( QDropEvent *);
61     virtual void dragEnterEvent( QDragEnterEvent * );
62     virtual void closeEvent( QCloseEvent * );
63
64 signals:
65     void rootChanged( int );
66 };
67
68 class ArtLabel : public CoverArtLabel
69 {
70     Q_OBJECT
71 public:
72     ArtLabel( QWidget *parent, intf_thread_t *intf )
73             : CoverArtLabel( parent, intf ) {};
74     virtual void mouseDoubleClickEvent( QMouseEvent *event )
75     {
76         THEDP->mediaInfoDialog();
77         event->accept();
78     }
79 };
80
81
82 #endif