29  return mComboBox->currentData();
 
   39  QComboBox *combo = 
new QComboBox( parent );
 
   40  combo->setMinimumContentsLength( 1 );
 
   41  combo->setSizeAdjustPolicy( QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon );
 
   47  mComboBox = qobject_cast<QComboBox *>( editor );
 
   55      for ( 
int i = 0; i < categories.size(); i++ )
 
   57        QString label = categories[i].label();
 
   58        const QString 
value = categories[i].value().toString();
 
   59        if ( label.isEmpty() )
 
   62        mComboBox->addItem( label, 
value );
 
   66    connect( mComboBox, 
static_cast<void ( QComboBox::* )( 
int )
>( &QComboBox::currentIndexChanged ),
 
   76void QgsClassificationWidgetWrapper::updateValues( 
const QVariant &value, 
const QVariantList & )
 
   78  mComboBox->setCurrentIndex( mComboBox->findData( 
value ) );
 
const QgsCategoryList & categories() const
Returns a list of all categories recognized by the renderer.
 
Represents a vector layer which manages a vector based data sets.
 
QgsFeatureRenderer * renderer()
Returns the feature renderer used for rendering the features in the layer in 2D map views.
 
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
 
QList< QgsRendererCategory > QgsCategoryList