87 geomMap.
insert( fid, *geom );
100 map.
insert( field, newValue );
102 attribMap.
insert( fid, map );
114 Q_UNUSED( oldValues );
118 attribMap.
insert( fid, newValues );
123 QgsAttributeMap::const_iterator it;
160 map[ attr ] = newName;
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)
bool addFeature(QgsFeature &f) override
Adds a feature.
virtual bool deleteFeatures(const QgsFeatureIds &id)
Deletes one or more features.
const_iterator constBegin() const
virtual bool renameAttributes(const QgsFieldNameMap &renamedAttributes)
Renames existing attributes.
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...
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)
QgsEditFormConfig * editFormConfig() const
Get the configuration of the form used to represent this vector layer.
void featureAdded(QgsFeatureId fid)
QSet< int > QgsAttributeIds
void attributeAdded(int idx)
void geometryChanged(QgsFeatureId fid, QgsGeometry &geom)
bool deleteFeatures(const QgsFeatureIds &fids) override
Deletes a set of features from the layer (but does not commit it)
virtual bool changeAttributeValues(const QgsChangedAttributesMap &attr_map)
Changes attribute values of existing features.
QgsVectorLayer * layer()
Returns the layer associated with the undo command.
const_iterator constEnd() const
int fieldNameIndex(const QString &fieldName) const
Returns the index of a field name or -1 if the field does not exist.
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(const QgsGeometryMap &geometry_map)
Changes geometries of existing features.
void attributeRenamed(int idx, const QString &newName)
Emitted when an attribute has been renamed.
QgsFeatureId id() const
Get the feature ID for this feature.
bool isModified() const override
Returns true if the provider has been modified since the last commit.
bool changeAttributeValues(QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues) override
Changes values of attributes (but does not commit it).
QgsVectorLayerEditPassthrough(QgsVectorLayer *layer)
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)
bool renameAttribute(int attr, const QString &newName) override
Renames an attribute field (but does not commit it)
QgsVectorDataProvider * dataProvider()
Returns the data provider.
Represents a vector layer which manages a vector based data sets.
void featureDeleted(QgsFeatureId fid)
bool commitChanges(QStringList &commitErrors) override
Attempts to commit any changes to disk.