31 class QgsFeaturePrivate;
48 bool operator<(
const QgsFeatureId &
id )
const {
return mId <
id.mId; }
49 bool operator>(
const QgsFeatureId &
id )
const {
return mId >
id.mId; }
57 qint64 toLongLong()
const 75 return qHash(
id.mId );
78 #define FID_IS_NEW(fid) (fid).isNew() 79 #define FID_TO_NUMBER(fid) (fid).toLongLong() 80 #define FID_TO_STRING(fid) static_cast<QString>(fid) 81 #define STRING_TO_FID(str) QgsFeatureId(str) 87 #define FID_IS_NEW(fid) (fid<0) 88 #define FID_TO_NUMBER(fid) static_cast<qint64>(fid) 89 #define FID_TO_STRING(fid) QString::number( fid ) 90 #define STRING_TO_FID(str) (str).toLongLong() 96 #define FID_IS_NEW(fid) (fid<0) 97 #define FID_TO_NUMBER(fid) static_cast<int>(fid) 98 #define FID_TO_STRING(fid) QString::number( fid ) 99 #define STRING_TO_FID(str) (str).toLong() 157 if ( size() != v.
size() )
247 bool setAttribute(
int field,
const QVariant& attr );
252 void initAttributes(
int fieldCount );
259 void deleteAttribute(
int field );
266 bool isValid()
const;
272 void setValid(
bool validity );
310 Q_DECL_DEPRECATED
QgsGeometry *geometryAndOwnership();
343 Q_DECL_DEPRECATED
void setGeometryAndOwnership(
unsigned char * geom,
int length );
353 Q_DECL_DEPRECATED
void setFields(
const QgsFields* fields,
bool initAttributes =
false );
363 void setFields(
const QgsFields& fields,
bool initAttributes =
false );
388 bool deleteAttribute(
const QString& name );
406 QVariant attribute(
int fieldIdx )
const;
414 int fieldNameIndex(
const QString& fieldName )
const;
QMap< int, QString > QgsFieldNameMap
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
A rectangle specified with double values.
QMap< int, QVariant > QgsAttributeMap
QgsAttributes(const QVector< QVariant > &v)
Copies another vector of attributes.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QSet< QgsFeatureId > QgsFeatureIds
QList< QgsFeature > QgsFeatureList
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
uint qHash(const QDateTime &key)
Hash implementation for QDateTime.
Q_DECLARE_METATYPE(QgsMimeDataUtils::UriList)
Container of fields for a vector layer.
A geometry is the spatial representation of a feature.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QString number(int n, int base)
QgsAttributes(int size, const QVariant &v)
Constructs a vector with an initial size of size elements.
const T * constData() const
Encapsulate a field in an attribute table or data source.
QgsAttributes(int size)
Create a new vector of attributes with the given size.
QVariant fromValue(const T &value)
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
CORE_EXPORT QDataStream & operator>>(QDataStream &in, QgsFeature &feature)
Reads a feature from stream in into feature.
CORE_EXPORT QDataStream & operator<<(QDataStream &out, const QgsFeature &feature)
Writes the feature to stream out.
bool operator!=(const QgsAttributes &v) const
bool operator==(const QgsAttributes &v) const
Compares two vectors of attributes.