Zrythm v2.0.0-DEV
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/editor_settings.h"
7#include "utils/icloneable.h"
8
9#include <QtQmlIntegration/qqmlintegration.h>
10
11namespace zrythm::structure::arrangement
12{
13
17class Timeline : public QObject
18{
19 Q_OBJECT
20 QML_ELEMENT
21 Q_PROPERTY (
23 getEditorSettings CONSTANT FINAL)
24 QML_UNCREATABLE ("")
25
26public:
27 Timeline (
28 const structure::arrangement::ArrangerObjectRegistry &registry,
29 QObject * parent = nullptr);
30
31 // =========================================================
32 // QML interface
33 // =========================================================
34
35 auto getEditorSettings () const { return editor_settings_.get (); }
36
37 // =========================================================
38
39public:
40 friend void init_from (
41 Timeline &obj,
42 const Timeline &other,
43 utils::ObjectCloneType clone_type);
44
45private:
46 static constexpr auto kEditorSettingsKey = "editorSettings"sv;
47
48 static constexpr auto kTracksWidthKey = "tracksWidth";
49 friend void to_json (nlohmann::json &j, const Timeline &p);
50 friend void from_json (const nlohmann::json &j, Timeline &p);
51
52private:
54
56 int tracks_width_ = 0;
57};
58}
A unique pointer for QObject objects that also works with QObject-based ownership.
Definition qt.h:38