Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::qquick::ArrangerObjectHelper Class Reference

QML singleton providing imperative arranger object queries. More...

#include <src/gui/qquick/arranger_object_helper.h>

Inheritance diagram for zrythm::gui::qquick::ArrangerObjectHelper:
Collaboration diagram for zrythm::gui::qquick::ArrangerObjectHelper:

Static Public Member Functions

static Q_INVOKABLE double timelineTicks (structure::arrangement::ArrangerObject *obj)
 Warp-aware absolute timeline position of an arranger object.
static Q_INVOKABLE double timelineEndTicks (structure::arrangement::ArrangerObject *obj)
 Warp-aware absolute timeline end position.
static Q_INVOKABLE bool isClip (structure::arrangement::ArrangerObject *obj)
 Whether the object is a Clip (MidiClip, AudioClip, ChordClip, or AutomationClip).
static Q_INVOKABLE void setEndFromTimelineTicks (structure::arrangement::ArrangerObject *obj, double timeline_end_ticks)
 Sets an object's length so that its timeline end matches the given timeline tick position.

Detailed Description

QML singleton providing imperative arranger object queries.

Thin wrapper over the pure C++ free functions in arrangement/arranger_object_all.h. Use this from imperative JS handlers (drag, resize). For reactive bindings, use TimelinePositionTracker.

Definition at line 22 of file arranger_object_helper.h.

Member Function Documentation

◆ setEndFromTimelineTicks()

Q_INVOKABLE void zrythm::gui::qquick::ArrangerObjectHelper::setEndFromTimelineTicks ( structure::arrangement::ArrangerObject * obj,
double timeline_end_ticks )
static

Sets an object's length so that its timeline end matches the given timeline tick position.

Reverse-warp converts the timeline end into content space before setting the length. No-op for objects without a length.

◆ timelineEndTicks()

Q_INVOKABLE double zrythm::gui::qquick::ArrangerObjectHelper::timelineEndTicks ( structure::arrangement::ArrangerObject * obj)
static

Warp-aware absolute timeline end position.

For objects with a length, this is the warp-adjusted end. For objects without a length (e.g. Marker), returns the same as timelineTicks.

◆ timelineTicks()

Q_INVOKABLE double zrythm::gui::qquick::ArrangerObjectHelper::timelineTicks ( structure::arrangement::ArrangerObject * obj)
static

Warp-aware absolute timeline position of an arranger object.

For clips and other timeline objects: returns the object's position. For child objects inside a clip (MidiNotes, etc.): converts through the parent clip's ContentTimeWarp.


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