File: testTextStyle.qml

package info (click to toggle)
musescore3 3.2.3%2Bdfsg2-16
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 214,188 kB
  • sloc: cpp: 291,198; xml: 200,238; sh: 3,779; ansic: 1,447; python: 393; makefile: 244; perl: 82; pascal: 79
file content (22 lines) | stat: -rw-r--r-- 884 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import QtQuick 2.0
import MuseScore 1.0

MuseScore {
      onRun: {
            var seg = curScore.firstSegment();
            while (seg) {
                  for (var i = seg.annotations.length; i--; ) {
                        if (seg.annotations[i].type === Element.STAFF_TEXT) {
                              if (seg.annotations[i].textStyleType === TextStyleType.SYSTEM) {
                                    seg.annotations[i].textStyleType = TextStyleType.FIGURED_BASS;
                              }
                              else if (seg.annotations[i].textStyleType === TextStyleType.EXPRESSION) {
                                    seg.annotations[i].textStyleType = TextStyleType.STRING_NUMBER;
                              }
                        }
                  }
                  seg = seg.next;
            }
            Qt.quit();
            }
      }