Class: QgsVectorLayerUndoCommand

Base class for undo commands within a QgsVectorLayerEditBuffer.

Class Hierarchy

Inheritance diagram of qgis.core.QgsVectorLayerUndoCommand

Base classes

QUndoCommand

Subclasses

QgsVectorLayerUndoCommandAddAttribute

Undo command for adding a new attribute to a vector layer.

QgsVectorLayerUndoCommandAddFeature

Undo command for adding a feature to a vector layer.

QgsVectorLayerUndoCommandChangeAttribute

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

QgsVectorLayerUndoCommandChangeGeometry

Undo command for modifying the geometry of a feature from a vector layer.

QgsVectorLayerUndoCommandDeleteAttribute

Undo command for removing an existing attribute from a vector layer.

QgsVectorLayerUndoCommandDeleteFeature

Undo command for deleting a feature from a vector layer.

QgsVectorLayerUndoCommandRenameAttribute

Undo command for renaming an existing attribute of a vector layer.

QgsVectorLayerUndoPassthroughCommand

Undo command for vector layer in a transaction group mode.

Methods

layer

Returns the layer associated with the undo command

class qgis.core.QgsVectorLayerUndoCommand[source]

Bases: QUndoCommand

__init__(buffer: QgsVectorLayerEditBuffer | None)

Constructor for QgsVectorLayerUndoCommand

Parameters:

buffer (Optional[QgsVectorLayerEditBuffer]) – associated edit buffer

layer(self) QgsVectorLayer | None[source]

Returns the layer associated with the undo command

Return type:

Optional[QgsVectorLayer]