|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
QML-exposed operator for track collection operations. More...
#include <src/actions/track_collection_operator.h>


Public Member Functions | |
| TrackCollectionOperator (QObject *parent=nullptr) | |
| structure::tracks::TrackCollection * | collection () const |
| void | setCollection (structure::tracks::TrackCollection *collection) |
| Q_SIGNAL void | collectionChanged () |
| undo::UndoStack * | undoStack () 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. | |
| Q_INVOKABLE void | deleteTracks (const QList< zrythm::structure::tracks::Track * > &tracks) |
| Deletes the given tracks (and their descendants if foldable). | |
Properties | |
| zrythm::structure::tracks::TrackCollection * | collection |
| zrythm::undo::UndoStack * | undoStack |
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 24 of file track_collection_operator.h.
|
inlineexplicit |
Definition at line 32 of file track_collection_operator.h.
|
inline |
Definition at line 37 of file track_collection_operator.h.
| Q_INVOKABLE void zrythm::actions::TrackCollectionOperator::deleteTracks | ( | const QList< zrythm::structure::tracks::Track * > & | tracks | ) |
Deletes the given tracks (and their descendants if foldable).
Pushes a single DeleteTracksCommand onto the undo stack.
| std::invalid_argument | if any track is non-deletable. |
|
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 82 of file track_collection_operator.h.
| 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.
| tracks | List of tracks to move (in their current order). |
| targetPosition | The position where the first track should end up. |
| targetFolder | If 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. |
|
inline |
Definition at line 41 of file track_collection_operator.h.
|
inline |
Definition at line 52 of file track_collection_operator.h.
|
inline |
Definition at line 51 of file track_collection_operator.h.
|
readwrite |
Definition at line 27 of file track_collection_operator.h.
|
readwrite |
Definition at line 28 of file track_collection_operator.h.