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"
45 class ExtVideo
: public QObject
48 friend class ExtendedDialog
;
50 ExtVideo( struct intf_thread_t
*, QTabWidget
* );
51 /*void gotoConf( QObject* );*/
53 Ui::ExtVideoWidget ui
;
54 QSignalMapper
* filterMapper
;
55 intf_thread_t
*p_intf
;
56 void initComboBoxItems( QObject
* );
57 void setWidgetValue( QObject
* );
61 void updateFilterOptions();
64 void browseEraseFile();
67 class ExtV4l2
: public QWidget
71 ExtV4l2( intf_thread_t
*, QWidget
* );
73 virtual void showEvent( QShowEvent
*event
);
76 intf_thread_t
*p_intf
;
82 void ValueChange( int value
);
83 void ValueChange( bool value
);
86 class Equalizer
: public QWidget
89 friend class ExtendedDialog
;
91 Equalizer( intf_thread_t
*, QWidget
* );
92 QComboBox
*presetsComboBox
;
94 char * createValuesFromPreset( int i_preset
);
95 void updateUIFromCore();
96 void changeFreqLabels( bool );
98 Ui::EqualizerWidget ui
;
99 QSlider
*bands
[BANDS
];
100 QLabel
*band_texts
[BANDS
];
103 void delCallbacks( vlc_object_t
* );
104 void addCallbacks( vlc_object_t
* );
106 intf_thread_t
*p_intf
;
107 void clean() { enable(); }
114 void setCorePreset(int);
117 class Compressor
: public QWidget
121 Compressor( intf_thread_t
*, QWidget
* );
124 QSlider
*compCtrl
[NUM_CP_CTRL
];
125 QLabel
*ctrl_texts
[NUM_CP_CTRL
];
126 QLabel
*ctrl_readout
[NUM_CP_CTRL
];
127 float controlVars
[NUM_CP_CTRL
];
128 float oldControlVars
[NUM_CP_CTRL
];
130 QGroupBox
*compressorBox
;
132 intf_thread_t
*p_intf
;
134 void delCallbacks( vlc_object_t
* );
135 void addCallbacks( vlc_object_t
* );
137 void updateSliders(float *);
144 class Spatializer
: public QWidget
148 Spatializer( intf_thread_t
*, QWidget
* );
151 QSlider
*spatCtrl
[NUM_SP_CTRL
];
152 QLabel
*ctrl_texts
[NUM_SP_CTRL
];
153 QLabel
*ctrl_readout
[NUM_SP_CTRL
];
154 float controlVars
[5];
155 float oldControlVars
[5];
157 QGroupBox
*spatializerBox
;
159 void delCallbacks( vlc_object_t
* );
160 void addCallbacks( vlc_object_t
* );
161 intf_thread_t
*p_intf
;
167 void setInitValues();
170 class SyncWidget
: public QWidget
174 SyncWidget( QWidget
* );
175 void setValue( double d
);
177 void valueChanged( double );
179 void valueChangedHandler( double d
);
181 QDoubleSpinBox spinBox
;
185 class SyncControls
: public QWidget
188 friend class ExtendedDialog
;
190 SyncControls( intf_thread_t
*, QWidget
* );
191 virtual ~SyncControls();
193 intf_thread_t
*p_intf
;
195 SyncWidget
*subsSpin
;
196 QDoubleSpinBox
*subSpeedSpin
;
197 QDoubleSpinBox
*subDurationSpin
;
203 void initSubsDuration();
204 void subsdelayClean();
205 void subsdelaySetFactor( double );
209 void advanceAudio( double );
210 void advanceSubs( double );
211 void adjustSubsSpeed( double );
212 void adjustSubsDuration( double );