Exemplo n.º 1
0
    def draw(self):
        qub_line = None

        try:
            qub_line, _ = QubAddDrawing(self._drawing, QubLineDrawingMgr, qtcanvas.QCanvasLine)
            qub_line.show()
            qub_line.setPoints(self.start_qub_p._x, self.start_qub_p._y, self.end_qub_p._x, self.end_qub_p._y)
            qub_line.setColor(NORMAL_COLOR)

            pen = qt.QPen(self.start_qub_p._drawingObjects[0].pen())
            pen.setWidth(1)
            pen.setColor(NORMAL_COLOR)
            qub_line.setPen(pen)
        except:
            logging.getLogger("HWR").exception("Could not draw line")

        return qub_line
Exemplo n.º 2
0
    def draw(self):
        qub_line = None

        try:
            qub_line, _ = QubAddDrawing(self._drawing, QubLineDrawingMgr,
                                        qtcanvas.QCanvasLine)
            qub_line.show()
            qub_line.setPoints(self.start_qub_p._x, self.start_qub_p._y,
                               self.end_qub_p._x, self.end_qub_p._y)
            qub_line.setColor(NORMAL_COLOR)

            pen = qt.QPen(self.start_qub_p.\
                           _drawingObjects[0].pen())
            pen.setWidth(1)
            pen.setColor(NORMAL_COLOR)
            qub_line.setPen(pen)
        except:
            logging.getLogger('HWR').\
                exception('Could not draw line')

        return qub_line