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
QGraphicsProxyWidgetPrivate Class Reference

#include <qgraphicsproxywidget_p.h>

+ Inheritance diagram for QGraphicsProxyWidgetPrivate:
+ Collaboration diagram for QGraphicsProxyWidgetPrivate:

Public Types

enum  ChangeMode { NoMode , ProxyToWidgetMode , WidgetToProxyMode }
 
- Public Types inherited from QGraphicsItemPrivate
enum  Extra {
  ExtraToolTip , ExtraCursor , ExtraCacheData , ExtraMaxDeviceCoordCacheSize ,
  ExtraBoundingRegionGranularity
}
 
enum  AncestorFlag {
  NoFlag = 0 , AncestorHandlesChildEvents = 0x1 , AncestorClipsChildren = 0x2 , AncestorIgnoresTransformations = 0x4 ,
  AncestorFiltersChildEvents = 0x8 , AncestorContainsChildren = 0x10
}
 

Public Member Functions

 QGraphicsProxyWidgetPrivate ()
 
 ~QGraphicsProxyWidgetPrivate ()
 
void init ()
 
void sendWidgetMouseEvent (QGraphicsSceneMouseEvent *event)
 
void sendWidgetMouseEvent (QGraphicsSceneHoverEvent *event)
 
void sendWidgetKeyEvent (QKeyEvent *event)
 
void setWidget_helper (QWidget *widget, bool autoShow)
 
QWidgetfindFocusChild (QWidget *child, bool next) const
 
void removeSubFocusHelper (QWidget *widget, Qt::FocusReason reason)
 
void _q_removeWidgetSlot ()
 
void embedSubWindow (QWidget *)
 
void unembedSubWindow (QWidget *)
 
bool isProxyWidget () const override
 
void updateWidgetGeometryFromProxy ()
 
void updateProxyGeometryFromWidget ()
 
void updateProxyInputMethodAcceptanceFromWidget ()
 
QPointF mapToReceiver (const QPointF &pos, const QWidget *receiver) const
 
- Public Member Functions inherited from QGraphicsWidgetPrivate
 QGraphicsWidgetPrivate ()
 
virtual ~QGraphicsWidgetPrivate ()
 
void init (QGraphicsItem *parentItem, Qt::WindowFlags wFlags)
 
qreal titleBarHeight (const QStyleOptionTitleBar &options) const
 
void ensureMargins () const
 
void fixFocusChainBeforeReparenting (QGraphicsWidget *newParent, QGraphicsScene *oldScene, QGraphicsScene *newScene=nullptr)
 
void setLayout_helper (QGraphicsLayout *l)
 
void setLayoutDirection_helper (Qt::LayoutDirection direction)
 
void resolveLayoutDirection ()
 
void setPalette_helper (const QPalette &palette)
 
void resolvePalette (uint inheritedMask) override
 
void updatePalette (const QPalette &palette)
 
QPalette naturalWidgetPalette () const
 
void setFont_helper (const QFont &font)
 
void resolveFont (uint inheritedMask) override
 
void updateFont (const QFont &font)
 
QFont naturalWidgetFont () const
 
void initStyleOptionTitleBar (QStyleOptionTitleBar *option)
 
void adjustWindowFlags (Qt::WindowFlags *wFlags)
 
void windowFrameMouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
void windowFrameMousePressEvent (QGraphicsSceneMouseEvent *event)
 
void windowFrameMouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
void windowFrameHoverMoveEvent (QGraphicsSceneHoverEvent *event)
 
void windowFrameHoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
bool hasDecoration () const
 
qreal width () const override
 
void setWidth (qreal) override
 
void resetWidth () override
 
qreal height () const override
 
void setHeight (qreal) override
 
void resetHeight () override
 
void setGeometryFromSetPos ()
 
int attributeToBitIndex (Qt::WidgetAttribute att) const
 
void setAttribute (Qt::WidgetAttribute att, bool value)
 
bool testAttribute (Qt::WidgetAttribute att) const
 
void ensureWindowData ()
 
void ensureWindowFrameMargins () const
 
- Public Member Functions inherited from QGraphicsItemPrivate
 QGraphicsItemPrivate ()
 
virtual ~QGraphicsItemPrivate ()
 
void updateChildWithGraphicsEffectFlagRecursively ()
 Returns a pointer to this item's effect if it has one; otherwise \nullptr.
 
void updateAncestorFlag (QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag=NoFlag, bool enabled=false, bool root=true)
 
void updateAncestorFlags ()
 
void setIsMemberOfGroup (bool enabled)
 
void remapItemPos (QEvent *event, QGraphicsItem *item)
 
QTransform genericMapFromSceneTransform (const QWidget *viewport=nullptr) const
 
QPointF genericMapFromScene (const QPointF &pos, const QWidget *viewport) const
 
bool itemIsUntransformable () const
 
void combineTransformToParent (QTransform *x, const QTransform *viewTransform=nullptr) const
 
void combineTransformFromParent (QTransform *x, const QTransform *viewTransform=nullptr) const
 
virtual void updateSceneTransformFromParent ()
 
virtual void setPosHelper (const QPointF &pos)
 
void setTransformHelper (const QTransform &transform)
 
void prependGraphicsTransform (QGraphicsTransform *t)
 
void appendGraphicsTransform (QGraphicsTransform *t)
 
void setVisibleHelper (bool newVisible, bool explicitly, bool update=true, bool hiddenByPanel=false)
 
void setEnabledHelper (bool newEnabled, bool explicitly, bool update=true)
 
bool discardUpdateRequest (bool ignoreVisibleBit=false, bool ignoreDirtyBit=false, bool ignoreOpacity=false) const
 
virtual void transformChanged ()
 
int depth () const
 
void invalidateDepthRecursively ()
 
void resolveDepth ()
 
void addChild (QGraphicsItem *child)
 
void removeChild (QGraphicsItem *child)
 
void setParentItemHelper (QGraphicsItem *parent, const QVariant *newParentVariant, const QVariant *thisPointerVariant)
 
void childrenBoundingRectHelper (QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem)
 
void initStyleOption (QStyleOptionGraphicsItem *option, const QTransform &worldTransform, const QRegion &exposedRegion, bool allItems=false) const
 
QRectF effectiveBoundingRect (QGraphicsItem *topMostEffectItem=nullptr) const
 
QRectF sceneEffectiveBoundingRect () const
 
QRectF effectiveBoundingRect (const QRectF &rect) const
 
QVariant extra (Extra type) const
 
void setExtra (Extra type, const QVariant &value)
 
void unsetExtra (Extra type)
 
QGraphicsItemCachemaybeExtraItemCache () const
 
QGraphicsItemCacheextraItemCache () const
 
void removeExtraItemCache ()
 
void updatePaintedViewBoundingRects (bool updateChildren)
 
void ensureSceneTransformRecursive (QGraphicsItem **topMostDirtyItem)
 
void ensureSceneTransform ()
 
bool hasTranslateOnlySceneTransform ()
 
void invalidateChildrenSceneTransform ()
 
qreal calcEffectiveOpacity () const
 
bool isOpacityNull () const
 
bool isFullyTransparent () const
 
qreal effectiveOpacity () const
 
qreal combineOpacityFromParent (qreal parentOpacity) const
 
bool childrenCombineOpacity () const
 
bool childrenClippedToShape () const
 
bool isInvisible () const
 
void markParentDirty (bool updateBoundingRect=false)
 
void setFocusHelper (Qt::FocusReason focusReason, bool climb, bool focusFromHide)
 
void clearFocusHelper (bool giveFocusToParent, bool hiddenByParentPanel)
 
void setSubFocus (QGraphicsItem *rootItem=nullptr, QGraphicsItem *stopItem=nullptr)
 
void clearSubFocus (QGraphicsItem *rootItem=nullptr, QGraphicsItem *stopItem=nullptr)
 
void resetFocusProxy ()
 
virtual void subFocusItemChange ()
 
virtual void focusScopeItemChange (bool isSubFocusItem)
 
QTransform transformToParent () const
 
void ensureSortedChildren ()
 
void ensureSequentialSiblingIndex ()
 
void sendScenePosChange ()
 
virtual void siblingOrderChange ()
 

Public Attributes

QPointer< QWidgetwidget
 
QPointer< QWidgetlastWidgetUnderMouse
 
QPointer< QWidgetembeddedMouseGrabber
 
QWidgetdragDropWidget
 
Qt::DropAction lastDropAction
 
quint32 posChangeMode: 2
 
quint32 sizeChangeMode: 2
 
quint32 visibleChangeMode: 2
 
quint32 enabledChangeMode: 2
 
quint32 styleChangeMode: 2
 
quint32 paletteChangeMode: 2
 
quint32 tooltipChangeMode: 2
 
quint32 focusFromWidgetToProxy: 1
 
quint32 proxyIsGivingFocus: 1
 
- Public Attributes inherited from QGraphicsWidgetPrivate
std::unique_ptr< QMarginsFmargins
 
QGraphicsLayoutlayout
 
QPalette palette
 
uint inheritedPaletteResolveMask
 
QFont font
 
uint inheritedFontResolveMask
 
quint32 attributes: 10
 
quint32 inSetGeometry: 1
 
quint32 polished: 1
 
quint32 inSetPos: 1
 
quint32 autoFillBackground: 1
 
Qt::FocusPolicy focusPolicy
 
QGraphicsWidgetfocusNext
 
QGraphicsWidgetfocusPrev
 
Qt::WindowFlags windowFlags
 
std::unique_ptr< WindowDatawindowData
 
bool setWindowFrameMargins
 
std::unique_ptr< QMarginsFwindowFrameMargins
 
QList< QAction * > actions
 
- Public Attributes inherited from QGraphicsItemPrivate
QList< ExtraStructextras
 
QRectF childrenBoundingRect
 
QRectF needsRepaint
 
QHash< QWidget *, QRectpaintedViewBoundingRects
 
QPointF pos
 
qreal z
 
qreal opacity
 
QGraphicsScenescene
 
QGraphicsItemparent
 
QList< QGraphicsItem * > children
 
TransformDatatransformData
 
QGraphicsEffectgraphicsEffect
 
QTransform sceneTransform
 
int index
 
int siblingIndex
 
int itemDepth
 
QGraphicsItemfocusProxy
 
QList< QGraphicsItem ** > focusProxyRefs
 
QGraphicsItemsubFocusItem
 
QGraphicsItemfocusScopeItem
 
Qt::InputMethodHints imHints
 
QGraphicsItem::PanelModality panelModality
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
quint32 acceptedMouseButtons: 5
 
quint32 visible: 1
 
quint32 explicitlyHidden: 1
 
quint32 enabled: 1
 
quint32 explicitlyDisabled: 1
 
quint32 selected: 1
 
quint32 acceptsHover: 1
 
quint32 acceptDrops: 1
 
quint32 isMemberOfGroup: 1
 
quint32 handlesChildEvents: 1
 
quint32 itemDiscovered: 1
 
quint32 hasCursor: 1
 
quint32 ancestorFlags: 5
 
quint32 cacheMode: 2
 
quint32 hasBoundingRegionGranularity: 1
 
quint32 isWidget: 1
 
quint32 dirty: 1
 
quint32 dirtyChildren: 1
 
quint32 localCollisionHack: 1
 
quint32 inSetPosHelper: 1
 
quint32 needSortChildren: 1
 
quint32 allChildrenDirty: 1
 
quint32 fullUpdatePending: 1
 
quint32 flags: 20
 
quint32 paintedViewBoundingRectsNeedRepaint: 1
 
quint32 dirtySceneTransform: 1
 
quint32 geometryChanged: 1
 
quint32 inDestructor: 1
 
quint32 isObject: 1
 
quint32 ignoreVisible: 1
 
quint32 ignoreOpacity: 1
 
quint32 acceptTouchEvents: 1
 
quint32 acceptedTouchBeginEvent: 1
 
quint32 filtersDescendantEvents: 1
 
quint32 sceneTransformTranslateOnly: 1
 
quint32 notifyBoundingRectChanged: 1
 
quint32 notifyInvalidated: 1
 
quint32 mouseSetsFocus: 1
 
quint32 explicitActivate: 1
 
quint32 wantsActive: 1
 
quint32 holesInSiblingIndex: 1
 
quint32 sequentialOrdering: 1
 
quint32 updateDueToGraphicsEffect: 1
 
quint32 scenePosDescendants: 1
 
quint32 pendingPolish: 1
 
quint32 mayHaveChildWithGraphicsEffect: 1
 
quint32 sendParentChangeNotification: 1
 
quint32 dirtyChildrenBoundingRect: 1
 
quint32 padding: 20
 
int globalStackingOrder
 
QGraphicsItemq_ptr
 

Additional Inherited Members

- Static Public Member Functions inherited from QGraphicsItemPrivate
static const QGraphicsItemPrivateget (const QGraphicsItem *item)
 
static QGraphicsItemPrivateget (QGraphicsItem *item)
 
static bool movableAncestorIsSelected (const QGraphicsItem *item)
 
static bool isOpacityNull (qreal opacity)
 
static bool insertionOrder (QGraphicsItem *a, QGraphicsItem *b)
 

Detailed Description

Definition at line 28 of file qgraphicsproxywidget_p.h.

Member Enumeration Documentation

◆ ChangeMode

Enumerator
NoMode 
ProxyToWidgetMode 
WidgetToProxyMode 

Definition at line 64 of file qgraphicsproxywidget_p.h.

Constructor & Destructor Documentation

◆ QGraphicsProxyWidgetPrivate()

QGraphicsProxyWidgetPrivate::QGraphicsProxyWidgetPrivate ( )

Definition at line 163 of file qgraphicsproxywidget.cpp.

◆ ~QGraphicsProxyWidgetPrivate()

QGraphicsProxyWidgetPrivate::~QGraphicsProxyWidgetPrivate ( )

Definition at line 181 of file qgraphicsproxywidget.cpp.

Member Function Documentation

◆ _q_removeWidgetSlot()

void QGraphicsProxyWidgetPrivate::_q_removeWidgetSlot ( )

Definition at line 371 of file qgraphicsproxywidget.cpp.

References QGraphicsItemPrivate::extra(), QPointer< T >::isNull(), and widget.

Referenced by setWidget_helper().

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

◆ embedSubWindow()

void QGraphicsProxyWidgetPrivate::embedSubWindow ( QWidget * subWin)

Embeds subWin as a subwindow of this proxy widget. subWin must be a top-level widget and a descendant of the widget managed by this proxy. A separate subproxy will be created as a child of this proxy widget to manage subWin.

Definition at line 446 of file qgraphicsproxywidget.cpp.

References QGraphicsItemPrivate::extra().

+ Here is the call graph for this function:

◆ findFocusChild()

QWidget * QGraphicsProxyWidgetPrivate::findFocusChild ( QWidget * child,
bool next ) const

Some of the logic is shared with QApplicationPrivate::focusNextPrevChild_helper

Definition at line 336 of file qgraphicsproxywidget.cpp.

References child, QPointer< T >::data(), next, QWidget::previousInFocusChain(), qt_tab_all_widgets(), Qt::StrongFocus, Qt::TabFocus, and widget.

+ Here is the call graph for this function:

◆ init()

void QGraphicsProxyWidgetPrivate::init ( )

Definition at line 188 of file qgraphicsproxywidget.cpp.

References Qt::WheelFocus.

◆ isProxyWidget()

bool QGraphicsProxyWidgetPrivate::isProxyWidget ( ) const
overridevirtual

Tells us if it is a proxy widget

Reimplemented from QGraphicsItemPrivate.

Definition at line 478 of file qgraphicsproxywidget.cpp.

◆ mapToReceiver()

QPointF QGraphicsProxyWidgetPrivate::mapToReceiver ( const QPointF & pos,
const QWidget * receiver ) const

Definition at line 486 of file qgraphicsproxywidget.cpp.

References QWidget::parentWidget(), QGraphicsItemPrivate::pos, QWidget::pos, and widget.

Referenced by sendWidgetMouseEvent().

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

◆ removeSubFocusHelper()

void QGraphicsProxyWidgetPrivate::removeSubFocusHelper ( QWidget * widget,
Qt::FocusReason reason )

Definition at line 323 of file qgraphicsproxywidget.cpp.

References QEvent::FocusOut, QCoreApplication::sendEvent(), QWidget::style(), and widget.

+ Here is the call graph for this function:

◆ sendWidgetKeyEvent()

void QGraphicsProxyWidgetPrivate::sendWidgetKeyEvent ( QKeyEvent * event)

Definition at line 301 of file qgraphicsproxywidget.cpp.

References QWidget::focusWidget(), QWidget::isVisible(), Q_ASSERT, QCoreApplication::sendEvent(), and widget.

+ Here is the call graph for this function:

◆ sendWidgetMouseEvent() [1/2]

void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent ( QGraphicsSceneHoverEvent * event)

◆ sendWidgetMouseEvent() [2/2]

void QGraphicsProxyWidgetPrivate::sendWidgetMouseEvent ( QGraphicsSceneMouseEvent * event)

Definition at line 214 of file qgraphicsproxywidget.cpp.

References QWidget::childAt(), QApplicationPrivate::dispatchEnterLeave(), embeddedMouseGrabber, QEvent::GraphicsSceneMouseDoubleClick, QEvent::GraphicsSceneMouseMove, QEvent::GraphicsSceneMousePress, QEvent::GraphicsSceneMouseRelease, QEvent::isAccepted(), QWidget::isVisible(), lastWidgetUnderMouse, mapToReceiver(), QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, QEvent::MouseMove, QEvent::None, QGraphicsItemPrivate::pos, Q_ASSERT_X, QApplicationPrivate::sendMouseEvent(), QPointerEvent::setTimestamp(), QPointF::toPoint(), QWidget::unsetCursor(), and widget.

Referenced by sendWidgetMouseEvent().

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

◆ setWidget_helper()

◆ unembedSubWindow()

void QGraphicsProxyWidgetPrivate::unembedSubWindow ( QWidget * subWin)

Removes ("unembeds") subWin and deletes the proxy holder item. This can happen when QWidget::setParent() reparents the embedded window out of "embedded space".

Definition at line 462 of file qgraphicsproxywidget.cpp.

References child, QGraphicsItemPrivate::children, proxy, QGraphicsScene::removeItem(), and QGraphicsItemPrivate::scene.

+ Here is the call graph for this function:

◆ updateProxyGeometryFromWidget()

void QGraphicsProxyWidgetPrivate::updateProxyGeometryFromWidget ( )

Definition at line 392 of file qgraphicsproxywidget.cpp.

References QWidget::geometry, QSize::isValid(), QWidget::isWindow(), QWidget::mapFromGlobal(), NoMode, QWidget::parentWidget(), QWidget::pos, posChangeMode, QWidget::size, sizeChangeMode, QWidget::sizeHint, widget, and WidgetToProxyMode.

Referenced by setWidget_helper().

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

◆ updateProxyInputMethodAcceptanceFromWidget()

void QGraphicsProxyWidgetPrivate::updateProxyInputMethodAcceptanceFromWidget ( )

Definition at line 426 of file qgraphicsproxywidget.cpp.

References QWidget::focusWidget(), QGraphicsItem::ItemAcceptsInputMethod, QWidget::testAttribute(), Qt::WA_InputMethodEnabled, and widget.

Referenced by setWidget_helper().

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

◆ updateWidgetGeometryFromProxy()

void QGraphicsProxyWidgetPrivate::updateWidgetGeometryFromProxy ( )

Definition at line 385 of file qgraphicsproxywidget.cpp.

Member Data Documentation

◆ dragDropWidget

QWidget* QGraphicsProxyWidgetPrivate::dragDropWidget

Definition at line 54 of file qgraphicsproxywidget_p.h.

◆ embeddedMouseGrabber

QPointer<QWidget> QGraphicsProxyWidgetPrivate::embeddedMouseGrabber

Definition at line 53 of file qgraphicsproxywidget_p.h.

Referenced by sendWidgetMouseEvent().

◆ enabledChangeMode

quint32 QGraphicsProxyWidgetPrivate::enabledChangeMode

Definition at line 72 of file qgraphicsproxywidget_p.h.

Referenced by setWidget_helper().

◆ focusFromWidgetToProxy

quint32 QGraphicsProxyWidgetPrivate::focusFromWidgetToProxy

Definition at line 76 of file qgraphicsproxywidget_p.h.

◆ lastDropAction

Qt::DropAction QGraphicsProxyWidgetPrivate::lastDropAction

Definition at line 55 of file qgraphicsproxywidget_p.h.

◆ lastWidgetUnderMouse

QPointer<QWidget> QGraphicsProxyWidgetPrivate::lastWidgetUnderMouse

Definition at line 52 of file qgraphicsproxywidget_p.h.

Referenced by sendWidgetMouseEvent().

◆ paletteChangeMode

quint32 QGraphicsProxyWidgetPrivate::paletteChangeMode

Definition at line 74 of file qgraphicsproxywidget_p.h.

◆ posChangeMode

quint32 QGraphicsProxyWidgetPrivate::posChangeMode

Definition at line 69 of file qgraphicsproxywidget_p.h.

Referenced by setWidget_helper(), and updateProxyGeometryFromWidget().

◆ proxyIsGivingFocus

quint32 QGraphicsProxyWidgetPrivate::proxyIsGivingFocus

Definition at line 77 of file qgraphicsproxywidget_p.h.

◆ sizeChangeMode

quint32 QGraphicsProxyWidgetPrivate::sizeChangeMode

Definition at line 70 of file qgraphicsproxywidget_p.h.

Referenced by setWidget_helper(), and updateProxyGeometryFromWidget().

◆ styleChangeMode

quint32 QGraphicsProxyWidgetPrivate::styleChangeMode

Definition at line 73 of file qgraphicsproxywidget_p.h.

◆ tooltipChangeMode

quint32 QGraphicsProxyWidgetPrivate::tooltipChangeMode

Definition at line 75 of file qgraphicsproxywidget_p.h.

◆ visibleChangeMode

quint32 QGraphicsProxyWidgetPrivate::visibleChangeMode

Definition at line 71 of file qgraphicsproxywidget_p.h.

Referenced by setWidget_helper().

◆ widget


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