Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::structure::tracks::Tracklist Class Reference

A higher level wrapper over a track collection that serves as the project's only tracklist. More...

#include <src/structure/tracks/tracklist.h>

Inheritance diagram for zrythm::structure::tracks::Tracklist:
Collaboration diagram for zrythm::structure::tracks::Tracklist:

Public Types

using ArrangerObjectPtrVariant = arrangement::ArrangerObjectPtrVariant
using ArrangerObject = arrangement::ArrangerObject

Public Member Functions

 Tracklist (TrackRegistry &track_registry, QObject *parent=nullptr)
TrackCollectioncollection () const
SingletonTrackssingletonTracks () const
Q_INVOKABLE TrackgetTrackForTimelineObject (const arrangement::ArrangerObject *timelineObject) const
Q_INVOKABLE TrackLanegetTrackLaneForObject (const arrangement::ArrangerObject *timelineObject) const
TrackRoutingtrackRouting () const
int pinnedTracksCutoff () const
void setPinnedTracksCutoff (int index)
Q_SIGNAL void pinnedTracksCutoffChanged (int index)
std::optional< TrackPtrVariant > get_track (const TrackUuid &id) const
std::optional< TrackPtrVariant > get_visible_track_after_delta (Track::Uuid track_id, int delta) const
 Returns the Track after delta visible Track's.
bool multiply_track_heights (double multiplier, bool visible_only, bool check_only, bool fire_events)
 Multiplies all tracks' heights and returns if the operation was valid.
void handle_click (TrackUuid track_id, bool ctrl, bool shift, bool dragged)
 Handle a click selection.
std::vector< ArrangerObjectPtrVariant > get_timeline_objects () const
void clear_selections_for_object_siblings (const ArrangerObject::Uuid &object_id)
 Clears either the timeline selections or the clip editor selections.
std::optional< TrackUuidReference > get_track_for_plugin (const plugins::Plugin::Uuid &plugin_id) const
bool should_be_visible (const Track::Uuid &track_id) const
 Returns whether the track should be visible.
bool is_track_pinned (int index) const
 Returns whether the track at index is pinned.
bool is_track_pinned (Track::Uuid track_id) const
auto get_track_route_target (const TrackUuid &source_track) const
void mark_track_for_bounce (TrackPtrVariant track_var, bool bounce, bool mark_regions, bool mark_children, bool mark_parents)
 Marks the track for bouncing.

Properties

QML_ELEMENT zrythm::structure::tracks::TrackRoutingtrackRouting
zrythm::structure::tracks::SingletonTrackssingletonTracks
zrythm::structure::tracks::TrackCollectioncollection
int pinnedTracksCutoff

Friends

void init_from (Tracklist &obj, const Tracklist &other, utils::ObjectCloneType clone_type)
void to_json (nlohmann::json &j, const Tracklist &t)
void from_json (const nlohmann::json &j, Tracklist &t)

Detailed Description

A higher level wrapper over a track collection that serves as the project's only tracklist.

Definition at line 22 of file tracklist.h.

Member Typedef Documentation

◆ ArrangerObject

using zrythm::structure::tracks::Tracklist::ArrangerObject = arrangement::ArrangerObject

Definition at line 36 of file tracklist.h.

◆ ArrangerObjectPtrVariant

using zrythm::structure::tracks::Tracklist::ArrangerObjectPtrVariant = arrangement::ArrangerObjectPtrVariant

Definition at line 35 of file tracklist.h.

Member Function Documentation

◆ clear_selections_for_object_siblings()

void zrythm::structure::tracks::Tracklist::clear_selections_for_object_siblings ( const ArrangerObject::Uuid & object_id)

Clears either the timeline selections or the clip editor selections.

Parameters
object_idThe object that is part of the target selections.

◆ collection()

TrackCollection * zrythm::structure::tracks::Tracklist::collection ( ) const
inline

Definition at line 47 of file tracklist.h.

◆ get_track()

std::optional< TrackPtrVariant > zrythm::structure::tracks::Tracklist::get_track ( const TrackUuid & id) const
inline

Definition at line 79 of file tracklist.h.

◆ get_track_route_target()

auto zrythm::structure::tracks::Tracklist::get_track_route_target ( const TrackUuid & source_track) const
inline

Definition at line 152 of file tracklist.h.

◆ get_visible_track_after_delta()

std::optional< TrackPtrVariant > zrythm::structure::tracks::Tracklist::get_visible_track_after_delta ( Track::Uuid track_id,
int delta ) const

Returns the Track after delta visible Track's.

Negative delta searches backwards.

This function searches tracks only in the same Tracklist as the given one (ie, pinned or not).

◆ is_track_pinned() [1/2]

bool zrythm::structure::tracks::Tracklist::is_track_pinned ( int index) const
inline

Returns whether the track at index is pinned.

Definition at line 141 of file tracklist.h.

◆ is_track_pinned() [2/2]

bool zrythm::structure::tracks::Tracklist::is_track_pinned ( Track::Uuid track_id) const
inline

Definition at line 146 of file tracklist.h.

◆ mark_track_for_bounce()

void zrythm::structure::tracks::Tracklist::mark_track_for_bounce ( TrackPtrVariant track_var,
bool bounce,
bool mark_regions,
bool mark_children,
bool mark_parents )

Marks the track for bouncing.

Parameters
mark_childrenWhether to mark all children tracks as well. Used when exporting stems on the specific track stem only. IMPORTANT: Track.bounce_to_master must be set beforehand if this is true.
mark_parentsWhether to mark all parent tracks as well.

◆ multiply_track_heights()

bool zrythm::structure::tracks::Tracklist::multiply_track_heights ( double multiplier,
bool visible_only,
bool check_only,
bool fire_events )

Multiplies all tracks' heights and returns if the operation was valid.

Parameters
visible_onlyOnly apply to visible tracks.

◆ pinnedTracksCutoff()

int zrythm::structure::tracks::Tracklist::pinnedTracksCutoff ( ) const
inline

Definition at line 61 of file tracklist.h.

◆ setPinnedTracksCutoff()

void zrythm::structure::tracks::Tracklist::setPinnedTracksCutoff ( int index)
inline

Definition at line 62 of file tracklist.h.

◆ should_be_visible()

bool zrythm::structure::tracks::Tracklist::should_be_visible ( const Track::Uuid & track_id) const

Returns whether the track should be visible.

Takes into account Track.visible and whether any of the track's foldable parents are folded.

◆ singletonTracks()

SingletonTracks * zrythm::structure::tracks::Tracklist::singletonTracks ( ) const
inline

Definition at line 49 of file tracklist.h.

◆ trackRouting()

TrackRouting * zrythm::structure::tracks::Tracklist::trackRouting ( ) const
inline

Definition at line 59 of file tracklist.h.

◆ to_json

void to_json ( nlohmann::json & j,
const Tracklist & t )
friend

Definition at line 175 of file tracklist.h.

Property Documentation

◆ collection

zrythm::structure::tracks::TrackCollection * zrythm::structure::tracks::Tracklist::collection
read

Definition at line 29 of file tracklist.h.

◆ pinnedTracksCutoff

int zrythm::structure::tracks::Tracklist::pinnedTracksCutoff
readwrite

Definition at line 31 of file tracklist.h.

◆ singletonTracks

zrythm::structure::tracks::SingletonTracks * zrythm::structure::tracks::Tracklist::singletonTracks
read

Definition at line 28 of file tracklist.h.

◆ trackRouting

QML_ELEMENT zrythm::structure::tracks::TrackRouting * zrythm::structure::tracks::Tracklist::trackRouting
read

Definition at line 26 of file tracklist.h.


The documentation for this class was generated from the following file: