Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
automation_editor.h
1// SPDX-FileCopyrightText: © 2024-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
9namespace zrythm::structure::arrangement
10{
11
15class AutomationEditor : public QObject
16{
17 Q_OBJECT
18 QML_ELEMENT
19 Q_PROPERTY (
21 getEditorSettings CONSTANT FINAL)
22 QML_UNCREATABLE ("")
23
24public:
25 AutomationEditor (QObject * parent = nullptr);
26
27 // =========================================================
28 // QML interface
29 // =========================================================
30
31 auto getEditorSettings () const { return editor_settings_.get (); }
32
33 // =========================================================
34
35public:
36 friend void init_from (
37 AutomationEditor &obj,
38 const AutomationEditor &other,
39 utils::ObjectCloneType clone_type)
40
41 {
42 obj.editor_settings_ =
43 utils::clone_unique_qobject (*other.editor_settings_, &obj);
44 }
45
46private:
47 static constexpr auto kEditorSettingsKey = "editorSettings"sv;
48 friend void to_json (nlohmann::json &j, const AutomationEditor &editor);
49 friend void from_json (const nlohmann::json &j, AutomationEditor &editor);
50
51private:
53};
54
55}
A unique pointer for QObject objects that also works with QObject-based ownership.
Definition qt.h:38