QGraphicsItem Class Reference

#include <qgraphicsitem.h>

Class Description

Definition at line 89 of file qgraphicsitem.h.

+ Inheritance diagram for QGraphicsItem:

Public Types

enum  GraphicsItemFlag {
  ItemIsMovable = 0x1, ItemIsSelectable = 0x2, ItemIsFocusable = 0x4, ItemClipsToShape = 0x8,
  ItemClipsChildrenToShape = 0x10, ItemIgnoresTransformations = 0x20, ItemIgnoresParentOpacity = 0x40, ItemDoesntPropagateOpacityToChildren = 0x80,
  ItemStacksBehindParent = 0x100, ItemUsesExtendedStyleOption = 0x200, ItemHasNoContents = 0x400, ItemSendsGeometryChanges = 0x800,
  ItemAcceptsInputMethod = 0x1000, ItemNegativeZStacksBehindParent = 0x2000, ItemIsPanel = 0x4000, ItemIsFocusScope = 0x8000,
  ItemSendsScenePositionChanges = 0x10000, ItemStopsClickFocusPropagation = 0x20000, ItemStopsFocusHandling = 0x40000
}
 
enum  GraphicsItemChange {
  ItemPositionChange, ItemMatrixChange, ItemVisibleChange, ItemEnabledChange,
  ItemSelectedChange, ItemParentChange, ItemChildAddedChange, ItemChildRemovedChange,
  ItemTransformChange, ItemPositionHasChanged, ItemTransformHasChanged, ItemSceneChange,
  ItemVisibleHasChanged, ItemEnabledHasChanged, ItemSelectedHasChanged, ItemParentHasChanged,
  ItemSceneHasChanged, ItemCursorChange, ItemCursorHasChanged, ItemToolTipChange,
  ItemToolTipHasChanged, ItemFlagsChange, ItemFlagsHaveChanged, ItemZValueChange,
  ItemZValueHasChanged, ItemOpacityChange, ItemOpacityHasChanged, ItemScenePositionHasChanged,
  ItemRotationChange, ItemRotationHasChanged, ItemScaleChange, ItemScaleHasChanged,
  ItemTransformOriginPointChange, ItemTransformOriginPointHasChanged
}
 
enum  CacheMode { NoCache, ItemCoordinateCache, DeviceCoordinateCache }
 
enum  PanelModality { NonModal, PanelModal, SceneModal }
 
enum  { Type = 1, UserType = 65536 }
 

Public Member Functions

 QGraphicsItem (QGraphicsItem *parent=0, QGraphicsScene *scene=0)
 
virtual ~QGraphicsItem ()
 
QGraphicsScenescene () const
 
QGraphicsItemparentItem () const
 
QGraphicsItemtopLevelItem () const
 
QGraphicsObjectparentObject () const
 
QGraphicsWidgetparentWidget () const
 
QGraphicsWidgettopLevelWidget () const
 
QGraphicsWidgetwindow () const
 
QGraphicsItempanel () const
 
void setParentItem (QGraphicsItem *parent)
 
QList< QGraphicsItem * > children () const
 
QList< QGraphicsItem * > childItems () const
 
bool isWidget () const
 
bool isWindow () const
 
bool isPanel () const
 
QGraphicsObjecttoGraphicsObject ()
 
const QGraphicsObjecttoGraphicsObject () const
 
QGraphicsItemGroupgroup () const
 
void setGroup (QGraphicsItemGroup *group)
 
GraphicsItemFlags flags () const
 
void setFlag (GraphicsItemFlag flag, bool enabled=true)
 
void setFlags (GraphicsItemFlags flags)
 
CacheMode cacheMode () const
 
void setCacheMode (CacheMode mode, const QSize &cacheSize=QSize())
 
PanelModality panelModality () const
 
void setPanelModality (PanelModality panelModality)
 
bool isBlockedByModalPanel (QGraphicsItem **blockingPanel=0) const
 
QString toolTip () const
 
void setToolTip (const QString &toolTip)
 
QCursor cursor () const
 
void setCursor (const QCursor &cursor)
 
bool hasCursor () const
 
void unsetCursor ()
 
bool isVisible () const
 
bool isVisibleTo (const QGraphicsItem *parent) 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)
 
qreal opacity () const
 
qreal effectiveOpacity () const
 
void setOpacity (qreal opacity)
 
QGraphicsEffectgraphicsEffect () const
 
void setGraphicsEffect (QGraphicsEffect *effect)
 
Qt::MouseButtons acceptedMouseButtons () const
 
void setAcceptedMouseButtons (Qt::MouseButtons buttons)
 
bool acceptsHoverEvents () const
 
void setAcceptsHoverEvents (bool enabled)
 
bool acceptHoverEvents () const
 
void setAcceptHoverEvents (bool enabled)
 
bool acceptTouchEvents () const
 
void setAcceptTouchEvents (bool enabled)
 
bool filtersChildEvents () const
 
void setFiltersChildEvents (bool enabled)
 
bool handlesChildEvents () const
 
void setHandlesChildEvents (bool enabled)
 
bool isActive () const
 
void setActive (bool active)
 
bool hasFocus () const
 
void setFocus (Qt::FocusReason focusReason=Qt::OtherFocusReason)
 
void clearFocus ()
 
QGraphicsItemfocusProxy () const
 
void setFocusProxy (QGraphicsItem *item)
 
QGraphicsItemfocusItem () const
 
QGraphicsItemfocusScopeItem () const
 
void grabMouse ()
 
void ungrabMouse ()
 
void grabKeyboard ()
 
void ungrabKeyboard ()
 
QPointF pos () const
 
qreal x () const
 
void setX (qreal x)
 
qreal y () const
 
void setY (qreal y)
 
QPointF scenePos () const
 
void setPos (const QPointF &pos)
 
void setPos (qreal x, qreal y)
 
void moveBy (qreal dx, qreal dy)
 
void ensureVisible (const QRectF &rect=QRectF(), int xmargin=50, int ymargin=50)
 
void ensureVisible (qreal x, qreal y, qreal w, qreal h, int xmargin=50, int ymargin=50)
 
QMatrix matrix () const
 
QMatrix sceneMatrix () const
 
void setMatrix (const QMatrix &matrix, bool combine=false)
 
void resetMatrix ()
 
QTransform transform () const
 
QTransform sceneTransform () const
 
QTransform deviceTransform (const QTransform &viewportTransform) const
 
QTransform itemTransform (const QGraphicsItem *other, bool *ok=0) const
 
void setTransform (const QTransform &matrix, bool combine=false)
 
void resetTransform ()
 
void rotate (qreal angle)
 
void scale (qreal sx, qreal sy)
 
void shear (qreal sh, qreal sv)
 
void translate (qreal dx, qreal dy)
 
void setRotation (qreal angle)
 
qreal rotation () const
 
void setScale (qreal scale)
 
qreal scale () const
 
QList< QGraphicsTransform * > transformations () const
 
void setTransformations (const QList< QGraphicsTransform * > &transformations)
 
QPointF transformOriginPoint () const
 
void setTransformOriginPoint (const QPointF &origin)
 
void setTransformOriginPoint (qreal ax, qreal ay)
 
virtual void advance (int phase)
 
qreal zValue () const
 
void setZValue (qreal z)
 
void stackBefore (const QGraphicsItem *sibling)
 
virtual QRectF boundingRect () const =0
 
QRectF childrenBoundingRect () const
 
QRectF sceneBoundingRect () const
 
virtual QPainterPath shape () const
 
bool isClipped () const
 
QPainterPath clipPath () 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
 
bool isObscured () const
 
bool isObscured (const QRectF &rect) const
 
bool isObscured (qreal x, qreal y, qreal w, qreal h) const
 
virtual bool isObscuredBy (const QGraphicsItem *item) const
 
virtual QPainterPath opaqueArea () const
 
QRegion boundingRegion (const QTransform &itemToDeviceTransform) const
 
qreal boundingRegionGranularity () const
 
void setBoundingRegionGranularity (qreal granularity)
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)=0
 
void update (const QRectF &rect=QRectF())
 
void update (qreal x, qreal y, qreal width, qreal height)
 
void scroll (qreal dx, qreal dy, 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
 
QRectF mapRectToItem (const QGraphicsItem *item, const QRectF &rect) const
 
QRectF mapRectToParent (const QRectF &rect) const
 
QRectF mapRectToScene (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
 
QRectF mapRectFromItem (const QGraphicsItem *item, const QRectF &rect) const
 
QRectF mapRectFromParent (const QRectF &rect) const
 
QRectF mapRectFromScene (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
 
QPointF mapToItem (const QGraphicsItem *item, qreal x, qreal y) const
 
QPointF mapToParent (qreal x, qreal y) const
 
QPointF mapToScene (qreal x, qreal y) const
 
QPolygonF mapToItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const
 
QPolygonF mapToParent (qreal x, qreal y, qreal w, qreal h) const
 
QPolygonF mapToScene (qreal x, qreal y, qreal w, qreal h) const
 
QRectF mapRectToItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const
 
QRectF mapRectToParent (qreal x, qreal y, qreal w, qreal h) const
 
QRectF mapRectToScene (qreal x, qreal y, qreal w, qreal h) const
 
QPointF mapFromItem (const QGraphicsItem *item, qreal x, qreal y) const
 
QPointF mapFromParent (qreal x, qreal y) const
 
QPointF mapFromScene (qreal x, qreal y) const
 
QPolygonF mapFromItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const
 
QPolygonF mapFromParent (qreal x, qreal y, qreal w, qreal h) const
 
QPolygonF mapFromScene (qreal x, qreal y, qreal w, qreal h) const
 
QRectF mapRectFromItem (const QGraphicsItem *item, qreal x, qreal y, qreal w, qreal h) const
 
QRectF mapRectFromParent (qreal x, qreal y, qreal w, qreal h) const
 
QRectF mapRectFromScene (qreal x, qreal y, qreal w, qreal h) const
 
bool isAncestorOf (const QGraphicsItem *child) const
 
QGraphicsItemcommonAncestorItem (const QGraphicsItem *other) const
 
bool isUnderMouse () const
 
QVariant data (int key) const
 
void setData (int key, const QVariant &value)
 
Qt::InputMethodHints inputMethodHints () const
 
void setInputMethodHints (Qt::InputMethodHints hints)
 
virtual int type () const
 
void installSceneEventFilter (QGraphicsItem *filterItem)
 
void removeSceneEventFilter (QGraphicsItem *filterItem)
 

Protected Types

enum  Extension { UserExtension = 0x80000000 }
 

Protected Member Functions

void updateMicroFocus ()
 
virtual bool sceneEventFilter (QGraphicsItem *watched, QEvent *event)
 
virtual bool sceneEvent (QEvent *event)
 
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 hoverMoveEvent (QGraphicsSceneHoverEvent *event)
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 
virtual void wheelEvent (QGraphicsSceneWheelEvent *event)
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 
virtual bool supportsExtension (Extension extension) const
 
virtual void setExtension (Extension extension, const QVariant &variant)
 
virtual QVariant extension (const QVariant &variant) const
 
 QGraphicsItem (QGraphicsItemPrivate &dd, QGraphicsItem *parent, QGraphicsScene *scene)
 
void addToIndex ()
 
void removeFromIndex ()
 
void prepareGeometryChange ()
 

Protected Attributes

QScopedPointer< QGraphicsItemPrivate > d_ptr
 

Friends

class QGraphicsItemGroup
 
class QGraphicsScene
 
class QGraphicsScenePrivate
 
class QGraphicsSceneFindItemBspTreeVisitor
 
class QGraphicsSceneBspTree
 
class QGraphicsView
 
class QGraphicsViewPrivate
 
class QGraphicsObject
 
class QGraphicsWidget
 
class QGraphicsWidgetPrivate
 
class QGraphicsProxyWidgetPrivate
 
class QGraphicsSceneIndex
 
class QGraphicsSceneIndexPrivate
 
class QGraphicsSceneBspTreeIndex
 
class QGraphicsSceneBspTreeIndexPrivate
 
class QGraphicsItemEffectSourcePrivate
 
class QGraphicsTransformPrivate
 
class QGestureManager
 
class ::tst_QGraphicsItem
 
bool qt_closestLeaf (const QGraphicsItem *, const QGraphicsItem *)
 
bool qt_closestItemFirst (const QGraphicsItem *, const QGraphicsItem *)
 

Member Enumeration Documentation

Enumerator
ItemIsMovable 
ItemIsSelectable 
ItemIsFocusable 
ItemClipsToShape 
ItemClipsChildrenToShape 
ItemIgnoresTransformations 
ItemIgnoresParentOpacity 
ItemDoesntPropagateOpacityToChildren 
ItemStacksBehindParent 
ItemUsesExtendedStyleOption 
ItemHasNoContents 
ItemSendsGeometryChanges 
ItemAcceptsInputMethod 
ItemNegativeZStacksBehindParent 
ItemIsPanel 
ItemIsFocusScope 
ItemSendsScenePositionChanges 
ItemStopsClickFocusPropagation 
ItemStopsFocusHandling 

Definition at line 92 of file qgraphicsitem.h.

92  {
93  ItemIsMovable = 0x1,
94  ItemIsSelectable = 0x2,
95  ItemIsFocusable = 0x4,
96  ItemClipsToShape = 0x8,
101  ItemStacksBehindParent = 0x100,
103  ItemHasNoContents = 0x400,
104  ItemSendsGeometryChanges = 0x800,
105  ItemAcceptsInputMethod = 0x1000,
107  ItemIsPanel = 0x4000,
108  ItemIsFocusScope = 0x8000, // internal
111  ItemStopsFocusHandling = 0x40000
112  // NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag.
113  };
Enumerator
ItemPositionChange 
ItemMatrixChange 
ItemVisibleChange 
ItemEnabledChange 
ItemSelectedChange 
ItemParentChange 
ItemChildAddedChange 
ItemChildRemovedChange 
ItemTransformChange 
ItemPositionHasChanged 
ItemTransformHasChanged 
ItemSceneChange 
ItemVisibleHasChanged 
ItemEnabledHasChanged 
ItemSelectedHasChanged 
ItemParentHasChanged 
ItemSceneHasChanged 
ItemCursorChange 
ItemCursorHasChanged 
ItemToolTipChange 
ItemToolTipHasChanged 
ItemFlagsChange 
ItemFlagsHaveChanged 
ItemZValueChange 
ItemZValueHasChanged 
ItemOpacityChange 
ItemOpacityHasChanged 
ItemScenePositionHasChanged 
ItemRotationChange 
ItemRotationHasChanged 
ItemScaleChange 
ItemScaleHasChanged 
ItemTransformOriginPointChange 
ItemTransformOriginPointHasChanged 

Definition at line 116 of file qgraphicsitem.h.

116  {
151  };
enum CacheMode
Enumerator
NoCache 
ItemCoordinateCache 
DeviceCoordinateCache 

Definition at line 153 of file qgraphicsitem.h.

Enumerator
NonModal 
PanelModal 
SceneModal 

Definition at line 159 of file qgraphicsitem.h.

anonymous enum
Enumerator
Type 
UserType 

Definition at line 419 of file qgraphicsitem.h.

419  {
420  Type = 1,
421  UserType = 65536
422  };
enum Extension
protected
Enumerator
UserExtension 

Definition at line 454 of file qgraphicsitem.h.

454  {
455  UserExtension = 0x80000000
456  };

Constructor & Destructor Documentation

QGraphicsItem ( QGraphicsItem parent = 0,
QGraphicsScene scene = 0 
)
virtual ~QGraphicsItem ( )
virtual
QGraphicsItem ( QGraphicsItemPrivate &  dd,
QGraphicsItem parent,
QGraphicsScene scene 
)
protected

Member Function Documentation

QGraphicsScene* scene ( ) const
QGraphicsItem* parentItem ( ) const
QGraphicsItem* topLevelItem ( ) const
QGraphicsObject* parentObject ( ) const
QGraphicsWidget* parentWidget ( ) const
QGraphicsWidget* topLevelWidget ( ) const
QGraphicsWidget* window ( ) const
QGraphicsItem* panel ( ) const
void setParentItem ( QGraphicsItem parent)
QList<QGraphicsItem *> children ( ) const
QList<QGraphicsItem *> childItems ( ) const
bool isWidget ( ) const
bool isWindow ( ) const
bool isPanel ( ) const
QGraphicsObject* toGraphicsObject ( )
const QGraphicsObject* toGraphicsObject ( ) const
QGraphicsItemGroup* group ( ) const
void setGroup ( QGraphicsItemGroup group)
GraphicsItemFlags flags ( ) const
void setFlag ( GraphicsItemFlag  flag,
bool  enabled = true 
)
void setFlags ( GraphicsItemFlags  flags)
CacheMode cacheMode ( ) const
void setCacheMode ( CacheMode  mode,
const QSize cacheSize = QSize() 
)
PanelModality panelModality ( ) const
void setPanelModality ( PanelModality  panelModality)
bool isBlockedByModalPanel ( QGraphicsItem **  blockingPanel = 0) const
QString toolTip ( ) const
void setToolTip ( const QString toolTip)
QCursor cursor ( ) const
void setCursor ( const QCursor cursor)
bool hasCursor ( ) const
void unsetCursor ( )
bool isVisible ( ) const
bool isVisibleTo ( const QGraphicsItem parent) const
void setVisible ( bool  visible)
void hide ( )
inline

Definition at line 222 of file qgraphicsitem.h.

222 { setVisible(false); }
void setVisible(bool visible)
void show ( )
inline

Definition at line 223 of file qgraphicsitem.h.

223 { setVisible(true); }
void setVisible(bool visible)
bool isEnabled ( ) const
void setEnabled ( bool  enabled)
bool isSelected ( ) const
void setSelected ( bool  selected)
bool acceptDrops ( ) const
void setAcceptDrops ( bool  on)
qreal opacity ( ) const
qreal effectiveOpacity ( ) const
void setOpacity ( qreal  opacity)
QGraphicsEffect* graphicsEffect ( ) const
void setGraphicsEffect ( QGraphicsEffect effect)
Qt::MouseButtons acceptedMouseButtons ( ) const
void setAcceptedMouseButtons ( Qt::MouseButtons  buttons)
bool acceptsHoverEvents ( ) const
void setAcceptsHoverEvents ( bool  enabled)
bool acceptHoverEvents ( ) const
void setAcceptHoverEvents ( bool  enabled)
bool acceptTouchEvents ( ) const
void setAcceptTouchEvents ( bool  enabled)
bool filtersChildEvents ( ) const
void setFiltersChildEvents ( bool  enabled)
bool handlesChildEvents ( ) const
void setHandlesChildEvents ( bool  enabled)
bool isActive ( ) const
void setActive ( bool  active)
bool hasFocus ( ) const
void setFocus ( Qt::FocusReason  focusReason = Qt::OtherFocusReason)
void clearFocus ( )
QGraphicsItem* focusProxy ( ) const
void setFocusProxy ( QGraphicsItem item)
QGraphicsItem* focusItem ( ) const
QGraphicsItem* focusScopeItem ( ) const
void grabMouse ( )
void ungrabMouse ( )
void grabKeyboard ( )
void ungrabKeyboard ( )
QPointF pos ( ) const
qreal x ( ) const
inline

Definition at line 280 of file qgraphicsitem.h.

280 { return pos().x(); }
QPointF pos() const
qreal x() const
Definition: qpoint.h:282
void setX ( qreal  x)
qreal y ( ) const
inline

Definition at line 282 of file qgraphicsitem.h.

282 { return pos().y(); }
qreal y() const
Definition: qpoint.h:287
QPointF pos() const
void setY ( qreal  y)
QPointF scenePos ( ) const
void setPos ( const QPointF pos)
void setPos ( qreal  x,
qreal  y 
)
inline

Definition at line 501 of file qgraphicsitem.h.

502 { setPos(QPointF(ax, ay)); }
void setPos(const QPointF &pos)
void moveBy ( qreal  dx,
qreal  dy 
)
inline

Definition at line 287 of file qgraphicsitem.h.

287 { setPos(pos().x() + dx, pos().y() + dy); }
int int int int * dy
Definition: GLee.h:10535
void setPos(const QPointF &pos)
qreal x() const
QPointF pos() const
qreal y() const
int int int * dx
Definition: GLee.h:10535
void ensureVisible ( const QRectF rect = QRectF(),
int  xmargin = 50,
int  ymargin = 50 
)
void ensureVisible ( qreal  x,
qreal  y,
qreal  w,
qreal  h,
int  xmargin = 50,
int  ymargin = 50 
)
inline

Definition at line 503 of file qgraphicsitem.h.

504 { ensureVisible(QRectF(ax, ay, w, h), xmargin, ymargin); }
void ensureVisible(const QRectF &rect=QRectF(), int xmargin=50, int ymargin=50)
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QMatrix matrix ( ) const
QMatrix sceneMatrix ( ) const
void setMatrix ( const QMatrix matrix,
bool  combine = false 
)
void resetMatrix ( )
QTransform transform ( ) const
QTransform sceneTransform ( ) const
QTransform deviceTransform ( const QTransform viewportTransform) const
QTransform itemTransform ( const QGraphicsItem other,
bool *  ok = 0 
) const
void setTransform ( const QTransform matrix,
bool  combine = false 
)
void resetTransform ( )
void rotate ( qreal  angle)
void scale ( qreal  sx,
qreal  sy 
)
void shear ( qreal  sh,
qreal  sv 
)
void translate ( qreal  dx,
qreal  dy 
)
void setRotation ( qreal  angle)
qreal rotation ( ) const
void setScale ( qreal  scale)
qreal scale ( ) const
QList<QGraphicsTransform *> transformations ( ) const
void setTransformations ( const QList< QGraphicsTransform * > &  transformations)
QPointF transformOriginPoint ( ) const
void setTransformOriginPoint ( const QPointF origin)
void setTransformOriginPoint ( qreal  ax,
qreal  ay 
)
inline

Definition at line 320 of file qgraphicsitem.h.

321  { setTransformOriginPoint(QPointF(ax,ay)); }
void setTransformOriginPoint(const QPointF &origin)
virtual void advance ( int  phase)
virtual
qreal zValue ( ) const
void setZValue ( qreal  z)
void stackBefore ( const QGraphicsItem sibling)
QRectF childrenBoundingRect ( ) const
QRectF sceneBoundingRect ( ) const
bool isClipped ( ) const
QPainterPath clipPath ( ) const
virtual bool collidesWithItem ( const QGraphicsItem other,
Qt::ItemSelectionMode  mode = Qt::IntersectsItemShape 
) const
virtual
virtual bool collidesWithPath ( const QPainterPath path,
Qt::ItemSelectionMode  mode = Qt::IntersectsItemShape 
) const
virtual
bool isObscured ( ) const
bool isObscured ( const QRectF rect) const
bool isObscured ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 507 of file qgraphicsitem.h.

508 { return isObscured(QRectF(ax, ay, w, h)); }
bool isObscured() const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QRegion boundingRegion ( const QTransform itemToDeviceTransform) const
qreal boundingRegionGranularity ( ) const
void setBoundingRegionGranularity ( qreal  granularity)
void update ( const QRectF rect = QRectF())
void update ( qreal  x,
qreal  y,
qreal  width,
qreal  height 
)
inline

Definition at line 505 of file qgraphicsitem.h.

506 { update(QRectF(ax, ay, width, height)); }
GLenum GLsizei width
Definition: GLee.h:873
GLenum GLsizei GLsizei height
Definition: GLee.h:883
void update(const QRectF &rect=QRectF())
Definition: qrect.h:511
void scroll ( qreal  dx,
qreal  dy,
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
QRectF mapRectToItem ( const QGraphicsItem item,
const QRectF rect 
) const
QRectF mapRectToParent ( const QRectF rect) const
QRectF mapRectToScene ( 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
QRectF mapRectFromItem ( const QGraphicsItem item,
const QRectF rect 
) const
QRectF mapRectFromParent ( const QRectF rect) const
QRectF mapRectFromScene ( 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
QPointF mapToItem ( const QGraphicsItem item,
qreal  x,
qreal  y 
) const
inline

Definition at line 509 of file qgraphicsitem.h.

510 { return mapToItem(item, QPointF(ax, ay)); }
QPointF mapToItem(const QGraphicsItem *item, const QPointF &point) const
QPointF mapToParent ( qreal  x,
qreal  y 
) const
inline

Definition at line 511 of file qgraphicsitem.h.

512 { return mapToParent(QPointF(ax, ay)); }
QPointF mapToParent(const QPointF &point) const
QPointF mapToScene ( qreal  x,
qreal  y 
) const
inline

Definition at line 513 of file qgraphicsitem.h.

514 { return mapToScene(QPointF(ax, ay)); }
QPointF mapToScene(const QPointF &point) const
QPolygonF mapToItem ( const QGraphicsItem item,
qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 521 of file qgraphicsitem.h.

522 { return mapToItem(item, QRectF(ax, ay, w, h)); }
QPointF mapToItem(const QGraphicsItem *item, const QPointF &point) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QPolygonF mapToParent ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 523 of file qgraphicsitem.h.

524 { return mapToParent(QRectF(ax, ay, w, h)); }
QPointF mapToParent(const QPointF &point) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QPolygonF mapToScene ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 525 of file qgraphicsitem.h.

526 { return mapToScene(QRectF(ax, ay, w, h)); }
QPointF mapToScene(const QPointF &point) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QRectF mapRectToItem ( const QGraphicsItem item,
qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 527 of file qgraphicsitem.h.

528 { return mapRectToItem(item, QRectF(ax, ay, w, h)); }
QRectF mapRectToItem(const QGraphicsItem *item, const QRectF &rect) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QRectF mapRectToParent ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 529 of file qgraphicsitem.h.

530 { return mapRectToParent(QRectF(ax, ay, w, h)); }
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QRectF mapRectToParent(const QRectF &rect) const
QRectF mapRectToScene ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 531 of file qgraphicsitem.h.

532 { return mapRectToScene(QRectF(ax, ay, w, h)); }
QRectF mapRectToScene(const QRectF &rect) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QPointF mapFromItem ( const QGraphicsItem item,
qreal  x,
qreal  y 
) const
inline

Definition at line 515 of file qgraphicsitem.h.

516 { return mapFromItem(item, QPointF(ax, ay)); }
QPointF mapFromItem(const QGraphicsItem *item, const QPointF &point) const
QPointF mapFromParent ( qreal  x,
qreal  y 
) const
inline

Definition at line 517 of file qgraphicsitem.h.

518 { return mapFromParent(QPointF(ax, ay)); }
QPointF mapFromParent(const QPointF &point) const
QPointF mapFromScene ( qreal  x,
qreal  y 
) const
inline

Definition at line 519 of file qgraphicsitem.h.

520 { return mapFromScene(QPointF(ax, ay)); }
QPointF mapFromScene(const QPointF &point) const
QPolygonF mapFromItem ( const QGraphicsItem item,
qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 533 of file qgraphicsitem.h.

534 { return mapFromItem(item, QRectF(ax, ay, w, h)); }
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
QPointF mapFromItem(const QGraphicsItem *item, const QPointF &point) const
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QPolygonF mapFromParent ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 535 of file qgraphicsitem.h.

536 { return mapFromParent(QRectF(ax, ay, w, h)); }
QPointF mapFromParent(const QPointF &point) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QPolygonF mapFromScene ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 537 of file qgraphicsitem.h.

538 { return mapFromScene(QRectF(ax, ay, w, h)); }
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
QPointF mapFromScene(const QPointF &point) const
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QRectF mapRectFromItem ( const QGraphicsItem item,
qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 539 of file qgraphicsitem.h.

540 { return mapRectFromItem(item, QRectF(ax, ay, w, h)); }
QRectF mapRectFromItem(const QGraphicsItem *item, const QRectF &rect) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QRectF mapRectFromParent ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 541 of file qgraphicsitem.h.

542 { return mapRectFromParent(QRectF(ax, ay, w, h)); }
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
QRectF mapRectFromParent(const QRectF &rect) const
QRectF mapRectFromScene ( qreal  x,
qreal  y,
qreal  w,
qreal  h 
) const
inline

Definition at line 543 of file qgraphicsitem.h.

544 { return mapRectFromScene(QRectF(ax, ay, w, h)); }
QRectF mapRectFromScene(const QRectF &rect) const
Definition: qrect.h:511
int int int int int int h
Definition: GLee.h:10534
GLubyte GLubyte GLubyte GLubyte w
Definition: GLee.h:1775
bool isAncestorOf ( const QGraphicsItem child) const
QGraphicsItem* commonAncestorItem ( const QGraphicsItem other) const
bool isUnderMouse ( ) const
QVariant data ( int  key) const
void setData ( int  key,
const QVariant value 
)
Qt::InputMethodHints inputMethodHints ( ) const
void setInputMethodHints ( Qt::InputMethodHints  hints)
void installSceneEventFilter ( QGraphicsItem filterItem)
void removeSceneEventFilter ( QGraphicsItem filterItem)
void updateMicroFocus ( )
protected
virtual bool sceneEventFilter ( QGraphicsItem watched,
QEvent event 
)
protectedvirtual
virtual bool sceneEvent ( QEvent event)
protectedvirtual
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent event)
protectedvirtual
virtual void dragEnterEvent ( QGraphicsSceneDragDropEvent event)
protectedvirtual
virtual void dragLeaveEvent ( QGraphicsSceneDragDropEvent event)
protectedvirtual
virtual void dragMoveEvent ( QGraphicsSceneDragDropEvent event)
protectedvirtual
virtual void dropEvent ( QGraphicsSceneDragDropEvent event)
protectedvirtual
virtual void focusInEvent ( QFocusEvent event)
protectedvirtual
virtual void focusOutEvent ( QFocusEvent event)
protectedvirtual
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent event)
protectedvirtual

Reimplemented in QGraphicsTextItem, and QGraphicsProxyWidget.

virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent event)
protectedvirtual
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent event)
protectedvirtual
virtual void keyPressEvent ( QKeyEvent event)
protectedvirtual
virtual void keyReleaseEvent ( QKeyEvent event)
protectedvirtual
virtual void mousePressEvent ( QGraphicsSceneMouseEvent event)
protectedvirtual
virtual void mouseMoveEvent ( QGraphicsSceneMouseEvent event)
protectedvirtual
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent event)
protectedvirtual
virtual void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent event)
protectedvirtual
virtual void wheelEvent ( QGraphicsSceneWheelEvent event)
protectedvirtual

Reimplemented in QGraphicsWebView, and QGraphicsProxyWidget.

virtual void inputMethodEvent ( QInputMethodEvent event)
protectedvirtual

Reimplemented in QGraphicsTextItem, and QGraphicsWebView.

virtual QVariant inputMethodQuery ( Qt::InputMethodQuery  query) const
protectedvirtual

Reimplemented in QGraphicsTextItem, and QGraphicsWebView.

virtual QVariant itemChange ( GraphicsItemChange  change,
const QVariant value 
)
protectedvirtual
virtual bool supportsExtension ( Extension  extension) const
protectedvirtual
virtual void setExtension ( Extension  extension,
const QVariant variant 
)
protectedvirtual
void addToIndex ( )
protected
void removeFromIndex ( )
protected
void prepareGeometryChange ( )
protected

Friends And Related Function Documentation

friend class QGraphicsItemGroup
friend

Definition at line 473 of file qgraphicsitem.h.

friend class QGraphicsScene
friend

Definition at line 474 of file qgraphicsitem.h.

friend class QGraphicsScenePrivate
friend

Definition at line 475 of file qgraphicsitem.h.

friend class QGraphicsSceneFindItemBspTreeVisitor
friend

Definition at line 476 of file qgraphicsitem.h.

friend class QGraphicsSceneBspTree
friend

Definition at line 477 of file qgraphicsitem.h.

friend class QGraphicsView
friend

Definition at line 478 of file qgraphicsitem.h.

friend class QGraphicsViewPrivate
friend

Definition at line 479 of file qgraphicsitem.h.

friend class QGraphicsObject
friend

Definition at line 480 of file qgraphicsitem.h.

friend class QGraphicsWidget
friend

Definition at line 481 of file qgraphicsitem.h.

friend class QGraphicsWidgetPrivate
friend

Definition at line 482 of file qgraphicsitem.h.

friend class QGraphicsProxyWidgetPrivate
friend

Definition at line 483 of file qgraphicsitem.h.

friend class QGraphicsSceneIndex
friend

Definition at line 484 of file qgraphicsitem.h.

friend class QGraphicsSceneIndexPrivate
friend

Definition at line 485 of file qgraphicsitem.h.

friend class QGraphicsSceneBspTreeIndex
friend

Definition at line 486 of file qgraphicsitem.h.

friend class QGraphicsSceneBspTreeIndexPrivate
friend

Definition at line 487 of file qgraphicsitem.h.

friend class QGraphicsItemEffectSourcePrivate
friend

Definition at line 488 of file qgraphicsitem.h.

friend class QGraphicsTransformPrivate
friend

Definition at line 489 of file qgraphicsitem.h.

friend class QGestureManager
friend

Definition at line 491 of file qgraphicsitem.h.

friend class ::tst_QGraphicsItem
friend

Definition at line 493 of file qgraphicsitem.h.

bool qt_closestLeaf ( const QGraphicsItem ,
const QGraphicsItem  
)
friend
bool qt_closestItemFirst ( const QGraphicsItem ,
const QGraphicsItem  
)
friend

Member Data Documentation

QScopedPointer<QGraphicsItemPrivate> d_ptr
protected

Definition at line 464 of file qgraphicsitem.h.


The documentation for this class was generated from the following file: