Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::undo::UndoStack Class Reference
Inheritance diagram for zrythm::undo::UndoStack:
Collaboration diagram for zrythm::undo::UndoStack:

Public Types

using CallbackWithPausedEngineRequester
 A function for requesting a callback with the engine paused.

Signals

void undoActionsChanged ()
void redoActionsChanged ()
void indexChanged ()
void canUndoChanged ()
void canRedoChanged ()

Public Member Functions

 UndoStack (CallbackWithPausedEngineRequester callback_with_paused_engine_requester, QObject *parent=nullptr)
void push (QUndoCommand *cmd)
Q_INVOKABLE void undo ()
Q_INVOKABLE void redo ()
bool canUndo () const
bool canRedo () const
const QUndoCommand * command (int index) const
Q_INVOKABLE void beginMacro (const QString &text)
Q_INVOKABLE void endMacro ()
QStringList undoActions ()
QStringList redoActions ()
int index () const
void setIndex (int idx)
auto count () const
auto text (int idx) const

Properties

QStringList undoActions
QStringList redoActions
int index
bool canUndo
bool canRedo

Friends

void to_json (nlohmann::json &j, const UndoStack &u)
void from_json (const nlohmann::json &j, UndoStack &u)

Detailed Description

Definition at line 17 of file undo_stack.h.

Member Typedef Documentation

◆ CallbackWithPausedEngineRequester

Initial value:
std::function<void (const std::function<void ()> &, bool)>

A function for requesting a callback with the engine paused.

See also
AudioEngine.run_function_with_paused_processing().

Definition at line 33 of file undo_stack.h.

Member Function Documentation

◆ beginMacro()

Q_INVOKABLE void zrythm::undo::UndoStack::beginMacro ( const QString & text)
inline

Definition at line 55 of file undo_stack.h.

◆ canRedo()

bool zrythm::undo::UndoStack::canRedo ( ) const
inline

Definition at line 48 of file undo_stack.h.

◆ canUndo()

bool zrythm::undo::UndoStack::canUndo ( ) const
inline

Definition at line 47 of file undo_stack.h.

◆ command()

const QUndoCommand * zrythm::undo::UndoStack::command ( int index) const
inline

Definition at line 50 of file undo_stack.h.

◆ count()

auto zrythm::undo::UndoStack::count ( ) const
inline

Definition at line 67 of file undo_stack.h.

◆ endMacro()

Q_INVOKABLE void zrythm::undo::UndoStack::endMacro ( )
inline

Definition at line 59 of file undo_stack.h.

◆ index()

int zrythm::undo::UndoStack::index ( ) const
inline

Definition at line 64 of file undo_stack.h.

◆ text()

auto zrythm::undo::UndoStack::text ( int idx) const
inline

Definition at line 68 of file undo_stack.h.

Property Documentation

◆ canRedo

bool zrythm::undo::UndoStack::canRedo
read

Definition at line 24 of file undo_stack.h.

◆ canUndo

bool zrythm::undo::UndoStack::canUndo
read

Definition at line 23 of file undo_stack.h.

◆ index

int zrythm::undo::UndoStack::index
readwrite

Definition at line 22 of file undo_stack.h.

◆ redoActions

QStringList zrythm::undo::UndoStack::redoActions
read

Definition at line 21 of file undo_stack.h.

◆ undoActions

QStringList zrythm::undo::UndoStack::undoActions
read

Definition at line 20 of file undo_stack.h.


The documentation for this class was generated from the following file: