Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
change_uuid_identifiable_object_property_command.h
1// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include <utility>
7
8#include "commands/change_qobject_property_command.h"
9#include "utils/uuid_identifiable.h"
10#include "utils/uuid_reference.h"
11
12namespace zrythm::commands
13{
14
33 : public ChangeQObjectPropertyCommand
34{
35public:
36 static constexpr int CommandId = 1783530767;
37
48 utils::UuidIdentifiableBase &uuid_object,
49 utils::IObjectRegistry &registry,
50 QString property_name,
51 QVariant value)
52 : ChangeQObjectPropertyCommand (
53 uuid_object,
54 std::move (property_name),
55 std::move (value)),
56 uuid_ref_ (uuid_object.raw_uuid (), registry)
57 {
58 }
59
74 utils::UuidIdentifiableBase &uuid_lifecycle_object,
75 QObject &target,
76 utils::IObjectRegistry &registry,
77 QString property_name,
78 QVariant value)
79 : ChangeQObjectPropertyCommand (target, property_name, value),
80 uuid_ref_ (uuid_lifecycle_object.raw_uuid (), registry)
81 {
82 }
83
84 int id () const override { return CommandId; }
85
86private:
87 utils::UuidReference uuid_ref_;
88};
89
90} // namespace zrythm::commands
ChangeUuidIdentifiableObjectPropertyCommand(utils::UuidIdentifiableBase &uuid_object, utils::IObjectRegistry &registry, QString property_name, QVariant value)
Direct case: the UUID-identifiable object IS the target.
ChangeUuidIdentifiableObjectPropertyCommand(utils::UuidIdentifiableBase &uuid_lifecycle_object, QObject &target, utils::IObjectRegistry &registry, QString property_name, QVariant value)
Sub-object case: the target is a child of a UUID-identifiable object.
Abstract interface for a UUID-keyed object registry.
QObject-based base for all UUID-identifiable objects.
Untyped, reference-counted UUID reference into an IObjectRegistry.