Commit 757962a0 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Open Capture Panel and file Panel: Don't build by hand the ComboChoices...

Make it automatic.
parent d258537d
This diff is collapsed.
...@@ -196,3 +196,25 @@ QString VLCKeyToString( int val ) ...@@ -196,3 +196,25 @@ QString VLCKeyToString( int val )
} }
return r; return r;
} }
#include <QComboBox>
void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
QComboBox *combo, QWidget *parent )
{
module_config_t *p_config =
config_FindConfig( VLC_OBJECT(p_intf), configname );
if( p_config )
{
for ( int i_index = 0; i_index < p_config->i_list; i_index++ )
{
combo->addItem( qfu( p_config->ppsz_list_text[i_index] ),
QVariant( p_config->pi_list[i_index] ) );
if( p_config->value.i == p_config->pi_list[i_index] )
{
combo->setCurrentIndex( i_index );
}
}
combo->setToolTip( qfu( p_config->psz_longtext ) );
}
}
...@@ -92,4 +92,10 @@ int qtEventToVLCKey( QKeyEvent *e ); ...@@ -92,4 +92,10 @@ int qtEventToVLCKey( QKeyEvent *e );
int qtWheelEventToVLCKey( QWheelEvent *e ); int qtWheelEventToVLCKey( QWheelEvent *e );
QString VLCKeyToString( int val ); QString VLCKeyToString( int val );
#include "qt4.hpp"
#include <vlc/vlc.h>
class QComboBox;
void setfillVLCConfigCombo(const char *configname, intf_thread_t *p_intf,
QComboBox *combo, QWidget *parent = 0 );
#endif #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