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_REMOVETIMESIGNATURECOMMAND_H
20 #define RG_REMOVETIMESIGNATURECOMMAND_H
21 
22 #include "base/NotationTypes.h"
23 #include "document/Command.h"
24 #include <QString>
25 #include "base/Event.h"
26 #include <QCoreApplication>
27 
28 
29 class Remove;
30 
31 
32 namespace Rosegarden
33 {
34 
35 class Composition;
36 
37 
38 class RemoveTimeSignatureCommand : public NamedCommand
39 {
Q_DECLARE_TR_FUNCTIONS(Rosegarden::RemoveTimeSignatureCommand)40     Q_DECLARE_TR_FUNCTIONS(Rosegarden::RemoveTimeSignatureCommand)
41 
42 public:
43     RemoveTimeSignatureCommand(Composition *composition,
44                                int index):
45         NamedCommand(getGlobalName()),
46         m_composition(composition),
47         m_timeSigIndex(index),
48         m_oldTime(0),
49         m_oldTimeSignature() { }
50 
~RemoveTimeSignatureCommand()51     ~RemoveTimeSignatureCommand() override {}
52 
getGlobalName()53     static QString getGlobalName() { return tr("Remove &Time Signature Change..."); }
54 
55     void execute() override;
56     void unexecute() override;
57 
58 private:
59     Composition  *m_composition;
60     int                       m_timeSigIndex;
61     timeT         m_oldTime;
62     TimeSignature m_oldTimeSignature;
63 };
64 
65 
66 
67 }
68 
69 #endif
70