5 #include <editor/EditorGlobal.h> 25 class EDITOR_API
Undo :
public QObject
37 static Undo *instance();
41 static void apply(
Action *action);
44 static void push(
Action *action);
67 static void rollback();
76 explicit Undo(QObject *parent);
79 friend class Editor::Presenter;
89 virtual void apply() = 0;
91 virtual void undo() = 0;
93 virtual void redo() = 0;
virtual bool modifiesWorld() const
Indicates whether the action brings any changes to the scene. Actions like selection,...
Definition: Undo.h:108
Undo manager class. This class is used to manage undo/redo operations for user actions in the Editor.
Definition: Undo.h:25
This basic class is used to represent any possible user action.
Definition: Undo.h:83
virtual bool validate()
This method allows action to do some internal cleanup. Return value indicates whether the action is s...
Definition: Undo.h:101