Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QGraphicsScenePrivate Class Reference

#include <qgraphicsscene_p.h>

+ Inheritance diagram for QGraphicsScenePrivate:
+ Collaboration diagram for QGraphicsScenePrivate:

Classes

struct  UpdatedRectsCmp
 

Public Member Functions

 QGraphicsScenePrivate ()
 
void init ()
 
void _q_emitUpdated ()
 
void registerTopLevelItem (QGraphicsItem *item)
 
void unregisterTopLevelItem (QGraphicsItem *item)
 
void _q_updateLater ()
 
void _q_polishItems ()
 
void _q_processDirtyItems ()
 
void setScenePosItemEnabled (QGraphicsItem *item, bool enabled)
 
void registerScenePosItem (QGraphicsItem *item)
 
void unregisterScenePosItem (QGraphicsItem *item)
 
void _q_updateScenePosDescendants ()
 
void removeItemHelper (QGraphicsItem *item)
 
void setActivePanelHelper (QGraphicsItem *item, bool duringActivationEvent)
 
void setFocusItemHelper (QGraphicsItem *item, Qt::FocusReason focusReason, bool emitFocusChanged=true)
 
void addPopup (QGraphicsWidget *widget)
 
void removePopup (QGraphicsWidget *widget, bool itemIsDying=false)
 
void grabMouse (QGraphicsItem *item, bool implicit=false)
 
void ungrabMouse (QGraphicsItem *item, bool itemIsDying=false)
 
void clearMouseGrabber ()
 
void grabKeyboard (QGraphicsItem *item)
 
void ungrabKeyboard (QGraphicsItem *item, bool itemIsDying=false)
 
void clearKeyboardGrabber ()
 
void enableMouseTrackingOnViews ()
 
QList< QGraphicsItem * > itemsAtPosition (const QPoint &screenPos, const QPointF &scenePos, QWidget *widget) const
 Returns all items for the screen position in event.
 
void storeMouseButtonsForMouseGrabber (QGraphicsSceneMouseEvent *event)
 
void addView (QGraphicsView *view)
 
void removeView (QGraphicsView *view)
 
void installSceneEventFilter (QGraphicsItem *watched, QGraphicsItem *filter)
 
void removeSceneEventFilter (QGraphicsItem *watched, QGraphicsItem *filter)
 
bool filterDescendantEvent (QGraphicsItem *item, QEvent *event)
 
bool filterEvent (QGraphicsItem *item, QEvent *event)
 
bool sendEvent (QGraphicsItem *item, QEvent *event)
 
bool dispatchHoverEvent (QGraphicsSceneHoverEvent *hoverEvent)
 This event handler, for event hoverEvent, can be reimplemented in a subclass to receive hover enter events.
 
bool itemAcceptsHoverEvents_helper (const QGraphicsItem *item) const
 
void leaveScene (QWidget *viewport)
 
void cloneDragDropEvent (QGraphicsSceneDragDropEvent *dest, QGraphicsSceneDragDropEvent *source)
 
void sendDragDropEvent (QGraphicsItem *item, QGraphicsSceneDragDropEvent *dragDropEvent)
 
void sendHoverEvent (QEvent::Type type, QGraphicsItem *item, QGraphicsSceneHoverEvent *hoverEvent)
 
void sendMouseEvent (QGraphicsSceneMouseEvent *mouseEvent)
 
void mousePressEventHandler (QGraphicsSceneMouseEvent *mouseEvent)
 
QGraphicsWidgetwindowForItem (const QGraphicsItem *item) const
 
void drawItemHelper (QGraphicsItem *item, QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget, bool painterStateProtection)
 
void drawItems (QPainter *painter, const QTransform *const viewTransform, QRegion *exposedRegion, QWidget *widget)
 
void drawSubtreeRecursive (QGraphicsItem *item, QPainter *painter, const QTransform *const, QRegion *exposedRegion, QWidget *widget, qreal parentOpacity=qreal(1.0), const QTransform *const effectTransform=nullptr)
 
void draw (QGraphicsItem *, QPainter *, const QTransform *const, const QTransform *const, QRegion *, QWidget *, qreal, const QTransform *const, bool, bool)
 
void markDirty (QGraphicsItem *item, const QRectF &rect=QRectF(), bool invalidateChildren=false, bool force=false, bool ignoreOpacity=false, bool removingItemFromScene=false, bool updateBoundingRect=false)
 
void processDirtyItemsRecursive (QGraphicsItem *item, bool dirtyAncestorContainsChildren=false, qreal parentOpacity=qreal(1.0))
 
void resetDirtyItem (QGraphicsItem *item, bool recursive=false)
 
void ensureSortedTopLevelItems ()
 
void ensureSequentialTopLevelSiblingIndexes ()
 
void setFont_helper (const QFont &font)
 
void resolveFont ()
 
void updateFont (const QFont &font)
 
void setPalette_helper (const QPalette &palette)
 
void resolvePalette ()
 
void updatePalette (const QPalette &palette)
 
int findClosestTouchPointId (const QPointF &scenePos)
 
void touchEventHandler (QTouchEvent *touchEvent)
 
bool sendTouchBeginEvent (QGraphicsItem *item, QTouchEvent *touchEvent)
 
void enableTouchEventsOnViews ()
 
void gestureEventHandler (QGestureEvent *event)
 
void gestureTargetsAtHotSpots (const QSet< QGesture * > &gestures, Qt::GestureFlag flag, QHash< QGraphicsObject *, QSet< QGesture * > > *targets, QSet< QGraphicsObject * > *itemsSet=nullptr, QSet< QGesture * > *normal=nullptr, QSet< QGesture * > *conflicts=nullptr)
 
void cancelGesturesForChildren (QGesture *original)
 
void grabGesture (QGraphicsItem *, Qt::GestureType gesture)
 
void ungrabGesture (QGraphicsItem *, Qt::GestureType gesture)
 
void updateInputMethodSensitivityInViews ()
 
void enterModal (QGraphicsItem *item, QGraphicsItem::PanelModality panelModality=QGraphicsItem::NonModal)
 
void leaveModal (QGraphicsItem *item)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
void _q_reregisterTimers (void *pointer)
 
bool isSender (const QObject *receiver, const char *signal) const
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Static Public Member Functions

static QGraphicsScenePrivateget (QGraphicsScene *q)
 
static void updateTouchPointsForItem (QGraphicsItem *item, QTouchEvent *touchEvent)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

int changedSignalIndex
 
int processDirtyItemsIndex
 
int polishItemsIndex
 
QGraphicsScene::ItemIndexMethod indexMethod
 
QGraphicsSceneIndexindex
 
int lastItemCount
 
QRectF sceneRect
 
quint32 hasSceneRect: 1
 
quint32 dirtyGrowingItemsBoundingRect: 1
 
quint32 updateAll: 1
 
quint32 calledEmitUpdated: 1
 
quint32 processDirtyItemsEmitted: 1
 
quint32 needSortTopLevelItems: 1
 
quint32 holesInTopLevelSiblingIndex: 1
 
quint32 topLevelSequentialOrdering: 1
 
quint32 scenePosDescendantsUpdatePending: 1
 
quint32 stickyFocus: 1
 
quint32 hasFocus: 1
 
quint32 lastMouseGrabberItemHasImplicitMouseGrab: 1
 
quint32 allItemsIgnoreHoverEvents: 1
 
quint32 allItemsUseDefaultCursor: 1
 
quint32 painterStateProtection: 1
 
quint32 sortCacheEnabled: 1
 
quint32 allItemsIgnoreTouchEvents: 1
 
quint32 focusOnTouch: 1
 
quint32 padding: 14
 
qreal minimumRenderSize
 
QRectF growingItemsBoundingRect
 
std::set< QRectF, UpdatedRectsCmpupdatedRects
 
QPainterPath selectionArea
 
int selectionChanging
 
QSet< QGraphicsItem * > selectedItems
 
QList< QGraphicsItem * > unpolishedItems
 
QList< QGraphicsItem * > topLevelItems
 
QHash< QGraphicsItem *, QPointFmovingItemsInitialPositions
 
QSet< QGraphicsItem * > scenePosItems
 
QBrush backgroundBrush
 
QBrush foregroundBrush
 
quint32 rectAdjust
 
QGraphicsItemfocusItem
 
QGraphicsItemlastFocusItem
 
QGraphicsItempassiveFocusItem
 
QGraphicsWidgettabFocusFirst
 
QGraphicsItemactivePanel
 
QGraphicsItemlastActivePanel
 
int activationRefCount
 
int childExplicitActivation
 
QList< QGraphicsWidget * > popupWidgets
 
QGraphicsItemlastMouseGrabberItem
 
QList< QGraphicsItem * > mouseGrabberItems
 
QList< QGraphicsItem * > keyboardGrabberItems
 
QGraphicsItemdragDropItem
 
QGraphicsWidgetenterWidget
 
Qt::DropAction lastDropAction
 
QList< QGraphicsItem * > cachedItemsUnderMouse
 
QList< QGraphicsItem * > hoverItems
 
QPointF lastSceneMousePos
 
QMap< Qt::MouseButton, QPointFmouseGrabberButtonDownPos
 
QMap< Qt::MouseButton, QPointFmouseGrabberButtonDownScenePos
 
QMap< Qt::MouseButton, QPointmouseGrabberButtonDownScreenPos
 
QList< QGraphicsView * > views
 
QMultiMap< QGraphicsItem *, QGraphicsItem * > sceneEventFilters
 
QStylestyle
 
QFont font
 
QPalette palette
 
QStyleOptionGraphicsItem styleOptionTmp
 
QMap< int, QEventPointsceneCurrentTouchPoints
 
QMap< int, QGraphicsItem * > itemForTouchPointId
 
QList< QGraphicsObject * > cachedTargetItems
 
QHash< QGraphicsObject *, QSet< QGesture * > > cachedItemGestures
 
QHash< QGraphicsObject *, QSet< QGesture * > > cachedAlreadyDeliveredGestures
 
QHash< QGesture *, QGraphicsObject * > gestureTargets
 
QHash< Qt::GestureType, int > grabbedGestures
 
QList< QGraphicsItem * > modalPanels
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint unused: 21
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData >
 

Detailed Description

Definition at line 47 of file qgraphicsscene_p.h.

Constructor & Destructor Documentation

◆ QGraphicsScenePrivate()

QGraphicsScenePrivate::QGraphicsScenePrivate ( )

Definition at line 246 of file qgraphicsscene.cpp.

Member Function Documentation

◆ _q_emitUpdated()

void QGraphicsScenePrivate::_q_emitUpdated ( )

Definition at line 313 of file qgraphicsscene.cpp.

References calledEmitUpdated, changedSignalIndex, QObject::connect(), dirtyGrowingItemsBoundingRect, emit, growingItemsBoundingRect, hasSceneRect, QList< T >::isEmpty(), QObjectPrivate::isSignalConnected(), QList< T >::reserve(), SIGNAL, SLOT, updateAll, updatedRects, view, and views.

Referenced by _q_processDirtyItems().

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

◆ _q_polishItems()

void QGraphicsScenePrivate::_q_polishItems ( )

Definition at line 406 of file qgraphicsscene.cpp.

References QList< T >::at(), QList< T >::clear(), QGraphicsItem::d_ptr, QScopedPointer< T, Cleanup >::data(), QGraphicsItemPrivate::explicitlyHidden, i, QMetaObject::invokeMethod(), QList< T >::isEmpty(), QGraphicsItemPrivate::isWidget, item, QGraphicsItem::itemChange(), QGraphicsItem::ItemVisibleChange, QGraphicsItem::ItemVisibleHasChanged, QGraphicsItemPrivate::pendingPolish, QEvent::Polish, QObjectData::q_ptr, Qt::QueuedConnection, QList< T >::remove(), QCoreApplication::sendEvent(), QList< T >::size(), QList< T >::squeeze(), and unpolishedItems.

Referenced by drawItems().

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

◆ _q_processDirtyItems()

void QGraphicsScenePrivate::_q_processDirtyItems ( )

Definition at line 443 of file qgraphicsscene.cpp.

References _q_emitUpdated(), calledEmitUpdated, dirtyGrowingItemsBoundingRect, emit, growingItemsBoundingRect, hasSceneRect, processDirtyItemsEmitted, processDirtyItemsRecursive(), Q_ASSERT, resetDirtyItem(), topLevelItems, updateAll, view, and views.

+ Here is the call graph for this function:

◆ _q_updateLater()

void QGraphicsScenePrivate::_q_updateLater ( )

◆ _q_updateScenePosDescendants()

void QGraphicsScenePrivate::_q_updateScenePosDescendants ( )

◆ addPopup()

void QGraphicsScenePrivate::addPopup ( QGraphicsWidget widget)

Definition at line 864 of file qgraphicsscene.cpp.

References QListSpecialMethodsBase< T >::contains(), focusItem, QEvent::FocusOut, QWidget::focusWidget(), grabKeyboard(), grabMouse(), Qt::PopupFocusReason, popupWidgets, Q_ASSERT, sendEvent(), QWidget::setFocus(), QList< T >::size(), and widget.

+ Here is the call graph for this function:

◆ addView()

void QGraphicsScenePrivate::addView ( QGraphicsView view)

Definition at line 5790 of file qgraphicsscene.cpp.

References QHash< Key, T >::constBegin(), QHash< Key, T >::constEnd(), grabbedGestures, it, view, and views.

+ Here is the call graph for this function:

◆ cancelGesturesForChildren()

void QGraphicsScenePrivate::cancelGesturesForChildren ( QGesture original)

Definition at line 6426 of file qgraphicsscene.cpp.

References QHash< Key, T >::begin(), QSet< T >::begin(), d, DEBUG, QSet< T >::end(), QHash< Key, T >::end(), QSet< T >::erase(), Qt::GestureCanceled, QApplicationPrivate::gestureManager, gestureTargets, QApplicationPrivate::instance(), QGestureEvent::isAccepted(), QGraphicsItem::isAncestorOf(), QSet< T >::isEmpty(), item, items, itemsAtPosition(), iter, list, Q_ASSERT, QGestureManager::recycle(), QHash< Key, T >::remove(), sendEvent(), QGraphicsItem::toGraphicsObject(), QHash< Key, T >::value(), and QSet< T >::values().

Referenced by gestureEventHandler().

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

◆ clearKeyboardGrabber()

void QGraphicsScenePrivate::clearKeyboardGrabber ( )

Definition at line 1075 of file qgraphicsscene.cpp.

References QList< T >::constFirst(), QList< T >::isEmpty(), keyboardGrabberItems, and ungrabKeyboard().

+ Here is the call graph for this function:

◆ clearMouseGrabber()

void QGraphicsScenePrivate::clearMouseGrabber ( )

Definition at line 1004 of file qgraphicsscene.cpp.

References QList< T >::first(), QList< T >::isEmpty(), lastMouseGrabberItem, mouseGrabberItems, and QGraphicsItem::ungrabMouse().

Referenced by mousePressEventHandler(), and sendMouseEvent().

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

◆ cloneDragDropEvent()

◆ dispatchHoverEvent()

bool QGraphicsScenePrivate::dispatchHoverEvent ( QGraphicsSceneHoverEvent hoverEvent)

This event handler, for event hoverEvent, can be reimplemented in a subclass to receive hover enter events.

The default implementation forwards the event to the topmost visible item that accepts hover events at the scene position from the event.

Note: See items() for a definition of which items are considered visible by this function.

See also
QGraphicsItem::hoverEvent(), QGraphicsItem::setAcceptHoverEvents()

Definition at line 3760 of file qgraphicsscene.cpp.

References allItemsIgnoreHoverEvents, QList< T >::append(), cachedItemsUnderMouse, QGraphicsItem::commonAncestorItem(), QList< T >::constLast(), QList< T >::crbegin(), QList< T >::crend(), QEvent::GraphicsSceneHoverEnter, QEvent::GraphicsSceneHoverLeave, QEvent::GraphicsSceneHoverMove, hoverItems, i, index, QListSpecialMethodsBase< T >::indexOf(), QList< T >::isEmpty(), it, item, itemAcceptsHoverEvents_helper(), itemsAtPosition(), QGraphicsItem::panel(), QObjectData::parent, QGraphicsItem::parentItem(), QGraphicsSceneHoverEvent::scenePos(), QGraphicsSceneHoverEvent::screenPos(), sendHoverEvent(), QList< T >::size(), QList< T >::takeLast(), and QGraphicsSceneEvent::widget().

Referenced by enterModal(), and leaveModal().

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

◆ draw()

void QGraphicsScenePrivate::draw ( QGraphicsItem item,
QPainter painter,
const QTransform * const  viewTransform,
const QTransform * const  transformPtr,
QRegion exposedRegion,
QWidget widget,
qreal  opacity,
const QTransform * const  effectTransform,
bool  wasDirtyParentSceneTransform,
bool  drawItem 
)

◆ drawItemHelper()

void QGraphicsScenePrivate::drawItemHelper ( QGraphicsItem item,
QPainter painter,
const QStyleOptionGraphicsItem option,
QWidget widget,
bool  painterStateProtection 
)

Draws items directly, or using cache.

Definition at line 4301 of file qgraphicsscene.cpp.

References _q_adjustRect(), _q_paintIntoCache(), _q_paintItem(), QRect::adjust(), QRect::adjusted(), QRectF::adjusted(), QGraphicsItemCache::allExposed, QGraphicsItem::boundingRect(), QGraphicsItemCache::boundingRect, QGraphicsItemCache::DeviceData::cacheIndent, QGraphicsItemPrivate::cacheMode, QList< T >::clear(), QRect::contains(), QGraphicsItem::d_ptr, QScopedPointer< T, Cleanup >::data(), QPainter::device(), QGraphicsItem::DeviceCoordinateCache, QGraphicsItemCache::deviceData, QPaintDevice::devicePixelRatio(), deviceRect, QPainter::drawPixmap(), QPainter::end(), QGraphicsItemCache::exposed, QStyleOptionGraphicsItem::exposedRect, QGraphicsItemPrivate::extra(), QGraphicsItemPrivate::extraItemCache(), QGraphicsItemPrivate::ExtraMaxDeviceCoordCacheSize, QPixmap::fill(), QPixmapCache::find(), QGraphicsItemCache::fixedSize, QTransform::fromTranslate(), QRect::height(), QRectF::height(), QSize::height(), QPixmapCache::insert(), QRect::intersects(), QTransform::inverted(), QRegion::isEmpty(), QList< T >::isEmpty(), QRect::isEmpty(), QRectF::isEmpty(), QSize::isEmpty(), QPixmap::isNull(), QRect::isNull(), QSize::isValid(), QGraphicsItem::isWidget(), item, QGraphicsItem::ItemCoordinateCache, QGraphicsItemCache::key, QGraphicsItemCache::DeviceData::key, QGraphicsItemCache::DeviceData::lastTransform, QRect::left(), QTransform::mapRect(), QGraphicsItem::NoCache, QPainter::opacity(), painter, painterStateProtection, pix, proxy, rect, QWidget::rect, QPixmapCache::remove(), QPainter::renderHints(), QTransform::scale(), QPixmap::setDevicePixelRatio(), QPainter::setOpacity(), QPainter::setWorldTransform(), QPixmap::size(), QRect::size(), styleOptionTmp, QRectF::toAlignedRect(), QRect::top(), QRect::topLeft(), QRectF::toRect(), QVariant::toSize(), transformIsSimple(), QTransform::translate(), Qt::transparent, QTransform::TxTranslate, QTransform::type(), widget, QRect::width(), QRectF::width(), QSize::width(), QPainter::worldTransform(), QRect::x(), and QRect::y().

Referenced by draw().

+ Here is the caller graph for this function:

◆ drawItems()

void QGraphicsScenePrivate::drawItems ( QPainter painter,
const QTransform *const  viewTransform,
QRegion exposedRegion,
QWidget widget 
)

Definition at line 4607 of file qgraphicsscene.cpp.

References _q_polishItems(), QRect::adjusted(), Qt::AscendingOrder, QRegion::boundingRect(), drawSubtreeRecursive(), indexMethod, QTransform::inverted(), QList< T >::isEmpty(), QTransform::mapRect(), QGraphicsScene::NoIndex, painter, unpolishedItems, updateAll, and widget.

+ Here is the call graph for this function:

◆ drawSubtreeRecursive()

void QGraphicsScenePrivate::drawSubtreeRecursive ( QGraphicsItem item,
QPainter painter,
const QTransform * const  viewTransform,
QRegion exposedRegion,
QWidget widget,
qreal  parentOpacity = qreal(1.0),
const QTransform *const  effectTransform = nullptr 
)

Definition at line 4626 of file qgraphicsscene.cpp.

References QRect::adjust(), adjustedItemEffectiveBoundingRect(), QGraphicsItemPrivate::children, QGraphicsItemPrivate::childrenCombineOpacity(), QGraphicsItemPrivate::combineOpacityFromParent(), QGraphicsItem::d_ptr, Qt::DeviceCoordinates, QGraphicsItem::deviceTransform(), QGraphicsItemPrivate::dirtySceneTransform, draw(), QGraphicsEffect::draw(), QTransform::dx(), QTransform::dy(), ENSURE_TRANSFORM_PTR, QGraphicsItemPrivate::flags, QGraphicsItemPrivate::graphicsEffect, info, QHash< Key, T >::insert(), QRegion::intersects(), QGraphicsItemPrivate::invalidateChildrenSceneTransform(), QList< T >::isEmpty(), QRect::isEmpty(), QGraphicsEffect::isEnabled(), QGraphicsItemPrivate::isOpacityNull(), item, QGraphicsItem::ItemClipsChildrenToShape, QGraphicsItem::ItemContainsChildrenInShape, QGraphicsItem::ItemHasNoContents, QGraphicsItemPrivate::itemIsUntransformable(), Qt::LogicalCoordinates, QTransform::mapRect(), minimumRenderSize, QRect::normalized(), QGraphicsItemPrivate::paintedViewBoundingRects, painter, Q_ASSERT, rectAdjust, QPainter::setOpacity(), QPainter::setWorldTransform(), QGraphicsEffect::source(), styleOptionTmp, QRect::topLeft(), QGraphicsEffectSourcePrivate::TransformChanged, QRectF::translated(), QTransform::TxTranslate, QTransform::type(), Qt::Uninitialized, QGraphicsItemPrivate::updateSceneTransformFromParent(), QGraphicsItemPrivate::visible, widget, and QPainter::worldTransform().

Referenced by draw(), and drawItems().

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

◆ enableMouseTrackingOnViews()

void QGraphicsScenePrivate::enableMouseTrackingOnViews ( )

Definition at line 1081 of file qgraphicsscene.cpp.

References view, and views.

◆ enableTouchEventsOnViews()

void QGraphicsScenePrivate::enableTouchEventsOnViews ( )

Definition at line 6027 of file qgraphicsscene.cpp.

References view, views, and Qt::WA_AcceptTouchEvents.

◆ ensureSequentialTopLevelSiblingIndexes()

void QGraphicsScenePrivate::ensureSequentialTopLevelSiblingIndexes ( )

Ensures that the list of toplevels is sorted by insertion order, and that the siblingIndexes are packed (no gaps), and start at 0.

This function is almost identical to

QGraphicsItemPrivate::ensureSequentialSiblingIndex().

Definition at line 1478 of file qgraphicsscene.cpp.

References QList< T >::begin(), QList< T >::end(), holesInTopLevelSiblingIndex, i, QGraphicsItemPrivate::insertionOrder(), needSortTopLevelItems, QList< T >::size(), topLevelItems, and topLevelSequentialOrdering.

Referenced by registerTopLevelItem().

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

◆ ensureSortedTopLevelItems()

void QGraphicsScenePrivate::ensureSortedTopLevelItems ( )
inline

Definition at line 253 of file qgraphicsscene_p.h.

References QList< T >::begin(), QList< T >::end(), and qt_notclosestLeaf().

Referenced by QGraphicsSceneIndex::estimateTopLevelItems().

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

◆ enterModal()

◆ filterDescendantEvent()

bool QGraphicsScenePrivate::filterDescendantEvent ( QGraphicsItem item,
QEvent event 
)

Definition at line 1157 of file qgraphicsscene.cpp.

References QGraphicsItemPrivate::AncestorFiltersChildEvents, QGraphicsItemPrivate::ancestorFlags, QObject::d_ptr, QGraphicsItem::d_ptr, item, QObjectData::parent, and QGraphicsItem::parentItem().

Referenced by sendEvent().

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

◆ filterEvent()

bool QGraphicsScenePrivate::filterEvent ( QGraphicsItem item,
QEvent event 
)

Definition at line 1175 of file qgraphicsscene.cpp.

References QMultiMap< Key, T >::contains(), it, item, QMultiMap< Key, T >::lowerBound(), sceneEventFilters, and QMultiMap< Key, T >::upperBound().

Referenced by sendEvent().

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

◆ findClosestTouchPointId()

int QGraphicsScenePrivate::findClosestTouchPointId ( const QPointF scenePos)

Definition at line 5816 of file qgraphicsscene.cpp.

References QLineF::length(), and sceneCurrentTouchPoints.

Referenced by touchEventHandler().

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

◆ gestureEventHandler()

void QGraphicsScenePrivate::gestureEventHandler ( QGestureEvent event)

Definition at line 6179 of file qgraphicsscene.cpp.

References QList< T >::append(), QList< T >::at(), QHash< Key, T >::begin(), QList< T >::begin(), QSet< T >::begin(), cachedAlreadyDeliveredGestures, cachedItemGestures, cachedTargetItems, QGesture::CancelAllInContext, cancelGesturesForChildren(), QList< T >::clear(), QHash< Key, T >::clear(), QList< T >::constBegin(), QList< T >::constEnd(), QHash< Key, T >::contains(), QGraphicsItem::contains(), QSet< T >::contains(), d, QPointer< T >::data(), QGraphicsItem::data(), DEBUG, e, QList< T >::end(), QSet< T >::end(), QHash< Key, T >::end(), QSet< T >::erase(), QTransform::fromTranslate(), Qt::GestureCanceled, Qt::GestureFinished, QEvent::GestureOverride, Qt::GestureStarted, gestureTargets, gestureTargetsAtHotSpots(), QGesture::gestureType, i, QGestureEvent::ignore(), Qt::IgnoredGesturesPropagateToParent, QHash< Key, T >::insert(), QSet< T >::insert(), QTransform::inverted(), QGestureEvent::isAccepted(), QSet< T >::isEmpty(), QGraphicsItem::isPanel(), it, item, QHash< Key, T >::keys(), QTransform::map(), QGraphicsItem::parentItem(), qt_closestItemFirst(), Qt::ReceivePartialGestures, QHash< Key, T >::remove(), QSet< T >::remove(), sendEvent(), QGestureEvent::setAccepted(), QGestureEvent::setWidget(), QList< T >::size(), QEvent::t, QGraphicsItem::toGraphicsObject(), QHash< Key, T >::value(), QSet< T >::values(), viewport(), QGraphicsView::viewportTransform(), QPoint::x(), and QPoint::y().

+ Here is the call graph for this function:

◆ gestureTargetsAtHotSpots()

void QGraphicsScenePrivate::gestureTargetsAtHotSpots ( const QSet< QGesture * > &  gestures,
Qt::GestureFlag  flag,
QHash< QGraphicsObject *, QSet< QGesture * > > *  targets,
QSet< QGraphicsObject * > *  itemsSet = nullptr,
QSet< QGesture * > *  normal = nullptr,
QSet< QGesture * > *  conflicts = nullptr 
)

Definition at line 6132 of file qgraphicsscene.cpp.

References QList< T >::at(), QSet< T >::contains(), d, QSet< T >::insert(), QGraphicsItem::isBlockedByModalPanel(), QGraphicsItem::isPanel(), it, item, items, itemsAtPosition(), j, QSet< T >::remove(), QList< T >::size(), QGraphicsItem::toGraphicsObject(), and void.

Referenced by gestureEventHandler().

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

◆ get()

QGraphicsScenePrivate * QGraphicsScenePrivate::get ( QGraphicsScene q)
static

Definition at line 308 of file qgraphicsscene.cpp.

◆ grabGesture()

void QGraphicsScenePrivate::grabGesture ( QGraphicsItem ,
Qt::GestureType  gesture 
)

Definition at line 6510 of file qgraphicsscene.cpp.

References grabbedGestures, QGestureManager::instance(), view, views, and void.

+ Here is the call graph for this function:

◆ grabKeyboard()

void QGraphicsScenePrivate::grabKeyboard ( QGraphicsItem item)

Definition at line 1014 of file qgraphicsscene.cpp.

References QList< T >::constLast(), QListSpecialMethodsBase< T >::contains(), QEvent::GrabKeyboard, QList< T >::isEmpty(), item, keyboardGrabberItems, qWarning, sendEvent(), and QEvent::UngrabKeyboard.

Referenced by addPopup().

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

◆ grabMouse()

void QGraphicsScenePrivate::grabMouse ( QGraphicsItem item,
bool  implicit = false 
)

Definition at line 914 of file qgraphicsscene.cpp.

References QList< T >::constLast(), QListSpecialMethodsBase< T >::contains(), QEvent::GrabMouse, QList< T >::isEmpty(), item, lastMouseGrabberItemHasImplicitMouseGrab, mouseGrabberItems, Q_ASSERT, qWarning, sendEvent(), QEvent::UngrabMouse, and QGraphicsItem::ungrabMouse().

Referenced by addPopup(), and mousePressEventHandler().

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

◆ init()

void QGraphicsScenePrivate::init ( )

◆ installSceneEventFilter()

void QGraphicsScenePrivate::installSceneEventFilter ( QGraphicsItem watched,
QGraphicsItem filter 
)

Definition at line 1131 of file qgraphicsscene.cpp.

References QMultiMap< Key, T >::insert(), and sceneEventFilters.

+ Here is the call graph for this function:

◆ itemAcceptsHoverEvents_helper()

bool QGraphicsScenePrivate::itemAcceptsHoverEvents_helper ( const QGraphicsItem item) const

Definition at line 3742 of file qgraphicsscene.cpp.

References QGraphicsItemPrivate::acceptsHover, QGraphicsItem::d_ptr, QGraphicsItem::isBlockedByModalPanel(), QGraphicsItemPrivate::isWidget, and item.

Referenced by dispatchHoverEvent(), and leaveScene().

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

◆ itemsAtPosition()

QList< QGraphicsItem * > QGraphicsScenePrivate::itemsAtPosition ( const QPoint screenPos,
const QPointF scenePos,
QWidget widget 
) const

Returns all items for the screen position in event.

Definition at line 1090 of file qgraphicsscene.cpp.

References Qt::DescendingOrder, Qt::IntersectsItemShape, QTransform::inverted(), QTransform::map(), QWidget::mapFromGlobal(), QTransform::mapRect(), QWidget::parentWidget(), QTransform::TxScale, QTransform::type(), view, and widget.

Referenced by cancelGesturesForChildren(), dispatchHoverEvent(), gestureTargetsAtHotSpots(), mousePressEventHandler(), sendTouchBeginEvent(), and touchEventHandler().

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

◆ leaveModal()

void QGraphicsScenePrivate::leaveModal ( QGraphicsItem item)

Definition at line 6100 of file qgraphicsscene.cpp.

References QSet< T >::contains(), dispatchHoverEvent(), e, QSet< T >::insert(), QGraphicsItem::isBlockedByModalPanel(), QGraphicsItem::isPanel(), item, lastSceneMousePos, modalPanels, panel, Q_ASSERT, QList< T >::removeAll(), sendEvent(), QGraphicsSceneHoverEvent::setScenePos(), and QEvent::WindowUnblocked.

Referenced by removeItemHelper().

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

◆ leaveScene()

void QGraphicsScenePrivate::leaveScene ( QWidget viewport)

◆ markDirty()

void QGraphicsScenePrivate::markDirty ( QGraphicsItem item,
const QRectF rect = QRectF(),
bool  invalidateChildren = false,
bool  force = false,
bool  ignoreOpacity = false,
bool  removingItemFromScene = false,
bool  updateBoundingRect = false 
)

◆ mousePressEventHandler()

void QGraphicsScenePrivate::mousePressEventHandler ( QGraphicsSceneMouseEvent mouseEvent)

Definition at line 1307 of file qgraphicsscene.cpp.

References QEvent::accept(), QGraphicsItem::acceptedMouseButtons(), QGraphicsSceneMouseEvent::button(), QGraphicsSceneMouseEvent::buttonDownPos(), QGraphicsSceneMouseEvent::buttonDownScenePos(), QGraphicsSceneMouseEvent::buttonDownScreenPos(), QGraphicsSceneMouseEvent::buttons(), cachedItemsUnderMouse, clearMouseGrabber(), Qt::ClickFocus, QList< T >::constFirst(), QList< T >::constLast(), Qt::ControlModifier, QGraphicsItem::d_ptr, disabled, QGraphicsItem::flags(), QGraphicsItemPrivate::flags, QGraphicsItem::focusItem(), grabMouse(), QEvent::GraphicsSceneMouseDoubleClick, QEvent::GraphicsSceneMousePress, QEvent::ignore(), QEvent::isAccepted(), QGraphicsItem::isBlockedByModalPanel(), QList< T >::isEmpty(), QGraphicsItem::isEnabled(), QGraphicsItem::isPanel(), QGraphicsItem::isWidget(), item, QGraphicsItem::ItemIsFocusable, itemsAtPosition(), QGraphicsItem::ItemStopsClickFocusPropagation, QGraphicsItem::ItemStopsFocusHandling, lastMouseGrabberItem, modalPanels, QGraphicsSceneMouseEvent::modifiers(), Qt::MouseFocusReason, mouseGrabberItems, QGraphicsItemPrivate::mouseSetsFocus, QWidget::parentWidget(), QGraphicsItem::SceneModal, QGraphicsSceneMouseEvent::scenePos(), QGraphicsSceneMouseEvent::screenPos(), QGraphicsView::ScrollHandDrag, sendMouseEvent(), QEvent::setAccepted(), QEvent::spontaneous(), stickyFocus, storeMouseButtonsForMouseGrabber(), QEvent::type(), ungrabMouse(), QList< T >::value(), view, void, QGraphicsSceneEvent::widget(), and QGraphicsItem::window().

+ Here is the call graph for this function:

◆ processDirtyItemsRecursive()

void QGraphicsScenePrivate::processDirtyItemsRecursive ( QGraphicsItem item,
bool  dirtyAncestorContainsChildren = false,
qreal  parentOpacity = qreal(1.0) 
)

Definition at line 5047 of file qgraphicsscene.cpp.

References _q_adjustRect(), adjustedItemEffectiveBoundingRect(), QGraphicsItemPrivate::allChildrenDirty, QGraphicsItem::boundingRect(), QGraphicsItem::boundingRegionGranularity(), changedSignalIndex, child, QGraphicsItemPrivate::children, QGraphicsItemPrivate::childrenCombineOpacity(), QGraphicsItemPrivate::combineOpacityFromParent(), QGraphicsItem::d_ptr, QScopedPointer< T, Cleanup >::data(), QGraphicsItemPrivate::dirty, QGraphicsItemPrivate::dirtyChildren, QGraphicsItemPrivate::dirtySceneTransform, QGraphicsViewPrivate::dirtyScrollOffset, QTransform::dx(), QTransform::dy(), QGraphicsItemPrivate::flags, QGraphicsItemPrivate::fullUpdatePending, QGraphicsViewPrivate::fullUpdatePending, QGraphicsItemPrivate::geometryChanged, QGraphicsItemPrivate::graphicsEffect, growingItemsBoundingRect, hasSceneRect, QRect::height(), QGraphicsItemPrivate::ignoreOpacity, QGraphicsItemPrivate::ignoreVisible, QGraphicsItemPrivate::invalidateChildrenSceneTransform(), QList< T >::isEmpty(), QRectF::isEmpty(), QGraphicsItemPrivate::isOpacityNull(), QObjectPrivate::isSignalConnected(), item, QGraphicsItem::ItemClipsChildrenToShape, QGraphicsItem::ItemContainsChildrenInShape, QGraphicsItem::ItemHasNoContents, QGraphicsItemPrivate::itemIsUntransformable(), QTransform::mapRect(), QGraphicsItemPrivate::needsRepaint, QGraphicsView::NoViewportUpdate, QGraphicsItemPrivate::paintedViewBoundingRects, QGraphicsItemPrivate::paintedViewBoundingRectsNeedRepaint, processDirtyItemsRecursive(), Q_ASSERT, qFuzzyIsNull(), rect, resetDirtyItem(), QGraphicsItemPrivate::sceneTransform, QGraphicsItemPrivate::sceneTransformTranslateOnly, QRect::translate(), QRectF::translated(), updateAll, updateHelper(), QGraphicsViewPrivate::updateRect(), QGraphicsItemPrivate::updateSceneTransformFromParent(), view, QGraphicsViewPrivate::viewportUpdateMode, views, QGraphicsItemPrivate::visible, QRect::width(), QRect::x(), and QRect::y().

Referenced by _q_processDirtyItems(), and processDirtyItemsRecursive().

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

◆ registerScenePosItem()

void QGraphicsScenePrivate::registerScenePosItem ( QGraphicsItem item)

Definition at line 504 of file qgraphicsscene.cpp.

References QSet< T >::insert(), item, scenePosItems, and setScenePosItemEnabled().

+ Here is the call graph for this function:

◆ registerTopLevelItem()

void QGraphicsScenePrivate::registerTopLevelItem ( QGraphicsItem item)

This function is almost identical to QGraphicsItemPrivate::addChild().

Definition at line 374 of file qgraphicsscene.cpp.

References QList< T >::append(), QGraphicsItem::d_ptr, ensureSequentialTopLevelSiblingIndexes(), item, needSortTopLevelItems, QGraphicsItemPrivate::siblingIndex, QList< T >::size(), and topLevelItems.

+ Here is the call graph for this function:

◆ removeItemHelper()

void QGraphicsScenePrivate::removeItemHelper ( QGraphicsItem item)

Schedules an item for removal. This function leaves some stale indexes around in the BSP tree if called from the item's destructor; these will be cleaned up the next time someone triggers purgeRemovedItems().

Note: This function might get called from QGraphicsItem's destructor. item is being destroyed, so we cannot call any pure virtual functions on it (such as boundingRect()). Also, it is unnecessary to update the item's own state in any way.

Definition at line 546 of file qgraphicsscene.cpp.

References activePanel, QHash< Key, T >::begin(), QMap< Key, T >::begin(), QMultiMap< Key, T >::begin(), cachedAlreadyDeliveredGestures, cachedItemGestures, cachedItemsUnderMouse, cachedTargetItems, child, QGraphicsItemPrivate::children, QGraphicsItem::clearFocus(), QGraphicsItemPrivate::clearSubFocus(), QMap< Key, T >::constBegin(), QMap< Key, T >::constEnd(), QListSpecialMethodsBase< T >::contains(), QGraphicsItem::d_ptr, dragDropItem, emit, QMap< Key, T >::end(), QMultiMap< Key, T >::end(), QHash< Key, T >::end(), QHash< Key, T >::erase(), QMap< Key, T >::erase(), QMultiMap< Key, T >::erase(), QGraphicsItem::flags(), focusItem, QGraphicsWidgetPrivate::focusNext, QGraphicsItemPrivate::gestureContext, gestureTargets, hoverItems, QGraphicsItemPrivate::inDestructor, QListSpecialMethodsBase< T >::indexOf(), QGraphicsItem::isPanel(), QGraphicsItem::isVisible(), QGraphicsItem::isWidget(), it, item, itemForTouchPointId, QGraphicsItem::ItemSendsScenePositionChanges, keyboardGrabberItems, lastActivePanel, lastFocusItem, lastMouseGrabberItem, leaveModal(), markDirty(), mouseGrabberItems, QGraphicsItem::NonModal, QGraphicsItem::panelModality(), QGraphicsItem::parentItem(), passiveFocusItem, QGraphicsItemPrivate::pendingPolish, Q_ASSERT_X, QHash< Key, T >::remove(), QMap< Key, T >::remove(), QSet< T >::remove(), QList< T >::removeAll(), QGraphicsScene::removeItem(), QList< T >::removeOne(), resetDirtyItem(), QGraphicsItemPrivate::resetFocusProxy(), QGraphicsItem::scene(), sceneCurrentTouchPoints, sceneEventFilters, selectedItems, selectionChanging, QGraphicsItem::setParentItem(), QSet< T >::size(), tabFocusFirst, QGraphicsItem::toGraphicsObject(), ungrabGesture(), ungrabKeyboard(), ungrabMouse(), unpolishedItems, unregisterScenePosItem(), unregisterTopLevelItem(), and widget.

+ Here is the call graph for this function:

◆ removePopup()

void QGraphicsScenePrivate::removePopup ( QGraphicsWidget widget,
bool  itemIsDying = false 
)

Remove widget from the popup list. Important notes:

widget is guaranteed to be in the list of popups, but it might not be the last entry; you can hide any item in the pop list before the others, and this must cause all later mouse grabbers to lose the grab.

Definition at line 890 of file qgraphicsscene.cpp.

References QListSpecialMethodsBase< T >::contains(), QEvent::FocusIn, focusItem, i, index, QListSpecialMethodsBase< T >::indexOf(), QList< T >::isEmpty(), QWidget::isVisible(), keyboardGrabberItems, Qt::PopupFocusReason, popupWidgets, Q_ASSERT, sendEvent(), QList< T >::size(), QList< T >::takeLast(), ungrabKeyboard(), ungrabMouse(), and widget.

Referenced by ungrabMouse().

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

◆ removeSceneEventFilter()

void QGraphicsScenePrivate::removeSceneEventFilter ( QGraphicsItem watched,
QGraphicsItem filter 
)

Definition at line 1139 of file qgraphicsscene.cpp.

References QMultiMap< Key, T >::contains(), QMultiMap< Key, T >::erase(), it, QMultiMap< Key, T >::lowerBound(), sceneEventFilters, and QMultiMap< Key, T >::upperBound().

+ Here is the call graph for this function:

◆ removeView()

void QGraphicsScenePrivate::removeView ( QGraphicsView view)

Definition at line 5800 of file qgraphicsscene.cpp.

References QList< T >::removeAll(), view, and views.

+ Here is the call graph for this function:

◆ resetDirtyItem()

◆ resolveFont()

void QGraphicsScenePrivate::resolveFont ( )

Resolve the scene's font against the application font, and propagate the changes too all items in the scene.

Definition at line 1511 of file qgraphicsscene.cpp.

References font, QApplication::font(), QFont::resolve(), QFont::setResolveMask(), and updateFont().

+ Here is the call graph for this function:

◆ resolvePalette()

void QGraphicsScenePrivate::resolvePalette ( )

Resolve the scene's palette against the application palette, and propagate the changes too all items in the scene.

Definition at line 1568 of file qgraphicsscene.cpp.

References QGuiApplication::palette(), palette, QPalette::resolve(), QPalette::setResolveMask(), and updatePalette().

+ Here is the call graph for this function:

◆ sendDragDropEvent()

void QGraphicsScenePrivate::sendDragDropEvent ( QGraphicsItem item,
QGraphicsSceneDragDropEvent dragDropEvent 
)

Definition at line 1249 of file qgraphicsscene.cpp.

References QGraphicsItem::d_ptr, QGraphicsItemPrivate::genericMapFromScene(), item, QGraphicsSceneDragDropEvent::scenePos(), sendEvent(), QGraphicsSceneDragDropEvent::setPos(), and QGraphicsSceneEvent::widget().

+ Here is the call graph for this function:

◆ sendEvent()

bool QGraphicsScenePrivate::sendEvent ( QGraphicsItem item,
QEvent event 
)

This is the final dispatch point for any events from the scene to the item. It filters the event first - if the filter returns true, the event is considered to have been eaten by the filter, and is therefore stopped (the default filter returns false). Then/otherwise, if the item is enabled, the event is sent; otherwise it is stopped.

Definition at line 1200 of file qgraphicsscene.cpp.

References filterDescendantEvent(), filterEvent(), QGestureManager::filterEvent(), QApplicationPrivate::gestureManager, QApplicationPrivate::instance(), QGraphicsItem::isEnabled(), item, o, qt_sendSpontaneousEvent(), QGraphicsItem::sceneEvent(), QCoreApplication::sendEvent(), and QGraphicsItem::toGraphicsObject().

Referenced by addPopup(), cancelGesturesForChildren(), enterModal(), gestureEventHandler(), grabKeyboard(), grabMouse(), leaveModal(), removePopup(), sendDragDropEvent(), sendHoverEvent(), sendMouseEvent(), sendTouchBeginEvent(), setFocusItemHelper(), touchEventHandler(), ungrabKeyboard(), and ungrabMouse().

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

◆ sendHoverEvent()

void QGraphicsScenePrivate::sendHoverEvent ( QEvent::Type  type,
QGraphicsItem item,
QGraphicsSceneHoverEvent hoverEvent 
)

Definition at line 1259 of file qgraphicsscene.cpp.

References QGraphicsItem::d_ptr, QGraphicsItemPrivate::genericMapFromSceneTransform(), item, QGraphicsSceneHoverEvent::lastScenePos(), QGraphicsSceneHoverEvent::lastScreenPos(), QTransform::map(), QGraphicsSceneHoverEvent::modifiers(), QGraphicsSceneHoverEvent::scenePos(), QGraphicsSceneHoverEvent::screenPos(), sendEvent(), and QGraphicsSceneEvent::widget().

Referenced by dispatchHoverEvent(), and leaveScene().

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

◆ sendMouseEvent()

◆ sendTouchBeginEvent()

◆ setActivePanelHelper()

void QGraphicsScenePrivate::setActivePanelHelper ( QGraphicsItem item,
bool  duringActivationEvent 
)

◆ setFocusItemHelper()

void QGraphicsScenePrivate::setFocusItemHelper ( QGraphicsItem item,
Qt::FocusReason  focusReason,
bool  emitFocusChanged = true 
)

emitFocusChanged needs to be false when focus passes from one item to another through setActivePanel(); i.e. when activation passes from one panel to another, to avoid getting two focusChanged() emissions; one focusChanged(0, lastFocus), then one focusChanged(newFocus, 0). Instead setActivePanel() emits the signal once itself: focusChanged(newFocus, oldFocus).

Definition at line 798 of file qgraphicsscene.cpp.

References QInputMethod::commit(), emit, QGraphicsItem::flags(), QEvent::FocusIn, focusItem, QEvent::FocusOut, QGuiApplication::inputMethod(), QGraphicsItem::isEnabled(), QGraphicsItem::isVisible(), item, QGraphicsItem::ItemAcceptsInputMethod, QGraphicsItem::ItemIsFocusable, lastFocusItem, qApp, QGraphicsItem::scene(), sendEvent(), QGraphicsItem::setFocus(), and updateInputMethodSensitivityInViews().

Referenced by setActivePanelHelper().

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

◆ setFont_helper()

void QGraphicsScenePrivate::setFont_helper ( const QFont font)

Set the font and propagate the changes if the font is different from the current font.

Definition at line 1498 of file qgraphicsscene.cpp.

References font, QFont::resolveMask(), and updateFont().

+ Here is the call graph for this function:

◆ setPalette_helper()

void QGraphicsScenePrivate::setPalette_helper ( const QPalette palette)

Set the palette and propagate the changes if the palette is different from the current palette.

Definition at line 1555 of file qgraphicsscene.cpp.

References palette, QPalette::resolveMask(), and updatePalette().

+ Here is the call graph for this function:

◆ setScenePosItemEnabled()

void QGraphicsScenePrivate::setScenePosItemEnabled ( QGraphicsItem item,
bool  enabled 
)

Definition at line 488 of file qgraphicsscene.cpp.

References QGraphicsItem::d_ptr, enabled, QMetaObject::invokeMethod(), item, QGraphicsItemPrivate::parent, Qt::QueuedConnection, QGraphicsItemPrivate::scenePosDescendants, and scenePosDescendantsUpdatePending.

Referenced by registerScenePosItem(), and unregisterScenePosItem().

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

◆ storeMouseButtonsForMouseGrabber()

void QGraphicsScenePrivate::storeMouseButtonsForMouseGrabber ( QGraphicsSceneMouseEvent event)

Definition at line 1115 of file qgraphicsscene.cpp.

References QList< T >::constLast(), QGraphicsItem::d_ptr, QGraphicsItemPrivate::genericMapFromScene(), i, QMap< Key, T >::insert(), mouseGrabberButtonDownPos, mouseGrabberButtonDownScenePos, mouseGrabberButtonDownScreenPos, and mouseGrabberItems.

Referenced by mousePressEventHandler().

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

◆ touchEventHandler()

◆ ungrabGesture()

void QGraphicsScenePrivate::ungrabGesture ( QGraphicsItem item,
Qt::GestureType  gesture 
)

Definition at line 6519 of file qgraphicsscene.cpp.

References QGestureManager::cleanupCachedGestures(), QGraphicsItem::d_ptr, grabbedGestures, QGestureManager::instance(), QGraphicsItemPrivate::isObject, item, Q_ASSERT, view, and views.

Referenced by removeItemHelper().

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

◆ ungrabKeyboard()

void QGraphicsScenePrivate::ungrabKeyboard ( QGraphicsItem item,
bool  itemIsDying = false 
)

Definition at line 1042 of file qgraphicsscene.cpp.

References QList< T >::at(), QList< T >::constLast(), QEvent::GrabKeyboard, QList< T >::isEmpty(), item, keyboardGrabberItems, QListSpecialMethodsBase< T >::lastIndexOf(), qWarning, sendEvent(), QList< T >::takeLast(), QEvent::UngrabKeyboard, and ungrabKeyboard().

Referenced by clearKeyboardGrabber(), removeItemHelper(), removePopup(), and ungrabKeyboard().

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

◆ ungrabMouse()

void QGraphicsScenePrivate::ungrabMouse ( QGraphicsItem item,
bool  itemIsDying = false 
)

Definition at line 957 of file qgraphicsscene.cpp.

References QList< T >::at(), QList< T >::constLast(), QEvent::GrabMouse, QListSpecialMethodsBase< T >::indexOf(), QList< T >::isEmpty(), item, lastMouseGrabberItemHasImplicitMouseGrab, mouseGrabberItems, popupWidgets, qWarning, removePopup(), sendEvent(), QList< T >::takeLast(), QEvent::UngrabMouse, and ungrabMouse().

Referenced by enterModal(), mousePressEventHandler(), removeItemHelper(), removePopup(), and ungrabMouse().

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

◆ unregisterScenePosItem()

void QGraphicsScenePrivate::unregisterScenePosItem ( QGraphicsItem item)

Definition at line 513 of file qgraphicsscene.cpp.

References item, QSet< T >::remove(), scenePosItems, and setScenePosItemEnabled().

Referenced by removeItemHelper().

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

◆ unregisterTopLevelItem()

void QGraphicsScenePrivate::unregisterTopLevelItem ( QGraphicsItem item)

This function is almost identical to QGraphicsItemPrivate::removeChild().

Definition at line 387 of file qgraphicsscene.cpp.

References QGraphicsItem::d_ptr, holesInTopLevelSiblingIndex, item, QList< T >::removeAt(), QList< T >::removeOne(), QGraphicsItemPrivate::siblingIndex, QList< T >::size(), topLevelItems, and topLevelSequentialOrdering.

Referenced by removeItemHelper().

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

◆ updateFont()

void QGraphicsScenePrivate::updateFont ( const QFont font)

Update the font, and whether or not it has changed, reresolve all fonts in the scene.

Definition at line 1525 of file qgraphicsscene.cpp.

References QGraphicsItem::d_ptr, font, QEvent::FontChange, item, items, QGraphicsItem::parentItem(), QGraphicsItemPrivate::resolveFont(), QFont::resolveMask(), and QCoreApplication::sendEvent().

Referenced by resolveFont(), and setFont_helper().

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

◆ updateInputMethodSensitivityInViews()

void QGraphicsScenePrivate::updateInputMethodSensitivityInViews ( )

Definition at line 6033 of file qgraphicsscene.cpp.

References view, and views.

Referenced by setFocusItemHelper().

+ Here is the caller graph for this function:

◆ updatePalette()

void QGraphicsScenePrivate::updatePalette ( const QPalette palette)

Update the palette, and whether or not it has changed, reresolve all palettes in the scene.

Definition at line 1582 of file qgraphicsscene.cpp.

References QGraphicsItem::d_ptr, item, items, palette, QEvent::PaletteChange, QGraphicsItem::parentItem(), QPalette::resolveMask(), QGraphicsItemPrivate::resolvePalette(), and QCoreApplication::sendEvent().

Referenced by resolvePalette(), and setPalette_helper().

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

◆ updateTouchPointsForItem()

void QGraphicsScenePrivate::updateTouchPointsForItem ( QGraphicsItem item,
QTouchEvent touchEvent 
)
static

Definition at line 5805 of file qgraphicsscene.cpp.

References QGraphicsItem::d_ptr, QGraphicsItemPrivate::genericMapFromSceneTransform(), i, item, QTransform::map(), and QTest::QTouchEventSequence::point().

Referenced by sendTouchBeginEvent(), and touchEventHandler().

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

◆ windowForItem()

QGraphicsWidget * QGraphicsScenePrivate::windowForItem ( const QGraphicsItem item) const

Member Data Documentation

◆ activationRefCount

int QGraphicsScenePrivate::activationRefCount

Definition at line 138 of file qgraphicsscene_p.h.

◆ activePanel

QGraphicsItem* QGraphicsScenePrivate::activePanel

Definition at line 136 of file qgraphicsscene_p.h.

Referenced by removeItemHelper(), and setActivePanelHelper().

◆ allItemsIgnoreHoverEvents

quint32 QGraphicsScenePrivate::allItemsIgnoreHoverEvents

Definition at line 79 of file qgraphicsscene_p.h.

Referenced by dispatchHoverEvent().

◆ allItemsIgnoreTouchEvents

quint32 QGraphicsScenePrivate::allItemsIgnoreTouchEvents

Definition at line 83 of file qgraphicsscene_p.h.

◆ allItemsUseDefaultCursor

quint32 QGraphicsScenePrivate::allItemsUseDefaultCursor

Definition at line 80 of file qgraphicsscene_p.h.

◆ backgroundBrush

QBrush QGraphicsScenePrivate::backgroundBrush

Definition at line 128 of file qgraphicsscene_p.h.

◆ cachedAlreadyDeliveredGestures

QHash<QGraphicsObject *, QSet<QGesture *> > QGraphicsScenePrivate::cachedAlreadyDeliveredGestures

Definition at line 287 of file qgraphicsscene_p.h.

Referenced by gestureEventHandler(), and removeItemHelper().

◆ cachedItemGestures

QHash<QGraphicsObject *, QSet<QGesture *> > QGraphicsScenePrivate::cachedItemGestures

Definition at line 286 of file qgraphicsscene_p.h.

Referenced by gestureEventHandler(), and removeItemHelper().

◆ cachedItemsUnderMouse

QList<QGraphicsItem *> QGraphicsScenePrivate::cachedItemsUnderMouse

◆ cachedTargetItems

QList<QGraphicsObject *> QGraphicsScenePrivate::cachedTargetItems

Definition at line 284 of file qgraphicsscene_p.h.

Referenced by gestureEventHandler(), and removeItemHelper().

◆ calledEmitUpdated

quint32 QGraphicsScenePrivate::calledEmitUpdated

Definition at line 70 of file qgraphicsscene_p.h.

Referenced by _q_emitUpdated(), and _q_processDirtyItems().

◆ changedSignalIndex

int QGraphicsScenePrivate::changedSignalIndex

◆ childExplicitActivation

int QGraphicsScenePrivate::childExplicitActivation

Definition at line 139 of file qgraphicsscene_p.h.

◆ dirtyGrowingItemsBoundingRect

quint32 QGraphicsScenePrivate::dirtyGrowingItemsBoundingRect

◆ dragDropItem

QGraphicsItem* QGraphicsScenePrivate::dragDropItem

Definition at line 159 of file qgraphicsscene_p.h.

Referenced by removeItemHelper().

◆ enterWidget

QGraphicsWidget* QGraphicsScenePrivate::enterWidget

Definition at line 160 of file qgraphicsscene_p.h.

◆ focusItem

QGraphicsItem* QGraphicsScenePrivate::focusItem

◆ focusOnTouch

quint32 QGraphicsScenePrivate::focusOnTouch

Definition at line 84 of file qgraphicsscene_p.h.

Referenced by sendTouchBeginEvent().

◆ font

QFont QGraphicsScenePrivate::font

Definition at line 265 of file qgraphicsscene_p.h.

Referenced by resolveFont(), setFont_helper(), and updateFont().

◆ foregroundBrush

QBrush QGraphicsScenePrivate::foregroundBrush

Definition at line 129 of file qgraphicsscene_p.h.

◆ gestureTargets

QHash<QGesture *, QGraphicsObject *> QGraphicsScenePrivate::gestureTargets

◆ grabbedGestures

QHash<Qt::GestureType, int> QGraphicsScenePrivate::grabbedGestures

Definition at line 289 of file qgraphicsscene_p.h.

Referenced by addView(), grabGesture(), and ungrabGesture().

◆ growingItemsBoundingRect

QRectF QGraphicsScenePrivate::growingItemsBoundingRect

◆ hasFocus

quint32 QGraphicsScenePrivate::hasFocus

Definition at line 77 of file qgraphicsscene_p.h.

◆ hasSceneRect

quint32 QGraphicsScenePrivate::hasSceneRect

◆ holesInTopLevelSiblingIndex

quint32 QGraphicsScenePrivate::holesInTopLevelSiblingIndex

◆ hoverItems

QList<QGraphicsItem *> QGraphicsScenePrivate::hoverItems

Definition at line 163 of file qgraphicsscene_p.h.

Referenced by dispatchHoverEvent(), enterModal(), leaveScene(), and removeItemHelper().

◆ index

QGraphicsSceneIndex* QGraphicsScenePrivate::index

◆ indexMethod

QGraphicsScene::ItemIndexMethod QGraphicsScenePrivate::indexMethod

Definition at line 60 of file qgraphicsscene_p.h.

Referenced by drawItems().

◆ itemForTouchPointId

QMap<int, QGraphicsItem *> QGraphicsScenePrivate::itemForTouchPointId

Definition at line 277 of file qgraphicsscene_p.h.

Referenced by removeItemHelper(), sendTouchBeginEvent(), and touchEventHandler().

◆ keyboardGrabberItems

QList<QGraphicsItem *> QGraphicsScenePrivate::keyboardGrabberItems

◆ lastActivePanel

QGraphicsItem* QGraphicsScenePrivate::lastActivePanel

Definition at line 137 of file qgraphicsscene_p.h.

Referenced by removeItemHelper(), and setActivePanelHelper().

◆ lastDropAction

Qt::DropAction QGraphicsScenePrivate::lastDropAction

Definition at line 161 of file qgraphicsscene_p.h.

◆ lastFocusItem

QGraphicsItem* QGraphicsScenePrivate::lastFocusItem

Definition at line 133 of file qgraphicsscene_p.h.

Referenced by removeItemHelper(), and setFocusItemHelper().

◆ lastItemCount

int QGraphicsScenePrivate::lastItemCount

Definition at line 63 of file qgraphicsscene_p.h.

◆ lastMouseGrabberItem

QGraphicsItem* QGraphicsScenePrivate::lastMouseGrabberItem

Definition at line 148 of file qgraphicsscene_p.h.

Referenced by clearMouseGrabber(), mousePressEventHandler(), and removeItemHelper().

◆ lastMouseGrabberItemHasImplicitMouseGrab

quint32 QGraphicsScenePrivate::lastMouseGrabberItemHasImplicitMouseGrab

Definition at line 78 of file qgraphicsscene_p.h.

Referenced by enterModal(), grabMouse(), sendMouseEvent(), and ungrabMouse().

◆ lastSceneMousePos

QPointF QGraphicsScenePrivate::lastSceneMousePos

Definition at line 164 of file qgraphicsscene_p.h.

Referenced by enterModal(), and leaveModal().

◆ minimumRenderSize

qreal QGraphicsScenePrivate::minimumRenderSize

Definition at line 87 of file qgraphicsscene_p.h.

Referenced by drawSubtreeRecursive().

◆ modalPanels

QList<QGraphicsItem *> QGraphicsScenePrivate::modalPanels

◆ mouseGrabberButtonDownPos

QMap<Qt::MouseButton, QPointF> QGraphicsScenePrivate::mouseGrabberButtonDownPos

Definition at line 166 of file qgraphicsscene_p.h.

Referenced by sendMouseEvent(), and storeMouseButtonsForMouseGrabber().

◆ mouseGrabberButtonDownScenePos

QMap<Qt::MouseButton, QPointF> QGraphicsScenePrivate::mouseGrabberButtonDownScenePos

Definition at line 167 of file qgraphicsscene_p.h.

Referenced by sendMouseEvent(), and storeMouseButtonsForMouseGrabber().

◆ mouseGrabberButtonDownScreenPos

QMap<Qt::MouseButton, QPoint> QGraphicsScenePrivate::mouseGrabberButtonDownScreenPos

Definition at line 168 of file qgraphicsscene_p.h.

Referenced by sendMouseEvent(), and storeMouseButtonsForMouseGrabber().

◆ mouseGrabberItems

◆ movingItemsInitialPositions

QHash<QGraphicsItem *, QPointF> QGraphicsScenePrivate::movingItemsInitialPositions

Definition at line 112 of file qgraphicsscene_p.h.

◆ needSortTopLevelItems

quint32 QGraphicsScenePrivate::needSortTopLevelItems

◆ padding

quint32 QGraphicsScenePrivate::padding

Definition at line 85 of file qgraphicsscene_p.h.

◆ painterStateProtection

quint32 QGraphicsScenePrivate::painterStateProtection

Definition at line 81 of file qgraphicsscene_p.h.

Referenced by draw(), and drawItemHelper().

◆ palette

QPalette QGraphicsScenePrivate::palette

Definition at line 269 of file qgraphicsscene_p.h.

Referenced by resolvePalette(), setPalette_helper(), and updatePalette().

◆ passiveFocusItem

QGraphicsItem* QGraphicsScenePrivate::passiveFocusItem

Definition at line 134 of file qgraphicsscene_p.h.

Referenced by removeItemHelper().

◆ polishItemsIndex

int QGraphicsScenePrivate::polishItemsIndex

Definition at line 58 of file qgraphicsscene_p.h.

Referenced by init().

◆ popupWidgets

QList<QGraphicsWidget *> QGraphicsScenePrivate::popupWidgets

◆ processDirtyItemsEmitted

quint32 QGraphicsScenePrivate::processDirtyItemsEmitted

Definition at line 71 of file qgraphicsscene_p.h.

Referenced by _q_processDirtyItems(), and markDirty().

◆ processDirtyItemsIndex

int QGraphicsScenePrivate::processDirtyItemsIndex

Definition at line 57 of file qgraphicsscene_p.h.

Referenced by init(), and markDirty().

◆ rectAdjust

quint32 QGraphicsScenePrivate::rectAdjust

Definition at line 131 of file qgraphicsscene_p.h.

Referenced by drawSubtreeRecursive().

◆ sceneCurrentTouchPoints

QMap<int, QEventPoint> QGraphicsScenePrivate::sceneCurrentTouchPoints

◆ sceneEventFilters

QMultiMap<QGraphicsItem *, QGraphicsItem *> QGraphicsScenePrivate::sceneEventFilters

◆ scenePosDescendantsUpdatePending

quint32 QGraphicsScenePrivate::scenePosDescendantsUpdatePending

Definition at line 75 of file qgraphicsscene_p.h.

Referenced by _q_updateScenePosDescendants(), and setScenePosItemEnabled().

◆ scenePosItems

QSet<QGraphicsItem *> QGraphicsScenePrivate::scenePosItems

◆ sceneRect

QRectF QGraphicsScenePrivate::sceneRect

Definition at line 65 of file qgraphicsscene_p.h.

◆ selectedItems

QSet<QGraphicsItem *> QGraphicsScenePrivate::selectedItems

Definition at line 108 of file qgraphicsscene_p.h.

Referenced by removeItemHelper(), and QGraphicsItem::setSelected().

◆ selectionArea

QPainterPath QGraphicsScenePrivate::selectionArea

Definition at line 106 of file qgraphicsscene_p.h.

◆ selectionChanging

int QGraphicsScenePrivate::selectionChanging

Definition at line 107 of file qgraphicsscene_p.h.

Referenced by removeItemHelper(), and QGraphicsItem::setSelected().

◆ sortCacheEnabled

quint32 QGraphicsScenePrivate::sortCacheEnabled

Definition at line 82 of file qgraphicsscene_p.h.

◆ stickyFocus

quint32 QGraphicsScenePrivate::stickyFocus

Definition at line 76 of file qgraphicsscene_p.h.

Referenced by mousePressEventHandler(), and sendTouchBeginEvent().

◆ style

QStyle* QGraphicsScenePrivate::style

Definition at line 264 of file qgraphicsscene_p.h.

◆ styleOptionTmp

QStyleOptionGraphicsItem QGraphicsScenePrivate::styleOptionTmp

Definition at line 274 of file qgraphicsscene_p.h.

Referenced by draw(), drawItemHelper(), and drawSubtreeRecursive().

◆ tabFocusFirst

QGraphicsWidget* QGraphicsScenePrivate::tabFocusFirst

◆ topLevelItems

◆ topLevelSequentialOrdering

quint32 QGraphicsScenePrivate::topLevelSequentialOrdering

◆ unpolishedItems

QList<QGraphicsItem *> QGraphicsScenePrivate::unpolishedItems

Definition at line 109 of file qgraphicsscene_p.h.

Referenced by _q_polishItems(), drawItems(), and removeItemHelper().

◆ updateAll

quint32 QGraphicsScenePrivate::updateAll

◆ updatedRects

std::set<QRectF, UpdatedRectsCmp> QGraphicsScenePrivate::updatedRects

Definition at line 104 of file qgraphicsscene_p.h.

Referenced by _q_emitUpdated().

◆ views


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