Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::commands::RemoveArrangerObjectCommand< ObjectT > Class Template Reference
Inheritance diagram for zrythm::commands::RemoveArrangerObjectCommand< ObjectT >:
Collaboration diagram for zrythm::commands::RemoveArrangerObjectCommand< ObjectT >:

Public Member Functions

 RemoveArrangerObjectCommand (structure::arrangement::ArrangerObjectOwner< ObjectT > &object_owner, structure::arrangement::ArrangerObjectUuidReference object_ref)
void undo () override
void redo () override
int id () const override

Static Public Attributes

static constexpr int CommandId
 QUndoCommand id for this removal.

Detailed Description

template<structure::arrangement::FinalArrangerObjectSubclass ObjectT>
class zrythm::commands::RemoveArrangerObjectCommand< ObjectT >

Definition at line 18 of file remove_arranger_object_command.h.

Constructor & Destructor Documentation

◆ RemoveArrangerObjectCommand()

template<structure::arrangement::FinalArrangerObjectSubclass ObjectT>
zrythm::commands::RemoveArrangerObjectCommand< ObjectT >::RemoveArrangerObjectCommand ( structure::arrangement::ArrangerObjectOwner< ObjectT > & object_owner,
structure::arrangement::ArrangerObjectUuidReference object_ref )
inline

Definition at line 36 of file remove_arranger_object_command.h.

Member Function Documentation

◆ id()

template<structure::arrangement::FinalArrangerObjectSubclass ObjectT>
int zrythm::commands::RemoveArrangerObjectCommand< ObjectT >::id ( ) const
inlineoverride

Definition at line 47 of file remove_arranger_object_command.h.

◆ redo()

template<structure::arrangement::FinalArrangerObjectSubclass ObjectT>
void zrythm::commands::RemoveArrangerObjectCommand< ObjectT >::redo ( )
inlineoverride

Definition at line 45 of file remove_arranger_object_command.h.

◆ undo()

template<structure::arrangement::FinalArrangerObjectSubclass ObjectT>
void zrythm::commands::RemoveArrangerObjectCommand< ObjectT >::undo ( )
inlineoverride

Definition at line 44 of file remove_arranger_object_command.h.

Field Documentation

◆ CommandId

template<structure::arrangement::FinalArrangerObjectSubclass ObjectT>
int zrythm::commands::RemoveArrangerObjectCommand< ObjectT >::CommandId
staticconstexpr
Initial value:
=
(std::is_same_v<ObjectT, structure::arrangement::TempoObject>
|| std::is_same_v<ObjectT, structure::arrangement::TimeSignatureObject>)
? 1781964242
: -1

QUndoCommand id for this removal.

Tempo/time-signature object specializations evaluate to a distinct id so the undo stack can recognize them and pause the audio engine before running the command — the tempo map's RT-side data must not change while the audio thread is processing. All other object types have no id (-1), which is QUndoCommand's default for "no special handling".

Definition at line 30 of file remove_arranger_object_command.h.


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