// qgraphicsitem.sip generated by MetaSIP
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt4.
// 
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file.  Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
// 
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license.  For more information contact
// info@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
%If (Qt_4_7_0 -)
        ItemRotationChange,
%End
%If (Qt_4_7_0 -)
        ItemRotationHasChanged,
%End
%If (Qt_4_7_0 -)
        ItemScaleChange,
%End
%If (Qt_4_7_0 -)
        ItemScaleHasChanged,
%End
%If (Qt_4_7_0 -)
        ItemTransformOriginPointChange,
%End
%If (Qt_4_7_0 -)
        ItemTransformOriginPointHasChanged,
%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;
%If (Qt_5_0_0 -)
    explicit QGraphicsItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsItem();
    QGraphicsScene *scene() const;
    QGraphicsItem *parentItem() const;
    QGraphicsItem *topLevelItem() const;
    void setParentItem(QGraphicsItem *parent /TransferThis/);
%If (- Qt_4_6_0)
    QList<QGraphicsItem*> children() const;
%End
    QGraphicsItemGroup *group() const;
    void setGroup(QGraphicsItemGroup *group /KeepReference/);
    QFlags<QGraphicsItem::GraphicsItemFlag> flags() const;
    void setFlag(QGraphicsItem::GraphicsItemFlag flag, bool enabled = true);
    void setFlags(QFlags<QGraphicsItem::GraphicsItemFlag> flags);
    QString toolTip() const;
    void setToolTip(const QString &toolTip);
    QCursor cursor() const;
    void setCursor(const QCursor &cursor);
    bool hasCursor() const;
    void unsetCursor();
    bool isVisible() const;
    void setVisible(bool visible);
    void hide();
    void show();
    bool isEnabled() const;
    void setEnabled(bool enabled);
    bool isSelected() const;
    void setSelected(bool selected);
    bool acceptDrops() const;
    void setAcceptDrops(bool on);
    Qt::MouseButtons acceptedMouseButtons() const;
    void setAcceptedMouseButtons(Qt::MouseButtons buttons);
%If (PyQt_Deprecated_5_0)
    bool acceptsHoverEvents() const;
%End
%If (PyQt_Deprecated_5_0)
    void setAcceptsHoverEvents(bool enabled);
%End
    bool handlesChildEvents() const;
    void setHandlesChildEvents(bool enabled);
    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 &pos);
    void moveBy(qreal dx, qreal dy);
    void ensureVisible(const QRectF &rect = QRectF(), int xMargin = 50, int yMargin = 50);
    QMatrix matrix() const;
    QMatrix sceneMatrix() const;
    void setMatrix(const QMatrix &matrix, bool combine = false);
    void resetMatrix();
%If (PyQt_Deprecated_5_0)
    void rotate(qreal angle);
%End
%If (PyQt_Deprecated_5_0)
    void scale(qreal sx, qreal sy);
%End
%If (PyQt_Deprecated_5_0)
    void shear(qreal sh, qreal sv);
%End
%If (PyQt_Deprecated_5_0)
    void translate(qreal dx, qreal dy);
%End
    virtual void advance(int phase);
    qreal zValue() const;
    void setZValue(qreal z);
    virtual QRectF boundingRect() const = 0;
    QRectF childrenBoundingRect() const;
    QRectF sceneBoundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual bool collidesWithItem(const QGraphicsItem *other, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    virtual bool collidesWithPath(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    QList<QGraphicsItem*> collidingItems(Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    virtual bool isObscuredBy(const QGraphicsItem *item) const;
    virtual QPainterPath opaqueArea() const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) = 0;
    void update(const QRectF &rect = QRectF());
    QPointF mapToItem(const QGraphicsItem *item, const QPointF &point) const;
    QPointF mapToParent(const QPointF &point) const;
    QPointF mapToScene(const QPointF &point) const;
    QPolygonF mapToItem(const QGraphicsItem *item, const QRectF &rect) const;
    QPolygonF mapToParent(const QRectF &rect) const;
    QPolygonF mapToScene(const QRectF &rect) const;
    QPolygonF mapToItem(const QGraphicsItem *item, const QPolygonF &polygon) const;
    QPolygonF mapToParent(const QPolygonF &polygon) const;
    QPolygonF mapToScene(const QPolygonF &polygon) const;
    QPainterPath mapToItem(const QGraphicsItem *item, const QPainterPath &path) const;
    QPainterPath mapToParent(const QPainterPath &path) const;
    QPainterPath mapToScene(const QPainterPath &path) const;
    QPointF mapFromItem(const QGraphicsItem *item, const QPointF &point) const;
    QPointF mapFromParent(const QPointF &point) const;
    QPointF mapFromScene(const QPointF &point) const;
    QPolygonF mapFromItem(const QGraphicsItem *item, const QRectF &rect) const;
    QPolygonF mapFromParent(const QRectF &rect) const;
    QPolygonF mapFromScene(const QRectF &rect) const;
    QPolygonF mapFromItem(const QGraphicsItem *item, const QPolygonF &polygon) const;
    QPolygonF mapFromParent(const QPolygonF &polygon) const;
    QPolygonF mapFromScene(const QPolygonF &polygon) const;
    QPainterPath mapFromItem(const QGraphicsItem *item, const QPainterPath &path) const;
    QPainterPath mapFromParent(const QPainterPath &path) const;
    QPainterPath mapFromScene(const QPainterPath &path) const;
    bool isAncestorOf(const QGraphicsItem *child) const;
    QVariant data(int key) const;
    void setData(int key, const QVariant &value);
%If (- Qt_5_0_0)

    enum
    {
        UserType,
    };

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

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

public:
    void setPos(qreal ax, qreal ay);
    void ensureVisible(qreal x, qreal y, qreal w, qreal h, int xMargin = 50, int yMargin = 50);
    void update(qreal ax, qreal ay, qreal width, qreal height);
    QPointF mapToItem(const QGraphicsItem *item, qreal ax, qreal ay) const;
    QPointF mapToParent(qreal ax, qreal ay) const;
    QPointF mapToScene(qreal ax, qreal ay) const;
    QPointF mapFromItem(const QGraphicsItem *item, qreal ax, qreal ay) const;
    QPointF mapFromParent(qreal ax, qreal ay) const;
    QPointF mapFromScene(qreal ax, qreal ay) 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 &viewportTransform) const;
%End
%If (Qt_4_3_0 -)
    void setTransform(const QTransform &matrix, bool combine = false);
%End
%If (Qt_4_3_0 -)
    void resetTransform();
%End
%If (Qt_5_0_0 -)
    bool isObscured(const QRectF &rect = QRectF()) const;
%End
%If (- Qt_5_0_0)
    bool isObscured() const;
%End
%If (Qt_4_3_0 - Qt_5_0_0)
    bool isObscured(const QRectF &rect) const;
%End
%If (Qt_4_3_0 -)
    bool isObscured(qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapToItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapToParent(qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapToScene(qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapFromItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapFromParent(qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_3_0 -)
    QPolygonF mapFromScene(qreal ax, qreal ay, qreal w, qreal h) 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 mode, const QSize &logicalCacheSize = QSize());
%End
%If (Qt_4_4_0 -)
    bool isVisibleTo(const QGraphicsItem *parent) const;
%End
%If (Qt_4_4_0 -)
    bool acceptHoverEvents() const;
%End
%If (Qt_4_4_0 -)
    void setAcceptHoverEvents(bool enabled);
%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 &itemToDeviceTransform) const;
%End
%If (Qt_4_4_0 -)
    qreal boundingRegionGranularity() const;
%End
%If (Qt_4_4_0 -)
    void setBoundingRegionGranularity(qreal granularity);
%End
%If (Qt_4_4_0 -)
    void scroll(qreal dx, qreal dy, const QRectF &rect = QRectF());
%End
%If (Qt_4_4_0 -)
    QGraphicsItem *commonAncestorItem(const QGraphicsItem *other) 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 opacity);
%End
%If (Qt_4_5_0 -)
    QTransform itemTransform(const QGraphicsItem *other, 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 *item, const QRectF &rect) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToParent(const QRectF &rect) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToScene(const QRectF &rect) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromItem(const QGraphicsItem *item, const QRectF &rect) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromParent(const QRectF &rect) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromScene(const QRectF &rect) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToParent(qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectToScene(qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromItem(const QGraphicsItem *item, qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromParent(qreal ax, qreal ay, qreal w, qreal h) const;
%End
%If (Qt_4_5_0 -)
    QRectF mapRectFromScene(qreal ax, qreal ay, qreal w, qreal h) 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 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 *effect /Transfer/);
%End
%If (Qt_4_6_0 -)
    bool acceptTouchEvents() const;
%End
%If (Qt_4_6_0 -)
    void setAcceptTouchEvents(bool enabled);
%End
%If (Qt_4_6_0 -)
    bool filtersChildEvents() const;
%End
%If (Qt_4_6_0 -)
    void setFiltersChildEvents(bool enabled);
%End
%If (Qt_4_6_0 -)
    bool isActive() const;
%End
%If (Qt_4_6_0 -)
    void setActive(bool active);
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *focusProxy() const;
%End
%If (Qt_4_6_0 -)
    void setFocusProxy(QGraphicsItem *item /KeepReference/);
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *focusItem() const;
%End
%If (Qt_4_6_0 -)
    void setX(qreal x);
%End
%If (Qt_4_6_0 -)
    void setY(qreal y);
%End
%If (Qt_4_6_0 -)
    void setRotation(qreal angle);
%End
%If (Qt_4_6_0 -)
    qreal rotation() const;
%End
%If (Qt_4_6_0 -)
    void setScale(qreal scale);
%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*> &transformations /KeepReference/);
%End
%If (Qt_4_6_0 -)
    QPointF transformOriginPoint() const;
%End
%If (Qt_4_6_0 -)
    void setTransformOriginPoint(const QPointF &origin);
%End
%If (Qt_4_6_0 -)
    void setTransformOriginPoint(qreal ax, qreal ay);
%End
%If (Qt_4_6_0 -)
    void stackBefore(const QGraphicsItem *sibling);
%End
%If (Qt_4_6_0 -)
    Qt::InputMethodHints inputMethodHints() const;
%End
%If (Qt_4_6_0 -)
    void setInputMethodHints(Qt::InputMethodHints hints);
%End

protected:
%If (Qt_4_7_0 -)
    void updateMicroFocus();
%End

private:
    QGraphicsItem(const QGraphicsItem &);
};

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

class QAbstractGraphicsShapeItem : QGraphicsItem
{
%TypeHeaderCode
#include <qgraphicsitem.h>
%End

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

private:
    QAbstractGraphicsShapeItem(const QAbstractGraphicsShapeItem &);
};

%End
%If (Qt_4_2_0 -)

class QGraphicsPathItem : QAbstractGraphicsShapeItem
{
%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
%If (Qt_5_0_0 -)
    explicit QGraphicsPathItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsPathItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsPathItem(const QPainterPath &path, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsPathItem(const QPainterPath &path, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsPathItem();
    QPainterPath path() const;
    void setPath(const QPainterPath &path);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *item) 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:
%If (Qt_5_0_0 -)
    explicit QGraphicsRectItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsRectItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsRectItem(const QRectF &rect, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsRectItem(const QRectF &rect, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsRectItem();
    QRectF rect() const;
    void setRect(const QRectF &rect);
    void setRect(qreal ax, qreal ay, qreal w, qreal h);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *item) 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:
%If (Qt_5_0_0 -)
    explicit QGraphicsEllipseItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsEllipseItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsEllipseItem(const QRectF &rect, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsEllipseItem(const QRectF &rect, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsEllipseItem();
    QRectF rect() const;
    void setRect(const QRectF &rect);
    void setRect(qreal ax, qreal ay, qreal w, qreal h);
    int startAngle() const;
    void setStartAngle(int angle);
    int spanAngle() const;
    void setSpanAngle(int angle);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *item) 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:
%If (Qt_5_0_0 -)
    explicit QGraphicsPolygonItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsPolygonItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsPolygonItem(const QPolygonF &polygon, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsPolygonItem(const QPolygonF &polygon, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsPolygonItem();
    QPolygonF polygon() const;
    void setPolygon(const QPolygonF &polygon);
    Qt::FillRule fillRule() const;
    void setFillRule(Qt::FillRule rule);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *item) 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:
%If (Qt_5_0_0 -)
    explicit QGraphicsLineItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsLineItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsLineItem(const QLineF &line, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsLineItem(const QLineF &line, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsLineItem();
    QPen pen() const;
    void setPen(const QPen &pen);
    QLineF line() const;
    void setLine(const QLineF &line);
    void setLine(qreal x1, qreal y1, qreal x2, qreal y2);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *item) 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,
    };

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

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 &text, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
    virtual ~QGraphicsTextItem();
    QString toHtml() const;
    void setHtml(const QString &html);
    QString toPlainText() const;
    void setPlainText(const QString &text);
    QFont font() const;
    void setFont(const QFont &font);
    void setDefaultTextColor(const QColor &c);
    QColor defaultTextColor() const;
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    virtual bool isObscuredBy(const QGraphicsItem *item) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;
    void setTextWidth(qreal width);
    qreal textWidth() const;
    void adjustSize();
    void setDocument(QTextDocument *document /KeepReference/);
    QTextDocument *document() const;
    void setTextInteractionFlags(Qt::TextInteractionFlags flags);
    Qt::TextInteractionFlags textInteractionFlags() const;
    void setOpenExternalLinks(bool open);
    bool openExternalLinks() const;
    void setTextCursor(const QTextCursor &cursor);
    QTextCursor textCursor() const;

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

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

public:
%If (Qt_4_5_0 -)
    void setTabChangesFocus(bool b);
%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:
%If (Qt_5_0_0 -)
    explicit QGraphicsSimpleTextItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsSimpleTextItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsSimpleTextItem(const QString &text, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsSimpleTextItem(const QString &text, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsSimpleTextItem();
    void setText(const QString &text);
    QString text() const;
    void setFont(const QFont &font);
    QFont font() const;
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    virtual bool isObscuredBy(const QGraphicsItem *item) 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:
%If (Qt_5_0_0 -)
    explicit QGraphicsItemGroup(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsItemGroup(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsItemGroup();
    void addToGroup(QGraphicsItem *item /Transfer/);
    void removeFromGroup(QGraphicsItem *item /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 *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    virtual bool isObscuredBy(const QGraphicsItem *item) 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:
%If (Qt_5_0_0 -)
    explicit QGraphicsObject(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsObject(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    virtual ~QGraphicsObject();
%End
    void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags(0));
    void ungrabGesture(Qt::GestureType type);

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

protected slots:
%If (Qt_4_7_0 -)
    void updateMicroFocus();
%End

protected:
%If (Qt_5_0_0 -)
    virtual bool event(QEvent *ev);
%End
};

%End
%If (Qt_4_6_0 -)

class QGraphicsTextItem : QGraphicsObject
{
%TypeHeaderCode
#include <qgraphicsitem.h>
%End

public:
%If (Qt_5_0_0 -)
    explicit QGraphicsTextItem(QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsTextItem(QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
%If (Qt_5_0_0 -)
    QGraphicsTextItem(const QString &text, QGraphicsItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QGraphicsTextItem(const QString &text, QGraphicsItem *parent /TransferThis/ = 0, QGraphicsScene *scene /TransferThis/ = 0);
%End
    virtual ~QGraphicsTextItem();
    QString toHtml() const;
    void setHtml(const QString &html);
    QString toPlainText() const;
    void setPlainText(const QString &text);
    QFont font() const;
    void setFont(const QFont &font);
    void setDefaultTextColor(const QColor &c);
    QColor defaultTextColor() const;
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;
    virtual bool contains(const QPointF &point) const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    virtual bool isObscuredBy(const QGraphicsItem *item) const;
    virtual QPainterPath opaqueArea() const;
    virtual int type() const;
    void setTextWidth(qreal width);
    qreal textWidth() const;
    void adjustSize();
    void setDocument(QTextDocument *document /KeepReference/);
    QTextDocument *document() const;
    void setTextInteractionFlags(Qt::TextInteractionFlags flags);
    Qt::TextInteractionFlags textInteractionFlags() const;
    void setTabChangesFocus(bool b);
    bool tabChangesFocus() const;
    void setOpenExternalLinks(bool open);
    bool openExternalLinks() const;
    void setTextCursor(const QTextCursor &cursor);
    QTextCursor textCursor() const;

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

protected:
    virtual bool sceneEvent(QEvent *event);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
    virtual void keyPressEvent(QKeyEvent *event);
    virtual void keyReleaseEvent(QKeyEvent *event);
    virtual void focusInEvent(QFocusEvent *event);
    virtual void focusOutEvent(QFocusEvent *event);
    virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
    virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
    virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
    virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
    virtual void inputMethodEvent(QInputMethodEvent *event);
    virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
    virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
    virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
    virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) 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
