]> git.sesse.net Git - vlc/blob - modules/gui/qt4/components/extended_panels.hpp
0aee52505bbeba174090f4df546604f2dadf70a3
[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  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _EQUALIZER_H_
25 #define _EQUALIZER_H_
26
27 #include <vlc/vlc.h>
28 #include <vlc_aout.h>
29
30 #include "ui/equalizer.h"
31 #include "ui/video_effects.h"
32
33 #define BANDS 10
34 #define NUM_SP_CTRL 5
35
36 class QSignalMapper;
37
38 class ExtVideo: public QWidget
39 {
40     Q_OBJECT
41 public:
42     ExtVideo( intf_thread_t *, QWidget * );
43     virtual ~ExtVideo();
44     /*void gotoConf( QObject* );*/
45 private:
46     Ui::ExtVideoWidget ui;
47     QSignalMapper* filterMapper;
48     intf_thread_t *p_intf;
49     void initComboBoxItems( QObject* );
50     void setWidgetValue( QObject* );
51     void ChangeVFiltersString( char *psz_name, vlc_bool_t b_add );
52 private slots:
53     void updateFilters();
54     void updateFilterOptions();
55 };
56
57 class Equalizer: public QWidget
58 {
59     Q_OBJECT
60 public:
61     Equalizer( intf_thread_t *, QWidget * );
62     virtual ~Equalizer();
63     QComboBox *presetsComboBox;
64
65 private:
66     Ui::EqualizerWidget ui;
67     QSlider *bands[BANDS];
68     QLabel *band_texts[BANDS];
69
70     void delCallbacks( aout_instance_t * );
71     void addCallbacks( aout_instance_t * );
72     void setValues( char *, float );
73
74     intf_thread_t *p_intf;
75 private slots:
76     void enable(bool);
77     void enable();
78     void set2Pass();
79     void setPreamp();
80     void setBand();
81     void setPreset(int);
82 };
83
84 class Spatializer: public QWidget
85 {
86     Q_OBJECT
87 public:
88     Spatializer( intf_thread_t *, QWidget * );
89     virtual ~Spatializer();
90
91 private:
92     QSlider *spatCtrl[NUM_SP_CTRL];
93     QLabel *ctrl_texts[NUM_SP_CTRL];
94     QLabel *ctrl_readout[NUM_SP_CTRL];
95     float controlVars[5];
96     float oldControlVars[5];
97
98     QCheckBox *enableCheck;
99
100     void delCallbacks( aout_instance_t * );
101     void addCallbacks( aout_instance_t * );
102     intf_thread_t *p_intf;
103 private slots:
104     void enable(bool);
105     void enable();
106     void setValues(float *);
107     void setInitValues();
108 };
109
110 class ExtendedControls: public QWidget
111 {
112     Q_OBJECT
113 public:
114     ExtendedControls( intf_thread_t *, QWidget * ) {};
115     virtual ~ExtendedControls() {};
116
117 private:
118     intf_thread_t *p_intf;
119 private slots:
120     void slower() {};
121     void faster() {};
122     void normal() {};
123     void snapshot() {};
124 };
125
126 #endif