51 return readConfig( configElement, layer, fieldIdx );
57 Q_UNUSED( configElement );
91 QVariant::Type fldType = vl->
fields().
at( fieldIdx ).
type();
92 bool alignRight = ( fldType == QVariant::Int || fldType == QVariant::Double || fldType == QVariant::LongLong
93 || fldType == QVariant::DateTime || fldType == QVariant::Date || fldType == QVariant::Time );
96 return Qt::AlignRight;
112 Q_UNUSED( configElement );
114 Q_UNUSED( fieldIdx );
119 bool QgsEditorWidgetFactory::isFieldSupported(
QgsVectorLayer* vl,
int fieldIdx )
FieldOrigin fieldOrigin(int fieldIdx) const
Get field's origin (value from an enumeration)
field comes from the underlying data provider of the vector layer (originIndex = index in provider's ...
const QgsField & at(int i) const
Get field at particular index (must be in range 0..N-1)
QgsFields fields() const
Returns the list of fields of this layer.
int fieldOriginIndex(int fieldIdx) const
Get field's origin index (its meaning is specific to each type of origin)
const char * name() const
QVariantMap QgsEditorWidgetConfig
Holds a set of configuration parameters for a editor widget wrapper.
QString displayString(const QVariant &v) const
Formats string for display.
virtual QVariant defaultValue(int fieldId, bool forceLazyEval=false)
Returns the default value for field specified by fieldId.
QgsVectorDataProvider * dataProvider()
Returns the data provider.
Represents a vector layer which manages a vector based data sets.
QVariant::Type type() const
Gets variant type of the field as it will be retrieved from data source.