Commit 2e02fbfc authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: ConfigControl: rework layout insertion.

Moving layout insertion outside of the constructors.
We no longer need constructor for creating a QWidget,
and we did not need at all to create a widget as a sublayout
is sufficient.
Removes many constructors and conditional code. gross -100 lines.

Also fixes an IntegerRangeConfigControl declaration which definition
was on IntegerRangeSliderConfigControl.
parent 67b43ed8
......@@ -723,12 +723,14 @@ void CaptureOpenPanel::initialize()
module_config_t *p_config =
config_FindConfig( VLC_OBJECT(p_intf), "dshow-vdev" );
vdevDshowW = new StringListConfigControl(
VLC_OBJECT(p_intf), p_config, this, dshowDevLayout, line );
VLC_OBJECT(p_intf), p_config, this );
vdevDshowW->insertIntoExistingGrid( dshowDevLayout, line );
line++;
p_config = config_FindConfig( VLC_OBJECT(p_intf), "dshow-adev" );
adevDshowW = new StringListConfigControl(
VLC_OBJECT(p_intf), p_config, this, dshowDevLayout, line );
VLC_OBJECT(p_intf), p_config, this );
adevDshowW->insertIntoExistingGrid( dshowDevLayout, line );
line++;
/* dshow Properties */
......
......@@ -680,8 +680,8 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
int line = 0;
panel_label->setText( qtr( "Configure Hotkeys" ) );
control = new KeySelectorControl( VLC_OBJECT(p_intf), p_config ,
this, gLayout, line );
control = new KeySelectorControl( VLC_OBJECT(p_intf), p_config, this );
control->insertIntoExistingGrid( gLayout, line );
controls.append( control );
line++;
......@@ -694,14 +694,16 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
p_config = config_FindConfig( VLC_OBJECT(p_intf), "hotkeys-mousewheel-mode" );
control = new IntegerListConfigControl( VLC_OBJECT(p_intf),
p_config, this, false, gLayout, line );
p_config, this, false );
control->insertIntoExistingGrid( gLayout, line );
controls.append( control );
#ifdef WIN32
line++;
p_config = config_FindConfig( VLC_OBJECT(p_intf), "qt-disable-volume-keys" );
control = new BoolConfigControl( VLC_OBJECT(p_intf), p_config, this, gLayout, line );
control = new BoolConfigControl( VLC_OBJECT(p_intf), p_config, this );
control->insertIntoExistingGrid( gLayout, line );
controls.append( control );
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment