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_REMOVECONTROLPARAMETERCOMMAND_H
20 #define RG_REMOVECONTROLPARAMETERCOMMAND_H
21 
22 #include "base/ControlParameter.h"
23 #include "base/Device.h"
24 #include "document/Command.h"  // for NamedCommand
25 
26 #include <QString>
27 
28 
29 namespace Rosegarden
30 {
31 
32 
33 class Studio;
34 
35 /// Remove a Controller (CC) from a MidiDevice.
36 class RemoveControlParameterCommand : public NamedCommand
37 {
Q_DECLARE_TR_FUNCTIONS(Rosegarden::RemoveControlParameterCommand)38     Q_DECLARE_TR_FUNCTIONS(Rosegarden::RemoveControlParameterCommand)
39 
40 public:
41     RemoveControlParameterCommand(Studio *studio,
42                                   DeviceId device,
43                                   int controllerIndex) :
44     NamedCommand(tr("&Remove Control Parameter")),
45     m_studio(studio),
46     m_device(device),
47     m_controllerIndex(controllerIndex)
48     { }
49 
50     // Command overrides.
51     void execute() override;
52     void unexecute() override;
53 
54 private:
55     Studio *m_studio;
56     DeviceId m_device;
57     /// Index into the Device's list of controllers.
58     int m_controllerIndex;
59 
60     ControlParameter m_oldControl;
61 
62 };
63 
64 
65 }
66 
67 #endif
68