com.trolltech.qt.gui
Class QGraphicsPathItem

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.gui.QAbstractGraphicsShapeItem
                  extended by com.trolltech.qt.gui.QGraphicsPathItem
All Implemented Interfaces:
QGraphicsItemInterface, QtJambiInterface

public class QGraphicsPathItem
extends QAbstractGraphicsShapeItem

The QGraphicsPathItem class provides a path item that you can add to a QGraphicsScene. To set the item's path, pass a QPainterPath to QGraphicsPathItem's constructor, or call the setPath() function. The path() function returns the current path.


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

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


Nested Class Summary
static class QGraphicsPathItem.enum_1
           
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, 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
QGraphicsPathItem()
          Constructs a QGraphicsPath.
QGraphicsPathItem(QGraphicsItemInterface parent)
          Constructs a QGraphicsPath.
QGraphicsPathItem(QGraphicsItemInterface parent, QGraphicsScene scene)
          Constructs a QGraphicsPath.
QGraphicsPathItem(QPainterPath path)
          Creates a new QGraphicsPathItem from the specified path.
QGraphicsPathItem(QPainterPath path, QGraphicsItemInterface parent)
          Creates a new QGraphicsPathItem from the specified path and parent.
QGraphicsPathItem(QPainterPath path, QGraphicsItemInterface parent, QGraphicsScene scene)
          Creates a new QGraphicsPathItem from the specified path, parent, and scene.
 
Method Summary
 QPainterPath path()
          Returns the item's path as a QPainterPath.
 void setPath(QPainterPath path)
          Sets the item's path to be the given path.
 
Methods inherited from class com.trolltech.qt.gui.QAbstractGraphicsShapeItem
acceptDrops, acceptedMouseButtons, acceptHoverEvents, acceptsHoverEvents, advance, boundingRect, boundingRegion, boundingRegionGranularity, brush, cacheMode, childItems, childrenBoundingRect, clearFocus, clipPath, collidesWithItem, collidesWithPath, collidingItems, commonAncestorItem, contains, contextMenuEvent, cursor, data, deviceTransform, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveOpacity, ensureVisible, ensureVisible, flags, focusInEvent, focusOutEvent, grabKeyboard, grabMouse, group, handlesChildEvents, hasCursor, hasFocus, hide, hoverEnterEvent, hoverLeaveEvent, hoverMoveEvent, inputMethodEvent, inputMethodQuery, installSceneEventFilter, isAncestorOf, isClipped, isEnabled, isObscured, isObscured, isObscured, isObscuredBy, isSelected, isUnderMouse, isVisible, isVisibleTo, isWidget, isWindow, itemChange, itemTransform, keyPressEvent, keyReleaseEvent, mapFromItem, mapFromItem, mapFromItem, mapFromItem, mapFromItem, mapFromItem, mapFromParent, mapFromParent, mapFromParent, mapFromParent, mapFromParent, mapFromParent, mapFromScene, mapFromScene, mapFromScene, mapFromScene, mapFromScene, mapFromScene, mapRectFromItem, mapRectFromItem, mapRectFromParent, mapRectFromParent, mapRectFromScene, mapRectFromScene, mapRectToItem, mapRectToItem, mapRectToParent, mapRectToParent, mapRectToScene, mapRectToScene, mapToItem, mapToItem, mapToItem, mapToItem, mapToItem, mapToItem, mapToParent, mapToParent, mapToParent, mapToParent, mapToParent, mapToParent, mapToScene, mapToScene, mapToScene, mapToScene, mapToScene, mapToScene, mouseDoubleClickEvent, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, moveBy, opacity, 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, setOpacity, 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

QGraphicsPathItem

public QGraphicsPathItem(QGraphicsItemInterface parent)
Constructs a QGraphicsPath. parent is passed to QAbstractGraphicsShapeItem's constructor. The item is added to scene.

See also:
QGraphicsScene::addItem().


QGraphicsPathItem

public QGraphicsPathItem()
Constructs a QGraphicsPath. parent is passed to QAbstractGraphicsShapeItem's constructor. The item is added to scene.

See also:
QGraphicsScene::addItem().


QGraphicsPathItem

public QGraphicsPathItem(QGraphicsItemInterface parent,
                         QGraphicsScene scene)
Constructs a QGraphicsPath. parent is passed to QAbstractGraphicsShapeItem's constructor. The item is added to scene.

See also:
QGraphicsScene::addItem().


QGraphicsPathItem

public QGraphicsPathItem(QPainterPath path,
                         QGraphicsItemInterface parent)
Creates a new QGraphicsPathItem from the specified path and parent.


QGraphicsPathItem

public QGraphicsPathItem(QPainterPath path)
Creates a new QGraphicsPathItem from the specified path.


QGraphicsPathItem

public QGraphicsPathItem(QPainterPath path,
                         QGraphicsItemInterface parent,
                         QGraphicsScene scene)
Creates a new QGraphicsPathItem from the specified path, parent, and scene.

Method Detail

path

public final QPainterPath path()
Returns the item's path as a QPainterPath. If no item has been set, an empty QPainterPath is returned.

See also:
setPath().


setPath

public final void setPath(QPainterPath path)
Sets the item's path to be the given path.

See also:
path().