/
property.cpp
655 lines (573 loc) · 50.1 KB
/
property.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "property.h"
#include "style/style.h"
#include "rw/xml.h"
#include "rw/xmlvalue.h"
#include "types/typesconv.h"
#include "accidental.h"
#include "bracket.h"
#include "clef.h"
#include "dynamic.h"
#include "mscore.h"
#include "ottava.h"
#include "tremolo.h"
#include "trill.h"
#include "vibrato.h"
#include "layoutbreak.h"
#include "groups.h"
#include "note.h"
#include "barline.h"
#include "types/symnames.h"
#include "changeMap.h"
#include "fret.h"
using namespace mu;
using namespace mu::engraving;
using namespace mu::engraving::rw;
namespace Ms {
//---------------------------------------------------------
// PropertyMetaData
//---------------------------------------------------------
struct PropertyMetaData {
Pid id; // associated Pid
bool link; // link this property for linked elements
const char* name; // xml name of property
P_TYPE type; // associated P_TYPE
const char* userName; // user-visible name of property
};
//
// always: propertyList[subtype].id == subtype
//
//
//keep this properties untranslatable for now until we put the same strings to all UI elements
#define DUMMY_QT_TR_NOOP(x, y) y
/* *INDENT-OFF* */
static constexpr PropertyMetaData propertyList[] = {
{ Pid::SUBTYPE, false, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "subtype") },
{ Pid::SELECTED, false, "selected", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "selected") },
{ Pid::GENERATED, false, "generated", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "generated") },
{ Pid::COLOR, false, "color", P_TYPE::COLOR, DUMMY_QT_TR_NOOP("propertyName", "color") },
{ Pid::VISIBLE, false, "visible", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "visible") },
{ Pid::Z, false, "z", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "z") },
{ Pid::SMALL, false, "small", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "small") },
{ Pid::SHOW_COURTESY, false, "showCourtesySig", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "show courtesy") },
{ Pid::KEYSIG_MODE, false, "keysig_mode", P_TYPE::KEY_MODE, DUMMY_QT_TR_NOOP("propertyName", "show courtesy") },
{ Pid::SLUR_STYLE_TYPE, false, "lineType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "line type") },
{ Pid::PITCH, true, "pitch", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "pitch") },
{ Pid::TPC1, true, "tpc", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "tonal pitch class") },
{ Pid::TPC2, true, "tpc2", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "tonal pitch class") },
{ Pid::LINE, false, "line", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "line") },
{ Pid::FIXED, false, "fixed", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "fixed") },
{ Pid::FIXED_LINE, false, "fixedLine", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "fixed line") },
{ Pid::HEAD_TYPE, false, "headType", P_TYPE::NOTEHEAD_TYPE, DUMMY_QT_TR_NOOP("propertyName", "head type") },
{ Pid::HEAD_GROUP, false, "head", P_TYPE::NOTEHEAD_GROUP, DUMMY_QT_TR_NOOP("propertyName", "head") },
{ Pid::VELO_TYPE, false, "veloType", P_TYPE::VELO_TYPE, DUMMY_QT_TR_NOOP("propertyName", "velocity type") },
{ Pid::VELO_OFFSET, false, "velocity", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "velocity") },
{ Pid::ARTICULATION_ANCHOR, false, "anchor", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "anchor") },
{ Pid::DIRECTION, false, "direction", P_TYPE::DIRECTION_V, DUMMY_QT_TR_NOOP("propertyName", "direction") },
{ Pid::STEM_DIRECTION, false, "StemDirection", P_TYPE::DIRECTION_V, DUMMY_QT_TR_NOOP("propertyName", "stem direction") },
{ Pid::NO_STEM, false, "noStem", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "no stem") },
{ Pid::SLUR_DIRECTION, false, "up", P_TYPE::DIRECTION_V, DUMMY_QT_TR_NOOP("propertyName", "up") },
{ Pid::LEADING_SPACE, false, "leadingSpace", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "leading space") },
{ Pid::DISTRIBUTE, false, "distribute", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "distributed") },
{ Pid::MIRROR_HEAD, false, "mirror", P_TYPE::DIRECTION_H, DUMMY_QT_TR_NOOP("propertyName", "mirror") },
{ Pid::HEAD_HAS_PARENTHESES, false, "parentheses", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "parentheses") },
{ Pid::DOT_POSITION, false, "dotPosition", P_TYPE::DIRECTION_V, DUMMY_QT_TR_NOOP("propertyName", "dot position") },
{ Pid::TUNING, false, "tuning", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "tuning") },
{ Pid::PAUSE, true, "pause", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "pause") },
{ Pid::BARLINE_TYPE, false, "subtype", P_TYPE::BARLINE_TYPE, DUMMY_QT_TR_NOOP("propertyName", "subtype") },
{ Pid::BARLINE_SPAN, false, "span", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "span") },
{ Pid::BARLINE_SPAN_FROM, false, "spanFromOffset", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "span from") },
{ Pid::BARLINE_SPAN_TO, false, "spanToOffset", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "span to") },
{ Pid::BARLINE_SHOW_TIPS, false, "showTips", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "show tips") },
{ Pid::OFFSET, false, "offset", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "offset") },
{ Pid::FRET, true, "fret", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "fret") },
{ Pid::STRING, true, "string", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "string") },
{ Pid::GHOST, true, "ghost", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "ghost") },
{ Pid::PLAY, false, "play", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "played") },
{ Pid::TIMESIG_NOMINAL, false, 0, P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "nominal time signature") },
{ Pid::TIMESIG_ACTUAL, true, 0, P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "actual time signature") },
{ Pid::NUMBER_TYPE, false, "numberType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "number type") },
{ Pid::BRACKET_TYPE, false, "bracketType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "bracket type") },
{ Pid::NORMAL_NOTES, false, "normalNotes", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "normal notes") },
{ Pid::ACTUAL_NOTES, false, "actualNotes", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "actual notes") },
{ Pid::P1, false, "p1", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "p1") },
{ Pid::P2, false, "p2", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "p2") },
{ Pid::GROW_LEFT, false, "growLeft", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "grow left") },
{ Pid::GROW_RIGHT, false, "growRight", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "grow right") },
{ Pid::BOX_HEIGHT, false, "height", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "height") },
{ Pid::BOX_WIDTH, false, "width", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "width") },
{ Pid::BOX_AUTOSIZE, false, "boxAutoSize", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "autosize frame") },
{ Pid::TOP_GAP, false, "topGap", P_TYPE::MILLIMETRE, DUMMY_QT_TR_NOOP("propertyName", "top gap") },
{ Pid::BOTTOM_GAP, false, "bottomGap", P_TYPE::MILLIMETRE, DUMMY_QT_TR_NOOP("propertyName", "bottom gap") },
{ Pid::LEFT_MARGIN, false, "leftMargin", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "left margin") },
{ Pid::RIGHT_MARGIN, false, "rightMargin", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "right margin") },
{ Pid::TOP_MARGIN, false, "topMargin", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "top margin") },
{ Pid::BOTTOM_MARGIN, false, "bottomMargin", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "bottom margin") },
{ Pid::LAYOUT_BREAK, false, "subtype", P_TYPE::LAYOUTBREAK_TYPE, DUMMY_QT_TR_NOOP("propertyName", "subtype") },
{ Pid::AUTOSCALE, false, "autoScale", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "autoscale") },
{ Pid::SIZE, false, "size", P_TYPE::SIZE, DUMMY_QT_TR_NOOP("propertyName", "size") },
{ Pid::IMAGE_HEIGHT, false, "imageHeight", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "imageHeight") },
{ Pid::IMAGE_WIDTH, false, "imageWidth", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "imageWidth") },
{ Pid::IMAGE_FRAMED, false, "imageFramed", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "imageFramed") },
{ Pid::SCALE, false, "scale", P_TYPE::SCALE, DUMMY_QT_TR_NOOP("propertyName", "scale") },
{ Pid::LOCK_ASPECT_RATIO, false, "lockAspectRatio", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "aspect ratio locked") },
{ Pid::SIZE_IS_SPATIUM, false, "sizeIsSpatium", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "size is spatium") },
{ Pid::TEXT, true, "text", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "text") },
{ Pid::HTML_TEXT, false, 0, P_TYPE::STRING, "" },
{ Pid::USER_MODIFIED, false, 0, P_TYPE::BOOL, "" },
{ Pid::BEAM_POS, false, 0, P_TYPE::PAIR_REAL, DUMMY_QT_TR_NOOP("propertyName", "beam position") },
{ Pid::BEAM_MODE, true, "BeamMode", P_TYPE::BEAM_MODE, DUMMY_QT_TR_NOOP("propertyName", "beam mode") },
{ Pid::BEAM_NO_SLOPE, true, "noSlope", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "without slope") },
{ Pid::USER_LEN, false, "userLen", P_TYPE::MILLIMETRE, DUMMY_QT_TR_NOOP("propertyName", "length") },
{ Pid::SPACE, false, "space", P_TYPE::MILLIMETRE, DUMMY_QT_TR_NOOP("propertyName", "space") },
{ Pid::TEMPO, true, "tempo", P_TYPE::TEMPO, DUMMY_QT_TR_NOOP("propertyName", "tempo") },
{ Pid::TEMPO_FOLLOW_TEXT, true, "followText", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "following text") },
{ Pid::ACCIDENTAL_BRACKET, false, "bracket", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "bracket") },
{ Pid::ACCIDENTAL_TYPE, true, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "type") },
{ Pid::NUMERATOR_STRING, false, "textN", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "numerator string") },
{ Pid::DENOMINATOR_STRING, false, "textD", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "denominator string") },
{ Pid::FBPREFIX, false, "prefix", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "prefix") },
{ Pid::FBDIGIT, false, "digit", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "digit") },
{ Pid::FBSUFFIX, false, "suffix", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "suffix") },
{ Pid::FBCONTINUATIONLINE, false, "continuationLine", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "continuation line") },
{ Pid::FBPARENTHESIS1, false, "", P_TYPE::INT, "" },
{ Pid::FBPARENTHESIS2, false, "", P_TYPE::INT, "" },
{ Pid::FBPARENTHESIS3, false, "", P_TYPE::INT, "" },
{ Pid::FBPARENTHESIS4, false, "", P_TYPE::INT, "" },
{ Pid::FBPARENTHESIS5, false, "", P_TYPE::INT, "" },
{ Pid::OTTAVA_TYPE, true, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "ottava type") },
{ Pid::NUMBERS_ONLY, false, "numbersOnly", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "numbers only") },
{ Pid::TRILL_TYPE, false, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "trill type") },
{ Pid::VIBRATO_TYPE, false, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "vibrato type") },
{ Pid::HAIRPIN_CIRCLEDTIP, false, "hairpinCircledTip", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "hairpin with circled tip") },
{ Pid::HAIRPIN_TYPE, true, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "hairpin type") },
{ Pid::HAIRPIN_HEIGHT, false, "hairpinHeight", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "hairpin height") },
{ Pid::HAIRPIN_CONT_HEIGHT, false, "hairpinContHeight", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "hairpin cont height") },
{ Pid::VELO_CHANGE, true, "veloChange", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "velocity change") },
{ Pid::VELO_CHANGE_METHOD, true, "veloChangeMethod", P_TYPE::CHANGE_METHOD, DUMMY_QT_TR_NOOP("propertyName", "velocity change method") }, // left as a compatability property - we need to be able to read it correctly
{ Pid::VELO_CHANGE_SPEED, true, "veloChangeSpeed", P_TYPE::DYNAMIC_SPEED, DUMMY_QT_TR_NOOP("propertyName", "velocity change speed") },
{ Pid::DYNAMIC_TYPE, true, "subtype", P_TYPE::DYNAMIC_TYPE, DUMMY_QT_TR_NOOP("propertyName", "dynamic type") },
{ Pid::DYNAMIC_RANGE, true, "dynType", P_TYPE::DYNAMIC_RANGE, DUMMY_QT_TR_NOOP("propertyName", "dynamic range") },
{ Pid::SINGLE_NOTE_DYNAMICS, true, "singleNoteDynamics", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "single note dynamics") },
{ Pid::CHANGE_METHOD, true, "changeMethod", P_TYPE::CHANGE_METHOD, DUMMY_QT_TR_NOOP("propertyName", "change method") }, // the new, more general version of VELO_CHANGE_METHOD
{ Pid::PLACEMENT, false, "placement", P_TYPE::PLACEMENT_V, DUMMY_QT_TR_NOOP("propertyName", "placement") },
{ Pid::HPLACEMENT, false, "hplacement", P_TYPE::PLACEMENT_H, DUMMY_QT_TR_NOOP("propertyName", "horizontal placement") },
{ Pid::MMREST_RANGE_BRACKET_TYPE, false, "mmrestRangeBracketType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "multimeasure rest range bracket type") },
{ Pid::VELOCITY, false, "velocity", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "velocity") },
{ Pid::JUMP_TO, true, "jumpTo", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "jump to") },
{ Pid::PLAY_UNTIL, true, "playUntil", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "play until") },
{ Pid::CONTINUE_AT, true, "continueAt", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "continue at") },
{ Pid::LABEL, true, "label", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "label") },
{ Pid::MARKER_TYPE, true, 0, P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "marker type") },
{ Pid::ARP_USER_LEN1, false, 0, P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "length 1") },
{ Pid::ARP_USER_LEN2, false, 0, P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "length 2") },
{ Pid::REPEAT_END, true, 0, P_TYPE::BOOL, "" },
{ Pid::REPEAT_START, true, 0, P_TYPE::BOOL, "" },
{ Pid::REPEAT_JUMP, true, 0, P_TYPE::BOOL, "" },
{ Pid::MEASURE_NUMBER_MODE, false, "measureNumberMode", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "measure number mode") },
{ Pid::GLISS_TYPE, false, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "subtype") },
{ Pid::GLISS_TEXT, false, 0, P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "text") },
{ Pid::GLISS_SHOW_TEXT, false, 0, P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "showing text") },
{ Pid::GLISS_STYLE, true, "glissandoStyle", P_TYPE::GLISS_STYLE, DUMMY_QT_TR_NOOP("propertyName", "glissando style") },
{ Pid::GLISS_EASEIN, false, "easeInSpin", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName","ease in") },
{ Pid::GLISS_EASEOUT, false, "easeOutSpin", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "ease out") },
{ Pid::DIAGONAL, false, 0, P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "diagonal") },
{ Pid::GROUP_NODES, false, 0, P_TYPE::GROUPS, DUMMY_QT_TR_NOOP("propertyName", "groups") },
{ Pid::LINE_STYLE, false, "lineStyle", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "line style") },
{ Pid::LINE_WIDTH, false, "lineWidth", P_TYPE::MILLIMETRE, DUMMY_QT_TR_NOOP("propertyName", "line width") },
{ Pid::LINE_WIDTH_SPATIUM, false, "lineWidth", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "line width (spatium)") },
{ Pid::TIME_STRETCH, true, "timeStretch", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "time stretch") },
{ Pid::ORNAMENT_STYLE, true, "ornamentStyle", P_TYPE::ORNAMENT_STYLE, DUMMY_QT_TR_NOOP("propertyName", "ornament style") },
{ Pid::TIMESIG, false, "timesig", P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "time signature") },
{ Pid::TIMESIG_GLOBAL, false, 0, P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "global time signature") },
{ Pid::TIMESIG_STRETCH, false, 0, P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "time signature stretch") },
{ Pid::TIMESIG_TYPE, true, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "subtype") },
{ Pid::SPANNER_TICK, true, "tick", P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "tick") },
{ Pid::SPANNER_TICKS, true, "ticks", P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "ticks") },
{ Pid::SPANNER_TRACK2, false, "track2", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "track2") },
{ Pid::OFFSET2, false, "userOff2", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "offset2") },
{ Pid::BREAK_MMR, false, "breakMultiMeasureRest", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "breaking multimeasure rest") },
{ Pid::MMREST_NUMBER_POS, false, "mmRestNumberPos", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "vertical position of multimeasure rest number") },
{ Pid::MMREST_NUMBER_VISIBLE, false, "mmRestNumberVisible", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "visibility of multimeasure rest number") },
{ Pid::MEASURE_REPEAT_NUMBER_POS, false, "measureRepeatNumberPos", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "vertical position of measure repeat number") },
{ Pid::REPEAT_COUNT, true, "endRepeat", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "end repeat") },
{ Pid::USER_STRETCH, false, "stretch", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "stretch") },
{ Pid::NO_OFFSET, true, "noOffset", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "numbering offset") },
{ Pid::IRREGULAR, true, "irregular", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "irregular") },
{ Pid::ANCHOR, false, "anchor", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "anchor") },
{ Pid::SLUR_UOFF1, false, "o1", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "o1") },
{ Pid::SLUR_UOFF2, false, "o2", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "o2") },
{ Pid::SLUR_UOFF3, false, "o3", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "o3") },
{ Pid::SLUR_UOFF4, false, "o4", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "o4") },
{ Pid::STAFF_MOVE, true, "staffMove", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "staff move") },
{ Pid::VERSE, true, "no", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "verse") },
{ Pid::SYLLABIC, true, "syllabic", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "syllabic") },
{ Pid::LYRIC_TICKS, true, "ticks_f", P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "ticks") },
{ Pid::VOLTA_ENDING, true, "endings", P_TYPE::INT_VEC, DUMMY_QT_TR_NOOP("propertyName", "endings") },
{ Pid::LINE_VISIBLE, true, "lineVisible", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "visible line") },
{ Pid::MAG, false, "mag", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "mag") },
{ Pid::USE_DRUMSET, false, "useDrumset", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "using drumset") },
{ Pid::DURATION, false, 0, P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "duration") },
{ Pid::DURATION_TYPE_WITH_DOTS, false, 0, P_TYPE::DURATION_TYPE_WITH_DOTS, DUMMY_QT_TR_NOOP("propertyName", "duration type") },
{ Pid::ACCIDENTAL_ROLE, false, "role", P_TYPE::ACCIDENTAL_ROLE,DUMMY_QT_TR_NOOP("propertyName", "role") },
{ Pid::TRACK, false, 0, P_TYPE::SIZE_T, DUMMY_QT_TR_NOOP("propertyName", "track") },
{ Pid::FRET_STRINGS, true, "strings", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "strings") },
{ Pid::FRET_FRETS, true, "frets", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "frets") },
{ Pid::FRET_NUT, true, "showNut", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "show nut") },
{ Pid::FRET_OFFSET, true, "fretOffset", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "fret offset") },
{ Pid::FRET_NUM_POS, true, "fretNumPos", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "fret number position") },
{ Pid::ORIENTATION, true, "orientation", P_TYPE::ORIENTATION, DUMMY_QT_TR_NOOP("propertyName", "orientation") },
{ Pid::HARMONY_VOICE_LITERAL, true, "harmonyVoiceLiteral", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "harmony voice literal") },
{ Pid::HARMONY_VOICING, true, "harmonyVoicing", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "harmony voicing") },
{ Pid::HARMONY_DURATION, true, "harmonyDuration", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "harmony duration") },
{ Pid::SYSTEM_BRACKET, false, "type", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "type") },
{ Pid::GAP, false, 0, P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "gap") },
{ Pid::AUTOPLACE, false, "autoplace", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "autoplace") },
{ Pid::DASH_LINE_LEN, false, "dashLineLength", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "dash line length") },
{ Pid::DASH_GAP_LEN, false, "dashGapLength", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "dash gap length") },
{ Pid::TICK, false, 0, P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "tick") },
{ Pid::PLAYBACK_VOICE1, false, "playbackVoice1", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "playback voice 1") },
{ Pid::PLAYBACK_VOICE2, false, "playbackVoice2", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "playback voice 2") },
{ Pid::PLAYBACK_VOICE3, false, "playbackVoice3", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "playback voice 3") },
{ Pid::PLAYBACK_VOICE4, false, "playbackVoice4", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "playback voice 4") },
{ Pid::SYMBOL, true, "symbol", P_TYPE::SYMID, DUMMY_QT_TR_NOOP("propertyName", "symbol") },
{ Pid::PLAY_REPEATS, true, "playRepeats", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "playing repeats") },
{ Pid::CREATE_SYSTEM_HEADER, false, "createSystemHeader", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "creating system header") },
{ Pid::STAFF_LINES, true, "lines", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "lines") },
{ Pid::LINE_DISTANCE, true, "lineDistance", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "line distance") },
{ Pid::STEP_OFFSET, true, "stepOffset", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "step offset") },
{ Pid::STAFF_SHOW_BARLINES, false, "", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "showing barlines") },
{ Pid::STAFF_SHOW_LEDGERLINES, false, "", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "showing ledgerlines") },
{ Pid::STAFF_STEMLESS, false, "", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "stemless") },
{ Pid::STAFF_INVISIBLE, false, "", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "invisible") },
{ Pid::STAFF_COLOR, false, "color", P_TYPE::COLOR, DUMMY_QT_TR_NOOP("propertyName", "color") },
{ Pid::HEAD_SCHEME, false, "headScheme", P_TYPE::NOTEHEAD_SCHEME, DUMMY_QT_TR_NOOP("propertyName", "notehead scheme") },
{ Pid::STAFF_GEN_CLEF, false, "", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "generating clefs") },
{ Pid::STAFF_GEN_TIMESIG, false, "", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "generating time signature") },
{ Pid::STAFF_GEN_KEYSIG, false, "", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "generating key signature") },
{ Pid::STAFF_YOFFSET, false, "", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "y-offset") },
{ Pid::STAFF_USERDIST, false, "distOffset", P_TYPE::MILLIMETRE, DUMMY_QT_TR_NOOP("propertyName", "distance offset") },
{ Pid::STAFF_BARLINE_SPAN, false, "barLineSpan", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "barline span") },
{ Pid::STAFF_BARLINE_SPAN_FROM, false, "barLineSpanFrom", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "barline span from") },
{ Pid::STAFF_BARLINE_SPAN_TO, false, "barLineSpanTo", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "barline span to") },
{ Pid::BRACKET_SPAN, false, "bracketSpan", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "bracket span") },
{ Pid::BRACKET_COLUMN, false, "level", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "level") },
{ Pid::INAME_LAYOUT_POSITION, false, "layoutPosition", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "layout position") },
{ Pid::TEXT_STYLE, false, "style", P_TYPE::TEXT_STYLE, DUMMY_QT_TR_NOOP("propertyName", "style") },
{ Pid::FONT_FACE, false, "family", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "family") },
{ Pid::FONT_SIZE, false, "size", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "size") },
{ Pid::FONT_STYLE, false, "fontStyle", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "font style") },
{ Pid::TEXT_LINE_SPACING, false, "textLineSpacing", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "user line distancing") },
{ Pid::FRAME_TYPE, false, "frameType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "frame type") },
{ Pid::FRAME_WIDTH, false, "frameWidth", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "frame width") },
{ Pid::FRAME_PADDING, false, "framePadding", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "frame padding") },
{ Pid::FRAME_ROUND, false, "frameRound", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "frame round") },
{ Pid::FRAME_FG_COLOR, false, "frameFgColor", P_TYPE::COLOR, DUMMY_QT_TR_NOOP("propertyName", "frame foreground color") },
{ Pid::FRAME_BG_COLOR, false, "frameBgColor", P_TYPE::COLOR, DUMMY_QT_TR_NOOP("propertyName", "frame background color") },
{ Pid::SIZE_SPATIUM_DEPENDENT, false, "sizeIsSpatiumDependent",P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "spatium dependent font") },
{ Pid::ALIGN, false, "align", P_TYPE::ALIGN, DUMMY_QT_TR_NOOP("propertyName", "align") },
{ Pid::TEXT_SCRIPT_ALIGN, false, "align", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "text script align") },
{ Pid::SYSTEM_FLAG, false, "systemFlag", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "system flag") },
{ Pid::BEGIN_TEXT, true, "beginText", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "begin text") },
{ Pid::BEGIN_TEXT_ALIGN, false, "beginTextAlign", P_TYPE::ALIGN, DUMMY_QT_TR_NOOP("propertyName", "begin text align") },
{ Pid::BEGIN_TEXT_PLACE, false, "beginTextPlace", P_TYPE::TEXT_PLACE, DUMMY_QT_TR_NOOP("propertyName", "begin text place") },
{ Pid::BEGIN_HOOK_TYPE, false, "beginHookType", P_TYPE::HOOK_TYPE, DUMMY_QT_TR_NOOP("propertyName", "begin hook type") },
{ Pid::BEGIN_HOOK_HEIGHT, false, "beginHookHeight", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "begin hook height") },
{ Pid::BEGIN_FONT_FACE, false, "beginFontFace", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "begin font face") },
{ Pid::BEGIN_FONT_SIZE, false, "beginFontSize", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "begin font size") },
{ Pid::BEGIN_FONT_STYLE, false, "beginFontStyle", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "begin font style") },
{ Pid::BEGIN_TEXT_OFFSET, false, "beginTextOffset", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "begin text offset") },
{ Pid::CONTINUE_TEXT, true, "continueText", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "continue text") },
{ Pid::CONTINUE_TEXT_ALIGN, false, "continueTextAlign", P_TYPE::ALIGN, DUMMY_QT_TR_NOOP("propertyName", "continue text align") },
{ Pid::CONTINUE_TEXT_PLACE, false, "continueTextPlace", P_TYPE::TEXT_PLACE, DUMMY_QT_TR_NOOP("propertyName", "continue text place") },
{ Pid::CONTINUE_FONT_FACE, false, "continueFontFace", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "continue font face") },
{ Pid::CONTINUE_FONT_SIZE, false, "continueFontSize", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "continue font size") },
{ Pid::CONTINUE_FONT_STYLE, false, "continueFontStyle", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "continue font style") },
{ Pid::CONTINUE_TEXT_OFFSET, false, "continueTextOffset", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "continue text offset") },
{ Pid::END_TEXT, true, "endText", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "end text") },
{ Pid::END_TEXT_ALIGN, false, "endTextAlign", P_TYPE::ALIGN, DUMMY_QT_TR_NOOP("propertyName", "end text align") },
{ Pid::END_TEXT_PLACE, false, "endTextPlace", P_TYPE::TEXT_PLACE, DUMMY_QT_TR_NOOP("propertyName", "end text place") },
{ Pid::END_HOOK_TYPE, false, "endHookType", P_TYPE::HOOK_TYPE, DUMMY_QT_TR_NOOP("propertyName", "end hook type") },
{ Pid::END_HOOK_HEIGHT, false, "endHookHeight", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "end hook height") },
{ Pid::END_FONT_FACE, false, "endFontFace", P_TYPE::STRING, DUMMY_QT_TR_NOOP("propertyName", "end font face") },
{ Pid::END_FONT_SIZE, false, "endFontSize", P_TYPE::REAL, DUMMY_QT_TR_NOOP("propertyName", "end font size") },
{ Pid::END_FONT_STYLE, false, "endFontStyle", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "end font style") },
{ Pid::END_TEXT_OFFSET, false, "endTextOffset", P_TYPE::POINT, DUMMY_QT_TR_NOOP("propertyName", "end text offset") },
{ Pid::POS_ABOVE, false, "posAbove", P_TYPE::MILLIMETRE, DUMMY_QT_TR_NOOP("propertyName", "position above") },
{ Pid::LOCATION_STAVES, false, "staves", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "staves distance") },
{ Pid::LOCATION_VOICES, false, "voices", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "voices distance") },
{ Pid::LOCATION_MEASURES, false, "measures", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "measures distance") },
{ Pid::LOCATION_FRACTIONS, false, "fractions", P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "position distance") },
{ Pid::LOCATION_GRACE, false, "grace", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "grace note index") },
{ Pid::LOCATION_NOTE, false, "note", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "note index") },
{ Pid::VOICE, false, "voice", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "voice") },
{ Pid::POSITION, false, "position", P_TYPE::FRACTION, DUMMY_QT_TR_NOOP("propertyName", "position") },
{ Pid::CLEF_TYPE_CONCERT, true, "concertClefType", P_TYPE::CLEF_TYPE, DUMMY_QT_TR_NOOP("propertyName", "concert clef type") },
{ Pid::CLEF_TYPE_TRANSPOSING, true, "transposingClefType", P_TYPE::CLEF_TYPE, DUMMY_QT_TR_NOOP("propertyName", "transposing clef type") },
{ Pid::KEY, true, "accidental", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "key") },
{ Pid::ACTION, false, "action", P_TYPE::STRING, 0 },
{ Pid::MIN_DISTANCE, false, "minDistance", P_TYPE::SPATIUM, DUMMY_QT_TR_NOOP("propertyName", "autoplace minimum distance") },
{ Pid::ARPEGGIO_TYPE, true, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "arpeggio type") },
{ Pid::CHORD_LINE_TYPE, true, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "chord line type") },
{ Pid::CHORD_LINE_STRAIGHT, true, "straight", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "straight chord line") },
{ Pid::TREMOLO_TYPE, true, "subtype", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "tremolo type") },
{ Pid::TREMOLO_STYLE, true, "strokeStyle", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "tremolo style") },
{ Pid::HARMONY_TYPE, true, "harmonyType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "harmony type") },
{ Pid::BEND_TYPE, true, "bendType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "bend type") },
{ Pid::BEND_CURVE, true, "bendCurve", P_TYPE::PITCH_VALUES, DUMMY_QT_TR_NOOP("propertyName", "bend curve") },
{ Pid::TREMOLOBAR_TYPE, true, "tremoloBarType", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "tremolobar type") },
{ Pid::TREMOLOBAR_CURVE, true, "tremoloBarCurve", P_TYPE::PITCH_VALUES, DUMMY_QT_TR_NOOP("propertyName", "tremolobar curve") },
{ Pid::START_WITH_LONG_NAMES, false, "startWithLongNames", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "start with long names") },
{ Pid::START_WITH_MEASURE_ONE, true, "startWithMeasureOne", P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "start with measure one") },
{ Pid::FIRST_SYSTEM_INDENTATION,true, "firstSystemIndentation",P_TYPE::BOOL, DUMMY_QT_TR_NOOP("propertyName", "first system indentation") },
{ Pid::PATH, false, "path", P_TYPE::DRAW_PATH, DUMMY_QT_TR_NOOP("propertyName", "path") },
{ Pid::PREFER_SHARP_FLAT, true, "preferSharpFlat", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "prefer sharps or flats") },
{ Pid::PLAY_TECH_TYPE, true, "playTechType", P_TYPE::PLAYTECH_TYPE, DUMMY_QT_TR_NOOP("propertyName", "playing technique type") },
{ Pid::TEMPO_CHANGE_TYPE, true, "tempoChangeType", P_TYPE::TEMPOCHANGE_TYPE, DUMMY_QT_TR_NOOP("propertyName", "tempo ranged change type") },
{ Pid::TEMPO_EASING_METHOD, true, "tempoEasingMethod", P_TYPE::CHANGE_METHOD, DUMMY_QT_TR_NOOP("propertyName", "tempo easing method") },
{ Pid::END, false, "++end++", P_TYPE::INT, DUMMY_QT_TR_NOOP("propertyName", "<invalid property>") }
};
/* *INDENT-ON* */
//---------------------------------------------------------
// propertyId
//---------------------------------------------------------
Pid propertyId(const QStringRef& s)
{
for (const PropertyMetaData& pd : propertyList) {
if (pd.name == s) {
return pd.id;
}
}
return Pid::END;
}
//---------------------------------------------------------
// propertyId
//---------------------------------------------------------
Pid propertyId(const QString& s)
{
return propertyId(QStringRef(&s));
}
//---------------------------------------------------------
// propertyType
//---------------------------------------------------------
P_TYPE propertyType(Pid id)
{
Q_ASSERT(propertyList[int(id)].id == id);
return propertyList[int(id)].type;
}
//---------------------------------------------------------
// propertyLink
//---------------------------------------------------------
bool propertyLink(Pid id)
{
Q_ASSERT(propertyList[int(id)].id == id);
return propertyList[int(id)].link;
}
//---------------------------------------------------------
// propertyName
//---------------------------------------------------------
const char* propertyName(Pid id)
{
Q_ASSERT(propertyList[int(id)].id == id);
return propertyList[int(id)].name;
}
//---------------------------------------------------------
// propertyUserName
//---------------------------------------------------------
QString propertyUserName(Pid id)
{
Q_ASSERT(propertyList[int(id)].id == id);
return QObject::tr(propertyList[int(id)].userName, "propertyName");
}
//---------------------------------------------------------
// propertyFromString
//---------------------------------------------------------
PropertyValue propertyFromString(mu::engraving::P_TYPE type, QString)
{
switch (type) {
case P_TYPE::BEAM_MODE:
return PropertyValue(int(0));
case P_TYPE::GROUPS:
// unsupported
return PropertyValue();
case P_TYPE::DURATION_TYPE_WITH_DOTS:
case P_TYPE::INT_VEC:
return PropertyValue();
default:
break;
}
return PropertyValue();
}
//---------------------------------------------------------
// readProperty
//---------------------------------------------------------
PropertyValue readProperty(Pid id, XmlReader& e)
{
switch (propertyType(id)) {
case P_TYPE::BOOL:
return PropertyValue(bool(e.readInt()));
case P_TYPE::INT:
return PropertyValue(e.readInt());
case P_TYPE::REAL:
return PropertyValue(e.readDouble());
case P_TYPE::SPATIUM: return PropertyValue(Spatium(e.readDouble()));
case P_TYPE::MILLIMETRE: return PropertyValue(Spatium(e.readDouble())); //! NOTE type mm, but stored in xml as spatium
case P_TYPE::TEMPO:
return PropertyValue(e.readDouble());
case P_TYPE::FRACTION:
return PropertyValue::fromValue(e.readFraction());
case P_TYPE::SYMID:
return PropertyValue(TConv::fromXml(e.readElementText(), SymId::noSym));
case P_TYPE::COLOR:
return PropertyValue::fromValue(e.readColor());
case P_TYPE::ORNAMENT_STYLE:
return PropertyValue::fromValue(XmlValue::fromXml(e.readElementText(), OrnamentStyle::DEFAULT));
case P_TYPE::POINT:
return PropertyValue::fromValue(e.readPoint());
case P_TYPE::SCALE:
return PropertyValue::fromValue(e.readScale());
case P_TYPE::SIZE:
return PropertyValue::fromValue(e.readSize());
case P_TYPE::STRING:
return PropertyValue(e.readElementText());
case P_TYPE::ALIGN:
return PropertyValue(TConv::fromXml(e.readElementText(), Align()));
case P_TYPE::PLACEMENT_V:
return PropertyValue(XmlValue::fromXml(e.readElementText(), PlacementV::ABOVE));
case P_TYPE::PLACEMENT_H:
return PropertyValue(XmlValue::fromXml(e.readElementText(), PlacementH::LEFT));
case P_TYPE::TEXT_PLACE:
return PropertyValue(XmlValue::fromXml(e.readElementText(), TextPlace::AUTO));
case P_TYPE::DIRECTION_V:
return PropertyValue(XmlValue::fromXml(e.readElementText(), DirectionV::AUTO));
case P_TYPE::DIRECTION_H:
return PropertyValue(XmlValue::fromXml(e.readElementText(), DirectionH::AUTO));
case P_TYPE::ORIENTATION:
return PropertyValue(TConv::fromXml(e.readElementText(), Orientation::VERTICAL));
case P_TYPE::LAYOUTBREAK_TYPE:
return PropertyValue(XmlValue::fromXml(e.readElementText(), LayoutBreakType::NOBREAK));
case P_TYPE::VELO_TYPE:
return PropertyValue(XmlValue::fromXml(e.readElementText(), VeloType::OFFSET_VAL));
case P_TYPE::GLISS_STYLE:
return PropertyValue(XmlValue::fromXml(e.readElementText(), GlissandoStyle::CHROMATIC));
case P_TYPE::BARLINE_TYPE:
return PropertyValue(XmlValue::fromXml(e.readElementText(), BarLineType::NORMAL));
case P_TYPE::NOTEHEAD_TYPE:
return PropertyValue(TConv::fromXml(e.readElementText(), NoteHeadType::HEAD_AUTO));
case P_TYPE::NOTEHEAD_SCHEME:
return PropertyValue(TConv::fromXml(e.readElementText(), NoteHeadScheme::HEAD_AUTO));
case P_TYPE::NOTEHEAD_GROUP:
return PropertyValue(TConv::fromXml(e.readElementText(), NoteHeadGroup::HEAD_NORMAL));
case P_TYPE::CLEF_TYPE:
return PropertyValue(TConv::fromXml(e.readElementText(), ClefType::G));
case P_TYPE::DYNAMIC_TYPE:
return PropertyValue(TConv::fromXml(e.readElementText(), DynamicType::OTHER));
case P_TYPE::HOOK_TYPE:
return PropertyValue(TConv::fromXml(e.readElementText(), HookType::NONE));
case P_TYPE::KEY_MODE:
return PropertyValue(TConv::fromXml(e.readElementText(), KeyMode::NONE));
case P_TYPE::TEXT_STYLE:
return PropertyValue(TConv::fromXml(e.readElementText(), TextStyleType::DEFAULT));
case P_TYPE::CHANGE_METHOD:
return PropertyValue(TConv::fromXml(e.readElementText(), ChangeMethod::NORMAL));
case P_TYPE::BEAM_MODE:
return PropertyValue(int(0));
case P_TYPE::GROUPS: {
Groups g;
g.read(e);
return PropertyValue::fromValue(g.nodes());
}
case P_TYPE::DURATION_TYPE_WITH_DOTS:
case P_TYPE::INT_VEC:
return PropertyValue();
case P_TYPE::PLAYTECH_TYPE:
return PropertyValue(TConv::fromXml(e.readElementText(), PlayingTechniqueType::Natural));
case P_TYPE::TEMPOCHANGE_TYPE:
return PropertyValue(TConv::fromXml(e.readElementText(), TempoChangeType::Undefined));
default:
qFatal("unhandled PID type");
break;
}
return PropertyValue();
}
//---------------------------------------------------------
// propertyToString
// Originally extracted from XmlWriter
//---------------------------------------------------------
QString propertyToString(Pid id, const PropertyValue& value, bool mscx)
{
if (!value.isValid()) {
return QString();
}
switch (id) {
case Pid::SYSTEM_BRACKET: // system bracket type
return Bracket::bracketTypeName(BracketType(value.toInt()));
case Pid::ACCIDENTAL_TYPE:
return Accidental::subtype2name(AccidentalType(value.toInt()));
case Pid::OTTAVA_TYPE:
return Ottava::ottavaTypeName(OttavaType(value.toInt()));
case Pid::TREMOLO_TYPE:
return Tremolo::type2name(TremoloType(value.toInt()));
case Pid::TRILL_TYPE:
return Trill::type2name(Trill::Type(value.toInt()));
case Pid::VIBRATO_TYPE:
return Vibrato::type2name(Vibrato::Type(value.toInt()));
default:
break;
}
switch (propertyType(id)) {
case P_TYPE::DURATION_TYPE_WITH_DOTS:
qFatal("unknown: TDURATION");
case P_TYPE::TEMPO:
qFatal("unknown: TEMPO");
case P_TYPE::GROUPS:
qFatal("unknown: GROUPS");
case P_TYPE::INT_VEC:
qFatal("unknown: INT_VEC");
default: {
break;
}
}
if (!mscx) {
// String representation for properties that are written
// to MSCX in other way (e.g. as XML tag properties).
switch (value.type()) {
case P_TYPE::POINT: {
const PointF p(value.value<PointF>());
return QString("%1;%2").arg(QString::number(p.x()), QString::number(p.y()));
}
case P_TYPE::SIZE: {
const SizeF s(value.value<SizeF>());
return QString("%1x%2").arg(QString::number(s.width()), QString::number(s.height()));
}
case P_TYPE::STRING: {
return value.toString();
}
// TODO: support QVariant::Rect and QVariant::RectF?
default:
break;
}
}
return QString();
}
}