Пример #1
0
 def createArrow(self):
     rad = self._RADIUS
     pen = QPen()
     pen.setWidth(3)
     color = QColor(Qt.blue)
     color.setAlphaF(0.25)
     pen.setBrush(color)
     if self._virtual_helix.isEvenParity():
         arrow = QGraphicsLineItem(rad, rad, 2*rad, rad, self)
     else:
         arrow = QGraphicsLineItem(0, rad, rad, rad, self)
     arrow.setTransformOriginPoint(rad, rad)
     arrow.setZValue(400)
     arrow.setPen(pen)
     self.arrow = arrow
     self.arrow.hide()
Пример #2
0
 def createArrows(self):
     rad = _RADIUS
     pen1 = self._pen1
     pen2 = self._pen2
     pen1.setWidth(3)
     pen2.setWidth(3)
     pen1.setBrush(Qt.gray)
     pen2.setBrush(Qt.lightGray)
     if self._virtual_helix.isEvenParity():
         arrow1 = QGraphicsLineItem(rad, rad, 2*rad, rad, self)
         arrow2 = QGraphicsLineItem(0, rad, rad, rad, self)
     else:
         arrow1 = QGraphicsLineItem(0, rad, rad, rad, self)
         arrow2 = QGraphicsLineItem(rad, rad, 2*rad, rad, self)
     arrow1.setTransformOriginPoint(rad, rad)
     arrow2.setTransformOriginPoint(rad, rad)
     arrow1.setZValue(400)
     arrow2.setZValue(400)
     arrow1.setPen(pen1)
     arrow2.setPen(pen2)
     self.arrow1 = arrow1
     self.arrow2 = arrow2
     self.arrow1.hide()
     self.arrow2.hide()
Пример #3
0
 def createArrows(self):
     rad = self._RADIUS
     pen1 = self._pen1
     pen2 = self._pen2
     pen1.setWidth(3)
     pen2.setWidth(3)
     pen1.setBrush(Qt.gray)
     pen2.setBrush(Qt.lightGray)
     if self._virtual_helix.isEvenParity():
         arrow1 = QGraphicsLineItem(rad, rad, 2*rad, rad, self)
         arrow2 = QGraphicsLineItem(0, rad, rad, rad, self)
     else:
         arrow1 = QGraphicsLineItem(0, rad, rad, rad, self)
         arrow2 = QGraphicsLineItem(rad, rad, 2*rad, rad, self)
     arrow1.setTransformOriginPoint(rad, rad)
     arrow2.setTransformOriginPoint(rad, rad)
     arrow1.setZValue(400)
     arrow2.setZValue(400)
     arrow1.setPen(pen1)
     arrow2.setPen(pen2)
     self.arrow1 = arrow1
     self.arrow2 = arrow2
     self.arrow1.hide()
     self.arrow2.hide()