interface_widgets.hpp 2.98 KB
Newer Older
1
/*****************************************************************************
2
 * interface_widgets.hpp : Custom widgets for the main interface
3
 ****************************************************************************
4
5
 * Copyright (C) 2006 the VideoLAN team
 * $Id$
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
 *
 * 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.
 *****************************************************************************/

24
25
#ifndef _INTFWIDGETS_H_
#define _INTFWIDGETS_H_
26
27
28

#include <vlc/vlc.h>
#include <vlc/intf.h>
zorglub's avatar
zorglub committed
29
30
31

#include "qt4.hpp"

32
#include <QWidget>
zorglub's avatar
zorglub committed
33
#include <QFrame>
zorglub's avatar
zorglub committed
34
35
36
#include <QPalette>
#include <QResizeEvent>
#include <QPixmap>
37

zorglub's avatar
zorglub committed
38
class QLabel;
39
40
class QHBoxLayout;

41
/******************** Video Widget ****************/
zorglub's avatar
zorglub committed
42
class VideoWidget : public QFrame
43
{
zorglub's avatar
zorglub committed
44
    Q_OBJECT
45
public:
46
    VideoWidget( intf_thread_t * );
47
48
    virtual ~VideoWidget();

49
    void *request( vout_thread_t *, int *, int *,
50
                   unsigned int *, unsigned int * );
51
52
    void release( void * );
    int control( void *, int, va_list );
53

54
    int i_video_height, i_video_width;
zorglub's avatar
zorglub committed
55
    vout_thread_t *p_vout;
56
57
58

    QSize widgetSize;
    virtual QSize sizeHint() const;
59
60
61
62
private:
    QWidget *frame;
    intf_thread_t *p_intf;
    vlc_mutex_t lock;
63
64
};

65
/******************** Background Widget ****************/
66
67
68
69
70
71
class BackgroundWidget : public QFrame
{
    Q_OBJECT
public:
    BackgroundWidget( intf_thread_t * );
    virtual ~BackgroundWidget();
72
73
    QSize widgetSize;
    virtual QSize sizeHint() const;
74
75
76
77
78
79
80
81
private:
    QPalette plt;
    QLabel *label;
    QHBoxLayout *backgroundLayout;
    virtual void resizeEvent( QResizeEvent *e );
    int DrawBackground();
    int CleanBackground();
    intf_thread_t *p_intf;
82
83
};

zorglub's avatar
zorglub committed
84
85
86
87
88
89
90
91
92
class VisualSelector : public QFrame
{
    Q_OBJECT
public:
    VisualSelector( intf_thread_t *);
    virtual ~VisualSelector();
private:
    intf_thread_t *p_intf;
};
93

zorglub's avatar
zorglub committed
94
/******************** Playlist Widgets ****************/
95
96
97
98
#include <QModelIndex>
class QSignalMapper;
class PLSelector;
class PLPanel;
zorglub's avatar
zorglub committed
99
class QPushButton;
100

zorglub's avatar
zorglub committed
101
class PlaylistWidget : public BasePlaylistWidget
102
103
104
105
106
107
108
109
110
111
{
    Q_OBJECT;
public:
    PlaylistWidget( intf_thread_t * );
    virtual ~PlaylistWidget();
    QSize widgetSize;
    virtual QSize sizeHint() const;
private:
    PLSelector *selector;
    PLPanel *rightPanel;
zorglub's avatar
zorglub committed
112
    QPushButton *addButton;
zorglub's avatar
zorglub committed
113
114
signals:
    void rootChanged( int );
115
};
116

117
#endif