super().__init__(x,y,w,h)#x and y are coordinates relative to its parent block. Y will always be a fixed value. At the moment of writing -14.
#self.setFlag(QtWidgets.QGraphicsItem.ItemHasNoContents, True) #only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden
@ -120,6 +120,9 @@ class GuiBlockHandle(QtWidgets.QGraphicsRectItem):
self.endLabel.hide()
super().mousePressEvent(event)
#Mouse Move Event, as in dragging the blocks around, in in scorescene.py
#because we need to drag blocks into another track.
defmouseReleaseEventCustom(self,event):
"""Not a qt-override. This is called directly by GuiScore
ifyouclick-releaseonablock"""
@ -175,7 +178,7 @@ class GuiTrack(QtWidgets.QGraphicsItem):
def__init__(self,parentScore,staticExportItem):
super().__init__()
self.setFlag(QtWidgets.QGraphicsItem.ItemHasNoContents,True)#only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden
#self.setFlag(QtWidgets.QGraphicsItem.ItemContainsChildrenInShape, True) #Do not use! If we activate this a block will not be able to cross over into another track with drag and drop
self.parentScore=parentScore
self.staticExportItem=staticExportItem#This is not the notes but the track meta data. The notes are called staticRepresentationList