QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
29 return QStringLiteral(
"ValueMap" );
36 QString valueInternalText;
40 valueInternalText = value.toString();
42 const QVariant v = config.value( QStringLiteral(
"map" ) );
43 const QVariantList list = v.toList();
46 for (
const QVariant &item : list )
48 const QVariantMap map = item.toMap();
50 for (
auto it = map.constBegin(); it != map.constEnd(); ++it )
52 if ( it.value().toString() == valueInternalText )
61 QVariantMap map = v.toMap();
62 return map.key( valueInternalText, QVariant( QStringLiteral(
"(%1)" ).arg( layer->
fields().
at( fieldIndex ).
displayString( value ) ) ).toString() );
76 const QList<QVariant> valueList = config.value( QStringLiteral(
"map" ) ).toList();
77 for (
const QVariant &item : valueList )
79 values.append( item.toMap().constBegin().value() );
80 if ( values.count() == countLimit )
QString displayString(const QVariant &v) const
Formats string for display.
A context for field formatter containing information like the project.
QgsFields fields() const FINAL
Returns the list of fields of this layer.
Represents a vector layer which manages a vector based data sets.
QgsField at(int i) const
Gets field at particular index (must be in range 0..N-1)