I'm writing a pyqgis plugin with qgis 2.2 I succeeded in accessing and displaying vector data (geometries & attributes).
Now I would like to allow editing for all my layers and all features with layer’s in-memory editing buffer in order to be able in a 2nd time to commit/rollback the editions :
-> modifying features (geom & attributes) -> adding features (geom & attributes) -> deleting features (geom & attributes)
I read the qgis cookbook part called "Modifying Vector Layers with an Editing Buffer". But there is not examples showing the structure of the code. I would like to get, if possible the method I should use? Is it possible to get the structure of the code please? Which classes and which functions should i use ?
I'm writing a pyqgis 2.2 plugin with qgis 2.2 I succeeded in accessing and displaying vector data (geometries & attributes). I succeed also to create a 'beforecomitechanges' signal ( emitted, before changes are commited to the data provider). Thus a message has appeared into qgis logwindow ("comit change" label) after editing operations and before commiting toward the dp). Please read following piece of code allowing to do that:
QgsMessageLog.logMessage( "commit change" ) QApplication.beep() layer.beforeCommitChanges.connect(self.beforeLayerCommitChange)
Now I would like to generate others signals. i would like generate the displaying of information messages (number of features that have been added,modifyied,deleted, the id of the features which have been modified, the name of the layer..).
COuld you throw light for me ? THanks.