33 value = mComboBox->currentData();
48 return new QComboBox( parent );
53 mComboBox = qobject_cast<QComboBox *>( editor );
57 QStringList enumValues;
60 const auto constEnumValues = enumValues;
61 for (
const QString &s : constEnumValues )
63 mComboBox->addItem( s, s );
65 connect( mComboBox,
static_cast<void ( QComboBox::* )(
int )
>( &QComboBox::currentIndexChanged ),
75void QgsEnumerationWidgetWrapper::updateValues(
const QVariant &value,
const QVariantList & )
79 mComboBox->setCurrentIndex( mComboBox->findData(
value ) );
virtual void enumValues(int index, QStringList &enumList) const
Returns the possible enum values of an attribute.
Represents a vector layer which manages a vector based data sets.
QgsVectorDataProvider * dataProvider() FINAL
Returns the layer's data provider, it may be nullptr.
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.