QGraphicsEllipseItem Class Reference
[QtGui module]
该QGraphicsEllipseItem类提供了一个椭圆形项目,你可以添加到QGraphicsScene。More…
Methods
__init__ (self, QGraphicsItem parent = None, QGraphicsScene scene = None)
__init__ (self, QRectF rect, QGraphicsItem parent = None, QGraphicsScene scene = None)
__init__ (self, float x, float y, float w, float h, QGraphicsItem parent = None, QGraphicsScene scene = None)
QRectF boundingRect (self)
bool contains (self, QPointF point)
bool isObscuredBy (self, QGraphicsItem item)
QPainterPath opaqueArea (self)
paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget = None)
QRectF rect (self)
setRect (self, QRectF rect)
setRect (self, float ax, float ay, float w, float h)
setSpanAngle (self, int angle)
setStartAngle (self, int angle)
QPainterPath shape (self)
int spanAngle (self)
int startAngle (self)
int type (self)
Detailed Description
该QGraphicsEllipseItem类提供了一个椭圆形项目,你可以添加到QGraphicsScene。
QGraphicsEllipseItem respresents用填充和轮廓的椭圆形,而且你还可以使用它的椭圆段(见startAngle( )spanAngle())。
| |
|
要设置项目的椭圆形,传递QRectF到QGraphicsEllipseItem的构造函数,或调用setRect( ) 。该rect( )函数返回当前的椭圆形状。
QGraphicsEllipseItem使用矩形和钢笔的宽度,以提供合理的实施boundingRect( )shape()和contains( ) 。该paint( )函数绘制使用该项目的相关的画笔和画刷的椭圆,它可以通过调用设置setPen()和setBrush( ) 。
Method Documentation
QGraphicsEllipseItem.__init__ (self, QGraphicsItem parent = None, QGraphicsScene scene = None)
该parent的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
该scene的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
构造一个QGraphicsEllipseItem。parent被传递给QAbstractGraphicsShapeItem的构造。
See also QGraphicsScene.addItem( ) 。
QGraphicsEllipseItem.__init__ (self, QRectF rect, QGraphicsItem parent = None, QGraphicsScene scene = None)
该parent的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
该scene的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
构造一个QGraphicsEllipseItem using rect作为默认的矩形。parent被传递给QAbstractGraphicsShapeItem的构造。
See also QGraphicsScene.addItem( ) 。
QGraphicsEllipseItem.__init__ (self, float x, float y, float w, float h, QGraphicsItem parent = None, QGraphicsScene scene = None)
该parent的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
该scene的说法,如果不是没有,原因self通过Qt的,而不是PyQt的拥有。
构造一个QGraphicsEllipseItem使用由(定义的矩形x,y)和给定的width和height,作为默认的矩形。parent被传递给QAbstractGraphicsShapeItem的构造。
此功能被引入Qt的4.3 。
See also QGraphicsScene.addItem( ) 。
QRectF QGraphicsEllipseItem.boundingRect (self)
从重新实现QGraphicsItem.boundingRect( ) 。
bool QGraphicsEllipseItem.contains (self, QPointF point)
从重新实现QGraphicsItem.contains( ) 。
bool QGraphicsEllipseItem.isObscuredBy (self, QGraphicsItem item)
从重新实现QGraphicsItem.isObscuredBy( ) 。
QPainterPath QGraphicsEllipseItem.opaqueArea (self)
从重新实现QGraphicsItem.opaqueArea( ) 。
QGraphicsEllipseItem.paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget = None)
从重新实现QGraphicsItem.paint( ) 。
QRectF QGraphicsEllipseItem.rect (self)
See also setRect()和QPainter.drawEllipse( ) 。
QGraphicsEllipseItem.setRect (self, QRectF rect)
设置项的椭圆几何rect。矩形的左边缘定义椭圆的左边缘,并且矩形的顶边描述了椭圆形的顶部。矩形的高度和宽度描述椭圆的高度和宽度。
See also rect()和QPainter.drawEllipse( ) 。
QGraphicsEllipseItem.setRect (self, float ax, float ay, float w, float h)
设置项的矩形,由(定义的矩形x,y)和给定的width和height。
这个方便的功能等同于调用setRect(QRectF(x, y, width, height))
See also rect( ) 。
QGraphicsEllipseItem.setSpanAngle (self, int angle)
设置为椭圆段的跨度角angle,这在一定程度的16份。这个角度被一起使用startAngle()表示一个椭圆形段(馅饼) 。默认情况下,跨度角为5760 ( 360 * 16 ,一个完整的椭圆) 。
See also spanAngle( )setStartAngle()和QPainter.drawPie( ) 。
QGraphicsEllipseItem.setStartAngle (self, int angle)
设置为椭圆段的起始角度angle,这在一定程度的16份。这个角度被一起使用spanAngle( )来表示椭圆段(饼图) 。默认情况下,起始角度为0 。
See also startAngle( )setSpanAngle()和QPainter.drawPie( ) 。
QPainterPath QGraphicsEllipseItem.shape (self)
int QGraphicsEllipseItem.spanAngle (self)
返回一定程度的16份椭圆段的跨度角度。这个角度被一起使用startAngle( )来表示椭圆段(饼图) 。默认情况下,这个函数返回5760 ( 360 * 16 ,一个完整的椭圆) 。
See also setSpanAngle()和startAngle( ) 。
int QGraphicsEllipseItem.startAngle (self)
返回一定程度的16份为椭圆段的起始角度。这个角度被一起使用spanAngle( )来表示椭圆段(饼图) 。默认情况下,起始角度为0 。
See also setStartAngle()和spanAngle( ) 。
int QGraphicsEllipseItem.type (self)
从重新实现QGraphicsItem.type( ) 。