Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
track_creator.h
1
// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#pragma once
5
6
#include "commands/add_track_command.h"
7
#include "structure/tracks/track_all.h"
8
#include "structure/tracks/track_factory.h"
9
#include "structure/tracks/track_routing.h"
10
#include "structure/tracks/tracklist.h"
11
#include "undo/undo_stack.h"
12
13
namespace
zrythm::actions
14
{
15
class
TrackCreator :
public
QObject
16
{
17
Q_OBJECT
18
QML_ELEMENT
19
QML_UNCREATABLE (
"One instance per project"
)
20
21
public
:
22
explicit
TrackCreator (
23
undo::UndoStack
&undo_stack,
24
structure::tracks::TrackFactory
&track_factory,
25
structure::tracks::TrackCollection
&track_collection,
26
structure::tracks::TrackRouting
&track_routing,
27
structure::tracks::SingletonTracks
&singleton_tracks,
28
QObject * parent =
nullptr
)
29
: QObject (parent), track_factory_ (track_factory),
30
track_collection_ (track_collection), track_routing_ (track_routing),
31
singleton_tracks_ (singleton_tracks), undo_stack_ (undo_stack)
32
{
33
}
34
35
Q_INVOKABLE QVariant
36
addEmptyTrackFromType (
structure::tracks::Track::Type
trackType)
const
;
37
38
private
:
42
utils::Utf8String
get_unique_name_for_track (
43
const
structure::tracks::Track::Uuid
&track_to_skip,
44
const
utils::Utf8String
&name)
const
;
45
46
private
:
47
structure::tracks::TrackFactory
&track_factory_;
48
structure::tracks::TrackCollection
&track_collection_;
49
structure::tracks::TrackRouting
&track_routing_;
50
structure::tracks::SingletonTracks
&singleton_tracks_;
51
undo::UndoStack
&undo_stack_;
52
};
53
}
// namespace zrythm::actions
zrythm::structure::tracks::SingletonTracks
References to tracks that are singletons.
Definition
singleton_tracks.h:19
zrythm::structure::tracks::TrackCollection
A collection of tracks that provides a QAbstractListModel interface.
Definition
track_collection.h:21
zrythm::structure::tracks::TrackFactory
Factory for tracks.
Definition
track_factory.h:15
zrythm::structure::tracks::TrackRouting
Management of track-to-track connections.
Definition
track_routing.h:14
zrythm::structure::tracks::Track::Type
Type
Definition
track.h:88
zrythm::undo::UndoStack
Definition
undo_stack.h:18
zrythm::utils::Utf8String
Lightweight UTF-8 string wrapper with safe conversions.
Definition
utf8_string.h:38
zrythm::utils::UuidIdentifiableObject< Track >::Uuid
src
actions
track_creator.h
Generated by
1.15.0