Optional
configPointer to main editor object used to initialize
Array of commands that have been undone.
The time difference limit between two commands to be considered as a single command.
Array of commands that have been executed.
Clears the history by resetting the undo and redo stacks and the ID counter. Also dispatches a signal indicating that the history has changed.
Enables serialization of commands in the history stack.
This method ensures that all commands in the undo and redo stacks
are serialized by invoking their toJSON
method. It temporarily
disables the sceneGraphChanged
and historyChanged
signals to
prevent unnecessary updates during the serialization process.
The state ID to which the history should be restored after serialization.
Populates the history state from a JSON object.
The JSON object containing the history data.
The method processes the undos
and redos
arrays from the JSON object,
creating command instances and populating the respective history stacks.
It also updates the idCounter
to the highest command ID found in the JSON data.
If a command cannot be created from the JSON data, an error is logged to the console.
Finally, it dispatches a historyChanged
signal with the last executed undo-command.
Go to a specific state in the history.
State id to go to
E2E test method.
This method should return true
if the test passes, and false
if it fails.
Check the method itself for more information.
Converts the current history state to a JSON object.
The JSON representation of the history, including undos and redos. If the 'settings/history' configuration key is not set, returns an empty history.
Abstract class for all history implementations.