@ -52,6 +52,8 @@ class Conductor(QtWidgets.QGraphicsItem):
self.staticBlocks=None#Cached Block Data list
self.staticBlocks=None#Cached Block Data list
self.staticMeta=None#Cached track meta data dict.
self.staticMeta=None#Cached track meta data dict.
self.setFlag(QtWidgets.QGraphicsItem.ItemHasNoContents,True)#only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden
#Too irritating. And confuses with handle movement. self.setCursor(QtCore.Qt.SizeHorCursor) #this sets the cursor while the mouse is over the item. It is independent of AcceptHoverEvents
#Too irritating. And confuses with handle movement. self.setCursor(QtCore.Qt.SizeHorCursor) #this sets the cursor while the mouse is over the item. It is independent of AcceptHoverEvents
@ -531,7 +534,6 @@ class TempoPoint(QtWidgets.QGraphicsItem):
defwheelEvent(self,event):
defwheelEvent(self,event):
"""This buffers until hoverLeaveEvent and then the new value is sent in self.hoverLeaveEvent"""
"""This buffers until hoverLeaveEvent and then the new value is sent in self.hoverLeaveEvent"""
print("w")
ifevent.delta()>0:
ifevent.delta()>0:
self.wheelEventChangedValue+=1
self.wheelEventChangedValue+=1
else:
else:
@ -581,15 +583,16 @@ class TimeLine(QtWidgets.QGraphicsItem):
oneRectToReturnThemAll=QtCore.QRectF(0,0,0,0)#prevent the annoying "NotImplementError" from Qt for boundingRect. For items that don't need any collision detection.
classPitchCursor(QtWidgets.QGraphicsRectItem):
classPitchCursor(QtWidgets.QGraphicsRectItem):
def__init__(self):
def__init__(self):
"""Does not need the actual dotOnLine.
"""Does not need the actual dotOnLine.
@ -42,6 +44,8 @@ class PitchCursor(QtWidgets.QGraphicsRectItem):
oneRectToReturnThemAll=QtCore.QRectF(0,0,0,0)#prevent the annoying "NotImplementError" from Qt for boundingRect. For items that don't need any collision detection.
api.changeGraphItem(self.staticExportItem["id"],self.getXDifferenceAsBackendValue(),self.getYAsBackendValue())#send update to the backend, don't wait for callback.
api.changeGraphItem(self.staticExportItem["id"],self.getXDifferenceAsBackendValue(),self.getYAsBackendValue())#send update to the backend, don't wait for callback.
oneRectToReturnThemAll=QtCore.QRectF(0,0,0,0)#prevent the annoying "NotImplementError" from Qt for boundingRect. For items that don't need any collision detection.
@ -43,6 +43,8 @@ from .submenus import BlockPropertiesEdit
cosmeticPen=QtGui.QPen()
cosmeticPen=QtGui.QPen()
cosmeticPen.setCosmetic(True)
cosmeticPen.setCosmetic(True)
oneRectToReturnThemAll=QtCore.QRectF(0,0,0,0)#prevent the annoying "NotImplementError" from Qt for boundingRect. For items that don't need any collision detection.
classGuiBlockHandle(QtWidgets.QGraphicsRectItem):
classGuiBlockHandle(QtWidgets.QGraphicsRectItem):
"""A simplified version of a Block. Since we don't use blocks in the GUI, only in the backend
"""A simplified version of a Block. Since we don't use blocks in the GUI, only in the backend
westillneedthemsometimesasmacrostrutures,wherewedon't care about the content.
westillneedthemsometimesasmacrostrutures,wherewedon't care about the content.
@ -93,6 +95,8 @@ class GuiBlockHandle(QtWidgets.QGraphicsRectItem):
@ -237,6 +243,8 @@ class GuiTrack(QtWidgets.QGraphicsItem):
ifresult[1]:
ifresult[1]:
api.setTrackName(self.parent.staticExportItem["id"],nameString=result[0],initialInstrumentName=self.parent.staticExportItem["initialInstrumentName"],initialShortInstrumentName=self.parent.staticExportItem["initialShortInstrumentName"])#keep the old lilypond names
api.setTrackName(self.parent.staticExportItem["id"],nameString=result[0],initialInstrumentName=self.parent.staticExportItem["initialInstrumentName"],initialShortInstrumentName=self.parent.staticExportItem["initialShortInstrumentName"])#keep the old lilypond names
@ -399,6 +407,8 @@ class GuiTrack(QtWidgets.QGraphicsItem):
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.ItemHasNoContents,True)#only child items. Without this we get notImplementedError: QGraphicsItem.paint() is abstract and must be overridden
@ -69,7 +69,7 @@ class GuiScore(QtWidgets.QGraphicsScene):
self.backColor.setNamedColor("#fdfdff")
self.backColor.setNamedColor("#fdfdff")
self.setBackgroundBrush(self.backColor)
self.setBackgroundBrush(self.backColor)
self.grid=GuiGrid(parent=self)
self.grid=Grid(parentScene=self)
self.addItem(self.grid)
self.addItem(self.grid)
self.grid.setPos(0,-20*constantsAndConfigs.stafflineGap)#this is more calculation than simply using self.yStart, and might require manual adjustment in the future, but at least it guarantees the grid matches the staffline positions
self.grid.setPos(0,-20*constantsAndConfigs.stafflineGap)#this is more calculation than simply using self.yStart, and might require manual adjustment in the future, but at least it guarantees the grid matches the staffline positions
self.grid.setZValue(-50)
self.grid.setZValue(-50)
@ -278,8 +278,16 @@ class GuiScore(QtWidgets.QGraphicsScene):
returnNone
returnNone
defwheelEvent(self,event):
defnotTrueAnymore_wheelEvent(self,event):
"""We MUST handle the event somehow. Otherwise background grid items will block the views(!)