]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/playlist/playlist.hpp
Qt4 - Playlist: double clicking on the art will open the Media Information dialog.
[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 #include <vlc/vlc.h>
30 #include "qt4.hpp"
31 #include "dialogs_provider.hpp"
32
33 #include <QSplitter>
34 #include <QLabel>
35
36 class PLSelector;
37 class PLPanel;
38 class QPushButton;
39 class QSettings;
40
41 class PlaylistWidget : public QSplitter
42 {
43     Q_OBJECT;
44 public:
45     PlaylistWidget( intf_thread_t *_p_i, QSettings *settings, QWidget *parent ) ;
46     virtual ~PlaylistWidget();
47     QSize sizeHint() const;
48     void savingSettings( QSettings *settings );
49 private:
50     PLSelector *selector;
51     PLPanel *rightPanel;
52     QPushButton *addButton;
53     QLabel *art;
54     QString prevArt;
55     QWidget *parent;
56 protected:
57     intf_thread_t *p_intf;
58 private slots:
59     void setArt( QString );
60 signals:
61     void rootChanged( int );
62     void artSet( QString );
63 };
64
65 class ArtLabel : public QLabel
66 {
67     Q_OBJECT
68     void mouseDoubleClickEvent( QMouseEvent *event )
69     {
70         THEDP->mediaInfoDialog();
71     }
72 };
73
74
75 #endif