17#include "moc_qgsenumerationwidgetwrapper.cpp"
34 value = mComboBox->currentData();
49 QComboBox *combo =
new QComboBox( parent );
50 combo->setMinimumContentsLength( 1 );
51 combo->setSizeAdjustPolicy( QComboBox::SizeAdjustPolicy::AdjustToMinimumContentsLengthWithIcon );
57 mComboBox = qobject_cast<QComboBox *>( editor );
61 QStringList enumValues;
64 const auto constEnumValues = enumValues;
65 for (
const QString &s : constEnumValues )
67 mComboBox->addItem( s, s );
78void QgsEnumerationWidgetWrapper::updateValues(
const QVariant &value,
const QVariantList & )
82 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.