Developer Documentation
|
Class that is used to store global(group) backups. More...
#include <Plugin-Backup/GroupData.hh>
Public Member Functions | |
GroupData () | |
Constructor. | |
~GroupData () | |
Destructor. | |
void | updateBackupData (int _objectid, bool _isUndo) |
remove object from data More... | |
void | eraseBackups (int _objectid) |
erase all backups containing given id | |
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 | |
void | redo (int _objectid) |
perform a redo if possible | |
Public Member Functions inherited from BackupData | |
BackupData (BaseObjectData *_object=0) | |
Constructor. | |
virtual | ~BackupData () |
Destructor. | |
void | storeBackup (BaseBackup *_backup) |
store a backup | |
void | undo () |
perform an undo if possible | |
void | redo () |
perform a redo if possible | |
int | undoID () |
return the id of the next undo backup | |
int | redoID () |
return the id of the next redo backup | |
int | currentID () |
return the id of the current backup state | |
QString | undoName () |
return the name of the next undo backup | |
QString | redoName () |
return the name of the next redo backup | |
bool | undoAvailable () |
return if an undo backup is available | |
bool | redoAvailable () |
return if a redo backup is available | |
bool | undoBlocked () |
return if an undo backup is blocked | |
bool | redoBlocked () |
return if a redo backup is blocked | |
void | clear () |
remove all backups | |
void | setLinks (IdList _objectIDs) |
BaseBackup * | currentState () |
return the current state | |
size_t | maxBackups () |
return the maximum of backups which are saved | |
void | setMaxBackups (size_t _max) |
set the maximum of saved backups | |
Public Member Functions inherited from PerObjectData | |
PerObjectData () | |
You have to provide your own constructor for your object. | |
virtual PerObjectData * | copyPerObjectData () |
Copy Function. More... | |
Additional Inherited Members | |
Protected Attributes inherited from BackupData | |
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 60 of file GroupData.hh.
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 124 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 75 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 172 of file GroupData.cc.