// qgraphicsitem.sip generated by MetaSIP on Fri Apr 16 11:32:08 2010
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt.
// 
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file.  Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
// 
// Please review the following information to ensure GNU General
// Public Licensing requirements will be met:
// http://trolltech.com/products/qt/licenses/licensing/opensource/. If
// you are unsure which license is appropriate for your use, please
// review the following information:
// http://trolltech.com/products/qt/licenses/licensing/licensingoverview
// or contact the sales department at sales@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%If (Qt_4_2_0 -)
%ModuleCode
#include <qgraphicsitem.h>
%End
%End

%If (Qt_4_2_0 -)

class QGraphicsItem /Supertype=sip.wrapper/
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

%ConvertToSubClassCode
    switch (sipCpp->type())
    {
    case 2:
        sipType = sipType_QGraphicsPathItem;
        break;
    
    case 3:
        sipType = sipType_QGraphicsRectItem;
        break;
    
    case 4:
        sipType = sipType_QGraphicsEllipseItem;
        break;
    
    case 5:
        sipType = sipType_QGraphicsPolygonItem;
        break;
    
    case 6:
        sipType = sipType_QGraphicsLineItem;
        break;
    
    case 7:
        sipType = sipType_QGraphicsPixmapItem;
        break;
    
    case 8:
        // We need to explicitly cast because of the multiple inheritance.
        *sipCppRet = static_cast<QGraphicsTextItem *>(sipCpp);
        sipType = sipType_QGraphicsTextItem;
        break;
    
    case 9:
        sipType = sipType_QGraphicsSimpleTextItem;
        break;
    
    case 10:
        sipType = sipType_QGraphicsItemGroup;
        break;
    
    #if QT_VERSION >= 0x040400
    case 11:
        // We need to explicitly cast because of the multiple inheritance.
        *sipCppRet = static_cast<QGraphicsWidget *>(sipCpp);
        sipType = sipType_QGraphicsWidget;
        break;
    
    case 12:
        // We need to explicitly cast because of the multiple inheritance.
        *sipCppRet = static_cast<QGraphicsProxyWidget *>(sipCpp);
        sipType = sipType_QGraphicsProxyWidget;
        break;
    #endif
    
    default:
        sipType = 0;
    }
%End

public:
%If (Qt_4_4_0 -)

    enum CacheMode
    {
        NoCache,
        ItemCoordinateCache,
        DeviceCoordinateCache,
    };

%End

    enum GraphicsItemChange
    {
        ItemPositionChange,
        ItemMatrixChange,
        ItemVisibleChange,
        ItemEnabledChange,
        ItemSelectedChange,
        ItemParentChange,
        ItemChildAddedChange,
        ItemChildRemovedChange,
%If (Qt_4_3_0 -)
        ItemTransformChange,
%End
%If (Qt_4_3_0 -)
        ItemPositionHasChanged,
%End
%If (Qt_4_3_0 -)
        ItemTransformHasChanged,
%End
%If (Qt_4_3_0 -)
        ItemSceneChange,
%End
%If (Qt_4_4_0 -)
        ItemVisibleHasChanged,
%End
%If (Qt_4_4_0 -)
        ItemEnabledHasChanged,
%End
%If (Qt_4_4_0 -)
        ItemSelectedHasChanged,
%End
%If (Qt_4_4_0 -)
        ItemParentHasChanged,
%End
%If (Qt_4_4_0 -)
        ItemSceneHasChanged,
%End
%If (Qt_4_4_0 -)
        ItemCursorChange,
%End
%If (Qt_4_4_0 -)
        ItemCursorHasChanged,
%End
%If (Qt_4_4_0 -)
        ItemToolTipChange,
%End
%If (Qt_4_4_0 -)
        ItemToolTipHasChanged,
%End
%If (Qt_4_4_0 -)
        ItemFlagsChange,
%End
%If (Qt_4_4_0 -)
        ItemFlagsHaveChanged,
%End
%If (Qt_4_4_0 -)
        ItemZValueChange,
%End
%If (Qt_4_4_0 -)
        ItemZValueHasChanged,
%End
%If (Qt_4_5_0 -)
        ItemOpacityChange,
%End
%If (Qt_4_5_0 -)
        ItemOpacityHasChanged,
%End
%If (Qt_4_6_0 -)
        ItemScenePositionHasChanged,
%End
    };

    enum GraphicsItemFlag
    {
        ItemIsMovable,
        ItemIsSelectable,
        ItemIsFocusable,
%If (Qt_4_3_0 -)
        ItemClipsToShape,
%End
%If (Qt_4_3_0 -)
        ItemClipsChildrenToShape,
%End
%If (Qt_4_3_0 -)
        ItemIgnoresTransformations,
%End
%If (Qt_4_5_0 -)
        ItemIgnoresParentOpacity,
%End
%If (Qt_4_5_0 -)
        ItemDoesntPropagateOpacityToChildren,
%End
%If (Qt_4_5_0 -)
        ItemStacksBehindParent,
%End
%If (Qt_4_6_0 -)
        ItemUsesExtendedStyleOption,
%End
%If (Qt_4_6_0 -)
        ItemHasNoContents,
%End
%If (Qt_4_6_0 -)
        ItemSendsGeometryChanges,
%End
%If (Qt_4_6_0 -)
        ItemAcceptsInputMethod,
%End
%If (Qt_4_6_0 -)
        ItemNegativeZStacksBehindParent,
%End
%If (Qt_4_6_0 -)
        ItemIsPanel,
%End
%If (Qt_4_6_0 -)
        ItemSendsScenePositionChanges,
%End
    };

    typedef QFlags<QGraphicsItem::GraphicsItemFlag> GraphicsItemFlags;
    QGraphicsItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsItem();
    QGraphicsScene *scene() const;
    QGraphicsItem *parentItem() const;
    QGraphicsItem *topLevelItem() const;
    void setParentItem(QGraphicsItem * /TransferThis/);
%If (- Qt_4_6_0)
    QList<QGraphicsItem*> children() const;
%End
    QGraphicsItemGroup *group() const;
    void setGroup(QGraphicsItemGroup *);
    QFlags<QGraphicsItem::GraphicsItemFlag> flags() const;
    void setFlag(QGraphicsItem::GraphicsItemFlag, bool enabled = true);
    void setFlags(QFlags<QGraphicsItem::GraphicsItemFlag>);
    QString toolTip() const;
    void setToolTip(const QString &);
    QCursor cursor() const;
    void setCursor(const QCursor &);
    bool hasCursor() const;
    void unsetCursor();
    bool isVisible() const;
    void setVisible(bool);
    void hide();
    void show();
    bool isEnabled() const;
    void setEnabled(bool);
    bool isSelected() const;
    void setSelected(bool);
    bool acceptDrops() const;
    void setAcceptDrops(bool);
    Qt::MouseButtons acceptedMouseButtons() const;
    void setAcceptedMouseButtons(Qt::MouseButtons);
    bool acceptsHoverEvents() const;
    void setAcceptsHoverEvents(bool);
    bool handlesChildEvents() const;
    void setHandlesChildEvents(bool);
    bool hasFocus() const;
    void setFocus(Qt::FocusReason focusReason = Qt::OtherFocusReason);
    void clearFocus();
    QPointF pos() const;
    qreal x() const;
    qreal y() const;
    QPointF scenePos() const;
    void setPos(const QPointF &);
    void moveBy(qreal, qreal);
    void ensureVisible(const QRectF &rect = QRectF(), int xMargin = 50, int yMargin = 50);
    QMatrix matrix() const;
    QMatrix sceneMatrix() const;
    void setMatrix(const QMatrix &, bool combine = false);
    void resetMatrix();
    void rotate(qreal);
    void scale(qreal, qreal);
    void shear(qreal, qreal);
    void translate(qreal, qreal);
    virtual void advance(int);
    qreal zValue() const;
    void setZValue(qreal);
    virtual QRectF boundingRect() const = 0;
    QRectF childrenBoundingRect() const;
    QRectF sceneBoundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual bool collidesWithItem(const QGraphicsItem *, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    virtual bool collidesWithPath(const QPainterPath &, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    QList<QGraphicsItem*> collidingItems(Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    bool isObscured() const;
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget = 0) = 0;
    void update(const QRectF &rect = QRectF());
    QPointF mapToItem(const QGraphicsItem *, const QPointF &) const;
    QPointF mapToParent(const QPointF &) const;
    QPointF mapToScene(const QPointF &) const;
    QPolygonF mapToItem(const QGraphicsItem *, const QRectF &) const;
    QPolygonF mapToParent(const QRectF &) const;
    QPolygonF mapToScene(const QRectF &) const;
    QPolygonF mapToItem(const QGraphicsItem *, const QPolygonF &) const;
    QPolygonF mapToParent(const QPolygonF &) const;
    QPolygonF mapToScene(const QPolygonF &) const;
    QPainterPath mapToItem(const QGraphicsItem *, const QPainterPath &) const;
    QPainterPath mapToParent(const QPainterPath &) const;
    QPainterPath mapToScene(const QPainterPath &) const;
    QPointF mapFromItem(const QGraphicsItem *, const QPointF &) const;
    QPointF mapFromParent(const QPointF &) const;
    QPointF mapFromScene(const QPointF &) const;
    QPolygonF mapFromItem(const QGraphicsItem *, const QRectF &) const;
    QPolygonF mapFromParent(const QRectF &) const;
    QPolygonF mapFromScene(const QRectF &) const;
    QPolygonF mapFromItem(const QGraphicsItem *, const QPolygonF &) const;
    QPolygonF mapFromParent(const QPolygonF &) const;
    QPolygonF mapFromScene(const QPolygonF &) const;
    QPainterPath mapFromItem(const QGraphicsItem *, const QPainterPath &) const;
    QPainterPath mapFromParent(const QPainterPath &) const;
    QPainterPath mapFromScene(const QPainterPath &) const;
    bool isAncestorOf(const QGraphicsItem *) const;
    QVariant data(int) const;
    void setData(int, const QVariant &);

    enum
    {
        UserType,
    };

    virtual int type() const;
    void installSceneEventFilter(QGraphicsItem *);
    void removeSceneEventFilter(QGraphicsItem *);

protected:
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
    virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *);
    virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *);
    virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *);
    virtual void dropEvent(QGraphicsSceneDragDropEvent *);
    virtual void focusInEvent(QFocusEvent *);
    virtual void focusOutEvent(QFocusEvent *);
    virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *);
    virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *);
    virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *);
    virtual void inputMethodEvent(QInputMethodEvent *);
    virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;
    virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange, const QVariant &);
    virtual void keyPressEvent(QKeyEvent *);
    virtual void keyReleaseEvent(QKeyEvent *);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
    void prepareGeometryChange();
    virtual bool sceneEvent(QEvent *);
    virtual bool sceneEventFilter(QGraphicsItem *, QEvent *);
    virtual void wheelEvent(QGraphicsSceneWheelEvent *);

public:
    void setPos(qreal, qreal);
    void ensureVisible(qreal, qreal, qreal, qreal, int xMargin = 50, int yMargin = 50);
    void update(qreal, qreal, qreal, qreal);
    QPointF mapToItem(const QGraphicsItem *, qreal, qreal) const;
    QPointF mapToParent(qreal, qreal) const;
    QPointF mapToScene(qreal, qreal) const;
    QPointF mapFromItem(const QGraphicsItem *, qreal, qreal) const;
    QPointF mapFromParent(qreal, qreal) const;
    QPointF mapFromScene(qreal, qreal) const;
%If (Qt_4_3_0 -)
    QTransform transform() const;
%End
%If (Qt_4_3_0 -)
    QTransform sceneTransform() const;
%End
%If (Qt_4_3_0 -)
    QTransform deviceTransform(const QTransform &) const;
%End
%If (Qt_4_3_0 -)
    void setTransform(const QTransform &, bool combine = false);
%End
%If (Qt_4_3_0 -)
    void resetTransform();
%End
%If (Qt_4_3_0 -)
    bool isObscured(const QRectF &) const;
%End
%If (Qt_4_3_0 -)
    bool isObscured(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapToItem(const QGraphicsItem *, qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapToParent(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapToScene(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapFromItem(const QGraphicsItem *, qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapFromParent(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapFromScene(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_4_0 -)
    QGraphicsWidget *parentWidget() const;
%End
%If (Qt_4_4_0 -)
    QGraphicsWidget *topLevelWidget() const;
%End
%If (Qt_4_4_0 -)
    QGraphicsWidget *window() const;
%End
%If (Qt_4_4_0 -)
    QList<QGraphicsItem*> childItems() const;
%End
%If (Qt_4_4_0 -)
    bool isWidget() const;
%End
%If (Qt_4_4_0 -)
    bool isWindow() const;
%End
%If (Qt_4_4_0 -)
    QGraphicsItem::CacheMode cacheMode() const;
%End
%If (Qt_4_4_0 -)
    void setCacheMode(QGraphicsItem::CacheMode, const QSize &logicalCacheSize = QSize());
%End
%If (Qt_4_4_0 -)
    bool isVisibleTo(const QGraphicsItem *) const;
%End
%If (Qt_4_4_0 -)
    bool acceptHoverEvents() const;
%End
%If (Qt_4_4_0 -)
    void setAcceptHoverEvents(bool);
%End
%If (Qt_4_4_0 -)
    void grabMouse();
%End
%If (Qt_4_4_0 -)
    void ungrabMouse();
%End
%If (Qt_4_4_0 -)
    void grabKeyboard();
%End
%If (Qt_4_4_0 -)
    void ungrabKeyboard();
%End
%If (Qt_4_4_0 -)
    QRegion boundingRegion(const QTransform &) const;
%End
%If (Qt_4_4_0 -)
    qreal boundingRegionGranularity() const;
%End
%If (Qt_4_4_0 -)
    void setBoundingRegionGranularity(qreal);
%End
%If (Qt_4_4_0 -)
    void scroll(qreal, qreal, const QRectF &rect = QRectF());
%End
%If (Qt_4_4_0 -)
    QGraphicsItem *commonAncestorItem(const QGraphicsItem *) const;
%End
%If (Qt_4_4_0 -)
    bool isUnderMouse() const;
%End
%If (Qt_4_5_0 -)
    qreal opacity() const;
%End
%If (Qt_4_5_0 -)
    qreal effectiveOpacity() const;
%End
%If (Qt_4_5_0 -)
    void setOpacity(qreal);
%End
%If (Qt_4_5_0 -)
    QTransform itemTransform(const QGraphicsItem *, bool *ok = 0) const;
%End
%If (Qt_4_5_0 -)
    bool isClipped() const;
%End
%If (Qt_4_5_0 -)
    QPainterPath clipPath() const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToItem(const QGraphicsItem *, const QRectF &) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToParent(const QRectF &) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToScene(const QRectF &) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromItem(const QGraphicsItem *, const QRectF &) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromParent(const QRectF &) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromScene(const QRectF &) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToItem(const QGraphicsItem *, qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToParent(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToScene(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromItem(const QGraphicsItem *, qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromParent(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromScene(qreal, qreal, qreal, qreal) const;
%End
%If (Qt_4_6_0 -)

    enum PanelModality
    {
        NonModal,
        PanelModal,
        SceneModal,
    };

%End
%If (Qt_4_6_0 -)
    QGraphicsObject *parentObject() const;
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *panel() const;
%End
%If (Qt_4_6_0 -)
    bool isPanel() const;
%End
%If (Qt_4_6_0 -)
    QGraphicsObject *toGraphicsObject();
%End
%If (Qt_4_6_0 -)
    QGraphicsItem::PanelModality panelModality() const;
%End
%If (Qt_4_6_0 -)
    void setPanelModality(QGraphicsItem::PanelModality);
%End
%If (Qt_4_6_0 -)
    bool isBlockedByModalPanel(QGraphicsItem **blockingPanel /Out/ = 0) const;
%End
%If (Qt_4_6_0 -)
    QGraphicsEffect *graphicsEffect() const;
%End
%If (Qt_4_6_0 -)
    void setGraphicsEffect(QGraphicsEffect * /Transfer/);
%End
%If (Qt_4_6_0 -)
    bool acceptTouchEvents() const;
%End
%If (Qt_4_6_0 -)
    void setAcceptTouchEvents(bool);
%End
%If (Qt_4_6_0 -)
    bool filtersChildEvents() const;
%End
%If (Qt_4_6_0 -)
    void setFiltersChildEvents(bool);
%End
%If (Qt_4_6_0 -)
    bool isActive() const;
%End
%If (Qt_4_6_0 -)
    void setActive(bool);
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *focusProxy() const;
%End
%If (Qt_4_6_0 -)
    void setFocusProxy(QGraphicsItem *);
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *focusItem() const;
%End
%If (Qt_4_6_0 -)
    void setX(qreal);
%End
%If (Qt_4_6_0 -)
    void setY(qreal);
%End
%If (Qt_4_6_0 -)
    void setRotation(qreal);
%End
%If (Qt_4_6_0 -)
    qreal rotation() const;
%End
%If (Qt_4_6_0 -)
    void setScale(qreal);
%End
%If (Qt_4_6_0 -)
    qreal scale() const;
%End
%If (Qt_4_6_0 -)
    QList<QGraphicsTransform*> transformations() const;
%End
%If (Qt_4_6_0 -)
    void setTransformations(const QList<QGraphicsTransform*> &);
%End
%If (Qt_4_6_0 -)
    QPointF transformOriginPoint() const;
%End
%If (Qt_4_6_0 -)
    void setTransformOriginPoint(const QPointF &);
%End
%If (Qt_4_6_0 -)
    void setTransformOriginPoint(qreal, qreal);
%End
%If (Qt_4_6_0 -)
    void stackBefore(const QGraphicsItem *);
%End
%If (Qt_4_6_0 -)
    Qt::InputMethodHints inputMethodHints() const;
%End
%If (Qt_4_6_0 -)
    void setInputMethodHints(Qt::InputMethodHints);
%End

private:
    QGraphicsItem(const QGraphicsItem &);
};

%End
%If (Qt_4_2_0 -)
QFlags<QGraphicsItem::GraphicsItemFlag> operator|(QGraphicsItem::GraphicsItemFlag, QFlags<QGraphicsItem::GraphicsItemFlag>);
%End
%If (Qt_4_2_0 -)

class QAbstractGraphicsShapeItem : QGraphicsItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QAbstractGraphicsShapeItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QAbstractGraphicsShapeItem();
    QPen pen() const;
    void setPen(const QPen &);
    QBrush brush() const;
    void setBrush(const QBrush &);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;

private:
    QAbstractGraphicsShapeItem(const QAbstractGraphicsShapeItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsPathItem : QAbstractGraphicsShapeItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsPathItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsPathItem(const QPainterPath &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsPathItem();
    QPainterPath path() const;
    void setPath(const QPainterPath &);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;

private:
    QGraphicsPathItem(const QGraphicsPathItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsRectItem : QAbstractGraphicsShapeItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsRectItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsRectItem(const QRectF &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsRectItem(qreal, qreal, qreal, qreal, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsRectItem();
    QRectF rect() const;
    void setRect(const QRectF &);
    void setRect(qreal, qreal, qreal, qreal);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;

private:
    QGraphicsRectItem(const QGraphicsRectItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsEllipseItem : QAbstractGraphicsShapeItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsEllipseItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsEllipseItem(const QRectF &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsEllipseItem(qreal, qreal, qreal, qreal, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsEllipseItem();
    QRectF rect() const;
    void setRect(const QRectF &);
    void setRect(qreal, qreal, qreal, qreal);
    int startAngle() const;
    void setStartAngle(int);
    int spanAngle() const;
    void setSpanAngle(int);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;

private:
    QGraphicsEllipseItem(const QGraphicsEllipseItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsPolygonItem : QAbstractGraphicsShapeItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsPolygonItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsPolygonItem(const QPolygonF &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsPolygonItem();
    QPolygonF polygon() const;
    void setPolygon(const QPolygonF &);
    Qt::FillRule fillRule() const;
    void setFillRule(Qt::FillRule);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;

private:
    QGraphicsPolygonItem(const QGraphicsPolygonItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsLineItem : QGraphicsItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsLineItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsLineItem(const QLineF &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsLineItem(qreal, qreal, qreal, qreal, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsLineItem();
    QPen pen() const;
    void setPen(const QPen &);
    QLineF line() const;
    void setLine(const QLineF &);
    void setLine(qreal, qreal, qreal, qreal);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;

private:
    QGraphicsLineItem(const QGraphicsLineItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsPixmapItem : QGraphicsItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    enum ShapeMode
    {
        MaskShape,
        BoundingRectShape,
        HeuristicMaskShape,
    };

    QGraphicsPixmapItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsPixmapItem(const QPixmap &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsPixmapItem();
    QPixmap pixmap() const;
    void setPixmap(const QPixmap &);
    Qt::TransformationMode transformationMode() const;
    void setTransformationMode(Qt::TransformationMode);
    QPointF offset() const;
    void setOffset(const QPointF &);
%If (Qt_4_3_0 -)
    void setOffset(qreal, qreal);
%End
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;
    QGraphicsPixmapItem::ShapeMode shapeMode() const;
    void setShapeMode(QGraphicsPixmapItem::ShapeMode);

private:
    QGraphicsPixmapItem(const QGraphicsPixmapItem &);
};

%End
%If (Qt_4_2_0 - Qt_4_6_0)

class QGraphicsTextItem : QObject, QGraphicsItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsTextItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsTextItem(const QString &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsTextItem();
    QString toHtml() const;
    void setHtml(const QString &);
    QString toPlainText() const;
    void setPlainText(const QString &);
    QFont font() const;
    void setFont(const QFont &);
    void setDefaultTextColor(const QColor &);
    QColor defaultTextColor() const;
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;
    void setTextWidth(qreal);
    qreal textWidth() const;
    void adjustSize();
    void setDocument(QTextDocument * /KeepReference/);
    QTextDocument *document() const;
    void setTextInteractionFlags(Qt::TextInteractionFlags);
    Qt::TextInteractionFlags textInteractionFlags() const;
    void setOpenExternalLinks(bool);
    bool openExternalLinks() const;
    void setTextCursor(const QTextCursor &);
    QTextCursor textCursor() const;

signals:
    void linkActivated(const QString &);
    void linkHovered(const QString &);

protected:
    virtual bool sceneEvent(QEvent *);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
    virtual void keyPressEvent(QKeyEvent *);
    virtual void keyReleaseEvent(QKeyEvent *);
    virtual void focusInEvent(QFocusEvent *);
    virtual void focusOutEvent(QFocusEvent *);
    virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *);
    virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *);
    virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *);
    virtual void dropEvent(QGraphicsSceneDragDropEvent *);
    virtual void inputMethodEvent(QInputMethodEvent *);
    virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *);
    virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *);
    virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *);
    virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;

public:
%If (Qt_4_5_0 -)
    void setTabChangesFocus(bool);
%End
%If (Qt_4_5_0 -)
    bool tabChangesFocus() const;
%End

private:
    QGraphicsTextItem(const QGraphicsTextItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsSimpleTextItem : QAbstractGraphicsShapeItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsSimpleTextItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsSimpleTextItem(const QString &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsSimpleTextItem();
    void setText(const QString &);
    QString text() const;
    void setFont(const QFont &);
    QFont font() const;
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;

private:
    QGraphicsSimpleTextItem(const QGraphicsSimpleTextItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsItemGroup : QGraphicsItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsItemGroup(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsItemGroup();
    void addToGroup(QGraphicsItem * /Transfer/);
    void removeFromGroup(QGraphicsItem * /GetWrapper/);
%MethodCode
        sipCpp->removeFromGroup(a0);
        
        // The item will be passed to the group's parent if there is one.  If not,
        // transfer ownership back to Python.
        if (sipCpp->parentItem())
            sipTransferTo(a0Wrapper, sipGetPyObject(sipCpp->parentItem(), sipType_QGraphicsItem));
        else
            sipTransferBack(a0Wrapper);
%End

    virtual QRectF boundingRect() const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;

private:
    QGraphicsItemGroup(const QGraphicsItemGroup &);
};

%End
%If (Qt_4_6_0 -)

class QGraphicsObject : QObject, QGraphicsItem
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsObject(QGraphicsItem *parent /TransferThis/ = 0);
    void grabGesture(Qt::GestureType, Qt::GestureFlags flags = Qt::GestureFlags(0));
    void ungrabGesture(Qt::GestureType);

signals:
    void parentChanged();
    void opacityChanged();
    void visibleChanged();
    void enabledChanged();
    void xChanged();
    void yChanged();
    void zChanged();
    void rotationChanged();
    void scaleChanged();
};

%End
%If (Qt_4_6_0 -)

class QGraphicsTextItem : QGraphicsObject
{

%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
    QGraphicsTextItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    QGraphicsTextItem(const QString &, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsTextItem();
    QString toHtml() const;
    void setHtml(const QString &);
    QString toPlainText() const;
    void setPlainText(const QString &);
    QFont font() const;
    void setFont(const QFont &);
    void setDefaultTextColor(const QColor &);
    QColor defaultTextColor() const;
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &) const;
    virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
    virtual bool isObscuredBy(const QGraphicsItem *) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;
    void setTextWidth(qreal);
    qreal textWidth() const;
    void adjustSize();
    void setDocument(QTextDocument * /KeepReference/);
    QTextDocument *document() const;
    void setTextInteractionFlags(Qt::TextInteractionFlags);
    Qt::TextInteractionFlags textInteractionFlags() const;
    void setTabChangesFocus(bool);
    bool tabChangesFocus() const;
    void setOpenExternalLinks(bool);
    bool openExternalLinks() const;
    void setTextCursor(const QTextCursor &);
    QTextCursor textCursor() const;

signals:
    void linkActivated(const QString &);
    void linkHovered(const QString &);

protected:
    virtual bool sceneEvent(QEvent *);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
    virtual void keyPressEvent(QKeyEvent *);
    virtual void keyReleaseEvent(QKeyEvent *);
    virtual void focusInEvent(QFocusEvent *);
    virtual void focusOutEvent(QFocusEvent *);
    virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *);
    virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *);
    virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *);
    virtual void dropEvent(QGraphicsSceneDragDropEvent *);
    virtual void inputMethodEvent(QInputMethodEvent *);
    virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *);
    virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *);
    virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *);
    virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const;

private:
    QGraphicsTextItem(const QGraphicsTextItem &);
};

%End

%ModuleCode
#if QT_VERSION >= 0x040400
// These are needed by the %ConvertToSubClassCode.
#include <qgraphicsproxywidget.h>
#include <qgraphicswidget.h>
#endif
%End
