|
|
@ -440,11 +440,20 @@ class GuiChord(GuiItem): |
|
|
|
else: |
|
|
|
stemOrBeam = self.staticItem["stem"] |
|
|
|
|
|
|
|
#stem[2] is left/-1 or right/1 stem shifting. |
|
|
|
#stemOrBeam = (starting point, length, direction) #0 is middle line, but the stem for 0 begins at -1, which is the room above. |
|
|
|
#2 is treble-g which stem begins at 1. |
|
|
|
#negative numbers are above the middle line with the same -1 stem offset, compared to the note. |
|
|
|
#These numbers are calculated by the backend to span the whole chord. We just need to draw the stem here. |
|
|
|
#For beam groups the length is different for each member because they get shorter/longer with each ascending/descending note |
|
|
|
|
|
|
|
if stemOrBeam and stemOrBeam[2] > 0: |
|
|
|
self.directionRightAndUpwards = False |
|
|
|
else: |
|
|
|
self.directionRightAndUpwards = True |
|
|
|
|
|
|
|
print (stemOrBeam) |
|
|
|
|
|
|
|
#Stem - Both for groups and standalone. |
|
|
|
if stemOrBeam: #may be an empty tuple for whole notes and brevis |
|
|
|
line = QtWidgets.QGraphicsLineItem(QtCore.QLineF(0, constantsAndConfigs.stafflineGap * stemOrBeam[1]/2, 0, 0)) #x1, y1, x2, y2 |
|
|
@ -461,7 +470,7 @@ class GuiChord(GuiItem): |
|
|
|
self.flag = flag #store as persistent item. Otherwise qt will delete it. |
|
|
|
flag.setPos(self.stem.pos().x(), self.stem.line().p1().y() + self.stem.pos().y()) #we already know where the stem-line is. |
|
|
|
|
|
|
|
#Check if this item is the start or end of a beam group and mark it with lilypond syntax |
|
|
|
#Check if this item is the start or end of a beam group and mark it with a textitem (lilypond syntax [ ]) |
|
|
|
if self.staticItem["beamGroup"]: |
|
|
|
if self.staticItem["beamGroup"] == "open": |
|
|
|
beamGroupGlyph = QtWidgets.QGraphicsSimpleTextItem("[") |
|
|
|