QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Member Functions | List of all members
QgsVectorLayerUndoCommandRenameAttribute Class Reference

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

#include <qgsvectorlayerundocommand.h>

Inheritance diagram for QgsVectorLayerUndoCommandRenameAttribute:
Inheritance graph
[legend]

Public Member Functions

 QgsVectorLayerUndoCommandRenameAttribute (QgsVectorLayerEditBuffer *buffer, int fieldIndex, const QString &newName)
 Constructor for QgsVectorLayerUndoCommandRenameAttribute. More...
 
void redo () override
 
void undo () override
 
- Public Member Functions inherited from QgsVectorLayerUndoCommand
 QgsVectorLayerUndoCommand (QgsVectorLayerEditBuffer *buffer)
 Constructor for QgsVectorLayerUndoCommand. More...
 
int id () const override
 
QgsVectorLayerlayer ()
 Returns the layer associated with the undo command. More...
 
bool mergeWith (const QUndoCommand *) override
 

Additional Inherited Members

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

Detailed Description

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

Since
QGIS 2.16

Definition at line 239 of file qgsvectorlayerundocommand.h.

Constructor & Destructor Documentation

◆ QgsVectorLayerUndoCommandRenameAttribute()

QgsVectorLayerUndoCommandRenameAttribute::QgsVectorLayerUndoCommandRenameAttribute ( QgsVectorLayerEditBuffer buffer,
int  fieldIndex,
const QString &  newName 
)

Constructor for QgsVectorLayerUndoCommandRenameAttribute.

Parameters
bufferassociated edit buffer
fieldIndexindex of field to rename
newNamenew name for field

Definition at line 417 of file qgsvectorlayerundocommand.cpp.

Member Function Documentation

◆ redo()

void QgsVectorLayerUndoCommandRenameAttribute::redo ( )
override

Definition at line 444 of file qgsvectorlayerundocommand.cpp.

◆ undo()

void QgsVectorLayerUndoCommandRenameAttribute::undo ( )
override

Definition at line 429 of file qgsvectorlayerundocommand.cpp.


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