* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <QLabel>
#include <QVariant>
if( p_obj ) \
{ \
vlc_object_release( p_obj ); \
- if( checkbox ) checkbox->setCheckState( Qt::Checked ); \
+ if( checkbox ) checkbox->setChecked( true ); \
else groupbox->setChecked( true ); \
} \
else \
{ \
- if( checkbox ) checkbox->setCheckState( Qt::Unchecked ); \
+ if( checkbox ) checkbox->setChecked( false ); \
else groupbox->setChecked( false ); \
} \
} \
/* Please leave p_libvlc_global. This is where cached modules are
* stored. We're not trying to find a module instance. */
- module_t *p_obj = module_FindName( p_intf, psz_name );
+ module_t *p_obj = module_Find( p_intf, psz_name );
if( !p_obj )
{
msg_Err( p_intf, "Unable to find filter module \"%s\n.", psz_name );
}
else
{
- vlc_object_release( p_obj );
+ module_Put( p_obj );
msg_Err( p_intf, "Unknown video filter type." );
return;
}
- vlc_object_release( p_obj );
+ module_Put( p_obj );
psz_string = config_GetPsz( p_intf, psz_filter_type );
delete box;
}
+void ExtV4l2::showEvent( QShowEvent *event )
+{
+ QWidget::showEvent( event );
+ Refresh();
+}
+
void ExtV4l2::Refresh( void )
{
vlc_object_t *p_obj = (vlc_object_t*)vlc_object_find_name( p_intf, "v4l2", FIND_ANYWHERE );
case VLC_VAR_INTEGER:
{
QLabel *label = new QLabel( psz_label, box );
- QHBoxLayout *hlayout = new QHBoxLayout( box );
+ QHBoxLayout *hlayout = new QHBoxLayout();
hlayout->addWidget( label );
int i_val = var_GetInteger( p_obj, psz_var );
if( i_type & VLC_VAR_HASCHOICE )
}
case VLC_VAR_VOID:
{
- QPushButton *button = new QPushButton( psz_label, box );
- button->setObjectName( psz_var );
+ if( i_type & VLC_VAR_ISCOMMAND )
+ {
+ QPushButton *button = new QPushButton( psz_label, box );
+ button->setObjectName( psz_var );
- CONNECT( button, clicked( bool ), this,
- ValueChange( bool ) );
- layout->addWidget( button );
+ CONNECT( button, clicked( bool ), this,
+ ValueChange( bool ) );
+ layout->addWidget( button );
+ }
+ else
+ {
+ QLabel *label = new QLabel( psz_label, box );
+ layout->addWidget( label );
+ }
break;
}
default: