Developer Documentation
|
Class that is used to store global(group) backups. More...
#include <Plugin-Backup/GroupData.hh>
Public Member Functions | |
GroupData () | |
Constructor. More... | |
~GroupData () | |
Destructor. More... | |
void | updateBackupData (int _objectid, bool _isUndo) |
remove object from data More... | |
void | eraseBackups (int _objectid) |
erase all backups containing given id More... | |
void | undo () |
perform an undo if possible More... | |
void | redo () |
perform an redo if possible More... | |
void | undo (int _objectid) |
perform an undo if possible More... | |
void | redo (int _objectid) |
perform a redo if possible More... | |
![]() | |
BackupData (BaseObjectData *_object=0) | |
Constructor. More... | |
virtual | ~BackupData () |
Destructor. More... | |
void | storeBackup (BaseBackup *_backup) |
store a backup More... | |
void | undo () |
perform an undo if possible More... | |
void | redo () |
perform a redo if possible More... | |
int | undoID () |
return the id of the next undo backup More... | |
int | redoID () |
return the id of the next redo backup More... | |
int | currentID () |
return the id of the current backup state More... | |
QString | undoName () |
return the name of the next undo backup More... | |
QString | redoName () |
return the name of the next redo backup More... | |
bool | undoAvailable () |
return if an undo backup is available More... | |
bool | redoAvailable () |
return if a redo backup is available More... | |
bool | undoBlocked () |
return if an undo backup is blocked More... | |
bool | redoBlocked () |
return if a redo backup is blocked More... | |
void | clear () |
remove all backups More... | |
void | setLinks (IdList _objectIDs) |
BaseBackup * | currentState () |
return the current state More... | |
size_t | maxBackups () |
return the maximum of backups which are saved More... | |
void | setMaxBackups (size_t _max) |
set the maximum of saved backups More... | |
![]() | |
PerObjectData () | |
You have to provide your own constructor for your object. More... | |
virtual PerObjectData * | copyPerObjectData () |
Copy Function. More... | |
Additional Inherited Members | |
![]() | |
std::vector< BaseBackup * > | undoStates_ |
std::vector< BaseBackup * > | redoStates_ |
BaseBackup * | currentState_ |
BaseObjectData * | object_ |
size_t | maxBackups_ |
Class that is used to store global(group) backups.
Definition at line 54 of file GroupData.hh.
GroupData::GroupData | ( | ) |
Constructor.
Definition at line 51 of file GroupData.cc.
GroupData::~GroupData | ( | ) |
Destructor.
Definition at line 57 of file GroupData.cc.
void GroupData::eraseBackups | ( | int | _objectid | ) |
erase all backups containing given id
Definition at line 309 of file GroupData.cc.
void GroupData::redo | ( | ) |
perform an redo if possible
Redo operation on groups.
The redo on groups is different then on single objects we revert to the last redo state and perform a redo on every involved object
Definition at line 118 of file GroupData.cc.
void GroupData::redo | ( | int | _objectid | ) |
perform a redo if possible
Definition at line 266 of file GroupData.cc.
void GroupData::undo | ( | ) |
perform an undo if possible
Undo operation on groups.
The undo on groups is different then on single objects we cannot revert to the last undo state. We have to check which objects are affected by the current state and revert to the last state for all of them
Definition at line 69 of file GroupData.cc.
void GroupData::undo | ( | int | _objectid | ) |
perform an undo if possible
Definition at line 242 of file GroupData.cc.
void GroupData::updateBackupData | ( | int | _objectid, |
bool | _isUndo | ||
) |
remove object from data
Update GroupData structure after object undo/redo.
After and undo/redo on an object the global structure has to be updated to stay in sync.
Definition at line 166 of file GroupData.cc.