1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
#include "videoequalizer2.h"
21
VideoEqualizer2::VideoEqualizer2( QWidget* parent, Qt::WindowFlags f )
27
contrast_indicator->setNum(0);
28
brightness_indicator->setNum(0);
29
hue_indicator->setNum(0);
30
saturation_indicator->setNum(0);
31
gamma_indicator->setNum(0);
34
connect( contrast_slider, SIGNAL(valueChanged(int)),
35
contrast_indicator, SLOT(setNum(int)) );
37
connect( brightness_slider, SIGNAL(valueChanged(int)),
38
brightness_indicator, SLOT(setNum(int)) );
40
connect( hue_slider, SIGNAL(valueChanged(int)),
41
hue_indicator, SLOT(setNum(int)) );
43
connect( saturation_slider, SIGNAL(valueChanged(int)),
44
saturation_indicator, SLOT(setNum(int)) );
46
connect( gamma_slider, SIGNAL(valueChanged(int)),
47
gamma_indicator, SLOT(setNum(int)) );
50
connect( contrast_slider, SIGNAL(valueChanged(int)),
51
this, SIGNAL(contrastChanged(int)) );
52
connect( brightness_slider, SIGNAL(valueChanged(int)),
53
this, SIGNAL(brightnessChanged(int)) );
54
connect( hue_slider, SIGNAL(valueChanged(int)),
55
this, SIGNAL(hueChanged(int)) );
56
connect( saturation_slider, SIGNAL(valueChanged(int)),
57
this, SIGNAL(saturationChanged(int)) );
58
connect( gamma_slider, SIGNAL(valueChanged(int)),
59
this, SIGNAL(gammaChanged(int)) );
61
connect( makedefault_button, SIGNAL(clicked()),
62
this, SIGNAL(requestToChangeDefaultValues()) );
67
VideoEqualizer2::~VideoEqualizer2() {
70
void VideoEqualizer2::reset() {
78
void VideoEqualizer2::on_reset_button_clicked() {
79
qDebug("VideoEqualizer2::on_reset_button_clicked");
83
void VideoEqualizer2::on_bysoftware_check_stateChanged(int state) {
84
qDebug("VideoEqualizer2::on_bysoftware_check_stateChanged");
85
emit bySoftwareChanged(state == Qt::Checked);
88
void VideoEqualizer2::hideEvent( QHideEvent * ) {
89
emit visibilityChanged();
92
void VideoEqualizer2::showEvent( QShowEvent * ) {
93
emit visibilityChanged();
96
void VideoEqualizer2::retranslateStrings() {
100
makedefault_button->setWhatsThis(
101
tr("Use the current values as default values for new videos.") );
103
reset_button->setWhatsThis( tr("Set all controls to zero.") );
106
// Language change stuff
107
void VideoEqualizer2::changeEvent(QEvent *e) {
108
if (e->type() == QEvent::LanguageChange) {
109
retranslateStrings();
111
QWidget::changeEvent(e);
115
#include "moc_videoequalizer2.cpp"