Exemplo n.º 1
0
    def paint(self, painter, option, widget):
        """Paints the connector"""
        color = self.__settings.lineColor
        if self.penColor:
            color = self.penColor
        width = self.__settings.lineWidth
        if self.penWidth:
            width = self.penWidth

        pen = QPen(color)
        pen.setWidth(width)
        pen.setCapStyle(Qt.FlatCap)
        pen.setJoinStyle(Qt.RoundJoin)
        if self.penStyle:
            pen.setStyle(self.penStyle)
        self.setPen(pen)
        QGraphicsPathItem.paint(self, painter, option, widget)
Exemplo n.º 2
0
    def paint(self, painter, option, widget):
        """Paints the line item"""
        color = self.canvas.settings.cfLineColor
        if self.penColor:
            color = self.penColor
        width = self.canvas.settings.cfLineWidth
        if self.penWidth:
            width = self.penWidth

        pen = QPen(color)
        pen.setWidth(width)
        pen.setCapStyle(Qt.FlatCap)
        pen.setJoinStyle(Qt.RoundJoin)
        if self.penStyle:
            pen.setStyle(self.penStyle)
        self.setPen(pen)

        QGraphicsLineItem.paint(self, painter, option, widget)