@@ -1347,6 +1347,39 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
13471347 */
13481348 bool changeAttributeValue ( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
13491349
1350+ /* *
1351+ * Changes attributes' values for a feature (but does not immediately
1352+ * commit the changes).
1353+ * The \a fid argument specifies the ID of the feature to be changed.
1354+ *
1355+ * The new values to be assigned to the fields are given by \a newValues.
1356+ *
1357+ * If a valid QVariant is specified for a field in \a oldValues, it will be
1358+ * used as the field value in the case of an undo operation corresponding
1359+ * to this attribute value change. If an invalid QVariant is used (the
1360+ * default behavior), then the feature's current value will be
1361+ * automatically retrieved and used. Note that this involves a feature
1362+ * request to the underlying data provider, so it is more efficient to
1363+ * explicitly pass an oldValue if it is already available.
1364+ *
1365+ * Returns true if feature's attributes was successfully changed.
1366+ *
1367+ * @note Calls to changeAttributeValues() are only valid for layers in
1368+ * which edits have been enabled by a call to startEditing(). Changes made
1369+ * to features using this method are not committed to the underlying data
1370+ * provider until a commitChanges() call is made. Any uncommitted changes
1371+ * can be discarded by calling rollBack().
1372+ *
1373+ * @see startEditing()
1374+ * @see commitChanges()
1375+ * @see changeGeometry()
1376+ * @see updateFeature()
1377+ * @see changeAttributeValue()
1378+ *
1379+ * @note added in QGIS 2.18
1380+ */
1381+ bool changeAttributeValues ( QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues );
1382+
13501383 /* * Add an attribute field (but does not commit it)
13511384 * returns true if the field was added
13521385 */
0 commit comments