structures.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Laborejo 作者: hilbrichtsoftware 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号