15 #ifndef QGSVECTORLAYEREDITBUFFER_H 16 #define QGSVECTORLAYEREDITBUFFER_H 41 virtual bool isModified()
const;
60 virtual bool changeAttributeValue(
QgsFeatureId fid,
int field,
const QVariant &newValue,
const QVariant &oldValue = QVariant() );
64 virtual bool addAttribute(
const QgsField &field );
67 virtual bool deleteAttribute(
int attr );
85 virtual bool commitChanges( QStringList& commitErrors );
88 virtual void rollBack();
111 void undoIndexChanged(
int index );
115 void layerModified();
120 void attributeValueChanged(
QgsFeatureId fid,
int idx,
const QVariant & );
121 void attributeAdded(
int idx );
122 void attributeDeleted(
int idx );
125 void committedAttributesDeleted(
const QString& layerId,
const QgsAttributeList& deletedAttributes );
126 void committedAttributesAdded(
const QString& layerId,
const QList<QgsField>& addedAttributes );
127 void committedFeaturesAdded(
const QString& layerId,
const QgsFeatureList& addedFeatures );
128 void committedFeaturesRemoved(
const QString& layerId,
const QgsFeatureIds& deletedFeatureIds );
129 void committedAttributeValuesChanges(
const QString& layerId,
const QgsChangedAttributesMap& changedAttributesValues );
130 void committedGeometriesChanges(
const QString& layerId,
const QgsGeometryMap& changedGeometries );
142 void updateChangedAttributes(
QgsFeature &f );
145 void handleAttributeAdded(
int index );
148 void handleAttributeDeleted(
int index );
152 void updateAttributeMapIndex(
QgsAttributeMap& attrs,
int index,
int offset )
const;
154 void updateLayerFields();
191 #endif // QGSVECTORLAYEREDITBUFFER_H const QgsGeometryMap & changedGeometries()
Changed geometries which are not commited.
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
QgsVectorLayerEditBuffer()
QMap< int, QVariant > QgsAttributeMap
QSet< QgsFeatureId > QgsFeatureIds
QList< QgsFeature > QgsFeatureList
const QgsChangedAttributesMap & changedAttributeValues()
Changed attributes values which are not commited.
Container of fields for a vector layer.
QgsChangedAttributesMap mChangedAttributeValues
Changed attributes values which are not commited.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
QSet< int > QgsAttributeIds
QgsGeometryMap mChangedGeometries
Changed geometries which are not commited.
QList< int > QgsAttributeList
const QgsFeatureIds deletedFeatureIds()
QList< int > QgsAttributeList
QgsFeatureIds mDeletedFeatureIds
Deleted feature IDs which are not commited.
Encapsulate a field in an attribute table or data source.
const QList< QgsField > & addedAttributes()
added attributes fields which are not commited
const QgsFeatureMap & addedFeatures()
New features which are not commited.
QMap< QgsFeatureId, QgsFeature > QgsFeatureMap
QList< QgsField > mAddedAttributes
added attributes fields which are not commited
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
QgsFeatureMap mAddedFeatures
New features which are not commited.
Represents a vector layer which manages a vector based data sets.
const QgsAttributeList & deletedAttributeIds()
deleted attributes fields which are not commited.
QgsAttributeList mDeletedAttributeIds
deleted attributes fields which are not commited.