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_ADDDOTCOMMAND_H
20 #define RG_ADDDOTCOMMAND_H
21 
22 #include "document/BasicSelectionCommand.h"
23 #include <QString>
24 #include <QCoreApplication>  // For Q_DECLARE_TR_FUNCTIONS()
25 
26 
27 
28 
29 namespace Rosegarden
30 {
31 
32 class EventSelection;
33 
34 
35 class AddDotCommand : public BasicSelectionCommand
36 {
Q_DECLARE_TR_FUNCTIONS(Rosegarden::AddDotCommand)37     Q_DECLARE_TR_FUNCTIONS(Rosegarden::AddDotCommand)
38 
39 public:
40     AddDotCommand(EventSelection &selection, bool notationOnly) :
41         BasicSelectionCommand(getGlobalName(), selection, true),
42         m_selection(&selection),
43         m_notationOnly(notationOnly)
44     { }
45 
getGlobalName()46     static QString getGlobalName() {
47         return tr("&Add Dot");
48     }
49 
50 protected:
51     void modifySegment() override;
52 
53 private:
54     EventSelection *m_selection;// only used on 1st execute (cf bruteForceRedo)
55     bool m_notationOnly;
56 };
57 
58 
59 
60 
61 }
62 
63 #endif
64