Feature request #1482

Add accessors to QgsVectorLayer

Added by oliviert - over 8 years ago. Updated over 1 year ago.

Status:Closed
Priority:Low
Assignee:-
Category:Vectors
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No

Description

I think it will be useful to add accessors in the QgsVectorLayer class for private members. For instance :

const [[QgsFeatureIds]]& getDeletedFeaturesIds() const { return mDeletedFeatureIds; }
const [[QgsFeatureList]]& getAddedFeatures() const { return mAddedFeatures; }
const [[QgsGeometryMap]]& getChangedGeometries() const { return mChangedGeometries; }

Maybe it will also be a good idea for other members ...

History

#1 Updated by Paolo Cavallini almost 7 years ago

Still true?

#2 Updated by Giovanni Manghi over 5 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#3 Updated by Giovanni Manghi about 5 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#4 Updated by Pirmin Kalberer over 4 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#5 Updated by Médéric RIBREUX over 1 year ago

  • Pull Request or Patch supplied set to No
  • Status changed from Open to Closed
  • Resolution set to fixed/implemented
  • % Done changed from 0 to 100
  • Assignee deleted (nobody -)

Hello, bug triage...

since QGIS 2.0, you can access those attributes by using a QgsVectorLayerEditBuffer from the QgsVectorLayer. There are the following public methods:

  • addedFeatures()
  • deletedFeatureIds()
  • changedGeometries()

I am closing this old feature request (feel free to reopen it if you think there is still need to have a private access directly in QgsVectorLayer) !

Also available in: Atom PDF