28 return QStringLiteral(
"Range" );
45 if ( field.
type() == QVariant::Double &&
46 config.contains( QStringLiteral(
"Precision" ) ) &&
50 double val( value.toDouble( &ok ) );
53 int precision( config[ QStringLiteral(
"Precision" ) ].toInt( &ok ) );
57 result = QLocale().toString( val,
'f', precision );
61 else if ( ( field.
type() == QVariant::Int ) &&
65 double val( value.toInt( &ok ) );
68 result = QLocale().toString( val,
'f', 0 );
71 else if ( ( field.
type() == QVariant::LongLong ) &&
75 double val( value.toLongLong( &ok ) );
78 result = QLocale().toString( val,
'f', 0 );
83 result = value.toString();
QgsField at(int i) const
Gets field at particular index (must be in range 0..N-1)
QgsFields fields() const override
Returns the list of fields of this layer.
static QString nullRepresentation()
This string is used to represent the value NULL throughout QGIS.
Encapsulate a field in an attribute table or data source.
Represents a vector layer which manages a vector based data sets.