예제 #1
0
파일: halo.py 프로젝트: umithardal/nicos
 def __init__(self, x, y, size=60, width=10, parent=None, scene=None):
     self._width = width
     s = size + width / 2
     QGraphicsEllipseItem.__init__(self, QRectF(-QPoint(s, s),
                                   QSizeF(2 * s, 2 * s)), parent)
     self.setBrush(QBrush(statuscolor[status.OK]))
     if not parent and scene:
         scene.addItem(self)
     self.setPos(x, y)
     self.setState(status.OK)
예제 #2
0
 def __init__(self, x, y, size=40, parent=None, scene=None):
     self._origin = QPoint(x, y)
     self._size = size
     self._radius = size / 2
     if not self._color:
         self._color = QColor('white')
     QGraphicsEllipseItem.__init__(self, QRectF(-QPoint(size, size),
                                   QSizeF(2 * size, 2 * size)), parent)
     if not parent and scene:
         scene.addItem(self)
     self.setPos(x, y)
     self.setBrush(QBrush(self._color))