本文整理汇总了Python中PyQt4.QtGui.QGraphicsSimpleTextItem.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QGraphicsSimpleTextItem.__init__方法的具体用法?Python QGraphicsSimpleTextItem.__init__怎么用?Python QGraphicsSimpleTextItem.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QGraphicsSimpleTextItem
的用法示例。
在下文中一共展示了QGraphicsSimpleTextItem.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsSimpleTextItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsSimpleTextItem import __init__ [as 别名]
def __init__(self, face, node, text):
QGraphicsSimpleTextItem.__init__(self, text)
_ActionDelegator.__init__(self)
self.node = node
self.face = face
self._bounding_rect = self.face.get_bounding_rect()
self._real_rect = self.face.get_real_rect()
示例2: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsSimpleTextItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsSimpleTextItem import __init__ [as 别名]
def __init__(self, longitude, latitude, text, scene, parent=None, min_zoom_visibility=None):
pos = scene.posFromLonLat(longitude, latitude)
QGraphicsSimpleTextItem.__init__(self, text, scene=scene, parent=parent)
self._min_zoom = min_zoom_visibility
self._lon, self._lat = longitude, latitude
self.setPos(pos)
self.updatePosition(scene)
示例3: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsSimpleTextItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsSimpleTextItem import __init__ [as 别名]
def __init__( self, settings, text ):
QGraphicsSimpleTextItem.__init__( self )
self.__settings = settings
self.setFont( settings.badgeFont )
self.setText( text )
self.color = None
return
示例4: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsSimpleTextItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsSimpleTextItem import __init__ [as 别名]
def __init__(self,txt,font=def_font,loc=(0,0)):
QGraphicsSimpleTextItem.__init__(self,txt)
self.setPos(*loc)
self.setFont(font)
示例5: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsSimpleTextItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsSimpleTextItem import __init__ [as 别名]
def __init__(self, face, node, text):
QGraphicsSimpleTextItem.__init__(self, text)
_ActionDelegator.__init__(self)
self.node = node
示例6: __init__
# 需要导入模块: from PyQt4.QtGui import QGraphicsSimpleTextItem [as 别名]
# 或者: from PyQt4.QtGui.QGraphicsSimpleTextItem import __init__ [as 别名]
def __init__(self, face, text):
QGraphicsSimpleTextItem.__init__(self, text)
self.face = face
self._bounding_rect = self.face.get_bounding_rect()
self._real_rect = self.face.get_real_rect()