Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
uuid_property_operator.h
1// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "undo/undo_stack.h"
7#include "utils/iobject_registry.h"
8
9#include <QtQmlIntegration/qqmlintegration.h>
10
11namespace zrythm::actions
12{
13
27class UuidPropertyOperator : public QObject
28{
29 Q_OBJECT
30 QML_ELEMENT
31 QML_UNCREATABLE ("")
32
33public:
34 explicit UuidPropertyOperator (
35 undo::UndoStack &undo_stack,
36 utils::IObjectRegistry &registry,
37 QObject * parent = nullptr)
38 : QObject (parent), undo_stack_ (&undo_stack), registry_ (&registry)
39 {
40 }
41
51 Q_INVOKABLE void
52 setValue (QObject * uuidObject, QString propertyName, QVariant value);
53
68 Q_INVOKABLE void setValueOnSubObject (
69 QObject * uuidLifecycleObject,
70 QObject * target,
71 QString propertyName,
72 QVariant value);
73
74private:
75 undo::UndoStack * undo_stack_;
76 utils::IObjectRegistry * registry_;
77};
78
79} // namespace zrythm::actions
Q_INVOKABLE void setValueOnSubObject(QObject *uuidLifecycleObject, QObject *target, QString propertyName, QVariant value)
Commits a property change on a sub-object of a UUID-identifiable object.
Q_INVOKABLE void setValue(QObject *uuidObject, QString propertyName, QVariant value)
Commits a property change on a UUID-identifiable QObject.
Abstract interface for a UUID-keyed object registry.