|
ACF $AcfVersion:0$
|
Interface providing UNDO/REDO functionality. More...
#include <IUndoManager.h>
Public Member Functions | |
| virtual int | GetAvailableUndoSteps () const =0 |
| Get number of available UNDO levels. | |
| virtual int | GetAvailableRedoSteps () const =0 |
| Get number of available REDO levels. | |
| virtual QString | GetUndoLevelDescription (int stepIndex) const =0 |
| Get description of single UNDO level. | |
| virtual QString | GetRedoLevelDescription (int stepIndex) const =0 |
| Get description of single REDO level. | |
| virtual void | ResetUndo ()=0 |
| Reset all UNDO and REDO steps. | |
| virtual bool | DoUndo (int steps=1)=0 |
| Process UNDO steps. | |
| virtual bool | DoRedo (int steps=1)=0 |
| Process REDO steps. | |
Public Member Functions inherited from idoc::IDocumentStateComparator | |
| virtual bool | HasStoredDocumentState () const =0 |
| Check if there is stored document state available. | |
| virtual bool | StoreDocumentState ()=0 |
| Store state of the document. | |
| virtual bool | RestoreDocumentState ()=0 |
| Restore last stored document state. | |
| virtual DocumentChangeFlag | GetDocumentChangeFlag () const =0 |
| Check if document state is the same as stored state. | |
Public Member Functions inherited from istd::IChangeable | |
| virtual int | GetSupportedOperations () const |
| Get set of flags for supported operations. | |
| virtual bool | CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) |
| Copy this object from another one. | |
| virtual bool | IsEqual (const IChangeable &object) const |
| Compare this object with another object. | |
| virtual istd::TUniqueInterfacePtr< istd::IChangeable > | CloneMe (CompatibilityMode mode=CM_WITHOUT_REFS) const |
| Make a copy of this object. | |
| virtual bool | ResetData (CompatibilityMode mode=CM_WITHOUT_REFS) |
| Reset data to its default state. | |
| virtual void | BeginChanges (const ChangeSet &changeSet) |
| Starts the change transaction. | |
| virtual void | EndChanges (const ChangeSet &changeSet) |
| Ends the change transaction. | |
| virtual void | BeginChangeGroup (const ChangeSet &changeSet) |
| Starts group of changes. | |
| virtual void | EndChangeGroup (const ChangeSet &changeSet) |
| Ends group of changes. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Additional Inherited Members | |
Public Types inherited from idoc::IDocumentStateComparator | |
| enum | DocumentChangeFlag { DCF_UNKNOWN , DCF_EQUAL , DCF_DIFFERENT } |
| Flag indicating the relationship between current and stored document state. More... | |
Public Types inherited from istd::IChangeable | |
| enum | ChangeFlags { CF_ACF_INTERNAL = 0 , CF_ALL_DATA , CF_ANY , CF_DESTROYING , CF_DELEGATED , CF_NO_UNDO } |
| Data model change notification flags. More... | |
| enum | SupportedOperations { SO_NONE = 0 , SO_OBSERVE = 1 << 0 , SO_COPY = 1 << 1 , SO_CLONE = 1 << 2 , SO_COMPARE = 1 << 3 , SO_RESET = 1 << 4 } |
| Flags for supported operations. More... | |
| enum | CompatibilityMode { CM_STRICT , CM_WITHOUT_REFS , CM_WITH_REFS , CM_CONVERT } |
| Control how relationship betweeen objects are interpreted. More... | |
| typedef QMultiMap< QByteArray, QVariant > | ChangeInfoMap |
Static Public Member Functions inherited from istd::IChangeable | |
| static const ChangeSet & | GetNoChanges () |
| Get empty set of changes. | |
| static const ChangeSet & | GetAnyChange () |
| Get anonymous change set. | |
| static const ChangeSet & | GetAllChanges () |
| Get anonymous change set. | |
| static const ChangeSet & | GetDelegatedChanges () |
| Get delegated change set. | |
Protected Member Functions inherited from istd::IChangeable | |
| virtual void | OnBeginChanges () |
| Callback function for begin change event. | |
| virtual void | OnEndChanges (const ChangeSet &changeSet) |
| Callback function for end change event. | |
Interface providing UNDO/REDO functionality.
The undo manager tracks changes made to a document and provides the ability to reverse (undo) and reapply (redo) those changes. It maintains a history of document states and allows navigation through that history.
Key features:
The undo manager works in conjunction with IDocumentStateComparator to track and compare document states.
Definition at line 69 of file IUndoManager.h.
|
pure virtual |
Process REDO steps.
| steps | Number of redo levels to execute (default is 1). |
Implemented in idoc::CSerializedUndoManagerComp.
|
pure virtual |
Process UNDO steps.
| steps | Number of undo levels to execute (default is 1). |
Implemented in idoc::CSerializedUndoManagerComp.
|
pure virtual |
Get number of available REDO levels.
REDO levels are created when undo operations are performed.
Implemented in idoc::CSerializedUndoManagerComp.
|
pure virtual |
Get number of available UNDO levels.
Each level represents a separate change that can be undone.
Implemented in idoc::CSerializedUndoManagerComp.
|
pure virtual |
Get description of single REDO level.
| stepIndex | Index of the redo step (0 = most recent). |
Implemented in idoc::CSerializedUndoManagerComp.
|
pure virtual |
Get description of single UNDO level.
| stepIndex | Index of the undo step (0 = most recent). |
Implemented in idoc::CSerializedUndoManagerComp.
|
pure virtual |
Reset all UNDO and REDO steps.
This clears the entire undo/redo history. Use with caution.
Implemented in idoc::CSerializedUndoManagerComp.