]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/extended_panels.hpp
fc5892cf4995a6571e6593ee43d864f0787c4666
[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: preferences.hpp 16643 2006-09-13 12:45:46Z zorglub $
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 #include <vlc/vlc.h>
29 #include <vlc_aout.h>
30
31 #include "ui/equalizer.h"
32 #include "ui/video_effects.h"
33 #include "ui/v4l2.h"
34
35 #define BANDS 10
36 #define NUM_SP_CTRL 5
37
38 class QSignalMapper;
39
40 class ExtVideo: public QWidget
41 {
42     Q_OBJECT
43 public:
44     ExtVideo( intf_thread_t *, QWidget * );
45     virtual ~ExtVideo();
46     /*void gotoConf( QObject* );*/
47 private:
48     Ui::ExtVideoWidget ui;
49     QSignalMapper* filterMapper;
50     intf_thread_t *p_intf;
51     void initComboBoxItems( QObject* );
52     void setWidgetValue( QObject* );
53     void ChangeVFiltersString( char *psz_name, vlc_bool_t b_add );
54 private slots:
55     void updateFilters();
56     void updateFilterOptions();
57 };
58
59 class ExtV4l2 : public QWidget
60 {
61     Q_OBJECT
62 public:
63     ExtV4l2( intf_thread_t *, QWidget * );
64     virtual ~ExtV4l2();
65
66 private:
67     intf_thread_t *p_intf;
68     Ui::ExtV4l2Widget ui;
69     QGroupBox *box;
70
71 private slots:
72     void Refresh( void );
73     void ValueChange( int value );
74     void ValueChange( bool value );
75 };
76
77 class Equalizer: public QWidget
78 {
79     Q_OBJECT
80 public:
81     Equalizer( intf_thread_t *, QWidget * );
82     virtual ~Equalizer();
83     QComboBox *presetsComboBox;
84
85 private:
86     Ui::EqualizerWidget ui;
87     QSlider *bands[BANDS];
88     QLabel *band_texts[BANDS];
89
90     void delCallbacks( aout_instance_t * );
91     void addCallbacks( aout_instance_t * );
92     void setValues( char *, float );
93
94     intf_thread_t *p_intf;
95 private slots:
96     void enable(bool);
97     void enable();
98     void set2Pass();
99     void setPreamp();
100     void setBand();
101     void setPreset(int);
102 };
103
104 class Spatializer: public QWidget
105 {
106     Q_OBJECT
107 public:
108     Spatializer( intf_thread_t *, QWidget * );
109     virtual ~Spatializer();
110
111 private:
112     QSlider *spatCtrl[NUM_SP_CTRL];
113     QLabel *ctrl_texts[NUM_SP_CTRL];
114     QLabel *ctrl_readout[NUM_SP_CTRL];
115     float controlVars[5];
116     float oldControlVars[5];
117
118     QCheckBox *enableCheck;
119
120     void delCallbacks( aout_instance_t * );
121     void addCallbacks( aout_instance_t * );
122     intf_thread_t *p_intf;
123 private slots:
124     void enable(bool);
125     void enable();
126     void setValues(float *);
127     void setInitValues();
128 };
129
130 class ExtendedControls: public QWidget
131 {
132     Q_OBJECT
133 public:
134     ExtendedControls( intf_thread_t *, QWidget * ) {};
135     virtual ~ExtendedControls() {};
136
137 private:
138     intf_thread_t *p_intf;
139 private slots:
140     void slower() {};
141     void faster() {};
142     void normal() {};
143     void snapshot() {};
144 };
145
146 #endif