]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/playlist/playlist.hpp
Fix drop on the playlist in all case (DP and MI )
[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 <vlc_common.h>
34 #include "qt4.hpp"
35 #include "dialogs_provider.hpp"
36
37 #include <QSplitter>
38 #include <QLabel>
39
40 class PLSelector;
41 class PLPanel;
42 class QPushButton;
43
44 class PlaylistWidget : public QSplitter
45 {
46     Q_OBJECT;
47 public:
48     PlaylistWidget( intf_thread_t *_p_i, QWidget *parent ) ;
49     virtual ~PlaylistWidget();
50 private:
51     PLSelector *selector;
52     PLPanel *rightPanel;
53     QPushButton *addButton;
54     QLabel *art;
55     QString prevArt;
56     QWidget *parent;
57 protected:
58     intf_thread_t *p_intf;
59     void dropEvent( QDropEvent *);
60     void dragEnterEvent( QDragEnterEvent * );
61
62 private slots:
63     void setArt( QString );
64 signals:
65     void rootChanged( int );
66 };
67
68 class ArtLabel : public QLabel
69 {
70     Q_OBJECT
71     void mouseDoubleClickEvent( QMouseEvent *event )
72     {
73         THEDP->mediaInfoDialog();
74     }
75 };
76
77
78 #endif