117 I_ASSIGN(m_maxBufferSizeAttrPtr,
"MaxBufferSize",
"Maximal memory size of the Undo-buffer in MByte",
false, 100);
128 virtual bool DoUndo(
int steps = 1)
override;
129 virtual bool DoRedo(
int steps = 1)
override;
163 qint64 GetUsedMemorySize()
const;
170 bool m_hasStoredDocumentState;
176 mutable bool m_isStateChangedFlagValid;
178 I_ATTR(
int, m_maxBufferSizeAttrPtr);
Base class for component implementation.
Implements multi-level UNDO mechanism based on storing complete object state at each step using seria...
virtual int GetAvailableUndoSteps() const override
Get number of available UNDO levels.
QList< UndoStepInfo > UndoList
istd::TDelPtr< iser::CMemoryWriteArchive > UndoArchivePtr
virtual bool OnModelDetached(imod::IModel *modelPtr) override
Callback invoked when an observable model is about to be detached from this observer.
virtual int GetAvailableRedoSteps() const override
Get number of available REDO levels.
imod::TSingleModelObserverBase< iser::ISerializable > BaseClass2
virtual void ResetUndo() override
Reset all UNDO and REDO steps.
bool DoListShift(int steps, UndoList &fromList, UndoList &toList)
virtual bool HasStoredDocumentState() const override
Check if there is stored document state available.
icomp::CComponentBase BaseClass
virtual iser::ISerializable * CastFromModel(imod::IModel *modelPtr) const override
virtual void AfterUpdate(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
Callback invoked after an update of the observer's content occurs.
virtual QString GetUndoLevelDescription(int stepIndex) const override
Get description of single UNDO level.
virtual DocumentChangeFlag GetDocumentChangeFlag() const override
Check if document state is the same as stored state.
virtual bool DoRedo(int steps=1) override
Process REDO steps.
virtual bool StoreDocumentState() override
Store state of the document.
CSerializedUndoManagerComp()
virtual void OnComponentDestroyed() override
virtual bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
Callback invoked when an observable model is about to be attached to this observer.
virtual QString GetRedoLevelDescription(int stepIndex) const override
Get description of single REDO level.
virtual void BeforeUpdate(imod::IModel *modelPtr) override
Callback invoked before an update of the observer's content occurs.
virtual bool DoUndo(int steps=1) override
Process UNDO steps.
virtual bool RestoreDocumentState() override
Restore last stored document state.
Allows to store some document state used as reference for comparison.
DocumentChangeFlag
Flag indicating the relationship between current and stored document state.
Interface providing UNDO/REDO functionality.
Common interface for model objects, that supports Model/Observer design pattern.
Common interface for all classes implementing the Observer functionality in the Model/Observer design...
Basic implementation for a single model observer with binding to concrete data object interface.
Implementation of archive using memory buffer to store the persistent objects.
Common class for all classes which objects can be archived or restored from archive.
Set of change flags (its IDs).
Pointer wrapper providing automatic deleting pointed object during destruction.
Contains the system independent basic implementations of Document/View design pattern.
UndoArchivePtr archivePtr