Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QGraphicsEllipseItem

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.gui.QAbstractGraphicsShapeItem
                      com.trolltech.qt.gui.QGraphicsEllipseItem

All Implemented Interfaces:
  QGraphicsItemInterface, QtJambiInterface

    public class QGraphicsEllipseItem

extends QAbstractGraphicsShapeItem

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()`.

See also:
  `QGraphicsPathItem`, `QGraphicsRectItem`, `QGraphicsPolygonItem`, `QGraphicsTextItem`, `QGraphicsLineItem`, `QGraphicsPixmapItem`, and The Graphics View Framework.

Nested Class Summary
`static class` | `QGraphicsEllipseItem.enum_1`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Constructor Summary
`QGraphicsEllipseItem()` Constructs a `QGraphicsEllipseItem`.
`QGraphicsEllipseItem(double x, double y, double w, double h)` Creates a new QGraphicsEllipseItem with top left corner in the point (`x`, `y`), width `w`.
`QGraphicsEllipseItem(double x, double y, double w, double h, QGraphicsItemInterface parent)` Creates a new QGraphicsEllipseItem with top left corner in the point (`x`, `y`), width `w`, and height `h`, and the specified `parent`.
`QGraphicsEllipseItem(double x, double y, double w, double h, QGraphicsItemInterface parent, QGraphicsScene scene)` Creates a new QGraphicsEllipseItem with top left corner in the point (`x`, `y`), width `w`, and height `h`, and the specified `parent`.
`QGraphicsEllipseItem(QGraphicsItemInterface parent)` Constructs a `QGraphicsEllipseItem`.
`QGraphicsEllipseItem(QGraphicsItemInterface parent, QGraphicsScene scene)` Constructs a `QGraphicsEllipseItem`.
`QGraphicsEllipseItem(QRectF rect)` tes a new QGraphicsEllipseItem with the specified `rect` bounds.
`QGraphicsEllipseItem(QRectF rect, QGraphicsItemInterface parent)` Creates a new QGraphicsEllipseItem with the specified `rect` bounds and `parent`.
`QGraphicsEllipseItem(QRectF rect, QGraphicsItemInterface parent, QGraphicsScene scene)` Creates a new QGraphicsEllipseItem with the specified `rect` bounds and `parent`, and then adds it to `scene`.

Method Summary
`QRectF` | `rect()` Returns the item's ellipse geometry as a `QRectF`.
`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 `width` and `height`.
`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.
`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.

Methods inherited from class com.trolltech.qt.gui.QAbstractGraphicsShapeItem
`acceptDrops, acceptedMouseButtons, acceptHoverEvents, acceptsHoverEvents, advance, boundingRect, boundingRegion, boundingRegionGranularity, brush, cacheMode, childItems, childrenBoundingRect, clearFocus, collidesWithItem, collidesWithPath, collidingItems, commonAncestorItem, contains, contextMenuEvent, cursor, data, deviceTransform, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, ensureVisible, ensureVisible, flags, focusInEvent, focusOutEvent, grabKeyboard, grabMouse, group, handlesChildEvents, hasCursor, hasFocus, hide, hoverEnterEvent, hoverLeaveEvent, hoverMoveEvent, inputMethodEvent, inputMethodQuery, installSceneEventFilter, isAncestorOf, isEnabled, isObscured, isObscured, isObscured, isObscuredBy, isSelected, isUnderMouse, isVisible, isVisibleTo, isWidget, isWindow, itemChange, keyPressEvent, keyReleaseEvent, mapFromItem, mapFromItem, mapFromItem, mapFromItem, mapFromItem, mapFromItem, mapFromParent, mapFromParent, mapFromParent, mapFromParent, mapFromParent, mapFromParent, mapFromScene, mapFromScene, mapFromScene, mapFromScene, mapFromScene, mapFromScene, mapToItem, mapToItem, mapToItem, mapToItem, mapToItem, mapToItem, mapToParent, mapToParent, mapToParent, mapToParent, mapToParent, mapToParent, mapToScene, mapToScene, mapToScene, mapToScene, mapToScene, mapToScene, mouseDoubleClickEvent, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, moveBy, opaqueArea, paint, parentItem, parentWidget, pen, pos, prepareGeometryChange, removeSceneEventFilter, resetTransform, rotate, scale, scene, sceneBoundingRect, sceneEvent, sceneEventFilter, scenePos, sceneTransform, scroll, setAcceptDrops, setAcceptedMouseButtons, setAcceptHoverEvents, setAcceptsHoverEvents, setBoundingRegionGranularity, setBrush, setCacheMode, setCursor, setData, setEnabled, setFlag, setFlags, setFocus, setGroup, setHandlesChildEvents, setParentItem, setPen, setPos, setPos, setSelected, setToolTip, setTransform, setVisible, setZValue, shape, shear, show, toolTip, topLevelItem, topLevelWidget, transform, translate, type, ungrabKeyboard, ungrabMouse, unsetCursor, update, update, wheelEvent, window, x, y, zValue`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

Methods inherited from class java.lang.Object
`clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(QGraphicsItemInterface parent)

  Constructs a `QGraphicsEllipseItem`. `parent` is passed to `QAbstractGraphicsShapeItem`'s constructor. The item is then added to `scene`.

See also:
  `QGraphicsScene::addItem()`.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem()

  Constructs a `QGraphicsEllipseItem`. `parent` is passed to `QAbstractGraphicsShapeItem`'s constructor. The item is then added to `scene`.

See also:
  `QGraphicsScene::addItem()`.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(QGraphicsItemInterface parent,
                                QGraphicsScene scene)

  Constructs a `QGraphicsEllipseItem`. `parent` is passed to `QAbstractGraphicsShapeItem`'s constructor. The item is then added to `scene`.

See also:
  `QGraphicsScene::addItem()`.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(QRectF rect,
                                QGraphicsItemInterface parent)

  Creates a new QGraphicsEllipseItem with the specified `rect` bounds and `parent`.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(QRectF rect)

  tes a new QGraphicsEllipseItem with the specified `rect` bounds.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(QRectF rect,
                                QGraphicsItemInterface parent,
                                QGraphicsScene scene)

  Creates a new QGraphicsEllipseItem with the specified `rect` bounds and `parent`, and then adds it to `scene`.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(double x,
                                double y,
                                double w,
                                double h,
                                QGraphicsItemInterface parent)

  Creates a new QGraphicsEllipseItem with top left corner in the point (`x`, `y`), width `w`, and height `h`, and the specified `parent`.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(double x,
                                double y,
                                double w,
                                double h)

  Creates a new QGraphicsEllipseItem with top left corner in the point (`x`, `y`), width `w`.

### QGraphicsEllipseItem

    public QGraphicsEllipseItem(double x,
                                double y,
                                double w,
                                double h,
                                QGraphicsItemInterface parent,
                                QGraphicsScene scene)

  Creates a new QGraphicsEllipseItem with top left corner in the point (`x`, `y`), width `w`, and height `h`, and the specified `parent`. It is then added to `scene`.

Method Detail

### rect

    public final QRectF rect()

  Returns the item's ellipse geometry as a `QRectF`.

See also:
  `setRect()`, and `QPainter::drawEllipse()`.

### setRect

    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.

See also:
  `rect()`, and `QPainter::drawEllipse()`.

### setRect

    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 `width` and `height`.

  This convenience function is equivalent to calling `setRect(QRectF(x, y, width, height))`

See also:
  `rect()`.

### setSpanAngle

    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).

See also:
  `spanAngle()`, `setStartAngle()`, and `QPainter::drawPie()`.

### setStartAngle

    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.

See also:
  `startAngle()`, `setSpanAngle()`, and `QPainter::drawPie()`.

### spanAngle

    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).

See also:
  `setSpanAngle()`, and `startAngle()`.

### startAngle

    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.

See also:
  `setStartAngle()`, and `spanAngle()`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD