|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
Property-change command that keeps the target alive via UUID reference. More...
#include <src/commands/change_uuid_identifiable_object_property_command.h>


Public Member Functions | |
| ChangeUuidIdentifiableObjectPropertyCommand (utils::UuidIdentifiableBase &uuid_object, utils::IObjectRegistry ®istry, QString property_name, QVariant value) | |
| Direct case: the UUID-identifiable object IS the target. | |
| ChangeUuidIdentifiableObjectPropertyCommand (utils::UuidIdentifiableBase &uuid_lifecycle_object, QObject &target, utils::IObjectRegistry ®istry, QString property_name, QVariant value) | |
| Sub-object case: the target is a child of a UUID-identifiable object. | |
| int | id () const override |
| Public Member Functions inherited from zrythm::commands::ChangeQObjectPropertyCommand | |
| ChangeQObjectPropertyCommand (QObject &object, QString property_name, QVariant value) | |
| int | id () const override |
| bool | mergeWith (const QUndoCommand *other) override |
| void | undo () override |
| void | redo () override |
Static Public Attributes | |
| static constexpr int | CommandId = 1783530767 |
Property-change command that keeps the target alive via UUID reference.
Unlike ChangeQObjectPropertyCommand (which stores a raw QObject&), this variant holds a utils::UuidReference whose RAII refcount prevents the UUID-identifiable object from being deleted while the command is on the undo stack. This makes it safe for objects whose lifetime is tied to a mutating model (e.g. automation points that can be removed by other undo commands).
The base class's raw QObject& remains valid because the UUID reference prevents the registry from deleting the object (and transitively, any sub-objects it owns).
Uses a distinct command id from ChangeQObjectPropertyCommand so the two variants never merge with each other — merging a UUID-safe command into a raw command would lose the refcount safety.
Definition at line 32 of file change_uuid_identifiable_object_property_command.h.
|
inline |
Direct case: the UUID-identifiable object IS the target.
| uuid_object | The UUID-identifiable object to modify and keep alive. |
| registry | The object registry that owns uuid_object. |
| property_name | The Q_PROPERTY name to change. |
| value | The new value. |
Definition at line 47 of file change_uuid_identifiable_object_property_command.h.
|
inline |
Sub-object case: the target is a child of a UUID-identifiable object.
The UUID reference pins the parent alive, which transitively keeps the target alive through QObject ownership.
| uuid_lifecycle_object | The UUID-identifiable object whose lifetime guarantees target's lifetime. |
| target | The actual QObject whose property is changed. |
| registry | The object registry that owns uuid_lifecycle_object. |
| property_name | The Q_PROPERTY name to change. |
| value | The new value. |
Definition at line 73 of file change_uuid_identifiable_object_property_command.h.
|
inlineoverride |
Definition at line 84 of file change_uuid_identifiable_object_property_command.h.
|
staticconstexpr |
Definition at line 36 of file change_uuid_identifiable_object_property_command.h.