|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
QML-accessible operator for undoable property changes on UUID-identifiable objects. More...
#include <src/actions/uuid_property_operator.h>


Public Member Functions | |
| UuidPropertyOperator (undo::UndoStack &undo_stack, utils::IObjectRegistry ®istry, QObject *parent=nullptr) | |
| Q_INVOKABLE void | setValue (QObject *uuidObject, QString propertyName, QVariant value) |
| Commits a property change on a UUID-identifiable QObject. | |
| 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. | |
QML-accessible operator for undoable property changes on UUID-identifiable objects.
Unlike QObjectPropertyOperator, this operator creates commands::ChangeUuidIdentifiableObjectPropertyCommand instances that hold a UUID reference keeping the target alive on the undo stack. This makes it safe for objects that can be deleted by other commands (e.g. automation points removed via undo of point creation).
The registry is injected at construction time (C++ side) and never exposed to QML.
Definition at line 27 of file uuid_property_operator.h.
|
inlineexplicit |
Definition at line 34 of file uuid_property_operator.h.
| Q_INVOKABLE void zrythm::actions::UuidPropertyOperator::setValue | ( | QObject * | uuidObject, |
| QString | propertyName, | ||
| QVariant | value ) |
Commits a property change on a UUID-identifiable QObject.
The object is kept alive on the undo stack via UUID reference.
| uuidObject | The UUID-identifiable QObject whose property to change. |
| propertyName | The Q_PROPERTY name. |
| value | The new value. |
| Q_INVOKABLE void zrythm::actions::UuidPropertyOperator::setValueOnSubObject | ( | QObject * | uuidLifecycleObject, |
| QObject * | target, | ||
| QString | propertyName, | ||
| QVariant | value ) |
Commits a property change on a sub-object of a UUID-identifiable object.
The UUID-identifiable parent is kept alive, which transitively keeps the target alive. Use this when the property lives on a child QObject (e.g. a CurveOptionsQmlAdapter inside an AutomationPoint).
| uuidLifecycleObject | The UUID-identifiable parent whose lifetime guarantees target's lifetime. |
| target | The QObject whose property is changed. |
| propertyName | The Q_PROPERTY name. |
| value | The new value. |