22 #include <QSharedDataPointer> 27 class QgsFieldPrivate;
28 class QgsFieldsPrivate;
59 QVariant::Type type = QVariant::Invalid,
83 QVariant::Type type()
const;
103 int precision()
const;
114 void setName(
const QString& name );
119 void setType( QVariant::Type type );
125 void setTypeName(
const QString& typeName );
131 void setLength(
int len );
137 void setPrecision(
int precision );
142 void setComment(
const QString& comment );
154 bool convertCompatible(
QVariant& v )
const;
202 Field(): origin( OriginUnknown ), originIndex( -1 ) {}
232 bool append(
const QgsField& field,
FieldOrigin origin = OriginProvider,
int originIndex = -1 );
234 bool appendExpressionField(
const QgsField& field,
int originIndex );
236 void remove(
int fieldIdx );
241 bool isEmpty()
const;
249 bool exists(
int i )
const;
252 const QgsField& operator[](
int i )
const;
258 const QgsField& field(
int fieldIdx )
const;
265 int fieldOriginIndex(
int fieldIdx )
const;
268 int indexFromName(
const QString& name )
const;
273 int fieldNameIndex(
const QString& fieldName )
const;
290 QIcon iconForField(
int fieldIdx )
const;
Class for parsing and evaluation of expressions (formerly called "search strings").
field comes from a joined layer (originIndex / 1000 = index of the join, originIndex % 1000 = index w...
field has been temporarily added in editing mode (originIndex = index in the list of added attributes...
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Container of fields for a vector layer.
field comes from the underlying data provider of the vector layer (originIndex = index in provider's ...
it has not been specified where the field comes from
bool operator==(const Field &other) const
Field(const QgsField &f, FieldOrigin o, int oi)
CORE_EXPORT QDataStream & operator<<(QDataStream &out, const QgsField &field)
Writes the field to stream out.
Encapsulate a field in an attribute table or data source.
bool operator!=(const Field &other) const
QList< int > QgsAttributeList
int originIndex
index specific to the origin
bool operator!=(const QgsFields &other) const
FieldOrigin origin
origin of the field
CORE_EXPORT QDataStream & operator>>(QDataStream &in, QgsField &field)
Reads a field from stream in into field.