QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsVectorLayerUndoCommandChangeAttribute Class Reference

Undo command for modifying an attribute of a feature from a vector layer. More...

#include <qgsvectorlayerundocommand.h>

Inheritance diagram for QgsVectorLayerUndoCommandChangeAttribute:

Public Member Functions

 QgsVectorLayerUndoCommandChangeAttribute (QgsVectorLayerEditBuffer *buffer, QgsFeatureId fid, int fieldIndex, const QVariant &newValue, const QVariant &oldValue)
 Constructor for QgsVectorLayerUndoCommandChangeAttribute.
void redo () override
void undo () override
Public Member Functions inherited from QgsVectorLayerUndoCommand
 QgsVectorLayerUndoCommand (QgsVectorLayerEditBuffer *buffer)
 Constructor for QgsVectorLayerUndoCommand.
int id () const override
QgsVectorLayerlayer ()
 Returns the layer associated with the undo command.
bool mergeWith (const QUndoCommand *) override

Additional Inherited Members

Protected Attributes inherited from QgsVectorLayerUndoCommand
QgsVectorLayerEditBuffermBuffer = nullptr
 Associated edit buffer.

Detailed Description

Undo command for modifying an attribute of a feature from a vector layer.

Definition at line 149 of file qgsvectorlayerundocommand.h.

Constructor & Destructor Documentation

◆ QgsVectorLayerUndoCommandChangeAttribute()

QgsVectorLayerUndoCommandChangeAttribute::QgsVectorLayerUndoCommandChangeAttribute ( QgsVectorLayerEditBuffer * buffer,
QgsFeatureId fid,
int fieldIndex,
const QVariant & newValue,
const QVariant & oldValue )

Constructor for QgsVectorLayerUndoCommandChangeAttribute.

Parameters
bufferassociated edit buffer
fidfeature ID of feature to modify
fieldIndexindex of field to modify
newValuenew value of attribute
oldValueprevious value of attribute

Definition at line 194 of file qgsvectorlayerundocommand.cpp.

Member Function Documentation

◆ redo()

void QgsVectorLayerUndoCommandChangeAttribute::redo ( )
override

Definition at line 286 of file qgsvectorlayerundocommand.cpp.

◆ undo()

void QgsVectorLayerUndoCommandChangeAttribute::undo ( )
override

Definition at line 239 of file qgsvectorlayerundocommand.cpp.


The documentation for this class was generated from the following files: