本文整理汇总了Python中PyQt4.QtGui.QGraphicsEllipseItem.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QGraphicsEllipseItem.__init__方法的具体用法?Python QGraphicsEllipseItem.__init__怎么用?Python QGraphicsEllipseItem.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QGraphicsEllipseItem
的用法示例。
在下文中一共展示了QGraphicsEllipseItem.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, *args):
QGraphicsEllipseItem.__init__(self, *args)
self.setRect(-3, -3, 6, 6)
self.setPen(QPen(Qt.NoPen))
self.normalBrush = QBrush(QColor("#9CACB4"))
self.hoverBrush = QBrush(QColor("#7D7D7D"))
self.setBrush(self.normalBrush)
self.__hover = False
示例2: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, rect, type):
QGraphicsEllipseItem.__init__(self, rect)
self._color = None
self._darkColor = None
self._pos = None
self._startAngle = None
self._spanAngle = None
self._value = None
self._type = type
示例3: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, name, tileset, roundsFinished=0, parent = None):
"""generate new wind tile"""
if not len(WINDPIXMAPS):
WINDPIXMAPS[('E', False)] = None # avoid recursion
self.genWINDPIXMAPS()
QGraphicsEllipseItem.__init__(self)
if parent:
self.setParentItem(parent)
self.name = name
self.face = QGraphicsSvgItem()
self.face.setParentItem(self)
self.prevailing = None
self.setWind(name, roundsFinished)
self.tileset = tileset
self.__sizeFace()
示例4: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, radius, parent=None):
QGraphicsEllipseItem.__init__(self, QRectF(-radius, -radius, radius*2.0, radius*2.0), parent=parent)
self._pen = QPen(QColor('#000000'))
self._pen.setWidth(1)
self.setPen(self._pen)
self._hoverPen = QPen(QColor('#000000'))
self._hoverPen.setWidth(2)
brush = QBrush(QColor('#FF9966'))
self.setBrush(brush)
self._isSelected = False
self._isHover = False
self.setAcceptHoverEvents(True)
示例5: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, longitude, latitude, pixmap, scene, parent=None):
"""Constructor.
Args:
longitude(float): Longitude of the origin of the pixmap.
latitude(float): Latitude of the center of the pixmap.
pixmap(QPixmap): Pixmap.
scene(MapGraphicsScene): Scene the item belongs to.
parent(QGraphicsItem): Parent item.
"""
QGraphicsEllipseItem.__init__(self, parent=parent, scene=scene)
self._lon = longitude
self._lat = latitude
self.setPixmap(pixmap)
self.updatePosition(scene)
示例6: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, name, radius, parent=None):
QGraphicsEllipseItem.__init__(self, QRectF(-radius, -radius, radius*2.0, radius*2.0), parent=parent)
self._name = name
pfname = parent.fullname()
if pfname is not None:
self._fullname = pfname + ':' + name
else:
self._fullname = parent.name() + ':' + name
pen = QPen(QColor('#000000'))
pen.setWidth(3)
self.setPen(pen)
brush = QBrush(QColor('#000000'))
self.setBrush(brush)
self.setToolTip(name)
self.setAcceptedMouseButtons(Qt.LeftButton)
self.setAcceptHoverEvents(True)
self._isDraggingLine = False
示例7: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, *args, **kwords):
QGraphicsEllipseItem.__init__(self, *args, **kwords)
self.setSpanAngle(180*16)
示例8: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, x, y, number=0, radius=RADIUS, parent=None, scene=None):
QGraphicsEllipseItem.__init__(self, x - radius / 2, y - radius / 2, 2 * radius, 2 * radius, parent, scene)
self.number = number
示例9: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsEllipseItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsEllipseItem import __init__ [as 别名]
def __init__(self, *args):
QGraphicsEllipseItem.__init__(self, *args)
self.setRect(-3.5, -3.5, 7., 7.)
self.setPen(QPen(Qt.NoPen))
self.setBrush(QBrush(QColor("#9CACB4")))
self.__hover = False