MuseScore  3.4
Music composition and notation
undo.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2002-2017 Werner Schweer
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __UNDO_H__
14 #define __UNDO_H__
15 
21 #include "spatium.h"
22 #include "mscore.h"
23 #include "sig.h"
24 #include "tempo.h"
25 #include "input.h"
26 #include "style.h"
27 #include "key.h"
28 #include "select.h"
29 #include "instrument.h"
30 #include "synthesizer/midipatch.h"
31 #include "pitchvalue.h"
32 #include "timesig.h"
33 #include "noteevent.h"
34 #include "synthesizerstate.h"
35 #include "dynamic.h"
36 #include "staff.h"
37 #include "stafftype.h"
38 #include "cleflist.h"
39 #include "note.h"
40 #include "chord.h"
41 #include "drumset.h"
42 #include "rest.h"
43 #include "fret.h"
44 
46 
47 namespace Ms {
48 
49 class ElementList;
50 class Element;
51 class Instrument;
52 class System;
53 class Measure;
54 class Segment;
55 class Staff;
56 class Part;
57 class Volta;
58 class Score;
59 class Note;
60 class Chord;
61 class ChordRest;
62 class Harmony;
63 class SlurTie;
64 class MStaff;
65 class MeasureBase;
66 class Dynamic;
67 class Selection;
68 class Text;
69 class Channel;
70 class Tuplet;
71 class KeySig;
72 class TimeSig;
73 class Clef;
74 class Image;
75 class Bend;
76 class TremoloBar;
77 class NoteEvent;
78 class SlurSegment;
79 class InstrumentChange;
80 class Box;
81 class Spanner;
82 class BarLine;
83 enum class ClefType : signed char;
84 enum class PlayEventType : char;
85 class Excerpt;
86 class EditData;
87 
88 #define UNDO_NAME(a) virtual const char* name() const override { return a; }
89 
90 enum class LayoutMode : char;
91 
92 //---------------------------------------------------------
93 // UndoCommand
94 //---------------------------------------------------------
95 
96 class UndoCommand {
97  QList<UndoCommand*> childList;
98 
99  protected:
100  virtual void flip(EditData*) {}
101 
102  public:
103  virtual ~UndoCommand();
104  virtual void undo(EditData*);
105  virtual void redo(EditData*);
106  void appendChild(UndoCommand* cmd) { childList.append(cmd); }
107  UndoCommand* removeChild() { return childList.takeLast(); }
108  int childCount() const { return childList.size(); }
109  void unwind();
110  const QList<UndoCommand*>& commands() const { return childList; }
111  virtual void cleanup(bool undo);
112 // #ifndef QT_NO_DEBUG
113  virtual const char* name() const { return "UndoCommand"; }
114 // #endif
115  };
116 
117 //---------------------------------------------------------
118 // UndoMacro
119 // A root element for undo macro which is stored
120 // directly in UndoStack
121 //---------------------------------------------------------
122 
123 class UndoMacro : public UndoCommand {
124  struct SelectionInfo {
125  std::vector<Element*> elements;
128  int staffStart = -1;
129  int staffEnd = -1;
130 
131  bool isValid() const { return !elements.empty() || staffStart != -1; }
132  };
133 
138 
140 
141  static void fillSelectionInfo(SelectionInfo&, const Selection&);
142  static void applySelectionInfo(const SelectionInfo&, Selection&);
143 
144  public:
145  UndoMacro(Score* s);
146  virtual void undo(EditData*) override;
147  virtual void redo(EditData*) override;
148  bool empty() const { return childCount() == 0; }
149  UNDO_NAME("UndoMacro");
150  };
151 
152 //---------------------------------------------------------
153 // UndoStack
154 //---------------------------------------------------------
155 
156 class UndoStack {
158  QList<UndoMacro*> list;
159  std::vector<int> stateList;
162  int curIdx;
163 
164  void remove(int idx);
165 
166  public:
167  UndoStack();
168  ~UndoStack();
169 
170  bool active() const { return curCmd != 0; }
171  void beginMacro(Score*);
172  void endMacro(bool rollback);
173  void push(UndoCommand*, EditData*); // push & execute
174  void push1(UndoCommand*);
175  void pop();
176  void setClean();
177  bool canUndo() const { return curIdx > 0; }
178  bool canRedo() const { return curIdx < list.size(); }
179  int state() const { return stateList[curIdx]; }
180  bool isClean() const { return cleanState == state(); }
181  int getCurIdx() const { return curIdx; }
182  bool empty() const { return !canUndo() && !canRedo(); }
183  UndoMacro* current() const { return curCmd; }
184  UndoMacro* last() const { return curIdx > 0 ? list[curIdx-1] : 0; }
185  void undo(EditData*);
186  void redo(EditData*);
187  void rollback();
188  void reopen();
189  };
190 
191 //---------------------------------------------------------
192 // InsertPart
193 //---------------------------------------------------------
194 
195 class InsertPart : public UndoCommand {
197  int idx;
198 
199  public:
200  InsertPart(Part* p, int i);
201  virtual void undo(EditData*) override;
202  virtual void redo(EditData*) override;
203  UNDO_NAME("InsertPart")
204  };
205 
206 //---------------------------------------------------------
207 // RemovePart
208 //---------------------------------------------------------
209 
210 class RemovePart : public UndoCommand {
212  int idx;
213 
214  public:
215  RemovePart(Part*, int idx);
216  virtual void undo(EditData*) override;
217  virtual void redo(EditData*) override;
218  UNDO_NAME("RemovePart")
219  };
220 
221 //---------------------------------------------------------
222 // InsertStaff
223 //---------------------------------------------------------
224 
225 class InsertStaff : public UndoCommand {
227  int ridx;
228 
229  public:
230  InsertStaff(Staff*, int idx);
231  virtual void undo(EditData*) override;
232  virtual void redo(EditData*) override;
233  UNDO_NAME("InsertStaff")
234  };
235 
236 //---------------------------------------------------------
237 // RemoveStaff
238 //---------------------------------------------------------
239 
240 class RemoveStaff : public UndoCommand {
242  int ridx;
243 
244  public:
245  RemoveStaff(Staff*);
246  virtual void undo(EditData*) override;
247  virtual void redo(EditData*) override;
248  UNDO_NAME("RemoveStaff")
249  };
250 
251 //---------------------------------------------------------
252 // InsertMStaff
253 //---------------------------------------------------------
254 
255 class InsertMStaff : public UndoCommand {
258  int idx;
259 
260  public:
261  InsertMStaff(Measure*, MStaff*, int);
262  virtual void undo(EditData*) override;
263  virtual void redo(EditData*) override;
264  UNDO_NAME("InsertMStaff")
265  };
266 
267 //---------------------------------------------------------
268 // RemoveMStaff
269 //---------------------------------------------------------
270 
271 class RemoveMStaff : public UndoCommand {
274  int idx;
275 
276  public:
277  RemoveMStaff(Measure*, MStaff*, int);
278  virtual void undo(EditData*) override;
279  virtual void redo(EditData*) override;
280  UNDO_NAME("RemoveMStaff")
281  };
282 
283 //---------------------------------------------------------
284 // InsertStaves
285 //---------------------------------------------------------
286 
287 class InsertStaves : public UndoCommand {
289  int a;
290  int b;
291 
292  public:
293  InsertStaves(Measure*, int, int);
294  virtual void undo(EditData*) override;
295  virtual void redo(EditData*) override;
296  UNDO_NAME("InsertStaves")
297  };
298 
299 //---------------------------------------------------------
300 // RemoveStaves
301 //---------------------------------------------------------
302 
303 class RemoveStaves : public UndoCommand {
305  int a;
306  int b;
307 
308  public:
309  RemoveStaves(Measure*, int, int);
310  virtual void undo(EditData*) override;
311  virtual void redo(EditData*) override;
312  UNDO_NAME("RemoveStaves")
313  };
314 
315 //---------------------------------------------------------
316 // SortStaves
317 //---------------------------------------------------------
318 
319 class SortStaves : public UndoCommand {
321  QList<int> list;
322  QList<int> rlist;
323 
324  public:
325  SortStaves(Score*, QList<int>);
326  virtual void undo(EditData*) override;
327  virtual void redo(EditData*) override;
328  UNDO_NAME("SortStaves")
329  };
330 
331 //---------------------------------------------------------
332 // ChangePitch
333 //---------------------------------------------------------
334 
335 class ChangePitch : public UndoCommand {
337  int pitch;
338  int tpc1;
339  int tpc2;
340  void flip(EditData*) override;
341 
342  public:
343  ChangePitch(Note* note, int pitch, int tpc1, int tpc2);
344  UNDO_NAME("ChangePitch")
345  };
346 
347 //---------------------------------------------------------
348 // ChangeFretting
349 //---------------------------------------------------------
350 
351 class ChangeFretting : public UndoCommand {
353  int pitch;
354  int string;
355  int fret;
356  int tpc1;
357  int tpc2;
358  void flip(EditData*) override;
359 
360  public:
361  ChangeFretting(Note* note, int pitch, int string, int fret, int tpc1, int tpc2);
362  UNDO_NAME("ChangeFretting")
363  };
364 
365 //---------------------------------------------------------
366 // ChangeKeySig
367 //---------------------------------------------------------
368 
369 class ChangeKeySig : public UndoCommand {
374 
375  void flip(EditData*) override;
376 
377  public:
378  ChangeKeySig(KeySig* k, KeySigEvent newKeySig, bool sc, bool addEvtToStaff = true);
379  UNDO_NAME("ChangeKeySig")
380  };
381 
382 //---------------------------------------------------------
383 // ChangeMeasureLen
384 //---------------------------------------------------------
385 
389  void flip(EditData*) override;
390 
391  public:
393  UNDO_NAME("ChangeMeasureLen")
394  };
395 
396 //---------------------------------------------------------
397 // ChangeElement
398 //---------------------------------------------------------
399 
400 class ChangeElement : public UndoCommand {
403  void flip(EditData*) override;
404 
405  public:
406  ChangeElement(Element* oldElement, Element* newElement);
407  UNDO_NAME("ChangeElement")
408  };
409 
410 //---------------------------------------------------------
411 // TransposeHarmony
412 //---------------------------------------------------------
413 
416  int rootTpc, baseTpc;
417  void flip(EditData*) override;
418 
419  public:
420  TransposeHarmony(Harmony*, int rootTpc, int baseTpc);
421  UNDO_NAME("TransposeHarmony")
422  };
423 
424 //---------------------------------------------------------
425 // ExchangeVoice
426 //---------------------------------------------------------
427 
428 class ExchangeVoice : public UndoCommand {
430  int val1, val2;
431  int staff;
432 
433  public:
434  ExchangeVoice(Measure* ,int val1, int val2, int staff);
435  virtual void undo(EditData*) override;
436  virtual void redo(EditData*) override;
437  UNDO_NAME("ExchangeVoice")
438  };
439 
440 //---------------------------------------------------------
441 // CloneVoice
442 //---------------------------------------------------------
443 
444 class CloneVoice : public UndoCommand {
447  Segment* d; //Destination
448  int strack, dtrack;
449  int otrack;
450  bool linked;
451  bool first = true; //first redo
452 
453  public:
454  CloneVoice(Segment* sf, const Fraction& lTick, Segment* d, int strack, int dtrack, int otrack, bool linked = true);
455  virtual void undo(EditData*) override;
456  virtual void redo(EditData*) override;
457  UNDO_NAME("CloneVoice")
458  };
459 
460 //---------------------------------------------------------
461 // ChangeInstrumentShort
462 //---------------------------------------------------------
463 
467  QList<StaffName> text;
468  void flip(EditData*) override;
469 
470  public:
471  ChangeInstrumentShort(const Fraction&, Part*, QList<StaffName>);
472  UNDO_NAME("ChangeInstrumentShort")
473  };
474 
475 //---------------------------------------------------------
476 // ChangeInstrumentLong
477 //---------------------------------------------------------
478 
482  QList<StaffName> text;
483  void flip(EditData*) override;
484 
485  public:
486  const QList<StaffName>& longNames() const;
487  ChangeInstrumentLong(const Fraction&, Part*, QList<StaffName>);
488  UNDO_NAME("ChangeInstrumentLong")
489  };
490 
491 //---------------------------------------------------------
492 // ChangeBracketType
493 //---------------------------------------------------------
494 
498  void flip(EditData*) override;
499 
500  public:
502  UNDO_NAME("ChangeBracketType")
503  };
504 
505 //---------------------------------------------------------
506 // AddElement
507 //---------------------------------------------------------
508 
509 class AddElement : public UndoCommand {
511 
512  void endUndoRedo(bool) const;
513  void undo(EditData*) override;
514  void redo(EditData*) override;
515 
516  public:
518  Element* getElement() const { return element; }
519  virtual void cleanup(bool);
520  virtual const char* name() const override;
521  };
522 
523 //---------------------------------------------------------
524 // RemoveElement
525 //---------------------------------------------------------
526 
527 class RemoveElement : public UndoCommand {
529 
530  public:
532  virtual void undo(EditData*) override;
533  virtual void redo(EditData*) override;
534  virtual void cleanup(bool);
535  virtual const char* name() const override;
536  };
537 
538 //---------------------------------------------------------
539 // EditText
540 //---------------------------------------------------------
541 
542 class EditText : public UndoCommand {
544  QString oldText;
545  //int undoLevel;
546 
547  void undoRedo();
548 
549  public:
550  EditText(Text* t, const QString& ot, int /*l*/) : text(t), oldText(ot)/*, undoLevel(l)*/ {}
551  virtual void undo(EditData*) override;
552  virtual void redo(EditData*) override;
553  UNDO_NAME("EditText")
554  };
555 
556 //---------------------------------------------------------
557 // ChangePatch
558 //---------------------------------------------------------
559 
560 class ChangePatch : public UndoCommand {
564 
565  void flip(EditData*) override;
566 
567  public:
568  ChangePatch(Score* s, Channel* c, const MidiPatch* pt)
569  : score(s), channel(c), patch(*pt) {}
570  UNDO_NAME("ChangePatch")
571  };
572 
573 //---------------------------------------------------------
574 // SetUserBankController
575 //---------------------------------------------------------
576 
579  bool val;
580 
581  void flip(EditData*) override;
582 
583  public:
585  : channel(c), val(v) {}
586  UNDO_NAME("SetUserBankController")
587  };
588 
589 //---------------------------------------------------------
590 // ChangeStaff
591 //---------------------------------------------------------
592 
593 class ChangeStaff : public UndoCommand {
595  bool invisible;
597  qreal userDist;
600  bool cutaway;
602 
603  void flip(EditData*) override;
604 
605  public:
606  ChangeStaff(Staff*, bool invisible, ClefTypeList _clefType, qreal userDist, Staff::HideMode _hideMode,
607  bool _showIfEmpty, bool _cutaway, bool hide);
608  UNDO_NAME("ChangeStaff")
609  };
610 
611 //---------------------------------------------------------
612 // ChangeStaffType
613 //---------------------------------------------------------
614 
615 class ChangeStaffType : public UndoCommand {
618 
619  void flip(EditData*) override;
620 
621  public:
622  ChangeStaffType(Staff* s, const StaffType& t) : staff(s), staffType(t) {}
623  UNDO_NAME("ChangeStaffType")
624  };
625 
626 //---------------------------------------------------------
627 // ChangePart
628 //---------------------------------------------------------
629 
630 class ChangePart : public UndoCommand {
633  QString partName;
634 
635  void flip(EditData*) override;
636 
637  public:
638  ChangePart(Part*, Instrument*, const QString& name);
639  UNDO_NAME("ChangePart")
640  };
641 
642 //---------------------------------------------------------
643 // ChangeStyle
644 //---------------------------------------------------------
645 
646 class ChangeStyle : public UndoCommand {
649  void flip(EditData*) override;
650 
651  public:
652  ChangeStyle(Score*, const MStyle&);
653  UNDO_NAME("ChangeStyle")
654  };
655 
656 //---------------------------------------------------------
657 // ChangeStyleVal
658 //---------------------------------------------------------
659 
660 class ChangeStyleVal : public UndoCommand {
663  QVariant value;
664 
665  void flip(EditData*) override;
666 
667  public:
668  ChangeStyleVal(Score* s, Sid i, const QVariant& v) : score(s), idx(i), value(v) {}
669  UNDO_NAME("ChangeStyleVal")
670  };
671 
672 //---------------------------------------------------------
673 // ChangePageNumberOffset
674 //---------------------------------------------------------
675 
679 
680  void flip(EditData*) override;
681 
682  public:
683  ChangePageNumberOffset(Score* s, int po) : score(s), pageOffset(po) {}
684  UNDO_NAME("ChangePageNumberOffset")
685  };
686 
687 //---------------------------------------------------------
688 // ChangeChordStaffMove
689 //---------------------------------------------------------
690 
694  void flip(EditData*) override;
695 
696  public:
698  UNDO_NAME("ChangeChordStaffMove")
699  };
700 
701 //---------------------------------------------------------
702 // ChangeVelocity
703 //---------------------------------------------------------
704 
705 class ChangeVelocity : public UndoCommand {
709  void flip(EditData*) override;
710 
711  public:
713  UNDO_NAME("ChangeVelocity")
714  };
715 
716 //---------------------------------------------------------
717 // ChangeMStaffProperties
718 //---------------------------------------------------------
719 
722  int staffIdx;
723  bool visible;
724  bool stemless;
725  void flip(EditData*) override;
726 
727  public:
728  ChangeMStaffProperties(Measure*, int staffIdx, bool visible, bool stemless);
729  UNDO_NAME("ChangeMStaffProperties")
730  };
731 
732 //---------------------------------------------------------
733 // InsertRemoveMeasures
734 //---------------------------------------------------------
735 
739 
740  static std::vector<Clef*> getCourtesyClefs(Measure* m);
741 
742  protected:
743  void removeMeasures();
744  void insertMeasures();
745 
746  public:
747  InsertRemoveMeasures(MeasureBase* _fm, MeasureBase* _lm) : fm(_fm), lm(_lm) {}
748  virtual void undo(EditData*) override = 0;
749  virtual void redo(EditData*) override = 0;
750  };
751 
752 //---------------------------------------------------------
753 // RemoveMeasures
754 //---------------------------------------------------------
755 
757 
758  public:
760  virtual void undo(EditData*) override { insertMeasures(); }
761  virtual void redo(EditData*) override { removeMeasures(); }
762  UNDO_NAME("RemoveMeasures")
763  };
764 
765 //---------------------------------------------------------
766 // InsertMeasures
767 //---------------------------------------------------------
768 
770 
771  public:
773  virtual void redo(EditData*) override { insertMeasures(); }
774  virtual void undo(EditData*) override { removeMeasures(); }
775  UNDO_NAME("InsertMeasures")
776  };
777 
778 //---------------------------------------------------------
779 // AddExcerpt
780 //---------------------------------------------------------
781 
782 class AddExcerpt : public UndoCommand {
784 
785  public:
786  AddExcerpt(Excerpt* ex) : excerpt(ex) {}
787  virtual void undo(EditData*) override;
788  virtual void redo(EditData*) override;
789  UNDO_NAME("AddExcerpt")
790  };
791 
792 //---------------------------------------------------------
793 // RemoveExcerpt
794 //---------------------------------------------------------
795 
796 class RemoveExcerpt : public UndoCommand {
798 
799  public:
800  RemoveExcerpt(Excerpt* ex) : excerpt(ex) {}
801  virtual void undo(EditData*) override;
802  virtual void redo(EditData*) override;
803  UNDO_NAME("RemoveExcerpt")
804  };
805 
806 //---------------------------------------------------------
807 // SwapExcerpt
808 //---------------------------------------------------------
809 
810 class SwapExcerpt : public UndoCommand {
812  int pos1;
813  int pos2;
814 
815  void flip(EditData*) override;
816 
817  public:
818  SwapExcerpt(MasterScore* s, int p1, int p2) : score(s), pos1(p1), pos2(p2) {}
819  UNDO_NAME("SwapExcerpt")
820  };
821 
822 //---------------------------------------------------------
823 // ChangeExcerptTitle
824 //---------------------------------------------------------
825 
828  QString title;
829 
830  void flip(EditData*) override;
831 
832  public:
833  ChangeExcerptTitle(Excerpt* x, const QString& t) : excerpt(x), title(t) {}
834  UNDO_NAME("ChangeExcerptTitle")
835  };
836 
837 //---------------------------------------------------------
838 // ChangeBend
839 //---------------------------------------------------------
840 
841 class ChangeBend : public UndoCommand {
843  QList<PitchValue> points;
844 
845  void flip(EditData*) override;
846 
847  public:
848  ChangeBend(Bend* b, QList<PitchValue> p) : bend(b), points(p) {}
849  UNDO_NAME("ChangeBend")
850  };
851 
852 //---------------------------------------------------------
853 // ChangeTremoloBar
854 //---------------------------------------------------------
855 
858  QList<PitchValue> points;
859 
860  void flip(EditData*) override;
861 
862  public:
863  ChangeTremoloBar(TremoloBar* b, QList<PitchValue> p) : bend(b), points(p) {}
864  UNDO_NAME("ChangeTremoloBar")
865  };
866 
867 //---------------------------------------------------------
868 // ChangeNoteEvents
869 //---------------------------------------------------------
870 
872  //Chord* chord;
873  QList<NoteEvent*> events;
874 
875  void flip(EditData*) override;
876 
877  public:
878  ChangeNoteEvents(Chord* /*n*/, const QList<NoteEvent*>& l) : /*chord(n),*/ events(l) {}
879  UNDO_NAME("ChangeNoteEvents")
880  };
881 
882 //---------------------------------------------------------
883 // ChangeNoteEventList
884 //---------------------------------------------------------
885 
890 
891  void flip(EditData*) override;
892 
893  public:
895  note(n), newEvents(ne), newPetype(PlayEventType::User) {}
896  UNDO_NAME("ChangeNoteEventList")
897  };
898 
899 //---------------------------------------------------------
900 // ChangeChordPlayEventType
901 //---------------------------------------------------------
902 
906  QList<NoteEventList> events;
907 
908  void flip(EditData*) override;
909 
910  public:
911  ChangeChordPlayEventType(Chord* c, Ms::PlayEventType pet) : chord(c), petype(pet) { events = c->getNoteEventLists(); }
912  UNDO_NAME("ChangeChordPlayEventType")
913  };
914 
915 //---------------------------------------------------------
916 // ChangeInstrument
917 // change instrument in an InstrumentChange element
918 //---------------------------------------------------------
919 
923 
924  void flip(EditData*) override;
925 
926  public:
927  ChangeInstrument(InstrumentChange* _is, Instrument* i) : is(_is), instrument(i) {}
928  UNDO_NAME("ChangeInstrument")
929  };
930 
931 extern void updateNoteLines(Segment*, int track);
932 
933 //---------------------------------------------------------
934 // SwapCR
935 //---------------------------------------------------------
936 
937 class SwapCR : public UndoCommand {
940 
941  void flip(EditData*) override;
942 
943  public:
944  SwapCR(ChordRest* a, ChordRest* b) : cr1(a), cr2(b) {}
945  UNDO_NAME("SwapCR")
946  };
947 
948 //---------------------------------------------------------
949 // ChangeClefType
950 //---------------------------------------------------------
951 
952 class ChangeClefType : public UndoCommand {
956  void flip(EditData*) override;
957 
958  public:
960  UNDO_NAME("ChangeClef")
961  };
962 
963 //---------------------------------------------------------
964 // MoveStaff
965 //---------------------------------------------------------
966 #if 0 // commented out in mscore/instrwidget.cpp, not used anywhere else
967 class MoveStaff : public UndoCommand {
968  Staff* staff;
969  Part* part;
970  int rstaff;
971 
972  void flip(EditData*) override;
973 
974  public:
975  MoveStaff(Staff* s, Part* p, int idx) : staff(s), part(p), rstaff(idx) {}
976  UNDO_NAME("MoveStaff")
977  };
978 #endif
979 
980 //---------------------------------------------------------
981 // ChangeProperty
982 //---------------------------------------------------------
983 
984 class ChangeProperty : public UndoCommand {
985  protected:
988  QVariant property;
990 
991  void flip(EditData*) override;
992 
993  public:
995  : element(e), id(i), property(v), flags(ps) {}
996  Pid getId() const { return id; }
997  ScoreElement* getElement() const { return element; }
998  QVariant data() const { return property; }
999  UNDO_NAME("ChangeProperty")
1000  };
1001 
1002 //---------------------------------------------------------
1003 // ChangeBracketProperty
1004 //---------------------------------------------------------
1005 
1008  int level;
1009 
1010  void flip(EditData*) override;
1011 
1012  public:
1013  ChangeBracketProperty(Staff* s, int l, Pid i, const QVariant& v, PropertyFlags ps = PropertyFlags::NOSTYLE)
1014  : ChangeProperty(nullptr, i, v, ps), staff(s), level(l) {}
1015  UNDO_NAME("ChangeBracketProperty")
1016  };
1017 
1018 //---------------------------------------------------------
1019 // ChangeMetaText
1020 //---------------------------------------------------------
1021 
1022 class ChangeMetaText : public UndoCommand {
1024  QString id;
1025  QString text;
1026 
1027  void flip(EditData*) override;
1028 
1029  public:
1030  ChangeMetaText(Score* s, const QString& i, const QString& t) : score(s), id(i), text(t) {}
1031  UNDO_NAME("ChangeMetaText")
1032  };
1033 
1034 //---------------------------------------------------------
1035 // ChangeSynthesizerState
1036 //---------------------------------------------------------
1037 
1041 
1042  void flip(EditData*) override;
1043 
1044  public:
1045  ChangeSynthesizerState(Score* s, const SynthesizerState& st) : score(s), state(st) {}
1046  UNDO_NAME("ChangeSynthesizerState")
1047  };
1048 
1049 //---------------------------------------------------------
1050 // RemoveBracket
1051 //---------------------------------------------------------
1052 
1053 class RemoveBracket : public UndoCommand {
1055  int level;
1057  int span;
1058 
1059  virtual void undo(EditData*) override;
1060  virtual void redo(EditData*) override;
1061 
1062  public:
1063  RemoveBracket(Staff* s, int l, BracketType t, int sp) : staff(s), level(l), type(t), span(sp) {}
1064  UNDO_NAME("RemoveBracket")
1065  };
1066 
1067 //---------------------------------------------------------
1068 // AddBracket
1069 //---------------------------------------------------------
1070 
1071 class AddBracket : public UndoCommand {
1073  int level;
1075  int span;
1076 
1077  virtual void undo(EditData*) override;
1078  virtual void redo(EditData*) override;
1079 
1080  public:
1081  AddBracket(Staff* s, int l, BracketType t, int sp) : staff(s), level(l), type(t), span(sp) {}
1082  UNDO_NAME("AddBracket")
1083  };
1084 
1085 //---------------------------------------------------------
1086 // ChangeSpannerElements
1087 //---------------------------------------------------------
1088 
1093 
1094  void flip(EditData*) override;
1095 
1096  public:
1098  : spanner(s), startElement(se), endElement(ee) {}
1099  UNDO_NAME("ChangeSpannerElements")
1100  };
1101 
1102 //---------------------------------------------------------
1103 // ChangeParent
1104 //---------------------------------------------------------
1105 
1106 class ChangeParent : public UndoCommand {
1110 
1111  void flip(EditData*) override;
1112 
1113  public:
1114  ChangeParent(Element* e, Element* p, int si) : element(e), parent(p), staffIdx(si) {}
1115  UNDO_NAME("ChangeParent")
1116  };
1117 
1118 //---------------------------------------------------------
1119 // ChangeMMRest
1120 //---------------------------------------------------------
1121 
1122 class ChangeMMRest : public UndoCommand {
1125 
1126  void flip(EditData*) override;
1127 
1128  public:
1129  ChangeMMRest(Measure* _m, Measure* _mmr) : m(_m), mmrest(_mmr) {}
1130  UNDO_NAME("ChangeMMRest")
1131  };
1132 
1133 //---------------------------------------------------------
1134 // InsertTime
1135 //---------------------------------------------------------
1136 
1137 class InsertTime : public UndoCommand {
1141 
1142  void redo(EditData*) override;
1143  void undo(EditData*) override;
1144 
1145  public:
1146  InsertTime(Score* _score, const Fraction& _tick, const Fraction& _len)
1147  : score(_score), tick(_tick), len(_len) {}
1148  UNDO_NAME("InsertTime")
1149  };
1150 
1151 //---------------------------------------------------------
1152 // InsertTimeUnmanagedSpanner
1153 //---------------------------------------------------------
1154 
1159 
1160  void flip(EditData*) override;
1161 
1162  public:
1163  InsertTimeUnmanagedSpanner(Score* s, const Fraction& _tick, const Fraction& _len)
1164  : score(s), tick(_tick), len(_len) {}
1165  UNDO_NAME("InsertTimeUnmanagedSpanner")
1166  };
1167 
1168 //---------------------------------------------------------
1169 // ChangeNoteEvent
1170 //---------------------------------------------------------
1171 
1177 
1178  void flip(EditData*) override;
1179 
1180  public:
1182  : note(n), oldEvent(oe), newEvent(ne), newPetype(PlayEventType::User) {}
1183  UNDO_NAME("ChangeNoteEvent")
1184  };
1185 
1186 //---------------------------------------------------------
1187 // LinkUnlink
1188 //---------------------------------------------------------
1189 
1190 class LinkUnlink : public UndoCommand {
1191  bool mustDelete { false };
1192 
1193  protected:
1196 
1197  void link();
1198  void unlink();
1199 
1200  public:
1202  ~LinkUnlink();
1203  };
1204 
1205 //---------------------------------------------------------
1206 // Unlink
1207 //---------------------------------------------------------
1208 
1209 class Unlink : public LinkUnlink {
1210  public:
1211  Unlink(ScoreElement*);
1212  virtual void undo(EditData*) override { link(); }
1213  virtual void redo(EditData*) override { unlink(); }
1214  UNDO_NAME("Unlink")
1215  };
1216 
1217 //---------------------------------------------------------
1218 // Link
1219 //---------------------------------------------------------
1220 
1221 class Link : public LinkUnlink {
1222  public:
1224  virtual void undo(EditData*) override { unlink(); }
1225  virtual void redo(EditData*) override { link(); }
1226  UNDO_NAME("Link")
1227  };
1228 
1229 //---------------------------------------------------------
1230 // ChangeStartEndSpanner
1231 //---------------------------------------------------------
1232 
1237 
1238  void flip(EditData*) override;
1239 
1240  public:
1241  ChangeStartEndSpanner(Spanner* sp, Element*s, Element*e) : spanner(sp), start(s), end(e) {}
1242  UNDO_NAME("ChangeStartEndSpanner")
1243  };
1244 
1245 //---------------------------------------------------------
1246 // ChangeMetaTags
1247 //---------------------------------------------------------
1248 
1249 class ChangeMetaTags : public UndoCommand {
1251  QMap<QString,QString> metaTags;
1252 
1253  void flip(EditData*) override;
1254 
1255  public:
1256  ChangeMetaTags(Score* s, const QMap<QString,QString>& m) : score(s), metaTags(m) {}
1257  UNDO_NAME("ChangeMetaTags")
1258  };
1259 
1260 //---------------------------------------------------------
1261 // ChangeDrumset
1262 //---------------------------------------------------------
1263 
1264 class ChangeDrumset : public UndoCommand {
1267 
1268  void flip(EditData*) override;
1269 
1270  public:
1271  ChangeDrumset(Instrument* i, const Drumset* d) : instrument(i), drumset(*d) {}
1272  UNDO_NAME("ChangeDrumset")
1273  };
1274 
1275 //---------------------------------------------------------
1276 // FretDot
1277 //---------------------------------------------------------
1278 
1279 class FretDot : public UndoCommand {
1281  int string;
1282  int fret;
1283  bool add;
1286 
1287  void redo(EditData*) override;
1288  void undo(EditData*) override;
1289 
1290  public:
1291  FretDot(FretDiagram* d, int _string, int _fret, bool _add = false, FretDotType _dtype = FretDotType::NORMAL)
1292  : diagram(d), string(_string), fret(_fret), add(_add), dtype(_dtype) {}
1293  UNDO_NAME("FretDot")
1294  };
1295 
1296 //---------------------------------------------------------
1297 // FretMarker
1298 //---------------------------------------------------------
1299 
1300 class FretMarker : public UndoCommand {
1302  int string;
1305 
1306  void redo(EditData*) override;
1307  void undo(EditData*) override;
1308 
1309  public:
1310  FretMarker(FretDiagram* d, int _string, FretMarkerType _mtype) : diagram(d), string(_string), mtype(_mtype) {}
1311  UNDO_NAME("FretMarker")
1312  };
1313 
1314 //---------------------------------------------------------
1315 // FretBarre
1316 //---------------------------------------------------------
1317 
1318 class FretBarre : public UndoCommand {
1320  int string;
1321  int fret;
1322  bool add;
1324 
1325  void redo(EditData*) override;
1326  void undo(EditData*) override;
1327 
1328  public:
1329  FretBarre(FretDiagram* d, int _string, int _fret, bool _add = false) : diagram(d), string(_string), fret(_fret), add(_add) {}
1330  UNDO_NAME("FretBarre")
1331  };
1332 
1333 //---------------------------------------------------------
1334 // FretClear
1335 //---------------------------------------------------------
1336 
1337 class FretClear : public UndoCommand {
1340 
1341  void redo(EditData*) override;
1342  void undo(EditData*) override;
1343 
1344  public:
1345  FretClear(FretDiagram* d) : diagram(d) {}
1346  UNDO_NAME("FretClear")
1347  };
1348 
1349 //---------------------------------------------------------
1350 // MoveTremolo
1351 //---------------------------------------------------------
1352 
1353 class MoveTremolo : public UndoCommand {
1358  int track;
1359 
1362 
1363  void undo(EditData*) override;
1364  void redo(EditData*) override;
1365 
1366  public:
1367  MoveTremolo(Score* s, Fraction c1, Fraction c2, Tremolo* tr, int t) : score(s), chord1Tick(c1), chord2Tick(c2), trem(tr), track(t) {}
1368  UNDO_NAME("MoveTremolo")
1369  };
1370 
1371 } // namespace Ms
1372 #endif
ChangeNoteEventList(Ms::Note *n, NoteEventList &ne)
Definition: undo.h:894
SelectionInfo redoSelectionInfo
Definition: undo.h:137
QMap< QString, QString > metaTags
Definition: undo.h:1251
QString text
Definition: undo.h:1025
Definition: undo.h:1172
ChordRest * cr1
Definition: undo.h:938
MasterScore * score
Definition: undo.h:811
int strack
Definition: undo.h:448
bool cutaway
Definition: undo.h:600
int ridx
Definition: undo.h:227
bool isValid() const
Definition: undo.h:131
Definition: select.h:136
Score * score
Definition: undo.h:647
int state() const
Definition: undo.h:179
Fraction tick
Definition: undo.h:481
Chord * oldC1
Definition: undo.h:1360
InsertTime(Score *_score, const Fraction &_tick, const Fraction &_len)
Definition: undo.h:1146
PropertyFlags flags
Definition: undo.h:989
Definition: midipatch.h:29
int string
Definition: undo.h:354
Global staff data not directly related to drawing.
Definition: staff.h:62
Definition: undo.h:705
Pid getId() const
Definition: undo.h:996
int nextState
Definition: undo.h:160
bool canRedo() const
Definition: undo.h:178
Pid
Definition: property.h:62
QList< int > list
Definition: undo.h:321
Virtual base class for Measure, HBox and VBox.
Definition: measurebase.h:61
bool hideSystemBarLine
Definition: undo.h:601
Definition: undo.h:769
ChangeSynthesizerState(Score *s, const SynthesizerState &st)
Definition: undo.h:1045
PlayEventType newPetype
Definition: undo.h:1176
int otrack
Definition: undo.h:449
InsertMeasures(MeasureBase *m1, MeasureBase *m2)
Definition: undo.h:772
KeySigEvent ks
Definition: undo.h:371
Fretboard diagram.
Definition: fret.h:122
Definition: noteevent.h:25
virtual void undo(EditData *) override
Definition: undo.h:774
ChangeExcerptTitle(Excerpt *x, const QString &t)
Definition: undo.h:833
bool empty() const
Definition: undo.h:148
Definition: undo.h:123
Per staff values of measure.
Definition: measure.cpp:90
MStyle style
Definition: undo.h:648
int track
Definition: undo.h:1358
Segment * d
Definition: undo.h:447
AddExcerpt(Excerpt *ex)
Definition: undo.h:786
bool showIfEmpty
Definition: undo.h:599
InsertTimeUnmanagedSpanner(Score *s, const Fraction &_tick, const Fraction &_len)
Definition: undo.h:1163
Clef * clef
Definition: undo.h:953
Part * part
Definition: undo.h:465
Definition: undo.h:1038
SelectionInfo undoSelectionInfo
Definition: undo.h:136
Fraction tick
Definition: undo.h:466
int val2
Definition: undo.h:430
SwapCR(ChordRest *a, ChordRest *b)
Definition: undo.h:944
QList< NoteEventList > getNoteEventLists()
Definition: chord.cpp:3604
Pid id
Definition: undo.h:987
Definition: undo.h:630
Virtual base class for slurs, ties, lines etc.
Definition: spanner.h:136
int fret
Definition: undo.h:1282
Definition: undo.h:195
Measure * measure
Definition: undo.h:288
Excerpt * excerpt
Definition: undo.h:783
Score * score
Definition: undo.h:320
Definition: scoreElement.h:146
Definition: undo.h:351
BracketType type
Definition: undo.h:1056
bool stemless
Definition: undo.h:724
RemoveMeasures(MeasureBase *m1, MeasureBase *m2)
Definition: undo.h:759
Staff * staff
Definition: undo.h:594
FretDiagram * diagram
Definition: undo.h:1338
one measure in a system
Definition: measure.h:65
Definition: score.h:1227
ChangeMetaText(Score *s, const QString &i, const QString &t)
Definition: undo.h:1030
int idx
Definition: undo.h:274
Channel * channel
Definition: undo.h:578
virtual void redo(EditData *) override
Definition: undo.h:761
Definition: tremolo.h:39
UndoMacro * last() const
Definition: undo.h:184
Definition: scoreElement.h:173
Fraction tick
Definition: undo.h:1139
Definition: undo.h:369
bool linked
Definition: undo.h:450
Definition: undo.h:1071
Definition: undo.h:287
NoteEventList newEvents
Definition: undo.h:888
Measure * measure
Definition: undo.h:387
Fraction chord1Tick
Definition: undo.h:1355
Definition: undo.h:593
MStaff * mstaff
Definition: undo.h:257
Fraction tickStart
Definition: undo.h:126
FretDot(FretDiagram *d, int _string, int _fret, bool _add=false, FretDotType _dtype=FretDotType::NORMAL)
Definition: undo.h:1291
Base class of score layout elements.
Definition: element.h:158
Part * part
Definition: undo.h:211
ClefType transposingClef
Definition: undo.h:955
Definition: undo.h:1249
Definition: instrument.h:250
InstrumentChange * is
Definition: undo.h:921
RemoveBracket(Staff *s, int l, BracketType t, int sp)
Definition: undo.h:1063
QList< StaffName > text
Definition: undo.h:482
Element * endElement
Definition: undo.h:1092
Measure * measure
Definition: undo.h:256
Text * text
Definition: undo.h:543
Instrument * instrument
Definition: undo.h:922
bool isClean() const
Definition: undo.h:180
Tremolo * trem
Definition: undo.h:1357
Graphic representation of a clef.
Definition: clef.h:132
int a
Definition: undo.h:305
int pos1
Definition: undo.h:812
int b
Definition: undo.h:290
Score * score
Definition: undo.h:1354
Definition: clef.h:81
QList< UndoCommand * > childList
Definition: undo.h:97
ChangeNoteEvent(Note *n, NoteEvent *oe, const NoteEvent &ne)
Definition: undo.h:1181
QList< StaffName > text
Definition: undo.h:467
int pageOffset
Definition: undo.h:678
HideMode
Definition: staff.h:64
InsertRemoveMeasures(MeasureBase *_fm, MeasureBase *_lm)
Definition: undo.h:747
NoteEvent * oldEvent
Definition: undo.h:1174
Note::ValueType veloType
Definition: undo.h:707
virtual void flip(EditData *)
Definition: undo.h:100
Staff::HideMode hideMode
Definition: undo.h:598
Score * score
Definition: undo.h:561
bool visible
Definition: undo.h:723
int level
Definition: undo.h:1073
Definition: undo.h:542
bool canUndo() const
Definition: undo.h:177
InputState undoInputState
Definition: undo.h:134
int staffIdx
Definition: undo.h:1109
Part * part
Definition: undo.h:480
int idx
Definition: undo.h:212
QList< NoteEvent * > events
Definition: undo.h:873
Fraction len
Definition: undo.h:1158
Measure * m
Definition: undo.h:1123
Instrument * instrument
Definition: undo.h:1265
Definition: undo.h:1053
FretDiagram * diagram
Definition: undo.h:1319
ChordRest * cr2
Definition: undo.h:939
Score * score
Definition: undo.h:1138
Definition: score.h:391
Measure * measure
Definition: undo.h:304
Staff * staff
Definition: undo.h:616
Score * score
Definition: undo.h:139
Note * note
Definition: undo.h:706
NoteEvent newEvent
Definition: undo.h:1175
PlayEventType
Determines whether oranaments are automatically generated when playing a score and whether the PlayEv...
Definition: types.h:489
int idx
Definition: undo.h:197
Definition: undo.h:1233
Score * score
Definition: undo.h:1156
Definition: noteevent.h:53
Definition: undo.h:952
ChangeInstrument(InstrumentChange *_is, Instrument *i)
Definition: undo.h:927
Note * note
Definition: undo.h:336
Definition: synthesizerstate.h:55
PropertyFlags
Definition: property.h:54
Element * end
Definition: undo.h:1236
Score * score
Definition: undo.h:1023
Sid idx
Definition: undo.h:662
ChangeSpannerElements(Spanner *s, Element *se, Element *ee)
Definition: undo.h:1097
QList< int > rlist
Definition: undo.h:322
Element * element
Definition: undo.h:1107
Spanner * spanner
Definition: undo.h:1234
ChangeDrumset(Instrument *i, const Drumset *d)
Definition: undo.h:1271
Definition: bracket.h:29
Measure * measure
Definition: undo.h:721
QString title
Definition: undo.h:828
int ridx
Definition: undo.h:242
void updateNoteLines(Segment *segment, int track)
Definition: undo.cpp:92
ChangeBracketProperty(Staff *s, int l, Pid i, const QVariant &v, PropertyFlags ps=PropertyFlags::NOSTYLE)
Definition: undo.h:1013
Note * note
Definition: undo.h:352
int pos2
Definition: undo.h:813
int span
Definition: undo.h:1057
Definition: drumset.h:68
bool active() const
Definition: undo.h:170
Segment * sf
Definition: undo.h:445
Fraction tick
Definition: undo.h:1157
Definition: fret.h:97
QList< UndoMacro * > list
Definition: undo.h:158
QList< PitchValue > points
Definition: undo.h:843
int veloOffset
Definition: undo.h:708
Definition: undo.h:444
int string
Definition: undo.h:1320
Element * getElement() const
Definition: undo.h:518
Definition: undo.h:720
FretDiagram * diagram
Definition: undo.h:1280
Element * parent
Definition: undo.h:1108
Fraction len
Definition: undo.h:1140
Element * newElement
Definition: undo.h:402
FretBarre(FretDiagram *d, int _string, int _fret, bool _add=false)
Definition: undo.h:1329
FretMarkerType
Definition: fret.h:34
Definition: undo.h:210
ChordRest * chordRest
Definition: undo.h:692
ChangeTremoloBar(TremoloBar *b, QList< PitchValue > p)
Definition: undo.h:863
Definition: bend.h:27
Definition: undo.h:1318
Definition: undo.h:386
int getCurIdx() const
Definition: undo.h:181
const QList< UndoCommand * > & commands() const
Definition: undo.h:110
LayoutMode
Definition: score.h:129
int childCount() const
Definition: undo.h:108
Ms::PlayEventType petype
Definition: undo.h:905
void appendChild(UndoCommand *cmd)
Definition: undo.h:106
Definition: tremolobar.h:29
int fret
Definition: undo.h:355
Definition: undo.h:1264
Definition: input.h:42
Element * startElement
Definition: undo.h:1091
RemoveExcerpt(Excerpt *ex)
Definition: undo.h:800
Definition: undo.h:826
ChangePageNumberOffset(Score *s, int po)
Definition: undo.h:683
The KeySig class represents a Key Signature on a staff.
Definition: keysig.h:31
ChangeChordPlayEventType(Chord *c, Ms::PlayEventType pet)
Definition: undo.h:911
QString id
Definition: undo.h:1024
int staffIdx
Definition: undo.h:722
Measure * mmrest
Definition: undo.h:1124
std::vector< Element * > elements
Definition: undo.h:125
virtual void redo(EditData *) override
Definition: undo.h:773
Element * element
Definition: undo.h:510
Definition: undo.h:856
Definition: undo.h:560
Definition: key.h:95
Drumset drumset
Definition: undo.h:1266
Definition: undo.h:428
QString partName
Definition: undo.h:633
FretUndoData undoData
Definition: undo.h:1304
Definition: undo.h:676
Staff * staff
Definition: undo.h:1054
Definition: undo.h:691
bool add
Definition: undo.h:1322
int span
Definition: undo.h:1075
Definition: undo.h:810
Definition: undo.h:509
Fraction lTick
Definition: undo.h:446
QVariant property
Definition: undo.h:988
Definition: segment.h:50
Definition: undo.h:1122
FretClear(FretDiagram *d)
Definition: undo.h:1345
Fraction tickEnd
Definition: undo.h:127
Harmony * harmony
Definition: undo.h:415
FretMarkerType mtype
Definition: undo.h:1303
#define UNDO_NAME(a)
Definition: undo.h:88
FretUndoData undoData
Definition: undo.h:1285
ChangeStyleVal(Score *s, Sid i, const QVariant &v)
Definition: undo.h:668
int pitch
Definition: undo.h:337
Definition: aeolus.cpp:26
Definition: undo.h:756
FretDotType dtype
Definition: undo.h:1284
int string
Definition: undo.h:1302
ChangeNoteEvents(Chord *, const QList< NoteEvent *> &l)
Definition: undo.h:878
Definition: undo.h:841
Definition: undo.h:1300
Sid
Definition: style.h:33
Definition: stafftype.h:173
Definition: undo.h:903
bool empty() const
Definition: undo.h:182
int tpc1
Definition: undo.h:356
Definition: undo.h:984
Definition: undo.h:1137
Definition: undo.h:124
Staff * staff
Definition: undo.h:241
AddBracket(Staff *s, int l, BracketType t, int sp)
Definition: undo.h:1081
Definition: undo.h:615
UndoMacro * curCmd
Definition: undo.h:157
ScoreElement * getElement() const
Definition: undo.h:997
int cleanState
Definition: undo.h:161
SynthesizerState state
Definition: undo.h:1040
ChangePatch(Score *s, Channel *c, const MidiPatch *pt)
Definition: undo.h:568
Definition: undo.h:527
Definition: undo.h:886
Spanner * spanner
Definition: undo.h:1090
bool add
Definition: undo.h:1283
MStaff * mstaff
Definition: undo.h:273
Excerpt * excerpt
Definition: undo.h:827
ChangeParent(Element *e, Element *p, int si)
Definition: undo.h:1114
Fraction chord2Tick
Definition: undo.h:1356
Ms::Chord * chord
Definition: undo.h:904
Q_DECLARE_LOGGING_CATEGORY(undoRedo)
Definition: undo.h:1006
FretDiagram * diagram
Definition: undo.h:1301
Excerpt * excerpt
Definition: undo.h:797
Definition: undo.h:736
FretMarker(FretDiagram *d, int _string, FretMarkerType _mtype)
Definition: undo.h:1310
bool invisible
Definition: undo.h:595
Graphic representation of a chord.
Definition: chord.h:55
Staff * staff
Definition: undo.h:226
ChangeStaffType(Staff *s, const StaffType &t)
Definition: undo.h:622
Definition: undo.h:782
Definition: harmony.h:72
MoveTremolo(Score *s, Fraction c1, Fraction c2, Tremolo *tr, int t)
Definition: undo.h:1367
Definition: undo.h:156
Definition: chordrest.h:48
ValueType
Definition: note.h:215
ChangeStartEndSpanner(Spanner *sp, Element *s, Element *e)
Definition: undo.h:1241
KeySig * keysig
Definition: undo.h:370
int tpc2
Definition: undo.h:357
Definition: undo.h:414
Part * part
Definition: undo.h:196
Definition of classes Note and NoteHead.
Definition of classes Chord, HelpLine and NoteList.
Definition: element.h:111
TremoloBar * bend
Definition: undo.h:857
Channel * channel
Definition: undo.h:562
BracketType
Definition: mscore.h:107
int staffMove
Definition: undo.h:693
Definition: instrument.h:100
Score * score
Definition: undo.h:1250
Measure * measure
Definition: undo.h:429
int tpc2
Definition: undo.h:339
MidiPatch patch
Definition: undo.h:563
Definition: excerpt.h:34
Definition: undo.h:479
Chord * oldC2
Definition: undo.h:1361
MeasureBase * lm
Definition: undo.h:738
Staff * staff
Definition: undo.h:1007
Definition: undo.h:577
FretUndoData undoData
Definition: undo.h:1323
qreal userDist
Definition: undo.h:597
Definition: undo.h:255
Bracket * bracket
Definition: undo.h:496
Definition: undo.h:796
Definition: undo.h:660
int a
Definition: undo.h:289
QList< NoteEventList > events
Definition: undo.h:906
int pitch
Definition: undo.h:353
int level
Definition: undo.h:1055
Definition: undo.h:495
ChangeMetaTags(Score *s, const QMap< QString, QString > &m)
Definition: undo.h:1256
Definition: instrchange.h:25
Definition: undo.h:1337
int rootTpc
Definition: undo.h:416
MeasureBase * fm
Definition: undo.h:737
Graphic representation of a note.
Definition: note.h:212
FretDotType
Definition: fret.h:26
Part * part
Definition: undo.h:631
ChangeProperty(ScoreElement *e, Pid i, const QVariant &v, PropertyFlags ps=PropertyFlags::NOSTYLE)
Definition: undo.h:994
UndoCommand * removeChild()
Definition: undo.h:107
ClefType
Definition: clef.h:37
Definition: fraction.h:46
Definition: undo.h:303
int b
Definition: undo.h:306
Definition: undo.h:1279
Ms::Note * note
Definition: undo.h:887
int curIdx
Definition: undo.h:162
Definition: undo.h:1353
ClefType concertClef
Definition: undo.h:954
QString oldText
Definition: undo.h:544
std::vector< int > stateList
Definition: undo.h:159
Some play events are modified by user.
Definition: undo.h:920
BracketType type
Definition: undo.h:497
FretUndoData undoData
Definition: undo.h:1339
Fraction len
Definition: undo.h:388
Definition: undo.h:225
Definition: undo.h:400
StaffType staffType
Definition: undo.h:617
Definition: undo.h:646
Definition: undo.h:1089
bool showCourtesy
Definition: undo.h:372
Bend * bend
Definition: undo.h:842
int fret
Definition: undo.h:1321
Instrument * instrument
Definition: undo.h:632
QList< PitchValue > points
Definition: undo.h:858
Score * score
Definition: undo.h:661
Definition: undo.h:319
PlayEventType newPetype
Definition: undo.h:889
int level
Definition: undo.h:1008
Definition: undo.h:335
int idx
Definition: undo.h:258
Element * start
Definition: undo.h:1235
BracketType type
Definition: undo.h:1074
Definition: undo.h:1155
Definition: part.h:47
Score * score
Definition: undo.h:677
Definition: undo.h:1022
Staff * staff
Definition: undo.h:1072
Definition: text.h:24
SetUserBankController(Channel *c, bool v)
Definition: undo.h:584
EditText(Text *t, const QString &ot, int)
Definition: undo.h:550
virtual const char * name() const
Definition: undo.h:113
ClefTypeList clefType
Definition: undo.h:596
QVariant value
Definition: undo.h:663
Definition: undo.h:1106
int string
Definition: undo.h:1281
Definition: undo.h:271
ChangeMMRest(Measure *_m, Measure *_mmr)
Definition: undo.h:1129
ChangeBend(Bend *b, QList< PitchValue > p)
Definition: undo.h:848
QVariant data() const
Definition: undo.h:998
bool val
Definition: undo.h:579
Definition: undo.h:871
Score * score
Definition: undo.h:1039
Definition: undo.h:937
Definition: undo.h:96
Measure * measure
Definition: undo.h:272
ScoreElement * element
Definition: undo.h:986
Element * element
Definition: undo.h:528
UndoMacro * current() const
Definition: undo.h:183
int tpc1
Definition: undo.h:338
virtual void undo(EditData *) override
Definition: undo.h:760
Definition: style.h:1293
Note * note
Definition: undo.h:1173
Definition of class Staff.
Definition: undo.h:464
SwapExcerpt(MasterScore *s, int p1, int p2)
Definition: undo.h:818
int staff
Definition: undo.h:431
Element * oldElement
Definition: undo.h:401
Definition: undo.h:240
Definition: channel.h:23
bool evtInStaff
Definition: undo.h:373
InputState redoInputState
Definition: undo.h:135