21#include "moc_qgsenumerationwidgetwrapper.cpp"
35 value = mComboBox->currentData();
50 QComboBox *combo =
new QComboBox( parent );
51 combo->setMinimumContentsLength( 1 );
52 combo->setSizeAdjustPolicy( QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon );
58 mComboBox = qobject_cast<QComboBox *>( editor );
62 QStringList enumValues;
65 const auto constEnumValues = enumValues;
66 for (
const QString &s : constEnumValues )
68 mComboBox->addItem( s, s );
79void QgsEnumerationWidgetWrapper::updateValues(
const QVariant &value,
const QVariantList & )
83 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 dataset.
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.