Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
arranger_object_helper.h
1// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "structure/arrangement/arranger_object.h"
7
8#include <QObject>
9#include <QtQmlIntegration/qqmlintegration.h>
10
11namespace zrythm::gui::qquick
12{
13
22class ArrangerObjectHelper : public QObject
23{
24 Q_OBJECT
25 QML_ELEMENT
26 QML_SINGLETON
27
28public:
36 Q_INVOKABLE static double
38
45 Q_INVOKABLE static double
47
52 Q_INVOKABLE static bool isClip (structure::arrangement::ArrangerObject * obj);
53
61 Q_INVOKABLE static void setEndFromTimelineTicks (
63 double timeline_end_ticks);
64};
65
66} // namespace zrythm::gui::qquick
QML singleton providing imperative arranger object queries.
static Q_INVOKABLE double timelineTicks(structure::arrangement::ArrangerObject *obj)
Warp-aware absolute timeline position of an arranger object.
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.
static Q_INVOKABLE bool isClip(structure::arrangement::ArrangerObject *obj)
Whether the object is a Clip (MidiClip, AudioClip, ChordClip, or AutomationClip).
static Q_INVOKABLE double timelineEndTicks(structure::arrangement::ArrangerObject *obj)
Warp-aware absolute timeline end position.
Base class for all objects in the arranger.