|
|||||||||
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.QGraphicsPathItem
public class QGraphicsPathItem
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.
Nested Class Summary | |
---|---|
static class |
QGraphicsPathItem.enum_1
Press link for info on QGraphicsPathItem.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 | |
---|---|
QGraphicsPathItem()
Equivalent to QGraphicsPathItem(, 0). |
|
QGraphicsPathItem(QGraphicsItemInterface parent)
Equivalent to QGraphicsPathItem(parent, 0). |
|
QGraphicsPathItem(QGraphicsItemInterface parent,
QGraphicsScene scene)
Constructs a QGraphicsPath item using parent as the default path. |
|
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 | |
---|---|
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 QGraphicsPathItem |
fromNativePointer(QNativePointer nativePointer)
This function returns the QGraphicsPathItem 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. |
QPainterPath |
path()
Returns the item's path as a QPainterPath. |
void |
setExtension(QGraphicsItem.Extension extension,
java.lang.Object variant)
This method is used internally by Qt Jambi. |
void |
setPath(QPainterPath path)
Sets the item's path to be the given path. |
QPainterPath |
shape()
This function is reimplemented for internal reasons. |
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 QGraphicsPathItem(QGraphicsItemInterface parent)
Equivalent to QGraphicsPathItem(parent, 0).
public QGraphicsPathItem()
Equivalent to QGraphicsPathItem(, 0).
public QGraphicsPathItem(QGraphicsItemInterface parent, QGraphicsScene scene)
Constructs a QGraphicsPath item using parent as the default path. scene is passed to QAbstractGraphicsShapeItem's constructor.
public QGraphicsPathItem(QPainterPath path, QGraphicsItemInterface parent)
public QGraphicsPathItem(QPainterPath path)
public QGraphicsPathItem(QPainterPath path, QGraphicsItemInterface parent, QGraphicsScene scene)
Method Detail |
---|
public final QPainterPath path()
Returns the item's path as a QPainterPath. If no item has been set, an empty QPainterPath is returned.
public final void setPath(QPainterPath path)
Sets the item's path to be the given path.
public QRectF boundingRect()
This function is reimplemented for internal reasons.
boundingRect
in interface QGraphicsItemInterface
boundingRect
in class QAbstractGraphicsShapeItem
public boolean contains(QPointF point)
This function is reimplemented for internal reasons.
contains
in interface QGraphicsItemInterface
contains
in class QAbstractGraphicsShapeItem
public java.lang.Object extension(java.lang.Object variant)
This function is reimplemented for internal reasons.
extension
in interface QGraphicsItemInterface
extension
in class QAbstractGraphicsShapeItem
public boolean isObscuredBy(QGraphicsItemInterface item)
This function is reimplemented for internal reasons.
isObscuredBy
in interface QGraphicsItemInterface
isObscuredBy
in class QAbstractGraphicsShapeItem
public QPainterPath opaqueArea()
This function is reimplemented for internal reasons.
opaqueArea
in interface QGraphicsItemInterface
opaqueArea
in class QAbstractGraphicsShapeItem
public void paint(QPainter painter, QStyleOptionGraphicsItem option, QWidget widget)
This function is reimplemented for internal reasons.
paint
in interface QGraphicsItemInterface
paint
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 QGraphicsItemInterface
setExtension
in class QAbstractGraphicsShapeItem
public QPainterPath shape()
This function is reimplemented for internal reasons.
shape
in interface QGraphicsItemInterface
shape
in class QAbstractGraphicsShapeItem
public boolean supportsExtension(QGraphicsItem.Extension extension)
This method is used internally by Qt Jambi. Do not use it in your applications.
supportsExtension
in interface QGraphicsItemInterface
supportsExtension
in class QAbstractGraphicsShapeItem
public int type()
This function is reimplemented for internal reasons.
type
in interface QGraphicsItemInterface
type
in class QAbstractGraphicsShapeItem
public static QGraphicsPathItem 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 |