14class AddEmptyTrackCommand :
public QUndoCommand
17 static constexpr auto CommandId = 1823189;
19 AddEmptyTrackCommand (
21 structure::tracks::TrackUuidReference track_ref)
22 : QUndoCommand (QObject::tr (
"Add Track")), collection_ (collection),
23 track_ref_ (std::move (track_ref))
27 int id ()
const override {
return CommandId; }
29 void undo ()
override { collection_.remove_track (track_ref_.id ()); }
30 void redo ()
override { collection_.add_track (track_ref_); }
34 structure::tracks::TrackUuidReference track_ref_;