79 class InstrumentChange;
88 #define UNDO_NAME(a) virtual const char* name() const override { return a; } 110 const QList<UndoCommand*>&
commands()
const {
return childList; }
111 virtual void cleanup(
bool undo);
113 virtual const char*
name()
const {
return "UndoCommand"; }
131 bool isValid()
const {
return !elements.empty() || staffStart != -1; }
146 virtual void undo(
EditData*)
override;
147 virtual void redo(
EditData*)
override;
148 bool empty()
const {
return childCount() == 0; }
164 void remove(
int idx);
170 bool active()
const {
return curCmd != 0; }
171 void beginMacro(
Score*);
172 void endMacro(
bool rollback);
178 bool canRedo()
const {
return curIdx < list.size(); }
179 int state()
const {
return stateList[curIdx]; }
180 bool isClean()
const {
return cleanState == state(); }
182 bool empty()
const {
return !canUndo() && !canRedo(); }
201 virtual void undo(
EditData*)
override;
202 virtual void redo(
EditData*)
override;
216 virtual void undo(
EditData*)
override;
217 virtual void redo(
EditData*)
override;
231 virtual void undo(
EditData*)
override;
232 virtual void redo(
EditData*)
override;
246 virtual void undo(
EditData*)
override;
247 virtual void redo(
EditData*)
override;
262 virtual void undo(
EditData*)
override;
263 virtual void redo(
EditData*)
override;
278 virtual void undo(
EditData*)
override;
279 virtual void redo(
EditData*)
override;
294 virtual void undo(
EditData*)
override;
295 virtual void redo(
EditData*)
override;
310 virtual void undo(
EditData*)
override;
311 virtual void redo(
EditData*)
override;
326 virtual void undo(
EditData*)
override;
327 virtual void redo(
EditData*)
override;
435 virtual void undo(
EditData*)
override;
436 virtual void redo(
EditData*)
override;
455 virtual void undo(
EditData*)
override;
456 virtual void redo(
EditData*)
override;
486 const QList<StaffName>& longNames()
const;
512 void endUndoRedo(
bool)
const;
519 virtual void cleanup(
bool);
520 virtual const char* name()
const override;
532 virtual void undo(
EditData*)
override;
533 virtual void redo(
EditData*)
override;
534 virtual void cleanup(
bool);
535 virtual const char* name()
const override;
551 virtual void undo(
EditData*)
override;
552 virtual void redo(
EditData*)
override;
569 : score(s), channel(c), patch(*pt) {}
585 : channel(c), val(v) {}
607 bool _showIfEmpty,
bool _cutaway,
bool hide);
740 static std::vector<Clef*> getCourtesyClefs(
Measure* m);
743 void removeMeasures();
744 void insertMeasures();
748 virtual void undo(
EditData*)
override = 0;
749 virtual void redo(
EditData*)
override = 0;
787 virtual void undo(
EditData*)
override;
788 virtual void redo(
EditData*)
override;
801 virtual void undo(
EditData*)
override;
802 virtual void redo(
EditData*)
override;
966 #if 0 // commented out in mscore/instrwidget.cpp, not used anywhere else 975 MoveStaff(
Staff* s,
Part* p,
int idx) : staff(s), part(p), rstaff(idx) {}
995 : element(e), id(i), property(v), flags(ps) {}
998 QVariant
data()
const {
return property; }
1059 virtual void undo(
EditData*)
override;
1060 virtual void redo(
EditData*)
override;
1077 virtual void undo(
EditData*)
override;
1078 virtual void redo(
EditData*)
override;
1098 : spanner(s), startElement(se), endElement(ee) {}
1147 : score(_score), tick(_tick), len(_len) {}
1164 : score(s), tick(_tick), len(_len) {}
1191 bool mustDelete {
false };
1292 : diagram(d), string(_string), fret(_fret), add(_add), dtype(_dtype) {}
1329 FretBarre(
FretDiagram* d,
int _string,
int _fret,
bool _add =
false) : diagram(d), string(_string), fret(_fret), add(_add) {}
ChangeNoteEventList(Ms::Note *n, NoteEventList &ne)
Definition: undo.h:894
SelectionInfo redoSelectionInfo
Definition: undo.h:137
QString text
Definition: undo.h:1025
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
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
virtual void undo(EditData *) override
Definition: undo.h:1224
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
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
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
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
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
Virtual base class for slurs, ties, lines etc.
Definition: spanner.h:136
int fret
Definition: undo.h:1282
Measure * measure
Definition: undo.h:288
Excerpt * excerpt
Definition: undo.h:783
Score * score
Definition: undo.h:320
Definition: scoreElement.h:146
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
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
UndoMacro * last() const
Definition: undo.h:184
Definition: scoreElement.h:173
virtual void undo(EditData *) override
Definition: undo.h:1212
Fraction tick
Definition: undo.h:1139
bool linked
Definition: undo.h:450
NoteEventList newEvents
Definition: undo.h:888
Measure * measure
Definition: undo.h:387
Fraction chord1Tick
Definition: undo.h:1355
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: 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
virtual void redo(EditData *) override
Definition: undo.h:1225
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
LinkedElements * le
Definition: undo.h:1194
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
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
FretDiagram * diagram
Definition: undo.h:1319
ChordRest * cr2
Definition: undo.h:939
Score * score
Definition: undo.h:1138
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
Score * score
Definition: undo.h:1156
Definition: noteevent.h:53
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
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
bool active() const
Definition: undo.h:170
Segment * sf
Definition: undo.h:445
Fraction tick
Definition: undo.h:1157
QList< UndoMacro * > list
Definition: undo.h:158
virtual void redo(EditData *) override
Definition: undo.h:1213
QList< PitchValue > points
Definition: undo.h:843
int veloOffset
Definition: undo.h:708
int string
Definition: undo.h:1320
Element * getElement() const
Definition: undo.h:518
FretDiagram * diagram
Definition: undo.h:1280
LinkUnlink()
Definition: undo.h:1201
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
ChordRest * chordRest
Definition: undo.h:692
ChangeTremoloBar(TremoloBar *b, QList< PitchValue > p)
Definition: undo.h:863
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
Element * startElement
Definition: undo.h:1091
RemoveExcerpt(Excerpt *ex)
Definition: undo.h:800
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
Drumset drumset
Definition: undo.h:1266
QString partName
Definition: undo.h:633
FretUndoData undoData
Definition: undo.h:1304
Staff * staff
Definition: undo.h:1054
bool add
Definition: undo.h:1322
int span
Definition: undo.h:1075
Fraction lTick
Definition: undo.h:446
QVariant property
Definition: undo.h:988
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
FretDotType dtype
Definition: undo.h:1284
int string
Definition: undo.h:1302
ChangeNoteEvents(Chord *, const QList< NoteEvent *> &l)
Definition: undo.h:878
Sid
Definition: style.h:33
Definition: stafftype.h:173
bool empty() const
Definition: undo.h:182
int tpc1
Definition: undo.h:356
Staff * staff
Definition: undo.h:241
AddBracket(Staff *s, int l, BracketType t, int sp)
Definition: undo.h:1081
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
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)
FretDiagram * diagram
Definition: undo.h:1301
Excerpt * excerpt
Definition: undo.h:797
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
MoveTremolo(Score *s, Fraction c1, Fraction c2, Tremolo *tr, int t)
Definition: undo.h:1367
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
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
Measure * measure
Definition: undo.h:429
int tpc2
Definition: undo.h:339
MidiPatch patch
Definition: undo.h:563
Chord * oldC2
Definition: undo.h:1361
MeasureBase * lm
Definition: undo.h:738
Staff * staff
Definition: undo.h:1007
FretUndoData undoData
Definition: undo.h:1323
qreal userDist
Definition: undo.h:597
Bracket * bracket
Definition: undo.h:496
int a
Definition: undo.h:289
ScoreElement * e
Definition: undo.h:1195
QList< NoteEventList > events
Definition: undo.h:906
int pitch
Definition: undo.h:353
int level
Definition: undo.h:1055
Definition: instrchange.h:25
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
int b
Definition: undo.h:306
Ms::Note * note
Definition: undo.h:887
int curIdx
Definition: undo.h:162
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.
BracketType type
Definition: undo.h:497
FretUndoData undoData
Definition: undo.h:1339
Fraction len
Definition: undo.h:388
StaffType staffType
Definition: undo.h:617
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
PlayEventType newPetype
Definition: undo.h:889
int level
Definition: undo.h:1008
int idx
Definition: undo.h:258
Element * start
Definition: undo.h:1235
BracketType type
Definition: undo.h:1074
Score * score
Definition: undo.h:677
Staff * staff
Definition: undo.h:1072
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
int string
Definition: undo.h:1281
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
Score * score
Definition: undo.h:1039
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
Note * note
Definition: undo.h:1173
Definition of class Staff.
SwapExcerpt(MasterScore *s, int p1, int p2)
Definition: undo.h:818
int staff
Definition: undo.h:431
Element * oldElement
Definition: undo.h:401
bool evtInStaff
Definition: undo.h:373
InputState redoInputState
Definition: undo.h:135