Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 20, 2017
1 parent 0ed1414 commit 4b041d6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/core/qgsvectordataprovider.h
Expand Up @@ -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
Expand Down

0 comments on commit 4b041d6

Please sign in to comment.