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

QML-exposed operator for track collection operations. More...

#include <src/actions/track_collection_operator.h>

Inheritance diagram for zrythm::actions::TrackCollectionOperator:
Collaboration diagram for zrythm::actions::TrackCollectionOperator:

Public Member Functions

 TrackCollectionOperator (QObject *parent=nullptr)
structure::tracks::TrackCollectioncollection () const
void setCollection (structure::tracks::TrackCollection *collection)
Q_SIGNAL void collectionChanged ()
undo::UndoStackundoStack () const
void setUndoStack (undo::UndoStack *undoStack)
Q_SIGNAL void undoStackChanged ()
Q_INVOKABLE void moveTracks (const QList< zrythm::structure::tracks::Track * > &tracks, int targetPosition, zrythm::structure::tracks::Track *targetFolder)
 Moves tracks to a new position in the collection.
Q_INVOKABLE void moveTracks (const QList< zrythm::structure::tracks::Track * > &tracks, int targetPosition)
 Convenience overload for QML - moves without specifying a folder.

Properties

zrythm::structure::tracks::TrackCollectioncollection
zrythm::undo::UndoStackundoStack

Detailed Description

QML-exposed operator for track collection operations.

This class provides QML bindings for operations that affect multiple tracks or the track collection as a whole, such as reordering tracks.

Definition at line 20 of file track_collection_operator.h.

Constructor & Destructor Documentation

◆ TrackCollectionOperator()

zrythm::actions::TrackCollectionOperator::TrackCollectionOperator ( QObject * parent = nullptr)
inlineexplicit

Definition at line 28 of file track_collection_operator.h.

Member Function Documentation

◆ collection()

structure::tracks::TrackCollection * zrythm::actions::TrackCollectionOperator::collection ( ) const
inline

Definition at line 33 of file track_collection_operator.h.

◆ moveTracks() [1/2]

Q_INVOKABLE void zrythm::actions::TrackCollectionOperator::moveTracks ( const QList< zrythm::structure::tracks::Track * > & tracks,
int targetPosition )
inline

Convenience overload for QML - moves without specifying a folder.

QML cannot resolve C++ default parameters on Q_INVOKABLE methods. Use this overload when no target folder is needed.

Definition at line 78 of file track_collection_operator.h.

◆ moveTracks() [2/2]

Q_INVOKABLE void zrythm::actions::TrackCollectionOperator::moveTracks ( const QList< zrythm::structure::tracks::Track * > & tracks,
int targetPosition,
zrythm::structure::tracks::Track * targetFolder )

Moves tracks to a new position in the collection.

Parameters
tracksList of tracks to move (in their current order).
targetPositionThe position where the first track should end up.
targetFolderIf non-null, the foldable track to make the moved tracks children of. If null and the target position is inside an expanded folder, the enclosing folder is inferred automatically.

◆ setCollection()

void zrythm::actions::TrackCollectionOperator::setCollection ( structure::tracks::TrackCollection * collection)
inline

Definition at line 37 of file track_collection_operator.h.

◆ setUndoStack()

void zrythm::actions::TrackCollectionOperator::setUndoStack ( undo::UndoStack * undoStack)
inline

Definition at line 48 of file track_collection_operator.h.

◆ undoStack()

undo::UndoStack * zrythm::actions::TrackCollectionOperator::undoStack ( ) const
inline

Definition at line 47 of file track_collection_operator.h.

Property Documentation

◆ collection

zrythm::structure::tracks::TrackCollection * zrythm::actions::TrackCollectionOperator::collection
readwrite

Definition at line 23 of file track_collection_operator.h.

◆ undoStack

zrythm::undo::UndoStack * zrythm::actions::TrackCollectionOperator::undoStack
readwrite

Definition at line 24 of file track_collection_operator.h.


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