![]() |
Qt 6.x
The Qt SDK
|
#include <qgraphicswidget_p.h>
Classes | |
struct | WindowData |
Additional Inherited Members | |
![]() | |
enum | Extra { ExtraToolTip , ExtraCursor , ExtraCacheData , ExtraMaxDeviceCoordCacheSize , ExtraBoundingRegionGranularity } |
enum | AncestorFlag { NoFlag = 0 , AncestorHandlesChildEvents = 0x1 , AncestorClipsChildren = 0x2 , AncestorIgnoresTransformations = 0x4 , AncestorFiltersChildEvents = 0x8 , AncestorContainsChildren = 0x10 } |
![]() | |
static const QGraphicsItemPrivate * | get (const QGraphicsItem *item) |
static QGraphicsItemPrivate * | get (QGraphicsItem *item) |
static bool | movableAncestorIsSelected (const QGraphicsItem *item) |
static bool | isOpacityNull (qreal opacity) |
static bool | insertionOrder (QGraphicsItem *a, QGraphicsItem *b) |
Definition at line 36 of file qgraphicswidget_p.h.
QGraphicsWidgetPrivate::QGraphicsWidgetPrivate | ( | ) |
Definition at line 54 of file qgraphicswidget_p.cpp.
|
virtual |
Definition at line 73 of file qgraphicswidget_p.cpp.
void QGraphicsWidgetPrivate::adjustWindowFlags | ( | Qt::WindowFlags * | wFlags | ) |
Definition at line 292 of file qgraphicswidget_p.cpp.
References Qt::CustomizeWindowHint, Qt::Dialog, Qt::FramelessWindowHint, Qt::Sheet, Qt::SubWindow, Qt::Tool, Qt::Window, Qt::WindowContextHelpButtonHint, Qt::WindowMaximizeButtonHint, Qt::WindowMinimizeButtonHint, Qt::WindowSystemMenuHint, Qt::WindowTitleHint, and Qt::WindowType_Mask.
Referenced by init().
|
inline |
Definition at line 93 of file qgraphicswidget_p.h.
References Qt::WA_DeleteOnClose, Qt::WA_NoSystemBackground, Qt::WA_OpaquePaintEvent, Qt::WA_Resized, Qt::WA_RightToLeft, Qt::WA_SetFont, Qt::WA_SetLayoutDirection, Qt::WA_SetPalette, Qt::WA_SetStyle, and Qt::WA_WindowPropagation.
Referenced by setAttribute(), and testAttribute().
void QGraphicsWidgetPrivate::ensureMargins | ( | ) | const |
Ensures that margins is allocated. This function must be called before any dereferencing.
Definition at line 83 of file qgraphicswidget_p.cpp.
References margins.
void QGraphicsWidgetPrivate::ensureWindowData | ( | ) |
Ensures that windowData is allocated. This function must be called before any dereferencing.
Definition at line 107 of file qgraphicswidget_p.cpp.
References windowData.
Referenced by initStyleOptionTitleBar(), windowFrameHoverLeaveEvent(), windowFrameHoverMoveEvent(), windowFrameMouseMoveEvent(), windowFrameMousePressEvent(), and windowFrameMouseReleaseEvent().
void QGraphicsWidgetPrivate::ensureWindowFrameMargins | ( | ) | const |
Ensures that windowFrameMargins is allocated. This function must be called before any dereferencing.
Definition at line 95 of file qgraphicswidget_p.cpp.
References windowFrameMargins.
void QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting | ( | QGraphicsWidget * | newParent, |
QGraphicsScene * | oldScene, | ||
QGraphicsScene * | newScene = nullptr |
||
) |
is called after a reparent has taken place to fix up the focus chain(s)
Definition at line 718 of file qgraphicswidget_p.cpp.
References focusNext, focusPrev, QGraphicsItem::isAncestorOf(), QGraphicsItem::isPanel(), QGraphicsItemPrivate::parent, Q_ASSERT, and QGraphicsItemPrivate::q_ptr.
bool QGraphicsWidgetPrivate::hasDecoration | ( | ) | const |
Definition at line 710 of file qgraphicswidget_p.cpp.
References Qt::Window, windowFlags, and Qt::WindowTitleHint.
Referenced by windowFrameHoverLeaveEvent(), and windowFrameHoverMoveEvent().
|
overridevirtual |
Returns the height of the item Reimplemented by QGraphicsWidget
Reimplemented from QGraphicsItemPrivate.
Definition at line 811 of file qgraphicswidget_p.cpp.
Referenced by titleBarHeight().
QT_BEGIN_NAMESPACE void QGraphicsWidgetPrivate::init | ( | QGraphicsItem * | parentItem, |
Qt::WindowFlags | wFlags | ||
) |
Definition at line 20 of file qgraphicswidget_p.cpp.
References adjustWindowFlags(), attributes, QSizePolicy::DefaultType, focusNext, focusPolicy, focusPrev, QGraphicsItemPrivate::isWidget, QGraphicsItem::ItemIsPanel, QGraphicsItem::ItemSendsGeometryChanges, QGraphicsItem::ItemUsesExtendedStyleOption, Qt::NoFocus, QSizePolicy::Preferred, resolveLayoutDirection(), Qt::Window, and windowFlags.
void QGraphicsWidgetPrivate::initStyleOptionTitleBar | ( | QStyleOptionTitleBar * | option | ) |
Definition at line 269 of file qgraphicswidget_p.cpp.
References QStyle::CC_TitleBar, QFontMetrics::elidedText(), Qt::ElideRight, ensureWindowData(), QApplication::font(), isActive, QStyle::SC_TitleBarCloseButton, QStyle::SC_TitleBarLabel, QStyle::SC_TitleBarSysMenu, QStyle::State_Active, textRect, titleBarHeight(), QRect::width(), Qt::WindowActive, windowData, windowFlags, and Qt::WindowNoState.
Referenced by windowFrameHoverMoveEvent(), and windowFrameMouseReleaseEvent().
QFont QGraphicsWidgetPrivate::naturalWidgetFont | ( | ) | const |
Definition at line 256 of file qgraphicswidget_p.cpp.
References QGraphicsScene::font, QGraphicsItemPrivate::parent, QGraphicsItem::parentWidget(), QGraphicsItemPrivate::scene, and QFont::setResolveMask().
Referenced by resolveFont().
QPalette QGraphicsWidgetPrivate::naturalWidgetPalette | ( | ) | const |
Definition at line 195 of file qgraphicswidget_p.cpp.
References QGraphicsScene::palette, palette, QGraphicsItemPrivate::parent, QGraphicsItem::parentWidget(), QGraphicsItemPrivate::scene, and QPalette::setResolveMask().
Referenced by resolvePalette().
|
overridevirtual |
Reset the height of the item Reimplemented by QGraphicsWidget
Reimplemented from QGraphicsItemPrivate.
Definition at line 828 of file qgraphicswidget_p.cpp.
|
overridevirtual |
Reset the width of the item Reimplemented by QGraphicsWidget
Reimplemented from QGraphicsItemPrivate.
Definition at line 805 of file qgraphicswidget_p.cpp.
Reimplemented from QGraphicsItemPrivate.
Definition at line 215 of file qgraphicswidget_p.cpp.
References font, inheritedFontResolveMask, naturalWidgetFont(), QGraphicsItem::parentWidget(), QFont::resolve(), and updateFont().
Referenced by QGraphicsProxyWidgetPrivate::setWidget_helper().
void QGraphicsWidgetPrivate::resolveLayoutDirection | ( | ) |
Definition at line 178 of file qgraphicswidget_p.cpp.
References QGuiApplication::layoutDirection, QGraphicsItem::parentWidget(), QGraphicsItemPrivate::scene, setLayoutDirection_helper(), and Qt::WA_SetLayoutDirection.
Referenced by init().
Reimplemented from QGraphicsItemPrivate.
Definition at line 120 of file qgraphicswidget_p.cpp.
References inheritedPaletteResolveMask, naturalWidgetPalette(), palette, QPalette::resolve(), and updatePalette().
Referenced by QGraphicsProxyWidgetPrivate::setWidget_helper().
|
inline |
Definition at line 111 of file qgraphicswidget_p.h.
References attributes, attributeToBitIndex(), and qWarning.
Definition at line 208 of file qgraphicswidget_p.cpp.
References font, QFont::resolveMask(), and updateFont().
void QGraphicsWidgetPrivate::setGeometryFromSetPos | ( | ) |
Definition at line 834 of file qgraphicswidget_p.cpp.
References inSetGeometry, inSetPos, and QGraphicsItemPrivate::pos.
Set the height of the item Reimplemented by QGraphicsWidget
Reimplemented from QGraphicsItemPrivate.
Definition at line 817 of file qgraphicswidget_p.cpp.
References qIsNaN().
void QGraphicsWidgetPrivate::setLayout_helper | ( | QGraphicsLayout * | l | ) |
Definition at line 778 of file qgraphicswidget_p.cpp.
References layout.
void QGraphicsWidgetPrivate::setLayoutDirection_helper | ( | Qt::LayoutDirection | direction | ) |
Definition at line 156 of file qgraphicswidget_p.cpp.
References QList< T >::at(), QGraphicsItemPrivate::children, direction, e, i, QGraphicsItem::isWidget(), item, QEvent::LayoutDirectionChange, QWidget::parentWidget(), Qt::RightToLeft, QCoreApplication::sendEvent(), QList< T >::size(), testAttribute(), QWidget::testAttribute(), Qt::WA_RightToLeft, Qt::WA_SetLayoutDirection, and widget.
Referenced by resolveLayoutDirection().
Definition at line 113 of file qgraphicswidget_p.cpp.
References palette, QPalette::resolveMask(), and updatePalette().
Set the width of the item Reimplemented by QGraphicsWidget
Reimplemented from QGraphicsItemPrivate.
Definition at line 794 of file qgraphicswidget_p.cpp.
References qIsNaN().
|
inline |
Definition at line 123 of file qgraphicswidget_p.h.
References attributes, and attributeToBitIndex().
Referenced by setLayoutDirection_helper().
qreal QGraphicsWidgetPrivate::titleBarHeight | ( | const QStyleOptionTitleBar & | options | ) | const |
Definition at line 44 of file qgraphicswidget_p.cpp.
References height(), and QStyle::PM_TitleBarHeight.
Referenced by initStyleOptionTitleBar(), and windowFrameHoverMoveEvent().
Definition at line 226 of file qgraphicswidget_p.cpp.
References QList< T >::at(), QGraphicsItemPrivate::children, QGraphicsItem::d_ptr, font, QEvent::FontChange, i, inheritedFontResolveMask, QGraphicsItem::isWidget(), item, polished, QGraphicsItemPrivate::resolveFont(), QFont::resolveMask(), QCoreApplication::sendEvent(), QList< T >::size(), and Qt::WA_WindowPropagation.
Referenced by resolveFont(), and setFont_helper().
Definition at line 128 of file qgraphicswidget_p.cpp.
References QList< T >::at(), QGraphicsItemPrivate::children, QGraphicsItem::d_ptr, i, inheritedPaletteResolveMask, QGraphicsItem::isWidget(), item, palette, QEvent::PaletteChange, QPalette::resolveMask(), QGraphicsItemPrivate::resolvePalette(), QCoreApplication::sendEvent(), QList< T >::size(), and Qt::WA_WindowPropagation.
Referenced by resolvePalette(), and setPalette_helper().
|
overridevirtual |
Returns the width of the item Reimplemented by QGraphicsWidget
Reimplemented from QGraphicsItemPrivate.
Definition at line 788 of file qgraphicswidget_p.cpp.
void QGraphicsWidgetPrivate::windowFrameHoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) |
Definition at line 684 of file qgraphicswidget_p.cpp.
References ensureWindowData(), hasDecoration(), Q_UNUSED, QStyle::SC_None, QStyle::SC_TitleBarCloseButton, and windowData.
Referenced by windowFrameHoverMoveEvent().
void QGraphicsWidgetPrivate::windowFrameHoverMoveEvent | ( | QGraphicsSceneHoverEvent * | event | ) |
Definition at line 604 of file qgraphicswidget_p.cpp.
References Qt::ArrowCursor, Qt::BottomLeftSection, Qt::BottomRightSection, Qt::BottomSection, QStyle::CC_TitleBar, ensureWindowData(), hasDecoration(), initStyleOptionTitleBar(), QRect::isNull(), Qt::LeftSection, QRect::moveTo(), QGraphicsItemPrivate::pos, Q_UNUSED, QStyleOption::rect, Qt::RightSection, QPointF::rx(), QPointF::ry(), QStyle::SC_None, QStyle::SC_TitleBarCloseButton, QStyle::SC_TitleBarLabel, QRect::setHeight(), Qt::SizeBDiagCursor, Qt::SizeFDiagCursor, Qt::SizeHorCursor, Qt::SizeVerCursor, Qt::TitleBarArea, titleBarHeight(), Qt::TopLeftSection, QPointF::toPoint(), Qt::TopRightSection, Qt::TopSection, QRectF::translated(), windowData, windowFrameHoverLeaveEvent(), and windowFrameMargins.
void QGraphicsWidgetPrivate::windowFrameMouseMoveEvent | ( | QGraphicsSceneMouseEvent * | event | ) |
Definition at line 534 of file qgraphicswidget_p.cpp.
References _q_boundGeometryToSizeConstraints(), Qt::BottomLeftSection, Qt::BottomRightSection, Qt::BottomSection, QLineF::dx(), QLineF::dy(), ensureWindowData(), Qt::LeftButton, Qt::LeftSection, Qt::MaximumSize, Qt::MinimumSize, Qt::NoSection, QLineF::p1(), QLineF::p2(), Qt::RightSection, QStyle::SC_TitleBarLabel, Qt::TitleBarArea, Qt::TopLeftSection, Qt::TopRightSection, Qt::TopSection, windowData, QPointF::x(), and QPointF::y().
void QGraphicsWidgetPrivate::windowFrameMousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) |
Definition at line 345 of file qgraphicswidget_p.cpp.
References ensureWindowData(), Qt::LeftButton, Qt::NoSection, QStyle::SC_TitleBarCloseButton, Qt::TitleBarArea, and windowData.
void QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) |
Definition at line 314 of file qgraphicswidget_p.cpp.
References QStyle::CC_TitleBar, ensureWindowData(), initStyleOptionTitleBar(), QRect::moveTo(), Qt::NoSection, QStyle::PM_TitleBarHeight, QGraphicsItemPrivate::pos, QStyleOption::rect, QPointF::rx(), QPointF::ry(), QStyle::SC_TitleBarCloseButton, QRect::setHeight(), QStyleOptionComplex::subControls, Qt::TitleBarArea, QPointF::toPoint(), windowData, and windowFrameMargins.
Definition at line 166 of file qgraphicswidget_p.h.
quint32 QGraphicsWidgetPrivate::attributes |
Definition at line 130 of file qgraphicswidget_p.h.
Referenced by init(), setAttribute(), and testAttribute().
quint32 QGraphicsWidgetPrivate::autoFillBackground |
Definition at line 134 of file qgraphicswidget_p.h.
QGraphicsWidget* QGraphicsWidgetPrivate::focusNext |
Definition at line 138 of file qgraphicswidget_p.h.
Referenced by fixFocusChainBeforeReparenting(), init(), and QGraphicsScenePrivate::removeItemHelper().
Qt::FocusPolicy QGraphicsWidgetPrivate::focusPolicy |
Definition at line 137 of file qgraphicswidget_p.h.
Referenced by init().
QGraphicsWidget* QGraphicsWidgetPrivate::focusPrev |
Definition at line 139 of file qgraphicswidget_p.h.
Referenced by fixFocusChainBeforeReparenting(), and init().
QFont QGraphicsWidgetPrivate::font |
Definition at line 65 of file qgraphicswidget_p.h.
Referenced by resolveFont(), setFont_helper(), and updateFont().
uint QGraphicsWidgetPrivate::inheritedFontResolveMask |
Definition at line 66 of file qgraphicswidget_p.h.
Referenced by resolveFont(), QGraphicsProxyWidgetPrivate::setWidget_helper(), and updateFont().
uint QGraphicsWidgetPrivate::inheritedPaletteResolveMask |
Definition at line 60 of file qgraphicswidget_p.h.
Referenced by resolvePalette(), QGraphicsProxyWidgetPrivate::setWidget_helper(), and updatePalette().
quint32 QGraphicsWidgetPrivate::inSetGeometry |
Definition at line 131 of file qgraphicswidget_p.h.
Referenced by setGeometryFromSetPos().
quint32 QGraphicsWidgetPrivate::inSetPos |
Definition at line 133 of file qgraphicswidget_p.h.
Referenced by setGeometryFromSetPos().
QGraphicsLayout* QGraphicsWidgetPrivate::layout |
Definition at line 54 of file qgraphicswidget_p.h.
Referenced by QGraphicsWidget::setGeometry(), and setLayout_helper().
|
mutable |
Definition at line 47 of file qgraphicswidget_p.h.
Referenced by ensureMargins().
QPalette QGraphicsWidgetPrivate::palette |
Definition at line 59 of file qgraphicswidget_p.h.
Referenced by naturalWidgetPalette(), resolvePalette(), setPalette_helper(), and updatePalette().
quint32 QGraphicsWidgetPrivate::polished |
Definition at line 132 of file qgraphicswidget_p.h.
Referenced by updateFont().
bool QGraphicsWidgetPrivate::setWindowFrameMargins |
Definition at line 161 of file qgraphicswidget_p.h.
std::unique_ptr<WindowData> QGraphicsWidgetPrivate::windowData |
Definition at line 158 of file qgraphicswidget_p.h.
Referenced by ensureWindowData(), initStyleOptionTitleBar(), windowFrameHoverLeaveEvent(), windowFrameHoverMoveEvent(), windowFrameMouseMoveEvent(), windowFrameMousePressEvent(), and windowFrameMouseReleaseEvent().
Qt::WindowFlags QGraphicsWidgetPrivate::windowFlags |
Definition at line 142 of file qgraphicswidget_p.h.
Referenced by hasDecoration(), init(), and initStyleOptionTitleBar().
|
mutable |
Definition at line 162 of file qgraphicswidget_p.h.
Referenced by ensureWindowFrameMargins(), windowFrameHoverMoveEvent(), and windowFrameMouseReleaseEvent().