}
}
+/*******************************************************
+ * Simple widgets
+ *******************************************************/
+InterfacePreviewWidget::InterfacePreviewWidget
+ ( QWidget *parent ) : QLabel( parent, 0 )
+{
+ setGeometry( 0, 0, 128, 100 );
+ setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+}
+
+void InterfacePreviewWidget::setPreview( int comboid )
+{
+ /* Need to move resources references as soon as qt4.cpp
+ local defines has been moved somewhere else
+ */
+ const char * pixmaps[] = { ":/prefsmenu/sample_classic",
+ ":/prefsmenu/sample_complete",
+ ":/prefsmenu/sample_minimal" };
+ setPixmap( QPixmap( pixmaps[ comboid ] ) );
+}
+
+
+
/**************************************************************************
* String-based controls
*************************************************************************/
BoolConfigControl::BoolConfigControl( vlc_object_t *_p_this,
module_config_t *_p_item,
QLabel *_label,
- QCheckBox *_checkbox,
+ QAbstractButton *_checkbox,
bool bycat ) :
VIntConfigControl( _p_this, _p_item )
{
void BoolConfigControl::finish()
{
- checkbox->setCheckState( p_item->value.i == true ? Qt::Checked
- : Qt::Unchecked );
+ checkbox->setChecked( p_item->value.i == true );
checkbox->setToolTip( formatTooltip(qtr(p_item->psz_longtext)) );
}
int BoolConfigControl::getValue()
{
- return checkbox->checkState() == Qt::Checked ? true : false;
+ return checkbox->isChecked();
}
/**************************************************************************
{
QList<QTreeWidgetItem *> list =
table->findItems( qtr( p_item->psz_text ), Qt::MatchExactly );
- if( list.count() > 1 )
+ if( list.count() >= 1 )
{
list[0]->setText( 2, VLCKeyToString( p_item->value.i ) );
list[0]->setData( 2, Qt::UserRole,
QVariant( p_item->value.i ) );
}
+ if( list.count() >= 2 )
+ msg_Dbg( p_this, "This is probably wrong, %s", p_item->psz_text );
}
}
module_config_free (p_config);