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