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 QGraphicsPolygonItem

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

All Implemented Interfaces:
  QGraphicsItemInterface, QtJambiInterface

    public class QGraphicsPolygonItem

extends QAbstractGraphicsShapeItem

The QGraphicsPolygonItem class provides a polygon item that you can add to a `QGraphicsScene`. To set the item's polygon, pass a `QPolygonF` to QGraphicsPolygonItem's constructor, or call the `setPolygon()` function. The `polygon()` function returns the current polygon.

QGraphicsPolygonItem uses the polygon and the pen width to provide a reasonable implementation of `boundingRect()`, `shape()`, and `contains()`. The `paint()` function draws the polygon using the item's associated pen and brush, which you can set by calling the `setPen()` and `setBrush()` functions.

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

Nested Class Summary
`static class` | `QGraphicsPolygonItem.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
`QGraphicsPolygonItem()` Constructs a QGraphicsPolygonItem.
`QGraphicsPolygonItem(QGraphicsItemInterface parent)` Constructs a QGraphicsPolygonItem.
`QGraphicsPolygonItem(QGraphicsItemInterface parent, QGraphicsScene scene)` Constructs a QGraphicsPolygonItem.
`QGraphicsPolygonItem(QPolygonF polygon)` Creates a new QGraphicsPolygonItem from `polygon`.
`QGraphicsPolygonItem(QPolygonF polygon, QGraphicsItemInterface parent)` Creates a new QGraphicsPolygonItem of the specified `polygon` and `parent`.
`QGraphicsPolygonItem(QPolygonF polygon, QGraphicsItemInterface parent, QGraphicsScene scene)` Creates a new QGraphicsPolygonItem from the given `polygon`, and with the specified `parent`.

Method Summary
`Qt.FillRule` | `fillRule()` Returns the fill rule of the polygon.
`QPolygonF` | `polygon()` Returns the item's polygon, or an empty polygon if no polygon has been set.
`void` | `setFillRule(Qt.FillRule rule)` Sets the fill rule of the polygon to `rule`.
`void` | `setPolygon(QPolygonF polygon)` Sets the item's polygon to be the given `polygon`.

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

### QGraphicsPolygonItem

    public QGraphicsPolygonItem(QGraphicsItemInterface parent)

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

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

### QGraphicsPolygonItem

    public QGraphicsPolygonItem()

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

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

### QGraphicsPolygonItem

    public QGraphicsPolygonItem(QGraphicsItemInterface parent,
                                QGraphicsScene scene)

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

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

### QGraphicsPolygonItem

    public QGraphicsPolygonItem(QPolygonF polygon,
                                QGraphicsItemInterface parent)

  Creates a new QGraphicsPolygonItem of the specified `polygon` and `parent`.

### QGraphicsPolygonItem

    public QGraphicsPolygonItem(QPolygonF polygon)

  Creates a new QGraphicsPolygonItem from `polygon`.

### QGraphicsPolygonItem

    public QGraphicsPolygonItem(QPolygonF polygon,
                                QGraphicsItemInterface parent,
                                QGraphicsScene scene)

  Creates a new QGraphicsPolygonItem from the given `polygon`, and with the specified `parent`. It is then added to `scene`.

Method Detail

### fillRule

    public final Qt.FillRule fillRule()

  Returns the fill rule of the polygon. The default fill rule is `Qt::OddEvenFill` .

See also:
  `setFillRule()`, `QPainterPath::fillRule()`, and `QPainter::drawPolygon()`.

### polygon

    public final QPolygonF polygon()

  Returns the item's polygon, or an empty polygon if no polygon has been set.

See also:
  `setPolygon()`.

### setFillRule

    public final void setFillRule(Qt.FillRule rule)

  Sets the fill rule of the polygon to `rule`. The default fill rule is `Qt::OddEvenFill` .

See also:
  `fillRule()`, `QPainterPath::fillRule()`, and `QPainter::drawPolygon()`.

### setPolygon

    public final void setPolygon(QPolygonF polygon)

  Sets the item's polygon to be the given `polygon`.

See also:
  `polygon()`.

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