kwave
18.07.70
|
#include <UndoTransaction.h>
Public Member Functions | |
UndoTransaction (const QString &name) | |
virtual | ~UndoTransaction () |
qint64 | undoSize () |
qint64 | redoSize () |
QString | description () |
bool | containsModification () const |
void | abort () |
bool | isAborted () const |
virtual void | dump (const QString &indent) |
Private Attributes | |
QString | m_description |
bool | m_aborted |
Groups multiple UndoAction objects together to one transaction. As most user actions consist of a number of small actions that belong together and don't make sense or leave an inconsistent state if separated, they get grouped together to one transaction.
Definition at line 37 of file UndoTransaction.h.
|
explicit |
Constructor.
name | description of the undo transaction as a user-readable localized string. |
Definition at line 27 of file UndoTransaction.cpp.
|
virtual |
Destructor
Definition at line 33 of file UndoTransaction.cpp.
void Kwave::UndoTransaction::abort | ( | ) |
aborts the undo transaction
Definition at line 102 of file UndoTransaction.cpp.
References m_aborted.
Referenced by Kwave::SignalManager::abortUndoTransaction().
bool Kwave::UndoTransaction::containsModification | ( | ) | const |
Loops over all undo actions to determine whether there is at least one undo action that contains a modification of the signal.
Definition at line 89 of file UndoTransaction.cpp.
References Kwave::UndoAction::containsModification().
Referenced by Kwave::SignalManager::redo(), and Kwave::SignalManager::undo().
QString Kwave::UndoTransaction::description | ( | ) |
Returns the description of the undo transaction as a user-readable localized string. If no name has been passed at initialization time, a list of all action's descriptions will be generated.
Definition at line 66 of file UndoTransaction.cpp.
References _, Kwave::UndoAction::description(), and m_description.
Referenced by dump(), Kwave::SignalManager::emitUndoRedoInfo(), Kwave::SignalManager::redo(), and Kwave::SignalManager::undo().
|
virtual |
dump, for debugging purposes
Definition at line 108 of file UndoTransaction.cpp.
References _, DBG, description(), and Kwave::UndoAction::dump().
Referenced by isAborted().
|
inline |
Returns true if the undo transaction has been aborted
Definition at line 82 of file UndoTransaction.h.
References dump(), and m_aborted.
Referenced by Kwave::SignalManager::closeUndoTransaction(), Kwave::SignalManager::continueWithoutUndo(), and Kwave::SignalManager::registerUndoAction().
qint64 Kwave::UndoTransaction::redoSize | ( | ) |
Returns the additional memory needed for storing redo data
Definition at line 54 of file UndoTransaction.cpp.
References Kwave::UndoAction::redoSize().
Referenced by Kwave::SignalManager::redo(), and Kwave::SignalManager::undo().
qint64 Kwave::UndoTransaction::undoSize | ( | ) |
Returns the size in bytes summed up over all undo actions
Definition at line 42 of file UndoTransaction.cpp.
References Kwave::UndoAction::undoSize().
Referenced by Kwave::SignalManager::freeUndoMemory(), Kwave::SignalManager::redo(), Kwave::SignalManager::undo(), and Kwave::SignalManager::usedUndoRedoMemory().
|
private |
if true, the transaction has been aborted
Definition at line 93 of file UndoTransaction.h.
Referenced by abort(), and isAborted().
|
private |