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

Public Types

enum  Roles { TrackLanePtrRole = Qt::UserRole + 1 }

Public Member Functions

 TrackLaneList (structure::arrangement::ArrangerObjectRegistry &obj_registry, dsp::FileAudioSourceRegistry &file_audio_source_registry, QObject *parent=nullptr)
QHash< int, QByteArray > roleNames () const override
int rowCount (const QModelIndex &parent=QModelIndex()) const override
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
Q_INVOKABLE TrackLanegetFirstLane () const
bool lanesVisible () const
void setLanesVisible (bool visible)
Q_SIGNAL void lanesVisibleChanged (bool visible)
Q_INVOKABLE TrackLaneaddLane ()
 Adds a lane to the end of the list with default settings.
Q_INVOKABLE TrackLaneinsertLane (size_t index)
Q_INVOKABLE void removeLane (size_t index)
Q_INVOKABLE void moveLane (size_t from_index, size_t to_index)
Q_SIGNAL void laneObjectsNeedRecache (utils::ExpandableTickRange affectedRange)
size_t size () const noexcept
bool empty () const noexcept
TrackLaneat (size_t idx) const
utils::QObjectUniquePtr< TrackLanepop_back ()
 Removes last lane.
void clear ()
auto & lanes () const
auto lanes_view () const
double get_visible_lane_heights () const
 Gets the total height of all visible lanes (if any).
void create_missing_lanes (size_t index)
 Creates missing TrackLane's until index.
void remove_empty_last_lanes ()
 Removes the empty last lanes of the Track (except the last one).

Properties

bool lanesVisible

Friends

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

Detailed Description

Definition at line 12 of file track_lane_list.h.

Member Enumeration Documentation

◆ Roles

enum zrythm::structure::tracks::TrackLaneList::Roles

Definition at line 20 of file track_lane_list.h.

Member Function Documentation

◆ addLane()

Q_INVOKABLE TrackLane * zrythm::structure::tracks::TrackLaneList::addLane ( )
inline

Adds a lane to the end of the list with default settings.

Definition at line 61 of file track_lane_list.h.

◆ at()

TrackLane * zrythm::structure::tracks::TrackLaneList::at ( size_t idx) const
inline

Definition at line 81 of file track_lane_list.h.

◆ clear()

void zrythm::structure::tracks::TrackLaneList::clear ( )
inline

Definition at line 111 of file track_lane_list.h.

◆ empty()

bool zrythm::structure::tracks::TrackLaneList::empty ( ) const
inlinenodiscardnoexcept

Definition at line 79 of file track_lane_list.h.

◆ get_visible_lane_heights()

double zrythm::structure::tracks::TrackLaneList::get_visible_lane_heights ( ) const
inline

Gets the total height of all visible lanes (if any).

Definition at line 133 of file track_lane_list.h.

◆ getFirstLane()

Q_INVOKABLE TrackLane * zrythm::structure::tracks::TrackLaneList::getFirstLane ( ) const
inline

Definition at line 42 of file track_lane_list.h.

◆ lanes()

auto & zrythm::structure::tracks::TrackLaneList::lanes ( ) const
inline

Definition at line 122 of file track_lane_list.h.

◆ lanes_view()

auto zrythm::structure::tracks::TrackLaneList::lanes_view ( ) const
inline

Definition at line 124 of file track_lane_list.h.

◆ lanesVisible()

bool zrythm::structure::tracks::TrackLaneList::lanesVisible ( ) const
inline

Definition at line 47 of file track_lane_list.h.

◆ pop_back()

utils::QObjectUniquePtr< TrackLane > zrythm::structure::tracks::TrackLaneList::pop_back ( )
inline

Removes last lane.

Definition at line 97 of file track_lane_list.h.

◆ setLanesVisible()

void zrythm::structure::tracks::TrackLaneList::setLanesVisible ( bool visible)
inline

Definition at line 48 of file track_lane_list.h.

◆ size()

size_t zrythm::structure::tracks::TrackLaneList::size ( ) const
inlinenodiscardnoexcept

Definition at line 77 of file track_lane_list.h.

◆ from_json

void from_json ( const nlohmann::json & j,
TrackLaneList & p )
friend

Definition at line 161 of file track_lane_list.h.

◆ to_json

void to_json ( nlohmann::json & j,
const TrackLaneList & p )
friend

Definition at line 156 of file track_lane_list.h.

Property Documentation

◆ lanesVisible

bool zrythm::structure::tracks::TrackLaneList::lanesVisible
readwrite

Definition at line 15 of file track_lane_list.h.


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