def __init__(self, parent):
super(GuiGrid, self).__init__()
self.parent = parent #QGraphicsScene
self.initialGridExists = False
self.gapVertical = None #gets recalculated if gridRhythm is changed by the user, or through stretching.
self.gapHorizontal = None #is constant, but for symetry reasons this is put into redrawTickGrid as well
self.width = None #recalculated in reactToresizeEventOrZoom
self.height = None #recalculated in reactToresizeEventOrZoom
self.linesHorizontal = [] #later the grid lines will be stored here
self.linesVertical = [] #later the grid lines will be stored here
self.horizontalScrollbarWaitForGapJump = 0
self.oldHorizontalValue = 0
self.verticalScrollbarWaitForGapJump = 0
self.oldVerticalValue = 0
self.parent.parentView.verticalScrollBar().valueChanged.connect(self.reactToVerticalScroll)
self.parent.parentView.horizontalScrollBar().valueChanged.connect(self.reactToHorizontalScroll)
self.setOpacity(constantsAndConfigs.gridOpacity)
评论列表
文章目录