1 2 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 3 4 /* 5 Rosegarden 6 A MIDI and audio sequencer and musical notation editor. 7 Copyright 2000-2021 the Rosegarden development team. 8 9 Other copyrights also apply to some parts of this work. Please 10 see the AUTHORS file and individual file headers for details. 11 12 This program is free software; you can redistribute it and/or 13 modify it under the terms of the GNU General Public License as 14 published by the Free Software Foundation; either version 2 of the 15 License, or (at your option) any later version. See the file 16 COPYING included with this distribution for more information. 17 */ 18 19 #ifndef RG_AUDIOSEGMENTINSERTCOMMAND_H 20 #define RG_AUDIOSEGMENTINSERTCOMMAND_H 21 22 #include "base/RealTime.h" 23 #include "base/Track.h" 24 #include "sound/AudioFile.h" 25 #include "document/Command.h" 26 #include "base/Event.h" 27 28 #include <QCoreApplication> 29 30 31 namespace Rosegarden 32 { 33 34 class Studio; 35 class Segment; 36 class RosegardenDocument; 37 class Composition; 38 class AudioFileManager; 39 40 41 class AudioSegmentInsertCommand : public NamedCommand 42 { 43 Q_DECLARE_TR_FUNCTIONS(Rosegarden::AudioSegmentInsertCommand) 44 45 public: 46 AudioSegmentInsertCommand(RosegardenDocument *doc, 47 TrackId track, 48 timeT startTime, 49 AudioFileId audioFileId, 50 const RealTime &audioStartTime, 51 const RealTime &audioEndTime); 52 ~AudioSegmentInsertCommand() override; 53 54 Segment *getNewSegment() { return m_segment; } 55 56 void execute() override; 57 void unexecute() override; 58 59 private: 60 Composition *m_composition; 61 AudioFileManager *m_audioFileManager; 62 Segment *m_segment; 63 int m_track; 64 timeT m_startTime; 65 AudioFileId m_audioFileId; 66 RealTime m_audioStartTime; 67 RealTime m_audioEndTime; 68 bool m_detached; 69 }; 70 71 72 } 73 74 #endif 75