57 geomMap.
insert( fid, *geom );
69 map.
insert( field, newValue );
71 attribMap.
insert( fid, map );
QgsFeatureId id() const
Get the feature ID for this feature.
const QString & name() const
Gets the name of the field.
virtual bool addAttributes(const QList< QgsField > &attributes)
Adds new attributes.
bool deleteAttribute(int attr) override
Delete an attribute field (but does not commit it)
QSet< QgsFeatureId > QgsFeatureIds
void attributeDeleted(int idx)
QList< QgsFeature > QgsFeatureList
bool addFeature(QgsFeature &f) override
Adds a feature.
virtual bool deleteFeatures(const QgsFeatureIds &id)
Deletes one or more features.
A geometry is the spatial representation of a feature.
bool changeAttributeValue(QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue=QVariant()) override
Changed an attribute value (but does not commit it)
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
int fieldNameIndex(const QString &fieldName) const
Returns the index of a field name or -1 if the field does not exist.
virtual bool addFeatures(QgsFeatureList &flist)
Adds a list of features.
bool addFeatures(QgsFeatureList &features) override
Insert a copy of the given features into the layer (but does not commit it)
void featureAdded(QgsFeatureId fid)
QSet< int > QgsAttributeIds
void attributeAdded(int idx)
void geometryChanged(QgsFeatureId fid, QgsGeometry &geom)
virtual bool changeAttributeValues(const QgsChangedAttributesMap &attr_map)
Changes attribute values of existing features.
void rollBack() override
Stop editing and discard the edits.
bool addAttribute(const QgsField &field) override
Add an attribute field (but does not commit it) returns true if the field was added.
Encapsulate a field in an attribute table or data source.
virtual bool changeGeometryValues(QgsGeometryMap &geometry_map)
Changes geometries of existing features.
bool deleteFeature(QgsFeatureId fid) override
Delete a feature from the layer (but does not commit it)
void attributeValueChanged(QgsFeatureId fid, int idx, const QVariant &)
bool changeGeometry(QgsFeatureId fid, QgsGeometry *geom) override
Change feature's geometry.
virtual bool deleteAttributes(const QgsAttributeIds &attributes)
Deletes existing attributes.
iterator insert(const Key &key, const T &value)
QgsVectorDataProvider * dataProvider()
Returns the data provider.
void featureDeleted(QgsFeatureId fid)
bool commitChanges(QStringList &commitErrors) override
Attempts to commit any changes to disk.