1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 2 3 /* 4 Rosegarden 5 A MIDI and audio sequencer and musical notation editor. 6 Copyright 2000-2012 the Rosegarden development team. 7 8 Other copyrights also apply to some parts of this work. Please 9 see the AUTHORS file and individual file headers for details. 10 11 This program is free software; you can redistribute it and/or 12 modify it under the terms of the GNU General Public License as 13 published by the Free Software Foundation; either version 2 of the 14 License, or (at your option) any later version. See the file 15 COPYING included with this distribution for more information. 16 */ 17 18 #ifndef RG_GENERATEDREGIONINSERTIONCOMMAND_H 19 #define RG_GENERATEDREGIONINSERTIONCOMMAND_H 20 21 #include "base/figuration/GeneratedRegion.h" 22 #include "document/BasicCommand.h" 23 #include "base/Event.h" 24 25 #include <QCoreApplication> 26 27 28 namespace Rosegarden 29 { 30 31 class Segment; 32 class Event; 33 34 35 class GeneratedRegionInsertionCommand : public BasicCommand 36 { 37 Q_DECLARE_TR_FUNCTIONS(Rosegarden::GeneratedRegionInsertionCommand) 38 39 public: 40 GeneratedRegionInsertionCommand(Segment &segment, 41 timeT time, 42 GeneratedRegion generatedRegion); 43 ~GeneratedRegionInsertionCommand() override; 44 45 EventSelection *getSubsequentSelection() override; getLastInsertedEvent()46 Event *getLastInsertedEvent() { return m_lastInsertedEvent; } 47 48 protected: 49 void modifySegment() override; 50 51 GeneratedRegion m_generatedRegion; 52 Event *m_lastInsertedEvent; 53 }; 54 55 56 } 57 58 #endif /* ifndef RG_GENERATEDREGIONINSERTIONCOMMAND_H */ 59