From: Antoine Cellerier Date: Sat, 16 Jun 2007 20:40:39 +0000 (+0000) Subject: Implement color change for colorthres and extract filters. Fix dial for rotate filter. X-Git-Tag: 0.9.0-test0~7031 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a3eb2a7047a551239dfe1b6dd9cd59dee6718313;p=vlc Implement color change for colorthres and extract filters. Fix dial for rotate filter. --- diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp index 36dd3efd94..1434909412 100644 --- a/modules/gui/qt4/components/extended_panels.cpp +++ b/modules/gui/qt4/components/extended_panels.cpp @@ -126,14 +126,10 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QWidget *_parent ) : SETUP_VFILTER_OPTION( brightnessThresholdCheck, stateChanged(int) ) SETUP_VFILTER( extract ) - SETUP_VFILTER_OPTION( extractRedSlider, valueChanged(int) ) - SETUP_VFILTER_OPTION( extractGreenSlider, valueChanged(int) ) - SETUP_VFILTER_OPTION( extractBlueSlider, valueChanged(int) ) + SETUP_VFILTER_OPTION( extractComponentText, textChanged(QString) ) SETUP_VFILTER( colorthres ) - SETUP_VFILTER_OPTION( colorthresRedSlider, valueChanged(int) ) - SETUP_VFILTER_OPTION( colorthresGreenSlider, valueChanged(int) ) - SETUP_VFILTER_OPTION( colorthresBlueSlider, valueChanged(int) ) + SETUP_VFILTER_OPTION( colorthresColorText, textChanged(QString) ) SETUP_VFILTER_OPTION( colorthresSaturationthresSlider, valueChanged(int) ) SETUP_VFILTER_OPTION( colorthresSimilaritythresSlider, valueChanged(int) ) @@ -165,6 +161,8 @@ ExtVideo::ExtVideo( intf_thread_t *_p_intf, QWidget *_parent ) : SETUP_VFILTER( rotate ) SETUP_VFILTER_OPTION( rotateAngleDial, valueChanged(int) ) + ui.rotateAngleDial->setWrapping( true ); + ui.rotateAngleDial->setNotchesVisible( true ); SETUP_VFILTER( puzzle ) SETUP_VFILTER_OPTION( puzzleRowsSpin, valueChanged(int) ) @@ -379,7 +377,13 @@ void ExtVideo::setWidgetValue( QObject *widget ) else if( checkbox ) checkbox->setCheckState( val.i_int? Qt::Checked : Qt::Unchecked ); else if( spinbox ) spinbox->setValue( val.i_int ); - else if( dial ) dial->setValue( val.i_int ); + else if( dial ) dial->setValue( (540-val.i_int)%360 ); + else if( lineedit ) + { + char str[30]; + sprintf( str, "%06X", val.i_int ); + lineedit->setText( str ); + } else msg_Warn( p_intf, "Oops %s %s %d", __FILE__, __func__, __LINE__ ); } else if( i_type == VLC_VAR_FLOAT ) @@ -448,8 +452,8 @@ void ExtVideo::updateFilterOptions() if( slider ) i_int = slider->value(); else if( checkbox ) i_int = checkbox->checkState() == Qt::Checked; else if( spinbox ) i_int = spinbox->value(); - else if( dial ) i_int = dial->value(); - else if( lineedit ) i_int = lineedit->text().toInt(); + else if( dial ) i_int = (540-dial->value())%360; + else if( lineedit ) i_int = lineedit->text().toInt(NULL,16); else msg_Warn( p_intf, "Oops %s %s %d", __FILE__, __func__, __LINE__ ); config_PutInt( p_intf, option.toStdString().c_str(), i_int ); if( i_type == VLC_VAR_INTEGER ) diff --git a/modules/gui/qt4/ui/video_effects.ui b/modules/gui/qt4/ui/video_effects.ui index e4c3940c77..d97a1a80e7 100644 --- a/modules/gui/qt4/ui/video_effects.ui +++ b/modules/gui/qt4/ui/video_effects.ui @@ -5,8 +5,8 @@ 0 0 - 995 - 575 + 1109 + 585 @@ -19,6 +19,41 @@ 6 + + + + _("Color extraction") + + + true + + + false + + + + 9 + + + 6 + + + + + _("Color") + + + + + + + >HHHHHH;# + + + + + + @@ -44,142 +79,190 @@ 6 - + _("Similarity") - + Qt::Horizontal - + Qt::Horizontal - + _("Saturation") - - + + - Green + _("Color") + + + + + + + >HHHHHH;# + + + + + + + true + + + _("Image adjust") + + + true + + + false + + + + 9 + + + 6 + - + + + 360 + Qt::Horizontal - - + + + + 500 + Qt::Horizontal + + 50 + - - - - Blue + + + + 300 + + + Qt::Horizontal + + + 100 - + + + 200 + Qt::Horizontal + + 100 + - - - - Red + + + + 200 + + + Qt::Horizontal + + + 100 - - - - - - - _("Advanced video filter controls") - - - - 9 - - - 6 - - - - - - + + + + _("Gamma") + + - - + + - _("Reset") + _("Contrast") - - + + - _("Update") + _("Brightness") - - + + - _("Video filters") + _("Saturation") - + - _("Vout filters") + _("Hue") - - + + - _("Subpicture filters") + _("Brightness threshold") - - - - - + + + + _("Noise") + + + + + - _("Logo erase") + _("Wall") true @@ -194,57 +277,47 @@ 6 - - + + - _("Top") + _("Rows") - - + + - _("Left") + _("Columns") - - - - + + + 1 + + + 3 + + - - - - - - _("Mask") + + + 1 + + + 3 - - - - _("Water effect") - - - - - - - _("Waves") - - - - - + + - _("Add logo") + _("Clone") true @@ -259,50 +332,23 @@ 6 - - + + - _("Transparency") + _("Number of clones") - - - - _("Left") + + + + 1 - - - - - - _("Top") - - - - - - - Qt::Horizontal - - - - - - - - - - - - - _("Logo") + + 2 - - - @@ -313,140 +359,6 @@ - - - - _("Add text") - - - true - - - false - - - - 9 - - - 6 - - - - - _("Position") - - - - - - - _("Text") - - - - - - - - - - - - - - - - _("Clone") - - - true - - - false - - - - 9 - - - 6 - - - - - _("Number of clones") - - - - - - - 1 - - - 2 - - - - - - - - - - _("Wall") - - - true - - - false - - - - 9 - - - 6 - - - - - _("Rows") - - - - - - - _("Columns") - - - - - - - 1 - - - 3 - - - - - - - 1 - - - 3 - - - - - - @@ -533,10 +445,19 @@ 359 - 45 + 0 + + + 0 - Qt::Vertical + Qt::Horizontal + + + false + + + false @@ -574,10 +495,24 @@ - - + + + + _("Waves") + + + + + + + _("Water effect") + + + + + - _("Gradient") + _("Sharpen") true @@ -592,37 +527,27 @@ 6 - - - - _("Cartoon") - - - - - - - _("Color") - - - - + - _("Mode") + _("Sigma") - + + + Qt::Horizontal + + - - + + - _("Noise") + _("Psychedelic") @@ -633,13 +558,10 @@ - - - - true - + + - _("Image adjust") + _("Motion blur") true @@ -654,117 +576,113 @@ 6 - - - - 360 - - - Qt::Horizontal + + + + _("Factor") - - - - 500 - + + Qt::Horizontal - - 50 - - - - - 300 - - - Qt::Horizontal - - - 100 - - - - - - - 200 - - - Qt::Horizontal - - - 100 - - - - - - - 200 - - - Qt::Horizontal - - - 100 - - - - - + + + + + + + _("Gradient") + + + true + + + false + + + + 9 + + + 6 + + + - _("Gamma") + _("Mode") - - + + - _("Contrast") + _("Color") - - + + - _("Brightness") + _("Cartoon") - - + + + + + + + + + + _("Add text") + + + true + + + false + + + + 9 + + + 6 + + + - _("Saturation") + _("Position") - + - _("Hue") + _("Text") - - - - _("Brightness threshold") - - + + + + + - - + + - _("Color extraction") + _("Add logo") true @@ -779,55 +697,57 @@ 6 - - - - Qt::Horizontal - - - - - - - Qt::Horizontal + + + + _("Transparency") - - - - Qt::Horizontal + + + + _("Left") - - + + - _("Blue") + _("Top") - - - - _("Green") + + + + Qt::Horizontal + + + + + + - + - _("Red") + _("Logo") + + + - - + + - _("Sharpen") + _("Logo erase") true @@ -842,33 +762,43 @@ 6 - - + + - _("Sigma") + _("Top") + + + + + + + _("Left") + + + + + + - - - Qt::Horizontal + + + + + + _("Mask") - - + + - _("Motion blur") - - - true - - - false + _("Advanced video filter controls") @@ -877,30 +807,53 @@ 6 + + + + + + + + + + _("Reset") + + + + + + + _("Update") + + + + + + + _("Video filters") + + + - + - _("Factor") + _("Vout filters") - - - - Qt::Horizontal + + + + _("Subpicture filters") + + + - - - - _("Psychedelic") - - -