|
|
| TrackCollection (TrackRegistry &track_registry, QObject *parent=nullptr) noexcept |
|
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 void | setTrackExpanded (const Track *track, bool expanded) |
|
int | numSoloedTracks () const |
|
Q_SIGNAL void | numSoloedTracksChanged () |
|
int | numMutedTracks () const |
|
Q_SIGNAL void | numMutedTracksChanged () |
|
int | numListenedTracks () const |
|
Q_SIGNAL void | numListenedTracksChanged () |
|
TrackPtrVariant | get_track_at_index (size_t index) const |
| | Get the track at the given index.
|
|
TrackUuidReference | get_track_ref_at_index (size_t index) const |
| | Get the track reference at the given index.
|
| auto | get_track_index (const Track::Uuid &track_id) const |
| | Get the index of the track with the given UUID.
|
| TrackUuidReference | track_ref_at_id (const Track::Uuid &track_id) const |
| auto | track_count () const |
| | Get the number of tracks in the collection.
|
|
bool | contains (const Track::Uuid &track_id) const |
| | Check if the collection contains a track with the given UUID.
|
|
void | add_track (const TrackUuidReference &track_id) |
| | Add a track to the collection.
|
|
void | insert_track (const TrackUuidReference &track_id, int pos) |
| | Insert a track at the given position.
|
|
void | remove_track (const Track::Uuid &track_id) |
| | Remove a track from the collection.
|
|
void | move_track (const Track::Uuid &track_id, int pos) |
| | Move a track from one position to another.
|
|
void | clear () |
| | Clear all tracks from the collection.
|
| auto | get_track_span () const |
| | Get a span view of all tracks.
|
| const std::vector< TrackUuidReference > & | tracks () const |
| | Get the underlying tracks vector.
|
| TrackRegistry & | get_track_registry () const |
| | Get the track registry.
|
|
void | set_track_expanded (const Track::Uuid &track_id, bool expanded) |
| | Set the expanded state of a foldable track.
|
|
bool | get_track_expanded (const Track::Uuid &track_id) const |
| | Get the expanded state of a foldable track.
|
|
void | set_folder_parent (const Track::Uuid &child_id, const Track::Uuid &parent_id) |
| | Set the folder parent for a track.
|
|
std::optional< Track::Uuid > | get_folder_parent (const Track::Uuid &child_id) const |
| | Get the folder parent for a track.
|
|
void | remove_folder_parent (const Track::Uuid &child_id) |
| | Remove the folder parent for a track.
|
|
bool | is_track_foldable (const Track::Uuid &track_id) const |
| | Check if a track is foldable.
|
|
size_t | get_child_count (const Track::Uuid &parent_id) const |
| | Get the number of children for a foldable track.
|
|
size_t | get_last_child_index (const Track::Uuid &parent_id) const |
| | Get the last child index for a foldable track.
|
A collection of tracks that provides a QAbstractListModel interface.
Tracks are stored in a flat list, and the model provides facilities to get whether a track is foldable, expanded, and its depth (0 means not part of a foldable parent).
Definition at line 20 of file track_collection.h.