From 547a4494dff2a2781a19c1be52ea3aa8e960c903 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Thu, 31 Jan 2008 02:34:31 +0000 Subject: [PATCH] Qt4 - Extended Panels. try to fix the sizing ... --- .../gui/qt4/components/extended_panels.cpp | 6 +- .../gui/qt4/components/extended_panels.hpp | 5 +- modules/gui/qt4/dialogs/extended.cpp | 13 +- modules/gui/qt4/ui/video_effects.ui | 1885 +++++++++-------- 4 files changed, 1063 insertions(+), 846 deletions(-) diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp index 02909de7c7..e8c36c2372 100644 --- a/modules/gui/qt4/components/extended_panels.cpp +++ b/modules/gui/qt4/components/extended_panels.cpp @@ -92,10 +92,10 @@ QString OptionFromWidgetName( QObject *obj ) return option; } -ExtVideo::ExtVideo( intf_thread_t *_p_intf, QWidget *_parent ) : - QWidget( _parent ) , p_intf( _p_intf ) +ExtVideo::ExtVideo( intf_thread_t *_p_intf, QTabWidget *_parent ) : + p_intf( _p_intf ) { - ui.setupUi( this ); + ui.setupUi( _parent ); #define SETUP_VFILTER( widget ) \ { \ diff --git a/modules/gui/qt4/components/extended_panels.hpp b/modules/gui/qt4/components/extended_panels.hpp index c215f2a24f..6ff5bd4964 100644 --- a/modules/gui/qt4/components/extended_panels.hpp +++ b/modules/gui/qt4/components/extended_panels.hpp @@ -36,16 +36,17 @@ #include "ui/video_effects.h" #include "ui/v4l2.h" +#include #define BANDS 10 #define NUM_SP_CTRL 5 class QSignalMapper; -class ExtVideo: public QWidget +class ExtVideo: public QObject { Q_OBJECT public: - ExtVideo( intf_thread_t *, QWidget * ); + ExtVideo( intf_thread_t *, QTabWidget * ); virtual ~ExtVideo(); /*void gotoConf( QObject* );*/ private: diff --git a/modules/gui/qt4/dialogs/extended.cpp b/modules/gui/qt4/dialogs/extended.cpp index 30ac0ce05c..8efe9ce752 100644 --- a/modules/gui/qt4/dialogs/extended.cpp +++ b/modules/gui/qt4/dialogs/extended.cpp @@ -45,6 +45,7 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) QTabWidget *mainTabW = new QTabWidget( this ); mainTabW->setTabPosition( QTabWidget::West ); + /* AUDIO effects */ QWidget *audioWidget = new QWidget; QHBoxLayout *audioLayout = new QHBoxLayout( audioWidget ); QTabWidget *audioTab = new QTabWidget( audioWidget ); @@ -58,8 +59,16 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf ) mainTabW->addTab( audioWidget, qtr( "Audio effects" ) ); - ExtVideo *videoEffect = new ExtVideo( p_intf, mainTabW ); - mainTabW->addTab( videoEffect, qtr( "Video Effects" ) ); + /* Video Effects */ + QWidget *videoWidget = new QWidget; + QHBoxLayout *videoLayout = new QHBoxLayout( videoWidget ); + QTabWidget *videoTab = new QTabWidget( videoWidget ); + + ExtVideo *videoEffect = new ExtVideo( p_intf, videoTab ); + videoLayout->addWidget( videoTab ); + videoTab->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ); + + mainTabW->addTab( videoWidget, qtr( "Video Effects" ) ); if( module_Exists( p_intf, "v4l2" ) ) { diff --git a/modules/gui/qt4/ui/video_effects.ui b/modules/gui/qt4/ui/video_effects.ui index 7f5e47acc2..dc808a6202 100644 --- a/modules/gui/qt4/ui/video_effects.ui +++ b/modules/gui/qt4/ui/video_effects.ui @@ -1,1012 +1,1219 @@ ExtVideoWidget - + 0 0 - 561 - 289 + 472 + 320 - - - 0 - 0 - - - - Form + + 1 - - - 9 - - - 6 - - - - - - 0 - 0 - - - - 0 - - - - _("Basic") - + + + _("Basic") + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Transform") + + + true + + + false + - + 9 - + + 9 + + + 9 + + + 9 + + 6 - - - - _("Transform") - - - true - - - false + + 6 + + + + + + + + + + + _("Sharpen") + + + true + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Sigma") - - - 9 - - - 6 - - - - - - - - _("Sharpen") + + + 200 - - true + + 1 - - false + + 10 - - - 9 - - - 6 - - - - - _("Sigma") - - - - - - - 200 - - - 1 - - - 10 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 100 - - - - - - - - - - true - - - _("Image adjust") - - - true - - - false + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 100 - - - 9 - - - 6 - - - - - 360 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 60 - - - - - - - 500 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 50 - - - - - - - 300 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 100 - - - - - - - 200 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 100 - - - - - - - 200 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 100 - - - - - - - _("Gamma") - - - - - - - _("Contrast") - - - - - - - _("Brightness") - - - - - - - _("Saturation") - - - - - - - _("Hue") - - - - - - - _("Brightness threshold") - - - - - - - _("Color fun") - + + + + + true + + + _("Image adjust") + + + true + + + false + - - 9 - - - 6 - + + + + 360 + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 60 + + + + + + + 500 + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 50 + + + + + + + 300 + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 100 + + + + + + + 200 + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 100 + + + - - - _("Color extraction") + + + 200 - - true + + Qt::Horizontal - - false + + QSlider::TicksBothSides + + + 100 - - - 9 - - - 6 - - - - - _("Color") - - - - - - - >HHHHHH;# - - - - - - + + - _("Color invert") + _("Gamma") - - - - _("Color threshold") + + + + _("Contrast") - - true + + + + + + _("Brightness") - - false + + + + + + _("Saturation") + + + + + + + _("Hue") + + + + + + + _("Brightness threshold") - - - 9 - - - 6 - - - - - _("Similarity") - - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - - - - _("Saturation") - - - - - - - _("Color") - - - - - - - >HHHHHH;# - - - - - - - _("Some random name") - + + + + + + _("Color fun") + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Color extraction") + + + true + + + false + - + 9 - + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Color") + + + + + + + >HHHHHH;# + + + + + + + + + + _("Color invert") + + + + + + + _("Color threshold") + + + true + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + 6 + + + + _("Similarity") + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + - + - _("Magnification") + _("Saturation") - - - _("Rotate") + + + _("Color") + + + + + + + >HHHHHH;# + + + + + + + + + + + _("Some random name") + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Magnification") + + + + + + + _("Rotate") + + + true + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + 359 + + + 0 - - true + + 0 - + + Qt::Horizontal + + false - - - 9 - - - 6 - - - - - 359 - - - 0 - - - 0 - - - Qt::Horizontal - - - false - - - false - - - - - - - _("Angle") - - - - - - - - - - _("Puzzle game") - - - true - - + false - - - 9 - - - 6 - - - - - 1 - - - 3 - - - - - - - 1 - - - 3 - - - - - - - _("Black slot") - - - - - - - _("Columns") - - - - - - - _("Rows") - - - - + + + + + + _("Angle") + - - - _("Image modification") - + + + + + _("Puzzle game") + + + true + + + false + - + + 9 + + 9 - + + 9 + + + 9 + + 6 - - - - _("Waves") + + 6 + + + + + 1 + + + 3 - - + + + + 1 + + + 3 + + + + + - _("Water effect") + _("Black slot") - - + + - _("Psychedelic") + _("Columns") - - + + - _("Noise") + _("Rows") - - + + + + + + + + _("Image modification") + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Waves") + + + + + + + _("Water effect") + + + + + + + _("Psychedelic") + + + + + + + _("Noise") + + + + + + + _("Motion detect") + + + + + + + _("Motion blur") + + + true + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + - _("Motion detect") + _("Factor") - - - _("Motion blur") + + + 1 - - true + + 127 - - false + + 80 - - - 9 - - - 6 - - - - - _("Factor") - - - - - - - 1 - - - 127 - - - 80 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 16 - - - - - - - - - - _("Gradient") - - - true - - - false + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 16 - - - 9 - - - 6 - - - - - _("Mode") - - - - - - - _("Color") - - - - - - - _("Cartoon") - - - - - - - - - - _("Find a name") - + + + + + _("Gradient") + + + true + + + false + - + + 9 + + 9 - + + 9 + + + 9 + + 6 - - - - _("Logo erase") + + 6 + + + + + _("Mode") - - true + + + + + + _("Color") - - false + + + + + + _("Cartoon") - - - 9 - - - 6 - - - - - _("Top") - - - - - - - _("Left") - - - - - - - - - - - - - - - - _("Mask") - - - - + + + + + + + + + + + _("Find a name") + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Logo erase") + + + true + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + - - - _("Clone") + + + _("Top") - - true + + + + + + _("Left") - - false + + + + + + + + + + + + + + + _("Mask") - - - 9 - - - 6 - - - - - _("Number of clones") - - - - - - - 1 - - - 2 - - - - + + + + + + + _("Clone") + + + true + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + - - - _("Wall") + + + _("Number of clones") - - true + + + + + + 1 - - false + + 2 - - - 9 - - - 6 - - - - - _("Rows") - - - - - - - _("Columns") - - - - - - - 1 - - - 3 - - - - - - - 1 - - - 3 - - - - - - - _("Overlay") - + + + + + _("Wall") + + + true + + + false + - + + 9 + + + 9 + + + 9 + + 9 - + + 6 + + 6 - - - _("Add text") + + + _("Rows") - - true + + + + + + _("Columns") - - false + + + + + + 1 + + + 3 - - - 9 - - - 6 - - - - - _("Position") - - - - - - - _("Text") - - - - - - - - - - - - - _("Add logo") - - - true + + + 1 - - false + + 3 - - - 9 - - - 6 - - - - - _("Transparency") - - - - - - - _("Left") - - - - - - - _("Top") - - - - - - - 255 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 32 - - - - - - - - - - - - - _("Logo") - - - - - - - - - - _("Advanced video filter controls") - + + + + + + _("Overlay") + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + _("Add text") + + + true + + + false + - + + 9 + + + 9 + + + 9 + + 9 - + + 6 + + 6 - - + + + + _("Position") + + - - + + - _("Subpicture filters") + _("Text") - - + + - - + + + + + + + + + + _("Add logo") + + + true + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + - _("Video filters") + _("Transparency") - - + + - _("Vout filters") + _("Left") - - + + - _("Reset") + _("Top") + + + + + + + 255 + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 32 - - + + + + + + + + - _("Update") + _("Logo") - - + + - - - + + + + + + _("Advanced video filter controls") + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + 6 + + + + + + + + _("Subpicture filters") + + + + + + + + + + _("Video filters") + + + + + + + _("Vout filters") + + + + + + + _("Reset") + + + + + + + _("Update") + + + + + + + + -- 2.39.2