5 #include <editor/UnigineEditorGlobal.h> 13 namespace UnigineEditor
20 namespace UnigineEditor
25 class UNIGINE_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 ::UnigineEditor::Presenter;
89 virtual void apply() = 0;
91 virtual void undo() = 0;
93 virtual void redo() = 0;
This basic class is used to represent any possible user action.
Definition: UnigineUndo.h:83
virtual bool validate()
This method allows action to do some internal cleanup. Return value indicates whether the action is s...
Definition: UnigineUndo.h:101
Undo manager class. This class is used to manage undo/redo operations for user actions in the Editor.
Definition: UnigineUndo.h:25
virtual bool modifiesWorld() const
Indicates whether the action brings any changes to the scene. Actions like selection,...
Definition: UnigineUndo.h:108