]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/controller_widget.hpp
8089a434d703767c9b9ae1f1f53417020b7abd19
[vlc] / modules / gui / qt4 / components / controller_widget.hpp
1 /*****************************************************************************
2  * interface_widgets.hpp : Custom widgets for the main interface
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 _CONTROLLER_WIDGET_H_
27 #define _CONTROLLER_WIDGET_H_
28
29 #ifdef HAVE_CONFIG_H
30 # include "config.h"
31 #endif
32
33 #include <vlc_common.h>
34 #include <vlc_interface.h>
35
36 #include "qt4.hpp"
37 #include "main_interface.hpp"
38 #include "input_manager.hpp"
39
40 #include <QWidget>
41 #include <QFrame>
42 #include <QToolButton>
43
44 #define I_PLAY_TOOLTIP N_("Play\nIf the playlist is empty, open a media")
45
46 class QPixmap;
47 class QLabel;
48 class QGridLayout;
49
50 class InputSlider;
51 class QAbstractSlider;
52
53 class QAbstractButton;
54
55 class VolumeClickHandler;
56 class QSignalMapper;
57
58 class QTimer;
59 class WidgetListing;
60
61 /**
62  * SPECIAL Widgets that are a bit more than just a ToolButton
63  * and have an icon/behaviour that changes depending on the context:
64  * - playButton
65  * - A->B Button
66  * - Teletext group buttons
67  * - Sound Widget group
68  **/
69 class PlayButton : public QToolButton
70 {
71     Q_OBJECT
72 private slots:
73     void updateButton( bool );
74 };
75
76 class AtoB_Button : public QToolButton
77 {
78     Q_OBJECT
79 private slots:
80     void setIcons( bool, bool );
81 };
82
83 class TeletextController : public QWidget
84 {
85     Q_OBJECT
86     friend class AbstractController;
87 private:
88     QToolButton         *telexTransparent, *telexOn;
89     QSpinBox            *telexPage;
90
91 private slots:
92     void enableTeletextButtons( bool );
93     void toggleTeletextTransparency( bool );
94 };
95
96 class SoundWidget : public QWidget
97 {
98     Q_OBJECT
99     friend class VolumeClickHandler;
100
101 public:
102     SoundWidget( QWidget *parent, intf_thread_t  *_p_i, bool );
103
104 private:
105     intf_thread_t       *p_intf;
106     QLabel              *volMuteLabel;
107     QAbstractSlider     *volumeSlider;
108     VolumeClickHandler  *hVolLabel;
109     bool                 b_my_volume;
110
111 protected slots:
112     void updateVolume( int );
113     void updateVolume( void );
114 };
115
116 #endif