1 /*****************************************************************************
2 * extended_panels.hpp : Exentended Panels
3 ****************************************************************************
4 * Copyright (C) 2006 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Antoine Cellerier <dionoea at videolan dot org>
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.
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.
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 *****************************************************************************/
32 #include <vlc_common.h>
34 #include "ui/equalizer.h"
35 #include "ui/video_effects.h"
46 class ExtVideo: public QObject
49 friend class ExtendedDialog;
51 ExtVideo( struct intf_thread_t *, QTabWidget * );
52 /*void gotoConf( QObject* );*/
54 Ui::ExtVideoWidget ui;
55 QSignalMapper* filterMapper;
56 intf_thread_t *p_intf;
57 vout_thread_t *p_vout;
58 void initComboBoxItems( QObject* );
59 void setWidgetValue( QObject* );
60 void ChangeVFiltersString( const char *psz_name, bool b_add );
64 void updateFilterOptions();
68 class ExtV4l2 : public QWidget
72 ExtV4l2( intf_thread_t *, QWidget * );
74 virtual void showEvent( QShowEvent *event );
77 intf_thread_t *p_intf;
83 void ValueChange( int value );
84 void ValueChange( bool value );
87 class Equalizer: public QWidget
90 friend class ExtendedDialog;
92 Equalizer( intf_thread_t *, QWidget * );
93 QComboBox *presetsComboBox;
95 char * createValuesFromPreset( int i_preset );
96 void updateUIFromCore();
98 Ui::EqualizerWidget ui;
99 QSlider *bands[BANDS];
100 QLabel *band_texts[BANDS];
102 void delCallbacks( aout_instance_t * );
103 void addCallbacks( aout_instance_t * );
105 intf_thread_t *p_intf;
106 void clean() { enable(); }
113 void setCorePreset(int);
116 class Compressor: public QWidget
120 Compressor( intf_thread_t *, QWidget * );
123 QSlider *compCtrl[NUM_CP_CTRL];
124 QLabel *ctrl_texts[NUM_CP_CTRL];
125 QLabel *ctrl_readout[NUM_CP_CTRL];
126 float controlVars[NUM_CP_CTRL];
127 float oldControlVars[NUM_CP_CTRL];
129 QCheckBox *enableCheck;
131 intf_thread_t *p_intf;
133 void delCallbacks( aout_instance_t * );
134 void addCallbacks( aout_instance_t * );
136 void updateSliders(float *);
137 void setValues(float *);
142 void setInitValues();
145 class Spatializer: public QWidget
149 Spatializer( intf_thread_t *, QWidget * );
152 QSlider *spatCtrl[NUM_SP_CTRL];
153 QLabel *ctrl_texts[NUM_SP_CTRL];
154 QLabel *ctrl_readout[NUM_SP_CTRL];
155 float controlVars[5];
156 float oldControlVars[5];
158 QCheckBox *enableCheck;
160 void delCallbacks( aout_instance_t * );
161 void addCallbacks( aout_instance_t * );
162 intf_thread_t *p_intf;
164 void setValues(float *);
169 void setInitValues();
172 class SyncControls : public QWidget
175 friend class ExtendedDialog;
177 SyncControls( intf_thread_t *, QWidget * );
178 virtual ~SyncControls() {};
180 intf_thread_t *p_intf;
181 QDoubleSpinBox *AVSpin;
182 QDoubleSpinBox *subsSpin;
183 QDoubleSpinBox *subSpeedSpin;
191 void advanceAudio( double );
192 void advanceSubs( double );
193 void adjustSubsSpeed( double );