Skip to content
Permalink
Browse files
Improve docs
  • Loading branch information
nyalldawson committed Mar 20, 2017
1 parent 0ed1414 commit 4b041d6f9e89a8bf86f0b401109e13eaf11f6b55
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/core/qgsvectordataprovider.h
@@ -260,21 +260,25 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
virtual bool truncate();

/**
* Adds new attributes
* @param attributes list of new attributes
* @return true in case of success and false in case of failure
* Adds new \a attributes to the provider. Returns true in case of success and false in case of failure.
* If attributes are added using this method then QgsVectorLayer::updateFields() must be called
* manually to ensure that the layer's field are correctly reported.
*/
virtual bool addAttributes( const QList<QgsField> &attributes );

/**
* Deletes existing attributes
* Deletes existing \a attributes from the provider.
* If attributes are deleted using this method then QgsVectorLayer::updateFields() must be called
* manually to ensure that the layer's field are correctly reported.
* @param attributes a set containing indices of attributes
* @return true in case of success and false in case of failure
*/
virtual bool deleteAttributes( const QgsAttributeIds &attributes );

/**
* Renames existing attributes.
* If attributes are renamed using this method then QgsVectorLayer::updateFields() must be called
* manually to ensure that the layer's field are correctly reported.
* @param renamedAttributes map of attribute index to new attribute name
* @return true in case of success and false in case of failure
* @note added in QGIS 2.16

0 comments on commit 4b041d6

Please sign in to comment.