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_MODIFYINSTRUMENTMAPPINGCOMMAND_H
20 #define RG_MODIFYINSTRUMENTMAPPINGCOMMAND_H
21 
22 #include "base/MidiProgram.h"
23 #include "base/Track.h"
24 #include "document/Command.h"
25 #include <QString>
26 #include <vector>
27 #include <QCoreApplication>
28 
29 
30 class Modify;
31 
32 
33 namespace Rosegarden
34 {
35 
36 class Studio;
37 class RosegardenDocument;
38 class Composition;
39 
40 
41 class ModifyInstrumentMappingCommand : public NamedCommand
42 {
43     Q_DECLARE_TR_FUNCTIONS(Rosegarden::ModifyInstrumentMappingCommand)
44 
45 public:
46     ModifyInstrumentMappingCommand(RosegardenDocument *doc,
47                                    InstrumentId fromInstrument,
48                                    InstrumentId toInstrument);
49 
getGlobalName()50     static QString getGlobalName() { return tr("Modify &Instrument Mapping"); }
51 
52     void execute() override;
53     void unexecute() override;
54 
55 protected:
56     Composition *m_composition;
57     Studio      *m_studio;
58     InstrumentId m_fromInstrument;
59     InstrumentId m_toInstrument;
60 
61     std::vector<TrackId> m_mapping;
62 
63 };
64 
65 
66 // because ModifyDeviceCommand is overkill for this
67 
68 
69 }
70 
71 #endif
72