Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
timeline.h
1// SPDX-FileCopyrightText: © 2020, 2023-2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "structure/arrangement/arranger_object_all.h"
7#include "structure/arrangement/editor_settings.h"
8#include "utils/icloneable.h"
9
10#include <QtQmlIntegration/qqmlintegration.h>
11
12namespace zrythm::structure::arrangement
13{
14
18class Timeline : public QObject
19{
20 Q_OBJECT
21 QML_ELEMENT
22 Q_PROPERTY (
24 getEditorSettings CONSTANT FINAL)
25 QML_UNCREATABLE ("")
26
27public:
28 Timeline (const utils::IObjectRegistry &registry, QObject * parent = nullptr);
29
30 // =========================================================
31 // QML interface
32 // =========================================================
33
34 auto getEditorSettings () const { return editor_settings_.get (); }
35
36 // =========================================================
37
38public:
39 friend void init_from (
40 Timeline &obj,
41 const Timeline &other,
42 utils::ObjectCloneType clone_type);
43
44private:
45 static constexpr auto kEditorSettingsKey = "editorSettings"sv;
46
47 static constexpr auto kTracksWidthKey = "tracksWidth";
48 friend void to_json (nlohmann::json &j, const Timeline &p);
49 friend void from_json (const nlohmann::json &j, Timeline &p);
50
51private:
53
55 int tracks_width_ = 0;
56};
57}
Abstract interface for a UUID-keyed object registry.
A unique pointer for QObject objects that also works with QObject-based ownership.
Definition qt.h:36