24 return QStringLiteral(
"ValueMap" );
31 QString valueInternalText;
35 valueInternalText = value.toString();
37 const QVariant v = config.value( QStringLiteral(
"map" ) );
38 const QVariantList list = v.toList();
41 for (
const QVariant &item : list )
43 const QVariantMap map = item.toMap();
45 for (
auto it = map.constBegin(); it != map.constEnd(); ++it )
47 if ( it.value().toString() == valueInternalText )
56 QVariantMap map = v.toMap();
57 return map.key( valueInternalText, QVariant( QStringLiteral(
"(%1)" ).arg( layer->
fields().
at( fieldIndex ).
displayString( value ) ) ).toString() );
QgsField at(int i) const
Gets field at particular index (must be in range 0..N-1)
QgsFields fields() const FINAL
Returns the list of fields of this layer.
QString displayString(const QVariant &v) const
Formats string for display.
Represents a vector layer which manages a vector based data sets.