playlist.hpp 2.29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
/*****************************************************************************
 * interface_widgets.hpp : Playlist Widgets
 ****************************************************************************
 * Copyright (C) 2006 the VideoLAN team
 * $Id$
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
 *          Jean-Baptiste Kempf <jb@videolan.org>
 *          Rafaël Carré <funman@videolanorg>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#ifndef _PLAYLISTWIDGET_H_
#define _PLAYLISTWIDGET_H_

Christophe Mutricy's avatar
Christophe Mutricy committed
29 30 31 32
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

33
#include <vlc_common.h>
34
#include "qt4.hpp"
35
#include "dialogs_provider.hpp"
36
#include "components/interface_widgets.hpp"
37 38

#include <QSplitter>
39
#include <QLabel>
40 41 42 43

class PLSelector;
class PLPanel;
class QPushButton;
44 45
class CoverArtLabel;
class ArtLabel;
46 47 48 49 50

class PlaylistWidget : public QSplitter
{
    Q_OBJECT;
public:
51
    PlaylistWidget( intf_thread_t *_p_i, QWidget *parent ) ;
52 53 54 55 56
    virtual ~PlaylistWidget();
private:
    PLSelector *selector;
    PLPanel *rightPanel;
    QPushButton *addButton;
57
    ArtLabel *art;
58
    QWidget *parent;
59 60
protected:
    intf_thread_t *p_intf;
61 62 63
    virtual void dropEvent( QDropEvent *);
    virtual void dragEnterEvent( QDragEnterEvent * );
    virtual void closeEvent( QCloseEvent * );
64

65 66 67 68
signals:
    void rootChanged( int );
};

69
class ArtLabel : public CoverArtLabel
70 71
{
    Q_OBJECT
72 73 74
public:
    ArtLabel( intf_thread_t *intf ) : CoverArtLabel( VLC_OBJECT( intf ) ) {};
    virtual ~ArtLabel() {};
75 76 77 78 79 80 81
    void mouseDoubleClickEvent( QMouseEvent *event )
    {
        THEDP->mediaInfoDialog();
    }
};


82
#endif