Undo manager.
More...
#include <src/gui/backend/backend/actions/undo_manager.h>
|
| UndoManager (QObject *parent=nullptr) |
|
void | init_loaded (sample_rate_t engine_sample_rate) |
| Inits the undo manager by populating the undo/redo stacks.
|
|
UndoStack * | getUndoStack () const |
|
UndoStack * | getRedoStack () const |
|
Q_INVOKABLE void | undo () |
| Undo last action.
|
|
Q_INVOKABLE void | redo () |
| Redo last undone action.
|
|
Q_INVOKABLE void | perform (QObject *action_qobject) |
| Performs the action and pushes it to the undo stack.
|
|
bool | contains_clip (const AudioClip &clip) const |
| Returns whether the given clip is used by any stack.
|
|
void | get_plugins (std::vector< zrythm::gui::old_dsp::plugins::Plugin * > &arr) const |
| Returns all plugins in the undo stacks.
|
|
std::optional< UndoableActionPtrVariant > | get_last_action () const |
| Returns the last performed action, or NULL if the stack is empty.
|
|
void | clear_stacks () |
| Clears the undo and redo stacks.
|
|
Undo manager.
Definition at line 20 of file undo_manager.h.
◆ get_plugins()
Returns all plugins in the undo stacks.
Used when cleaning up state dirs.
◆ getRedoStack()
UndoStack * zrythm::gui::actions::UndoManager::getRedoStack |
( |
| ) |
const |
|
inline |
◆ getUndoStack()
UndoStack * zrythm::gui::actions::UndoManager::getUndoStack |
( |
| ) |
const |
|
inline |
◆ perform()
Q_INVOKABLE void zrythm::gui::actions::UndoManager::perform |
( |
QObject * | action_qobject | ) |
|
Performs the action and pushes it to the undo stack.
- Note
- Takes ownership of the action.
- Exceptions
-
◆ redo()
Q_INVOKABLE void zrythm::gui::actions::UndoManager::redo |
( |
| ) |
|
Redo last undone action.
- Exceptions
-
◆ undo()
Q_INVOKABLE void zrythm::gui::actions::UndoManager::undo |
( |
| ) |
|
Undo last action.
- Exceptions
-
◆ from_json
void from_json |
( |
const nlohmann::json & | j, |
|
|
UndoManager & | undo_manager ) |
|
friend |
◆ to_json
void to_json |
( |
nlohmann::json & | j, |
|
|
const UndoManager & | undo_manager ) |
|
friend |
◆ action_sem_
std::binary_semaphore zrythm::gui::actions::UndoManager::action_sem_ { 1 } |
◆ redo_stack_
UndoStack* zrythm::gui::actions::UndoManager::redo_stack_ = nullptr |
◆ redo_stack_locked_
bool zrythm::gui::actions::UndoManager::redo_stack_locked_ = false |
Whether the redo stack is currently locked.
This is used as a hack when cancelling arranger drags.
Definition at line 130 of file undo_manager.h.
◆ undo_stack_
UndoStack* zrythm::gui::actions::UndoManager::undo_stack_ = nullptr |
◆ redoStack
UndoStack * zrythm::gui::actions::UndoManager::redoStack |
|
read |
◆ undoStack
QML_ELEMENT UndoStack * zrythm::gui::actions::UndoManager::undoStack |
|
read |
The documentation for this class was generated from the following file: