Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qgraphicsitem.cpp File Reference

(41c95615fc6f58d584f5658d062e35fda17dc3f8)

#include "qgraphicsitem.h"
#include "qgraphicsscene.h"
#include "qgraphicsscene_p.h"
#include "qgraphicssceneevent.h"
#include "qgraphicsview.h"
#include "qgraphicswidget.h"
#include "qgraphicsproxywidget.h"
#include "qgraphicsscenebsptreeindex_p.h"
#include <QtCore/qbitarray.h>
#include <QtCore/qpoint.h>
#include <QtCore/qstack.h>
#include <QtCore/qtimer.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/qnumeric.h>
#include <QtWidgets/qapplication.h>
#include <QtGui/qbitmap.h>
#include <QtGui/qpainter.h>
#include <QtGui/qpainterpath.h>
#include <QtGui/qpixmapcache.h>
#include <QtWidgets/qstyleoption.h>
#include <QtGui/qevent.h>
#include <QtGui/qinputmethod.h>
#include <private/qgraphicsitem_p.h>
#include <private/qgraphicswidget_p.h>
#include <private/qwidgettextcontrol_p.h>
#include <private/qtextdocumentlayout_p.h>
#include <private/qtextengine_p.h>
#include <private/qwidget_p.h>
#include <private/qapplication_p.h>
#include <private/qgesturemanager_p.h>
#include <private/qdebug_p.h>
#include "moc_qgraphicsitem.cpp"
+ Include dependency graph for qgraphicsitem.cpp:

Go to the source code of this file.

Classes

class  QGraphicsItemCustomDataStore
 
class  QAbstractGraphicsShapeItemPrivate
 
class  QGraphicsPathItemPrivate
 
class  QGraphicsRectItemPrivate
 
class  QGraphicsEllipseItemPrivate
 
class  QGraphicsPolygonItemPrivate
 
class  QGraphicsLineItemPrivate
 
class  QGraphicsPixmapItemPrivate
 
class  QGraphicsTextItemPrivate
 
class  QGraphicsSimpleTextItemPrivate
 
class  QGraphicsItemGroupPrivate
 

Functions

static QT_BEGIN_NAMESPACE void _q_adjustRect (QRect *rect)
 
static QPainterPath qt_graphicsItem_shapeFromPath (const QPainterPath &path, const QPen &pen)
 
static bool qt_QGraphicsItem_isObscured (const QGraphicsItem *item, const QGraphicsItem *other, const QRectF &rect)
 
bool _qt_movableAncestorIsSelected (const QGraphicsItem *item)
 
void Q_WIDGETS_EXPORT qt_graphicsItem_highlightSelected (QGraphicsItem *item, QPainter *painter, const QStyleOptionGraphicsItem *option)
 
QPainterPath qt_regionToPath (const QRegion &region)
 
static QRectF setupTextLayout (QTextLayout *layout)
 
static void formatGraphicsItemHelper (QDebug debug, const QGraphicsItem *item)
 
QDebug operator<< (QDebug debug, const QGraphicsItem *item)
 
QDebug operator<< (QDebug debug, const QGraphicsObject *item)
 
QDebug operator<< (QDebug debug, QGraphicsItem::GraphicsItemChange change)
 
QDebug operator<< (QDebug debug, QGraphicsItem::GraphicsItemFlag flag)
 
QDebug operator<< (QDebug debug, QGraphicsItem::GraphicsItemFlags flags)
 

Function Documentation

◆ _q_adjustRect()

static QT_BEGIN_NAMESPACE void _q_adjustRect ( QRect * rect)
inlinestatic

Definition at line 797 of file qgraphicsitem.cpp.

References Q_ASSERT, and rect.

Referenced by QGraphicsItem::boundingRegion(), QGraphicsItem::collidesWithPath(), QtPrivate::intersect_path(), QtPrivate::intersect_point(), QtPrivate::intersect_rect(), QGraphicsSceneIndex::items(), QGraphicsSceneIndex::items(), and QGraphicsSceneIndex::items().

+ Here is the caller graph for this function:

◆ _qt_movableAncestorIsSelected()

bool _qt_movableAncestorIsSelected ( const QGraphicsItem * item)

Definition at line 7042 of file qgraphicsitem.cpp.

References _qt_movableAncestorIsSelected(), QGraphicsItem::flags(), QGraphicsItem::isSelected(), item, QGraphicsItem::ItemIsMovable, and QGraphicsItem::parentItem().

Referenced by _qt_movableAncestorIsSelected(), and QGraphicsItemPrivate::movableAncestorIsSelected().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ formatGraphicsItemHelper()

static void formatGraphicsItemHelper ( QDebug debug,
const QGraphicsItem * item )
static

Definition at line 11148 of file qgraphicsitem.cpp.

References debug, QGraphicsItem::flags(), QtDebugUtils::formatQPoint(), item, QGraphicsItem::parentItem(), QGraphicsItem::pos(), and QGraphicsItem::zValue().

Referenced by operator<<(), and operator<<().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator<<() [1/5]

QDebug operator<< ( QDebug debug,
const QGraphicsItem * item )

Definition at line 11160 of file qgraphicsitem.cpp.

References debug, formatGraphicsItemHelper(), item, o, and QGraphicsItem::toGraphicsObject().

+ Here is the call graph for this function:

◆ operator<<() [2/5]

QDebug operator<< ( QDebug debug,
const QGraphicsObject * item )

Definition at line 11191 of file qgraphicsitem.cpp.

References debug, formatGraphicsItemHelper(), and item.

+ Here is the call graph for this function:

◆ operator<<() [3/5]

◆ operator<<() [4/5]

◆ operator<<() [5/5]

QDebug operator<< ( QDebug debug,
QGraphicsItem::GraphicsItemFlags flags )

Definition at line 11386 of file qgraphicsitem.cpp.

References debug, and i.

◆ qt_graphicsItem_highlightSelected()

void Q_WIDGETS_EXPORT qt_graphicsItem_highlightSelected ( QGraphicsItem * item,
QPainter * painter,
const QStyleOptionGraphicsItem * option )

◆ qt_graphicsItem_shapeFromPath()

static QPainterPath qt_graphicsItem_shapeFromPath ( const QPainterPath & path,
const QPen & pen )
static

Returns a QPainterPath of path when stroked with the pen. Ignoring dash pattern.

Definition at line 822 of file qgraphicsitem.cpp.

References QPainterPath::addPath(), QPainterPathStroker::createStroke(), Qt::NoPen, QPainterPathStroker::setCapStyle(), QPainterPathStroker::setJoinStyle(), QPainterPathStroker::setMiterLimit(), and QPainterPathStroker::setWidth().

Referenced by QGraphicsPathItem::shape(), QGraphicsRectItem::shape(), QGraphicsEllipseItem::shape(), QGraphicsPolygonItem::shape(), and QGraphicsLineItem::shape().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_QGraphicsItem_isObscured()

static bool qt_QGraphicsItem_isObscured ( const QGraphicsItem * item,
const QGraphicsItem * other,
const QRectF & rect )
static

Item obscurity helper function.

Returns true if the subrect rect of item's bounding rect is obscured by other (i.e., other's opaque area covers item's rect completely. other is assumed to already be "on top of" item wrt. stacking order.

Definition at line 5052 of file qgraphicsitem.cpp.

References item, other(), and rect.

Referenced by QGraphicsItem::isObscured(), and QGraphicsItem::isObscuredBy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_regionToPath()

QPainterPath qt_regionToPath ( const QRegion & region)
extern

Definition at line 1007 of file qregion.cpp.

Referenced by QGraphicsPixmapItemPrivate::updateShape().

+ Here is the caller graph for this function:

◆ setupTextLayout()

static QRectF setupTextLayout ( QTextLayout * layout)
static

Definition at line 10492 of file qgraphicsitem.cpp.

References i, layout, line, and qMax().

Referenced by QGraphicsSimpleTextItem::paint(), and QGraphicsSimpleTextItemPrivate::updateBoundingRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: