|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QAbstractGraphicsShapeItem
com.trolltech.qt.gui.QGraphicsEllipseItem
public class QGraphicsEllipseItem
The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.
QGraphicsEllipseItem respresents an ellipse with a fill and an outline, and you can also use it for ellipse segments (see startAngle, spanAngle).
![]() | ![]() |
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.
| Nested Class Summary | |
|---|---|
static class |
QGraphicsEllipseItem.enum_1
Press link for info on QGraphicsEllipseItem.enum_1 |
| Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
|---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
| Constructor Summary | |
|---|---|
QGraphicsEllipseItem()
Equivalent to QGraphicsEllipseItem(, 0). |
|
QGraphicsEllipseItem(double x,
double y,
double w,
double h)
This is a JambiDoclet generated javadoc comment for com.trolltech.qt.gui.QGraphicsEllipseItem. |
|
QGraphicsEllipseItem(double x,
double y,
double w,
double h,
QGraphicsItemInterface parent)
This is a JambiDoclet generated javadoc comment for com.trolltech.qt.gui.QGraphicsEllipseItem. |
|
QGraphicsEllipseItem(double x,
double y,
double w,
double h,
QGraphicsItemInterface parent,
QGraphicsScene scene)
This is a JambiDoclet generated javadoc comment for com.trolltech.qt.gui.QGraphicsEllipseItem. |
|
QGraphicsEllipseItem(QGraphicsItemInterface parent)
Equivalent to QGraphicsEllipseItem(parent, 0). |
|
QGraphicsEllipseItem(QGraphicsItemInterface parent,
QGraphicsScene scene)
Constructs a QGraphicsEllipseItem using parent as the default rectangle. |
|
QGraphicsEllipseItem(QRectF rect)
This is a JambiDoclet generated javadoc comment for com.trolltech.qt.gui.QGraphicsEllipseItem. |
|
QGraphicsEllipseItem(QRectF rect,
QGraphicsItemInterface parent)
This is a JambiDoclet generated javadoc comment for com.trolltech.qt.gui.QGraphicsEllipseItem. |
|
QGraphicsEllipseItem(QRectF rect,
QGraphicsItemInterface parent,
QGraphicsScene scene)
This is a JambiDoclet generated javadoc comment for com.trolltech.qt.gui.QGraphicsEllipseItem. |
|
| Method Summary | |
|---|---|
QRectF |
boundingRect()
This function is reimplemented for internal reasons. |
boolean |
contains(QPointF point)
This function is reimplemented for internal reasons. |
java.lang.Object |
extension(java.lang.Object variant)
This function is reimplemented for internal reasons. |
static QGraphicsEllipseItem |
fromNativePointer(QNativePointer nativePointer)
This function returns the QGraphicsEllipseItem instance pointed to by nativePointer |
boolean |
isObscuredBy(QGraphicsItemInterface item)
This function is reimplemented for internal reasons. |
QPainterPath |
opaqueArea()
This function is reimplemented for internal reasons. |
void |
paint(QPainter painter,
QStyleOptionGraphicsItem option,
QWidget widget)
This function is reimplemented for internal reasons. |
QRectF |
rect()
Returns the item's ellipse geometry as a QRectF. |
void |
setExtension(QGraphicsItem.Extension extension,
java.lang.Object variant)
This method is used internally by Qt Jambi. |
void |
setRect(double x,
double y,
double w,
double h)
Sets the item's rectangle to the rectangle defined by (x, y) and the given w and h. |
void |
setRect(QRectF rect)
Sets the item's ellipse geometry to rect. |
void |
setSpanAngle(int angle)
Sets the span angle for an ellipse segment to angle, which is in 16ths of a degree. |
void |
setStartAngle(int angle)
Sets the start angle for an ellipse segment to angle, which is in 16ths of a degree. |
QPainterPath |
shape()
This function is reimplemented for internal reasons. |
int |
spanAngle()
Returns the span angle of an ellipse segment in 16ths of a degree. |
int |
startAngle()
Returns the start angle for an ellipse segment in 16ths of a degree. |
boolean |
supportsExtension(QGraphicsItem.Extension extension)
This method is used internally by Qt Jambi. |
int |
type()
This function is reimplemented for internal reasons. |
| Methods inherited from class com.trolltech.qt.QtJambiObject |
|---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
| Methods inherited from class com.trolltech.qt.QSignalEmitter |
|---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.trolltech.qt.QtJambiInterface |
|---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
| Constructor Detail |
|---|
public QGraphicsEllipseItem(double x,
double y,
double w,
double h,
QGraphicsItemInterface parent)
public QGraphicsEllipseItem(double x,
double y,
double w,
double h)
public QGraphicsEllipseItem(double x,
double y,
double w,
double h,
QGraphicsItemInterface parent,
QGraphicsScene scene)
public QGraphicsEllipseItem(QGraphicsItemInterface parent)
Equivalent to QGraphicsEllipseItem(parent, 0).
public QGraphicsEllipseItem()
Equivalent to QGraphicsEllipseItem(, 0).
public QGraphicsEllipseItem(QGraphicsItemInterface parent,
QGraphicsScene scene)
Constructs a QGraphicsEllipseItem using parent as the default rectangle. scene is passed to QAbstractGraphicsShapeItem's constructor.
public QGraphicsEllipseItem(QRectF rect,
QGraphicsItemInterface parent)
public QGraphicsEllipseItem(QRectF rect)
public QGraphicsEllipseItem(QRectF rect,
QGraphicsItemInterface parent,
QGraphicsScene scene)
| Method Detail |
|---|
public final QRectF rect()
Returns the item's ellipse geometry as a QRectF.
public final void setRect(QRectF rect)
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.
public final void setRect(double x,
double y,
double w,
double h)
Sets the item's rectangle to the rectangle defined by (x, y) and the given w and h.
This convenience function is equivalent to calling setRect(QRectF(x, y, width, height))
public final void 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).
public final void 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.
public final int spanAngle()
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).
public final int startAngle()
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.
public QRectF boundingRect()
This function is reimplemented for internal reasons.
boundingRect in interface QGraphicsItemInterfaceboundingRect in class QAbstractGraphicsShapeItempublic boolean contains(QPointF point)
This function is reimplemented for internal reasons.
contains in interface QGraphicsItemInterfacecontains in class QAbstractGraphicsShapeItempublic java.lang.Object extension(java.lang.Object variant)
This function is reimplemented for internal reasons.
extension in interface QGraphicsItemInterfaceextension in class QAbstractGraphicsShapeItempublic boolean isObscuredBy(QGraphicsItemInterface item)
This function is reimplemented for internal reasons.
isObscuredBy in interface QGraphicsItemInterfaceisObscuredBy in class QAbstractGraphicsShapeItempublic QPainterPath opaqueArea()
This function is reimplemented for internal reasons.
opaqueArea in interface QGraphicsItemInterfaceopaqueArea in class QAbstractGraphicsShapeItem
public void paint(QPainter painter,
QStyleOptionGraphicsItem option,
QWidget widget)
This function is reimplemented for internal reasons.
paint in interface QGraphicsItemInterfacepaint in class QAbstractGraphicsShapeItem
public void setExtension(QGraphicsItem.Extension extension,
java.lang.Object variant)
This method is used internally by Qt Jambi. Do not use it in your applications.
setExtension in interface QGraphicsItemInterfacesetExtension in class QAbstractGraphicsShapeItempublic QPainterPath shape()
This function is reimplemented for internal reasons.
shape in interface QGraphicsItemInterfaceshape in class QAbstractGraphicsShapeItempublic boolean supportsExtension(QGraphicsItem.Extension extension)
This method is used internally by Qt Jambi. Do not use it in your applications.
supportsExtension in interface QGraphicsItemInterfacesupportsExtension in class QAbstractGraphicsShapeItempublic int type()
This function is reimplemented for internal reasons.
type in interface QGraphicsItemInterfacetype in class QAbstractGraphicsShapeItempublic static QGraphicsEllipseItem fromNativePointer(QNativePointer nativePointer)
nativePointer - the QNativePointer of which object should be returned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||