QtBase
v6.3.1
|
The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene. More...
#include <qgraphicsitem.h>
Additional Inherited Members | |
Protected Types inherited from QGraphicsItem | |
enum | Extension { UserExtension = 0x80000000 } |
Protected Attributes inherited from QGraphicsItem | |
QScopedPointer< QGraphicsItemPrivate > | d_ptr |
Related Functions inherited from QGraphicsItem | |
T | qgraphicsitem_cast (QGraphicsItem *item) |
The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.
\inmodule QtWidgets
QGraphicsEllipseItem respresents an ellipse with a fill and an outline, and you can also use it for ellipse segments (see startAngle(), spanAngle()).
\table \row
To set the item's ellipse, pass a QRectF to QGraphicsEllipseItem's constructor, or call setRect(). The rect() function returns the current ellipse geometry.
QGraphicsEllipseItem uses the rect and the pen width to provide a reasonable implementation of boundingRect(), shape(), and contains(). The paint() function draws the ellipse using the item's associated pen and brush, which you can set by calling setPen() and setBrush().
Definition at line 683 of file qgraphicsitem.h.
anonymous enum |
Enumerator | |
---|---|
Type |
Definition at line 710 of file qgraphicsitem.h.
|
explicit |
Constructs a QGraphicsEllipseItem. parent is passed to QAbstractGraphicsShapeItem's constructor.
Definition at line 8663 of file qgraphicsitem.cpp.
|
explicit |
Constructs a QGraphicsEllipseItem using rect as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.
Definition at line 8632 of file qgraphicsitem.cpp.
|
explicit |
Constructs a QGraphicsEllipseItem using the rectangle defined by (x, y) and the given width and height, as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.
Definition at line 8648 of file qgraphicsitem.cpp.
QGraphicsEllipseItem::~QGraphicsEllipseItem | ( | ) |
Destroys the QGraphicsEllipseItem.
Definition at line 8671 of file qgraphicsitem.cpp.
|
overridevirtual |
\reimp
Implements QGraphicsItem.
Reimplemented in EventTester.
Definition at line 8772 of file qgraphicsitem.cpp.
\reimp
Reimplemented from QGraphicsItem.
Definition at line 8807 of file qgraphicsitem.cpp.
Reimplemented from QGraphicsItem.
Definition at line 8877 of file qgraphicsitem.cpp.
|
overridevirtual |
\reimp
Reimplemented from QAbstractGraphicsShapeItem.
Reimplemented in MyItem.
Definition at line 8834 of file qgraphicsitem.cpp.
|
overridevirtual |
\reimp
Reimplemented from QAbstractGraphicsShapeItem.
Reimplemented in MyItem.
Definition at line 8842 of file qgraphicsitem.cpp.
|
overridevirtual |
\reimp
Implements QGraphicsItem.
Reimplemented in EventTester.
Definition at line 8815 of file qgraphicsitem.cpp.
QRectF QGraphicsEllipseItem::rect | ( | ) | const |
Returns the item's ellipse geometry as a QRectF.
Definition at line 8680 of file qgraphicsitem.cpp.
|
overrideprotectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 8868 of file qgraphicsitem.cpp.
Sets the item's ellipse geometry to rect. The rectangle's left edge defines the left edge of the ellipse, and the rectangle's top edge describes the top of the ellipse. The height and width of the rectangle describe the height and width of the ellipse.
Definition at line 8694 of file qgraphicsitem.cpp.
Sets the item's rectangle to the rectangle defined by (x, y) and the given width and height.
This convenience function is equivalent to calling {setRect(QRectF(x, y, width, height))}
Definition at line 723 of file qgraphicsitem.h.
void QGraphicsEllipseItem::setSpanAngle | ( | int | angle | ) |
Sets the span angle for an ellipse segment to angle, which is in 16ths of a degree. This angle is used together with startAngle() to represent an ellipse segment (a pie). By default, the span angle is 5760 (360 * 16, a full ellipse).
Definition at line 8758 of file qgraphicsitem.cpp.
void QGraphicsEllipseItem::setStartAngle | ( | int | angle | ) |
Sets the start angle for an ellipse segment to angle, which is in 16ths of a degree. This angle is used together with spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.
Definition at line 8725 of file qgraphicsitem.cpp.
|
overridevirtual |
\reimp
Reimplemented from QGraphicsItem.
Definition at line 8788 of file qgraphicsitem.cpp.
int QGraphicsEllipseItem::spanAngle | ( | ) | const |
Returns the span angle of an ellipse segment in 16ths of a degree. This angle is used together with startAngle() for representing an ellipse segment (a pie). By default, this function returns 5760 (360 * 16, a full ellipse).
Definition at line 8744 of file qgraphicsitem.cpp.
int QGraphicsEllipseItem::startAngle | ( | ) | const |
Returns the start angle for an ellipse segment in 16ths of a degree. This angle is used together with spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.
Definition at line 8712 of file qgraphicsitem.cpp.
|
overrideprotectedvirtual |
Reimplemented from QGraphicsItem.
Definition at line 8859 of file qgraphicsitem.cpp.
|
overridevirtual |
\reimp
Reimplemented from QGraphicsItem.
Reimplemented in MyItem.
Definition at line 8850 of file qgraphicsitem.cpp.