timeline.py 文件源码

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

项目:Laborejo 作者: hilbrichtsoftware 项目源码 文件源码
def __init__(self, parentCCPath, staticExportItem):
        #super().__init__(0,-1*parentCCPath.rect().height(),0, parentCCPath.rect().height()) #x1, y1, x2, y2
        super().__init__(0,-1, 0, parentCCPath.rect().height() + 4) #x1, y1, x2, y2
        assert not self.line().isNull() #needed to do self.line().setLength(x)
        self.parentCCPath = parentCCPath
        self.staticExportItem = staticExportItem
        self.setFlags(QtWidgets.QGraphicsItem.ItemIsMovable|QtWidgets.QGraphicsItem.ItemSendsGeometryChanges|QtWidgets.QGraphicsItem.ItemIsFocusable|QtWidgets.QGraphicsItem.ItemClipsToShape)
        self.setAcceptHoverEvents(True)
        self.setCursor(QtCore.Qt.SizeHorCursor)
        #self.setBrush(QtGui.QColor("red"))
        pen = QtGui.QPen()  # creates a default pen
        if not self.staticExportItem["exportsAllItems"]:
            pen.setStyle(QtCore.Qt.DotLine)
        pen.setWidth(2)
        self.setPen(pen)

        self.inactivePen = pen
        self.inactivePen.setColor(QtGui.QColor("black"))

        self.activePen = QtGui.QPen(pen)
        self.activePen.setColor(QtGui.QColor("cyan"))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号