![]() |
Qt 6.x
The Qt SDK
|
#include <qgraphicslayoutitem_p.h>
Public Types | |
enum | SizeComponent { Width , Height } |
Public Member Functions | |
virtual | ~QGraphicsLayoutItemPrivate () |
QGraphicsLayoutItemPrivate (QGraphicsLayoutItem *parent, bool isLayout) | |
void | init () |
QSizeF * | effectiveSizeHints (const QSizeF &constraint) const |
QGraphicsItem * | parentItem () const |
void | ensureUserSizeHints () |
void | setSize (Qt::SizeHint which, const QSizeF &size) |
void | setSizeComponent (Qt::SizeHint which, SizeComponent component, qreal value) |
bool | hasHeightForWidth () const |
bool | hasWidthForHeight () const |
Static Public Member Functions | |
static QGraphicsLayoutItemPrivate * | get (QGraphicsLayoutItem *q) |
static const QGraphicsLayoutItemPrivate * | get (const QGraphicsLayoutItem *q) |
Definition at line 27 of file qgraphicslayoutitem_p.h.
Enumerator | |
---|---|
Width | |
Height |
Definition at line 41 of file qgraphicslayoutitem_p.h.
|
virtual |
Definition at line 80 of file qgraphicslayoutitem.cpp.
References userSizeHints.
QGraphicsLayoutItemPrivate::QGraphicsLayoutItemPrivate | ( | QGraphicsLayoutItem * | par, |
bool | layout | ||
) |
Definition at line 72 of file qgraphicslayoutitem.cpp.
Definition at line 98 of file qgraphicslayoutitem.cpp.
References boundSize(), cachedConstraint, cachedSizeHints, cachedSizeHintsWithConstraints, COMBINE_SIZE, combineSize(), expandSize(), QSizeF::height(), i, Qt::MaximumSize, Qt::MinimumDescent, Qt::MinimumSize, normalizeHints(), Qt::NSizeHints, Qt::PreferredSize, QWIDGETSIZE_MAX, QSizeF::rheight(), QSizeF::rwidth(), sizeHintCacheDirty, sizeHintWithConstraintCacheDirty, userSizeHints, and QSizeF::width().
Referenced by QGraphicsLayoutItem::effectiveSizeHint().
void QGraphicsLayoutItemPrivate::ensureUserSizeHints | ( | ) |
Ensures that userSizeHints is allocated. This function must be called before any dereferencing.
Definition at line 191 of file qgraphicslayoutitem.cpp.
References Qt::NSizeHints, and userSizeHints.
Referenced by setSize(), and setSizeComponent().
|
inlinestatic |
Definition at line 34 of file qgraphicslayoutitem_p.h.
|
inlinestatic |
Definition at line 33 of file qgraphicslayoutitem_p.h.
Referenced by _q_boundGeometryToSizeConstraints(), QGraphicsGridLayoutEngineItem::dynamicConstraintOrientation(), QGraphicsGridLayoutEngineItem::hasDynamicConstraint(), hasHeightForWidth(), hasWidthForHeight(), and minimumHeightForWidth().
bool QGraphicsLayoutItemPrivate::hasHeightForWidth | ( | ) | const |
Definition at line 238 of file qgraphicslayoutitem.cpp.
References QGraphicsLayout::count(), get(), hasHeightForWidth(), i, isLayout, QGraphicsItem::isWidget(), item, and QGraphicsLayout::itemAt().
Referenced by _q_boundGeometryToSizeConstraints(), QGraphicsGridLayoutEngineItem::hasDynamicConstraint(), hasHeightForWidth(), and minimumHeightForWidth().
bool QGraphicsLayoutItemPrivate::hasWidthForHeight | ( | ) | const |
Definition at line 258 of file qgraphicslayoutitem.cpp.
References QGraphicsLayout::count(), get(), hasWidthForHeight(), i, isLayout, QGraphicsItem::isWidget(), item, and QGraphicsLayout::itemAt().
Referenced by _q_boundGeometryToSizeConstraints(), QGraphicsGridLayoutEngineItem::hasDynamicConstraint(), and hasWidthForHeight().
void QGraphicsLayoutItemPrivate::init | ( | ) |
Definition at line 89 of file qgraphicslayoutitem.cpp.
References sizeHintCacheDirty, and sizeHintWithConstraintCacheDirty.
QGraphicsItem * QGraphicsLayoutItemPrivate::parentItem | ( | ) | const |
Returns the parent item of this layout, or \nullptr if this layout is not installed on any widget.
If this is the item that the layout is installed on, it will return "itself".
If the layout is a sub-layout, this function returns the parent widget of the parent layout.
Note that it will traverse up the layout item hierarchy instead of just calling QGraphicsItem::parentItem(). This is on purpose.
Definition at line 174 of file qgraphicslayoutitem.cpp.
References QGraphicsLayoutItem::graphicsItem(), QGraphicsLayoutItem::isLayout(), parent, and QGraphicsLayoutItem::parentLayoutItem().
Referenced by QGraphicsLayoutPrivate::addChildLayoutItem(), QGraphicsLayoutPrivate::getMargin(), QGraphicsLayoutStyleInfo::style(), QGraphicsAnchorLayoutPrivate::styleInfo(), and QGraphicsLayoutPrivate::visualDirection().
void QGraphicsLayoutItemPrivate::setSize | ( | Qt::SizeHint | which, |
const QSizeF & | size | ||
) |
Sets the user size hint which to size. Use an invalid size to unset the size hint.
Definition at line 202 of file qgraphicslayoutitem.cpp.
References ensureUserSizeHints(), and userSizeHints.
Referenced by QGraphicsLayoutItem::setMaximumSize(), QGraphicsLayoutItem::setMinimumSize(), and QGraphicsLayoutItem::setPreferredSize().
void QGraphicsLayoutItemPrivate::setSizeComponent | ( | Qt::SizeHint | which, |
SizeComponent | component, | ||
qreal | value | ||
) |
Sets the width of the user size hint which to width.
Definition at line 223 of file qgraphicslayoutitem.cpp.
References component(), ensureUserSizeHints(), QSizeF::rheight(), rwidth(), userSizeHints, and Width.
Referenced by QGraphicsLayoutItem::setMaximumHeight(), QGraphicsLayoutItem::setMaximumWidth(), QGraphicsLayoutItem::setMinimumHeight(), QGraphicsLayoutItem::setMinimumWidth(), QGraphicsLayoutItem::setPreferredHeight(), and QGraphicsLayoutItem::setPreferredWidth().
|
mutable |
Definition at line 52 of file qgraphicslayoutitem_p.h.
Referenced by effectiveSizeHints().
|
mutable |
Definition at line 51 of file qgraphicslayoutitem_p.h.
Referenced by effectiveSizeHints().
|
mutable |
Definition at line 53 of file qgraphicslayoutitem_p.h.
Referenced by effectiveSizeHints().
QRectF QGraphicsLayoutItemPrivate::geom |
Definition at line 61 of file qgraphicslayoutitem_p.h.
Referenced by QGraphicsAnchorLayoutPrivate::setItemsGeometries().
QGraphicsItem* QGraphicsLayoutItemPrivate::graphicsItem |
Definition at line 62 of file qgraphicslayoutitem_p.h.
quint32 QGraphicsLayoutItemPrivate::isLayout |
Definition at line 57 of file qgraphicslayoutitem_p.h.
Referenced by hasHeightForWidth(), and hasWidthForHeight().
quint32 QGraphicsLayoutItemPrivate::ownedByLayout |
Definition at line 58 of file qgraphicslayoutitem_p.h.
QGraphicsLayoutItem* QGraphicsLayoutItemPrivate::parent |
Definition at line 48 of file qgraphicslayoutitem_p.h.
Referenced by QGraphicsLayoutPrivate::getMargin(), parentItem(), and QGraphicsAnchorLayoutPrivate::styleInfo().
QGraphicsLayoutItem* QGraphicsLayoutItemPrivate::q_ptr |
Definition at line 60 of file qgraphicslayoutitem_p.h.
|
mutable |
Definition at line 55 of file qgraphicslayoutitem_p.h.
Referenced by effectiveSizeHints(), and init().
|
mutable |
Definition at line 56 of file qgraphicslayoutitem_p.h.
Referenced by effectiveSizeHints(), and init().
QSizePolicy QGraphicsLayoutItemPrivate::sizePolicy |
Definition at line 47 of file qgraphicslayoutitem_p.h.
QSizeF* QGraphicsLayoutItemPrivate::userSizeHints |
Definition at line 50 of file qgraphicslayoutitem_p.h.
Referenced by ~QGraphicsLayoutItemPrivate(), effectiveSizeHints(), ensureUserSizeHints(), setSize(), and setSizeComponent().