Inheritance diagram for UndoRedoManager:
Collaboration diagram for UndoRedoManager:Signals | |
| void | didUpdateUndoStack () |
Public Member Functions | |
| UndoRedoManager (Editor *editor) | |
| bool | init () override |
| Status | load (Object *) override |
| Status | save (Object *) override |
| void | record (SAVESTATE_ID SaveStateId, const QString &description) |
| Records the given save state. | |
| bool | hasUnsavedChanges () const |
| Checks whether there are unsaved changes. | |
| SAVESTATE_ID | createState (UndoRedoRecordType recordType) |
| Prepares and returns an save state with common data. | |
| void | addUserState (SAVESTATE_ID SaveStateId, const UserSaveState &userState) |
| Adds userState to the saveState found at SaveStateId If no record is found matching the id, nothing happens. | |
| QAction * | createUndoAction (QObject *parent, const QIcon &icon) |
| QAction * | createRedoAction (QObject *parent, const QIcon &icon) |
| void | updateUndoAction (QAction *undoAction) |
| void | updateRedoAction (QAction *redoAction) |
| void | clearStack () |
| Clears the undo stack. | |
| void | legacyBackup (const QString &undoText) |
| bool | legacyBackup (int backupLayer, int backupFrame, const QString &undoText) |
| void | sanitizeLegacyBackupElementsAfterLayerDeletion (int layerIndex) |
| Restores integrity of the backup elements after a layer has been deleted. | |
| void | restoreLegacyKey () |
| void | rememberLastModifiedFrame (int layerNumber, int frameNumber) |
| void | onSettingChanged (SETTING setting) |
Public Member Functions inherited from BaseManager | |
| Editor * | editor () const |
| Object * | object () const |
| virtual bool | init ()=0 |
| virtual Status | load (Object *o)=0 |
| virtual Status | save (Object *o)=0 |
| virtual void | workingLayerChanged (Layer *) |
Public Member Functions inherited from QObject | |
| virtual const QMetaObject * | metaObject () const const |
| QObject (QObject *parent) | |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| QString | objectName () const const |
| void | setObjectName (const QString &name) |
| bool | isWidgetType () const const |
| bool | isWindowType () const const |
| bool | signalsBlocked () const const |
| bool | blockSignals (bool block) |
| QThread * | thread () const const |
| void | moveToThread (QThread *targetThread) |
| int | startTimer (int time, Qt::TimerType timerType) |
| void | killTimer (int id) |
| T | findChild (const QString &name, Qt::FindChildOptions options) const const |
| QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const const |
| QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const const |
| QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const |
| const QObjectList & | children () const const |
| void | setParent (QObject *parent) |
| void | installEventFilter (QObject *filterObj) |
| void | removeEventFilter (QObject *obj) |
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) const const |
| bool | disconnect (const QObject *receiver, const char *method) const const |
| void | dumpObjectTree () |
| void | dumpObjectInfo () |
| void | dumpObjectTree () const const |
| void | dumpObjectInfo () const const |
| bool | setProperty (const char *name, const QVariant &value) |
| QVariant | property (const char *name) const const |
| QList< QByteArray > | dynamicPropertyNames () const const |
| void | destroyed (QObject *obj) |
| void | objectNameChanged (const QString &objectName) |
| QObject * | parent () const const |
| bool | inherits (const char *className) const const |
| void | deleteLater () |
| Q_DISABLE_COPY (Class) | |
| Q_DISABLE_MOVE (Class) | |
| Q_DISABLE_COPY_MOVE (Class) | |
| T | qobject_cast (QObject *object) |
| T | qobject_cast (const QObject *object) |
| T | qFindChild (const QObject *obj, const QString &name) |
| QList< T > | qFindChildren (const QObject *obj, const QString &name) |
| QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
| Q_CLASSINFO (Name, Value) | |
| Q_INTERFACES (...) | |
| Q_PROPERTY (...) | |
| Q_ENUMS (...) | |
| Q_FLAGS (...) | |
| Q_ENUM (...) | |
| Q_FLAG (...) | |
| Q_ENUM_NS (...) | |
| Q_FLAG_NS (...) | |
| Q_OBJECT Q_OBJECT | |
| Q_GADGET Q_GADGET | |
| Q_NAMESPACE Q_NAMESPACE | |
| Q_NAMESPACE_EXPORT (EXPORT_MACRO) | |
| Q_SIGNALS Q_SIGNALS | |
| Q_SIGNAL Q_SIGNAL | |
| Q_SLOTS Q_SLOTS | |
| Q_SLOT Q_SLOT | |
| Q_EMIT Q_EMIT | |
| Q_INVOKABLE Q_INVOKABLE | |
| Q_REVISION Q_REVISION | |
| Q_SET_OBJECT_NAME (Object) | |
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Private Member Functions | |
| void | replaceKeyFrame (const UndoSaveState &undoState, const QString &description) |
| void | replaceBitmap (const UndoSaveState &undoState, const QString &description) |
| void | replaceVector (const UndoSaveState &undoState, const QString &description) |
| void | addKeyFrame (const UndoSaveState &undoState, const QString &description) |
| void | removeKeyFrame (const UndoSaveState &undoState, const QString &description) |
| void | moveKeyFrames (const UndoSaveState &undoState, const QString &description) |
| void | initCommonKeyFrameState (UndoSaveState *undoSaveState) const |
| void | pushCommand (QUndoCommand *command) |
| void | clearState (UndoSaveState *&state) |
| void | clearSaveStates () |
| void | legacyUndo () |
| void | legacyRedo () |
Private Attributes | |
| QUndoStack | mUndoStack |
| QMap< SAVESTATE_ID, UndoSaveState * > | mSaveStates |
| int | mLegacyBackupIndex = -1 |
| LegacyBackupElement * | mLegacyBackupAtSave = nullptr |
| QList< LegacyBackupElement * > | mLegacyBackupList |
| int | mLegacyLastModifiedLayer = -1 |
| int | mLegacyLastModifiedFrame = -1 |
| SAVESTATE_ID | mSaveStateId = 1 |
| bool | mNewBackupSystemEnabled = false |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| bool | disconnect (const QMetaObject::Connection &connection) |
| bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
Public Attributes inherited from QObject | |
| typedef | QObjectList |
Protected Member Functions inherited from BaseManager | |
| BaseManager (Editor *editor, const QString &name) | |
Protected Member Functions inherited from QObject | |
| QObject * | sender () const const |
| int | senderSignalIndex () const const |
| int | receivers (const char *signal) const const |
| bool | isSignalConnected (const QMetaMethod &signal) const const |
| virtual void | timerEvent (QTimerEvent *event) |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | customEvent (QEvent *event) |
| virtual void | connectNotify (const QMetaMethod &signal) |
| virtual void | disconnectNotify (const QMetaMethod &signal) |
Properties inherited from QObject | |
| objectName | |
Definition at line 118 of file undoredomanager.h.
|
explicit |
Definition at line 45 of file undoredomanager.cpp.
|
override |
Definition at line 50 of file undoredomanager.cpp.
|
private |
Definition at line 187 of file undoredomanager.cpp.
| void UndoRedoManager::addUserState | ( | SAVESTATE_ID | SaveStateId, |
| const UserSaveState & | userState | ||
| ) |
Adds userState to the saveState found at SaveStateId If no record is found matching the id, nothing happens.
| SaveStateId | The id used to fetch the saveState |
| userState | The data to be inserted onto on the saveState |
Definition at line 274 of file undoredomanager.cpp.
|
private |
Definition at line 148 of file undoredomanager.cpp.
| void UndoRedoManager::clearStack | ( | ) |
Clears the undo stack.
Definition at line 396 of file undoredomanager.cpp.
|
private |
Definition at line 140 of file undoredomanager.cpp.
Definition at line 329 of file undoredomanager.cpp.
| SAVESTATE_ID UndoRedoManager::createState | ( | UndoRedoRecordType | recordType | ) |
Prepares and returns an save state with common data.
Definition at line 261 of file undoredomanager.cpp.
Definition at line 309 of file undoredomanager.cpp.
| bool UndoRedoManager::hasUnsavedChanges | ( | ) | const |
Checks whether there are unsaved changes.
Definition at line 159 of file undoredomanager.cpp.
|
overridevirtual |
Implements BaseManager.
Definition at line 60 of file undoredomanager.cpp.
|
private |
Definition at line 280 of file undoredomanager.cpp.
| void UndoRedoManager::legacyBackup | ( | const QString & | undoText | ) |
Definition at line 413 of file undoredomanager.cpp.
| bool UndoRedoManager::legacyBackup | ( | int | backupLayer, |
| int | backupFrame, | ||
| const QString & | undoText | ||
| ) |
Definition at line 455 of file undoredomanager.cpp.
|
private |
Definition at line 730 of file undoredomanager.cpp.
|
private |
Definition at line 689 of file undoredomanager.cpp.
Implements BaseManager.
Definition at line 80 of file undoredomanager.cpp.
|
private |
Definition at line 207 of file undoredomanager.cpp.
| void UndoRedoManager::onSettingChanged | ( | SETTING | setting | ) |
Definition at line 70 of file undoredomanager.cpp.
|
private |
Definition at line 171 of file undoredomanager.cpp.
| void UndoRedoManager::record | ( | SAVESTATE_ID | SaveStateId, |
| const QString & | description | ||
| ) |
Records the given save state.
The input save state is cleaned up and set to nullptr after use.
| SaveStateId | The state that will be fetched and recorded based on the input SaveStateId. |
| description | The description that will bound to the undo/redo action. |
Definition at line 96 of file undoredomanager.cpp.
| void UndoRedoManager::rememberLastModifiedFrame | ( | int | layerNumber, |
| int | frameNumber | ||
| ) |
Definition at line 741 of file undoredomanager.cpp.
|
private |
Definition at line 178 of file undoredomanager.cpp.
|
private |
Definition at line 218 of file undoredomanager.cpp.
|
private |
Definition at line 196 of file undoredomanager.cpp.
|
private |
Definition at line 240 of file undoredomanager.cpp.
| void UndoRedoManager::restoreLegacyKey | ( | ) |
Definition at line 634 of file undoredomanager.cpp.
| void UndoRedoManager::sanitizeLegacyBackupElementsAfterLayerDeletion | ( | int | layerIndex | ) |
Restores integrity of the backup elements after a layer has been deleted.
Removes backup elements affecting the deleted layer and adjusts the layer index on other backup elements as necessary.
| layerIndex | The index of the layer that was deleted |
Definition at line 569 of file undoredomanager.cpp.
Implements BaseManager.
Definition at line 86 of file undoredomanager.cpp.
| void UndoRedoManager::updateRedoAction | ( | QAction * | redoAction | ) |
Definition at line 375 of file undoredomanager.cpp.
| void UndoRedoManager::updateUndoAction | ( | QAction * | undoAction | ) |
Definition at line 349 of file undoredomanager.cpp.
|
private |
Definition at line 214 of file undoredomanager.h.
|
private |
Definition at line 213 of file undoredomanager.h.
|
private |
Definition at line 215 of file undoredomanager.h.
|
private |
Definition at line 218 of file undoredomanager.h.
|
private |
Definition at line 217 of file undoredomanager.h.
|
private |
Definition at line 222 of file undoredomanager.h.
|
private |
Definition at line 220 of file undoredomanager.h.
|
private |
Definition at line 210 of file undoredomanager.h.
|
private |
Definition at line 208 of file undoredomanager.h.