|
|||||||||
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.QGraphicsPolygonItem
public class QGraphicsPolygonItem
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.
Nested Class Summary | |
---|---|
static class |
QGraphicsPolygonItem.enum_1
Press link for info on QGraphicsPolygonItem.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 | |
---|---|
QGraphicsPolygonItem()
Equivalent to QGraphicsPolygonItem(, 0). |
|
QGraphicsPolygonItem(QGraphicsItemInterface parent)
Equivalent to QGraphicsPolygonItem(parent, 0). |
|
QGraphicsPolygonItem(QGraphicsItemInterface parent,
QGraphicsScene scene)
Constructs a QGraphicsPolygonItem with parent as the default polygon. |
|
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 | |
---|---|
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. |
Qt.FillRule |
fillRule()
Returns the fill rule of the polygon. |
static QGraphicsPolygonItem |
fromNativePointer(QNativePointer nativePointer)
This function returns the QGraphicsPolygonItem 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. |
QPolygonF |
polygon()
Returns the item's polygon, or an empty polygon if no polygon has been set. |
void |
setExtension(QGraphicsItem.Extension extension,
java.lang.Object variant)
This method is used internally by Qt Jambi. |
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. |
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 QGraphicsPolygonItem(QGraphicsItemInterface parent)
Equivalent to QGraphicsPolygonItem(parent, 0).
public QGraphicsPolygonItem()
Equivalent to QGraphicsPolygonItem(, 0).
public QGraphicsPolygonItem(QGraphicsItemInterface parent, QGraphicsScene scene)
Constructs a QGraphicsPolygonItem with parent as the default polygon. scene is passed to QAbstractGraphicsShapeItem's constructor.
public QGraphicsPolygonItem(QPolygonF polygon, QGraphicsItemInterface parent)
public QGraphicsPolygonItem(QPolygonF polygon)
public QGraphicsPolygonItem(QPolygonF polygon, QGraphicsItemInterface parent, QGraphicsScene scene)
Method Detail |
---|
public final Qt.FillRule fillRule()
Returns the fill rule of the polygon. The default fill rule is Qt::OddEvenFill.
public final QPolygonF polygon()
Returns the item's polygon, or an empty polygon if no polygon has been set.
public final void setFillRule(Qt.FillRule rule)
Sets the fill rule of the polygon to rule. The default fill rule is Qt::OddEvenFill.
public final void setPolygon(QPolygonF polygon)
Sets the item's polygon to be the given polygon.
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 QGraphicsPolygonItem 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 |