Rosegarden – music editor and MIDI/audio sequencer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AddDotCommand.h 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
  2. /*
  3. Rosegarden
  4. A MIDI and audio sequencer and musical notation editor.
  5. This program is Copyright 2000-2008
  6. Guillaume Laurent <glaurent@telegraph-road.org>,
  7. Chris Cannam <cannam@all-day-breakfast.com>,
  8. Richard Bown <richard.bown@ferventsoftware.com>
  9. The moral rights of Guillaume Laurent, Chris Cannam, and Richard
  10. Bown to claim authorship of this work have been asserted.
  11. Other copyrights also apply to some parts of this work. Please
  12. see the AUTHORS file and individual file headers for details.
  13. This program is free software; you can redistribute it and/or
  14. modify it under the terms of the GNU General Public License as
  15. published by the Free Software Foundation; either version 2 of the
  16. License, or (at your option) any later version. See the file
  17. COPYING included with this distribution for more information.
  18. */
  19. #ifndef _RG_ADDDOTCOMMAND_H_
  20. #define _RG_ADDDOTCOMMAND_H_
  21. #include "document/BasicSelectionCommand.h"
  22. #include <tqstring.h>
  23. #include <tdelocale.h>
  24. namespace Rosegarden
  25. {
  26. class EventSelection;
  27. class AddDotCommand : public BasicSelectionCommand
  28. {
  29. public:
  30. AddDotCommand(EventSelection &selection, bool notationOnly) :
  31. BasicSelectionCommand(getGlobalName(), selection, true),
  32. m_selection(&selection),
  33. m_notationOnly(notationOnly)
  34. { }
  35. static TQString getGlobalName() {
  36. return i18n("&Add Dot");
  37. }
  38. protected:
  39. virtual void modifySegment();
  40. private:
  41. EventSelection *m_selection;// only used on 1st execute (cf bruteForceRedo)
  42. bool m_notationOnly;
  43. };
  44. }
  45. #endif