|
|
@ -293,10 +293,14 @@ class GuiNote(QtWidgets.QGraphicsItem): |
|
|
|
|
|
|
|
if noteExportObject["durationKeyword"]: |
|
|
|
self.durationKeywordGlyph = GuiNote.durationKeywords[noteExportObject["durationKeyword"]](noteExportObject) |
|
|
|
if directionRightAndUpwards: |
|
|
|
self.durationKeywordGlyph.setPos(3, 6) |
|
|
|
#width = self.noteHead.boundingRect().width() #1000 !? Weird svg. |
|
|
|
|
|
|
|
#setPos is relative to noteHead. |
|
|
|
if directionRightAndUpwards and noteExportObject["durationKeyword"]==api.D_STACCATO: |
|
|
|
#self.durationKeywordGlyph.setScale(-1) #doesn't work because center of rotation is somehwere at pixel 1000!! |
|
|
|
self.durationKeywordGlyph.setPos(4, -1*constantsAndConfigs.stafflineGap) #x should be the width of the notehead. |
|
|
|
else: |
|
|
|
self.durationKeywordGlyph.setPos(3, -6) |
|
|
|
self.durationKeywordGlyph.setPos(4, constantsAndConfigs.stafflineGap-1) |
|
|
|
|
|
|
|
self.durationKeywordGlyph.setParentItem(self.noteHead) |
|
|
|
|
|
|
@ -313,7 +317,7 @@ class GuiNote(QtWidgets.QGraphicsItem): |
|
|
|
|
|
|
|
durationKeywords = { #0 is default and has no markers. |
|
|
|
api.D_STACCATO : lambda noteExportObject: QtSvg.QGraphicsSvgItem(":svg/scriptsStaccato.svg"), |
|
|
|
api.D_TENUTO : lambda noteExportObject: QtWidgets.QGraphicsSimpleTextItem("-"), #TODO: tenuto glyph |
|
|
|
api.D_TENUTO : lambda noteExportObject: QtWidgets.QGraphicsSimpleTextItem("-"), #TODO: tenuto svg glyph with same position as the others. |
|
|
|
api.D_TIE : lambda noteExportObject: GuiTieCurveGraphicsItem(noteExportObject), |
|
|
|
} |
|
|
|
|
|
|
@ -406,6 +410,7 @@ class GuiChord(GuiItem): |
|
|
|
#Ledger Lines |
|
|
|
below, above = self.staticItem["ledgerLines"] |
|
|
|
|
|
|
|
|
|
|
|
for i in range(below): |
|
|
|
line = QtWidgets.QGraphicsLineItem(QtCore.QLineF(0, 0, 12, 0)) |
|
|
|
line.setPen(GuiChord.ledgerPen) |
|
|
@ -714,7 +719,6 @@ class GuiMetricalInstruction(GuiItem): |
|
|
|
def __init__(self, staticItem): |
|
|
|
super().__init__(staticItem) |
|
|
|
|
|
|
|
print (staticItem) |
|
|
|
if staticItem["oneMeasureInTicks"] == 0: |
|
|
|
#Basically just a manual barline |
|
|
|
displayString = "X" |
|
|
|