QgsVectorLayerUndoPassthroughCommand class
Undo command for vector layer in transaction group mode.
Contents
Base classes
- class QgsVectorLayerUndoCommand
- Base class for undo commands within a QgsVectorLayerEditBuffer.
Derived classes
- class QgsVectorLayerUndoPassthroughCommandAddAttribute
- Undo command for adding attri to a vector layer in transaction group.
- class QgsVectorLayerUndoPassthroughCommandAddFeatures
- Undo command for adding a feature to a vector layer in transaction group mode.
- class QgsVectorLayerUndoPassthroughCommandChangeAttribute
- Undo command for changing attr value from a vector layer in transaction group.
- class QgsVectorLayerUndoPassthroughCommandChangeAttributes
- Undo command for changing attributes' values from a vector layer in transaction group.
- class QgsVectorLayerUndoPassthroughCommandChangeGeometry
- Undo command for changing feature geometry from a vector layer in transaction group.
- class QgsVectorLayerUndoPassthroughCommandDeleteAttribute
- Undo command for deleting attri of a vector layer in transaction group.
- class QgsVectorLayerUndoPassthroughCommandDeleteFeatures
- Undo command for deleting features from a vector layer in transaction group.
- class QgsVectorLayerUndoPassthroughCommandRenameAttribute
- Undo command for deleting attri of a vector layer in transaction group.
- class QgsVectorLayerUndoPassthroughCommandUpdate
- Undo command for running a specific sql query in transaction group.
Constructors, destructors, conversion operators
- QgsVectorLayerUndoPassthroughCommand(QgsVectorLayerEditBuffer* buffer, const QString& text, bool autocreate = true)
- Constructor for QgsVectorLayerUndoPassthroughCommand.
Public functions
- auto hasError() const -> bool
- Returns error status.
Protected functions
- auto errorMessage() const -> QString
- Returns the error message or an empty string if there's none.
- auto rollBackToSavePoint() -> bool
- Rollback command, release savepoint or set error status save point must be set prior to call error satus should be false prior to call.
- void setError()
- Set error flag and append "failed" to text.
- void setErrorMessage(const QString& errorMessage)
- Sets the error message.
- auto setSavePoint(const QString& savePointId = QString()) -> bool
- Set the command savepoint or set error status.
Function documentation
QgsVectorLayerUndoPassthroughCommand:: QgsVectorLayerUndoPassthroughCommand(QgsVectorLayerEditBuffer* buffer,
const QString& text,
bool autocreate = true)
Constructor for QgsVectorLayerUndoPassthroughCommand.
| Parameters | |
|---|---|
| buffer | associated edit buffer |
| text | text associated with command |
| autocreate | flag allowing to automatically create a savepoint if necessary |
QString QgsVectorLayerUndoPassthroughCommand:: errorMessage() const protected
Returns the error message or an empty string if there's none.
void QgsVectorLayerUndoPassthroughCommand:: setErrorMessage(const QString& errorMessage) protected
Sets the error message.
bool QgsVectorLayerUndoPassthroughCommand:: setSavePoint(const QString& savePointId = QString()) protected
Set the command savepoint or set error status.
Error satus should be false prior to call. If the savepoint given in parameter is empty, then a new one is created if none is currently available in the transaction.