LibrePCB Developers Documentation
UndoStackTransaction Class Referencefinal

The UndoStackTransaction class helps to execute transactions on an UndoStack. More...

#include <undostack.h>

+ Collaboration diagram for UndoStackTransaction:

Public Member Functions

 UndoStackTransaction ()=delete
 
 UndoStackTransaction (const UndoStackTransaction &other)=delete
 
 UndoStackTransaction (UndoStack &stack, const QString &text)
 
 ~UndoStackTransaction () noexcept
 
void append (UndoCommand *cmd)
 
void abort ()
 
bool commit ()
 
UndoStackTransactionoperator= (const UndoStackTransaction &rhs)=delete
 

Private Attributes

UndoStackmStack
 
bool mCmdActive
 

Detailed Description

The UndoStackTransaction class helps to execute transactions on an UndoStack.

This class allows to use RAII on a librepcb::editor::UndoStack object to make its exception safety easier. The functionality is as follows:

Constructor & Destructor Documentation

◆ UndoStackTransaction() [1/3]

◆ UndoStackTransaction() [2/3]

UndoStackTransaction ( const UndoStackTransaction other)
delete

◆ UndoStackTransaction() [3/3]

UndoStackTransaction ( UndoStack stack,
const QString &  text 
)
+ Here is the call graph for this function:

◆ ~UndoStackTransaction()

~UndoStackTransaction ( )
noexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ append()

void append ( UndoCommand cmd)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ abort()

void abort ( )
+ Here is the call graph for this function:

◆ commit()

bool commit ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

UndoStackTransaction & operator= ( const UndoStackTransaction rhs)
delete

Member Data Documentation

◆ mStack

UndoStack& mStack
private

◆ mCmdActive

bool mCmdActive
private

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