#define I_POP_SORT N_("Sort")
#define I_POP_ADD N_("Add node")
+/*************** Preferences *************/
+#define I_HIDDEN_ADV N_( "Some options are available but hidden. "\
+ "Check \"Advanced options\" to see them." )
#endif
module_config_t *_p_item, QLabel *label, QComboBox *_combo,
bool bycat ) : VStringConfigControl( _p_this, _p_item )
{
- fprintf( stderr, "%p %p\n", _p_item, p_item );
combo = _combo;
finish( label, bycat );
}
#include <QFont>
#include "pixmaps/audio.xpm"
+#include "pixmaps/video.xpm"
#include "ui/sprefs_trivial.h"
#define ITEM_HEIGHT 25
addItem( "Very trivial" );
item(0)->setIcon( QIcon( QPixmap( audio_xpm ) ) );
+ item(0)->setData( Qt::UserRole, qVariantFromValue( 0 ) );
+ addItem( "Video" );
+ item(1)->setIcon( QIcon( QPixmap( video_xpm ) ) );
+ item(1)->setData( Qt::UserRole, qVariantFromValue( 1 ) );
}
void SPrefsCatList::ApplyAll()
{
Ui::SPrefsTrivial ui;
ui.setupUi( this );
- msg_Err( p_intf, "Intf there" );
module_config_t *p_config = config_FindConfig( VLC_OBJECT(p_intf),
"memcpy" );
- msg_Err( p_intf, "%p", p_config );
ConfigControl *control = new ModuleConfigControl( VLC_OBJECT(p_intf),
p_config, ui.memcpyLabel, ui.memcpyCombo, false );
controls.append( control );
main_layout->setColumnStretch( 0, 1 );
main_layout->setColumnStretch( 1,3 );
- setAll();
+ setSmall();
connect( adv_chk, SIGNAL( toggled(bool) ),
this, SLOT( setAdvanced( bool ) ) );
advanced_panel = new PrefsPanel( main_panel );
main_panel_l->addWidget( advanced_panel );
advanced_panel->show();
+ adv_chk->show();
}
void PrefsDialog::setSmall()
connect( simple_tree,
SIGNAL( currentItemChanged( QListWidgetItem *, QListWidgetItem *) ),
this, SLOT( changeSimplePanel( QListWidgetItem * ) ) );
-
}
tree_panel_l->addWidget( simple_tree );
simple_tree->show();
simple_panel = new SPrefsPanel( p_intf, main_panel, 0 );
main_panel_l->addWidget( simple_panel );
simple_panel->show();
+ adv_chk->hide();
}
PrefsDialog::~PrefsDialog()
void PrefsDialog::changeSimplePanel( QListWidgetItem *item )
{
+ int number = item->data( Qt::UserRole ).toInt();
if( simple_panel )
{
main_panel_l->removeWidget( simple_panel );
/* Don't do this once it works, you would loose all changes */
delete simple_panel;
}
- simple_panel = new SPrefsPanel( p_intf, main_panel, 0 );
+ simple_panel = new SPrefsPanel( p_intf, main_panel, number );
main_panel_l->addWidget( simple_panel );
simple_panel->show();
}