]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/extended_panels.hpp
Merge branch 'master' of git@git.videolan.org:vlc
[vlc] / modules / gui / qt4 / components / extended_panels.hpp
1 /*****************************************************************************
2  * extended_panels.hpp : Exentended Panels
3  ****************************************************************************
4  * Copyright (C) 2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Antoine Cellerier <dionoea at videolan dot org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef _EQUALIZER_H_
26 #define _EQUALIZER_H_
27
28 #ifdef HAVE_CONFIG_H
29 # include "config.h"
30 #endif
31
32 #include <vlc/vlc.h>
33 #include <vlc_aout.h>
34
35 #include "ui/equalizer.h"
36 #include "ui/video_effects.h"
37 #include "ui/v4l2.h"
38
39 #include <QTabWidget>
40 #define BANDS 10
41 #define NUM_SP_CTRL 5
42
43 class QSignalMapper;
44
45 class ExtVideo: public QObject
46 {
47     Q_OBJECT
48 public:
49     ExtVideo( intf_thread_t *, QTabWidget * );
50     virtual ~ExtVideo();
51     /*void gotoConf( QObject* );*/
52 private:
53     Ui::ExtVideoWidget ui;
54     QSignalMapper* filterMapper;
55     intf_thread_t *p_intf;
56     vout_thread_t *p_vout;
57     void initComboBoxItems( QObject* );
58     void setWidgetValue( QObject* );
59     void ChangeVFiltersString( char *psz_name, bool b_add );
60 private slots:
61     void updateFilters();
62     void updateFilterOptions();
63     void cropChange();
64 };
65
66 class ExtV4l2 : public QWidget
67 {
68     Q_OBJECT
69 public:
70     ExtV4l2( intf_thread_t *, QWidget * );
71     virtual ~ExtV4l2();
72
73     virtual void showEvent( QShowEvent *event );
74
75 private:
76     intf_thread_t *p_intf;
77     Ui::ExtV4l2Widget ui;
78     QGroupBox *box;
79
80 private slots:
81     void Refresh( void );
82     void ValueChange( int value );
83     void ValueChange( bool value );
84 };
85
86 class Equalizer: public QWidget
87 {
88     Q_OBJECT
89 public:
90     Equalizer( intf_thread_t *, QWidget * );
91     virtual ~Equalizer();
92     QComboBox *presetsComboBox;
93
94 private:
95     Ui::EqualizerWidget ui;
96     QSlider *bands[BANDS];
97     QLabel *band_texts[BANDS];
98
99     void delCallbacks( aout_instance_t * );
100     void addCallbacks( aout_instance_t * );
101     void setValues( char *, float );
102
103     intf_thread_t *p_intf;
104 private slots:
105     void enable(bool);
106     void enable();
107     void set2Pass();
108     void setPreamp();
109     void setBand();
110     void setPreset(int);
111 };
112
113 class Spatializer: public QWidget
114 {
115     Q_OBJECT
116 public:
117     Spatializer( intf_thread_t *, QWidget * );
118     virtual ~Spatializer();
119
120 private:
121     QSlider *spatCtrl[NUM_SP_CTRL];
122     QLabel *ctrl_texts[NUM_SP_CTRL];
123     QLabel *ctrl_readout[NUM_SP_CTRL];
124     float controlVars[5];
125     float oldControlVars[5];
126
127     QCheckBox *enableCheck;
128
129     void delCallbacks( aout_instance_t * );
130     void addCallbacks( aout_instance_t * );
131     intf_thread_t *p_intf;
132 private slots:
133     void enable(bool);
134     void enable();
135     void setValues(float *);
136     void setInitValues();
137 };
138
139 class ExtendedControls: public QWidget
140 {
141     Q_OBJECT
142 public:
143     ExtendedControls( intf_thread_t *, QWidget * ) {};
144     virtual ~ExtendedControls() {};
145
146 private:
147     intf_thread_t *p_intf;
148 private slots:
149     void slower() {};
150     void faster() {};
151     void normal() {};
152     void snapshot() {};
153 };
154
155 class SyncControls : public QWidget
156 {
157     Q_OBJECT
158 public:
159     SyncControls( intf_thread_t *, QWidget * );
160     virtual ~SyncControls() {};
161 private:
162     intf_thread_t *p_intf;
163     QDoubleSpinBox *AVSpin;
164     QDoubleSpinBox *subsSpin;
165     QDoubleSpinBox *subSpeedSpin;
166 public slots:
167     void update();
168 private slots:
169     void advanceAudio( double );
170     void advanceSubs( double );
171     void adjustSubsSpeed( double );
172 };
173
174 #endif