QGIS API Documentation  3.8.0-Zanzibar (11aff65)
Public Member Functions | Protected Member Functions | List of all members
QgsVectorLayerUndoPassthroughCommand Class Reference

Undo command for vector layer in transaction group mode. More...

#include <qgsvectorlayerundopassthroughcommand.h>

Inheritance diagram for QgsVectorLayerUndoPassthroughCommand:
Inheritance graph
[legend]

Public Member Functions

 QgsVectorLayerUndoPassthroughCommand (QgsVectorLayerEditBuffer *buffer, const QString &text, bool autocreate=true)
 Constructor for QgsVectorLayerUndoPassthroughCommand. More...
 
bool hasError () const
 Returns error status. More...
 
- 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
 

Protected Member Functions

QString errorMessage () const
 Returns the error message or an empty string if there's none. More...
 
bool rollBackToSavePoint ()
 Rollback command, release savepoint or set error status save point must be set prior to call error satus should be false prior to call. More...
 
void setError ()
 Set error flag and append "failed" to text. More...
 
void setErrorMessage (const QString &errorMessage)
 Sets the error message. More...
 
bool setSavePoint (const QString &savePointId=QString())
 Set the command savepoint or set error status. More...
 

Additional Inherited Members

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

Detailed Description

Undo command for vector layer in transaction group mode.

Since
QGIS 3.0

Definition at line 33 of file qgsvectorlayerundopassthroughcommand.h.

Constructor & Destructor Documentation

◆ QgsVectorLayerUndoPassthroughCommand()

QgsVectorLayerUndoPassthroughCommand::QgsVectorLayerUndoPassthroughCommand ( QgsVectorLayerEditBuffer buffer,
const QString &  text,
bool  autocreate = true 
)

Constructor for QgsVectorLayerUndoPassthroughCommand.

Parameters
bufferassociated edit buffer
texttext associated with command
autocreateflag allowing to automatically create a savepoint if necessary

Definition at line 32 of file qgsvectorlayerundopassthroughcommand.cpp.

Member Function Documentation

◆ errorMessage()

QString QgsVectorLayerUndoPassthroughCommand::errorMessage ( ) const
protected

Returns the error message or an empty string if there's none.

Since
QGIS 3.0

Definition at line 63 of file qgsvectorlayerundopassthroughcommand.cpp.

◆ hasError()

bool QgsVectorLayerUndoPassthroughCommand::hasError ( ) const
inline

Returns error status.

Definition at line 48 of file qgsvectorlayerundopassthroughcommand.h.

◆ rollBackToSavePoint()

bool QgsVectorLayerUndoPassthroughCommand::rollBackToSavePoint ( )
protected

Rollback command, release savepoint or set error status save point must be set prior to call error satus should be false prior to call.

Definition at line 92 of file qgsvectorlayerundopassthroughcommand.cpp.

◆ setError()

void QgsVectorLayerUndoPassthroughCommand::setError ( )
protected

Set error flag and append "failed" to text.

Definition at line 49 of file qgsvectorlayerundopassthroughcommand.cpp.

◆ setErrorMessage()

void QgsVectorLayerUndoPassthroughCommand::setErrorMessage ( const QString &  errorMessage)
protected

Sets the error message.

Since
QGIS 3.0

Definition at line 58 of file qgsvectorlayerundopassthroughcommand.cpp.

◆ setSavePoint()

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.

Definition at line 68 of file qgsvectorlayerundopassthroughcommand.cpp.


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