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