![]() |
Qt 6.x
The Qt SDK
|
#include <qgridlayoutengine_p.h>
Protected Attributes | |
QList< QGridLayoutItem * > | q_items |
Friends | |
class | QGridLayoutItem |
Definition at line 306 of file qgridlayoutengine_p.h.
QGridLayoutEngine::QGridLayoutEngine | ( | Qt::Alignment | defaultAlignment = { } , |
bool | snapToPixelGrid = false |
||
) |
Definition at line 756 of file qgridlayoutengine.cpp.
References invalidate(), and Qt::LeftToRight.
|
inline |
Definition at line 310 of file qgridlayoutengine_p.h.
References qDeleteAll().
void QGridLayoutEngine::addItem | ( | QGridLayoutItem * | item | ) |
Definition at line 970 of file qgridlayoutengine.cpp.
References insertItem(), and item.
QRectF QGridLayoutEngine::cellRect | ( | const QRectF & | contentsGeometry, |
int | row, | ||
int | column, | ||
int | rowSpan, | ||
int | columnSpan, | ||
const QAbstractLayoutStyleInfo * | styleInfo | ||
) | const |
Definition at line 1057 of file qgridlayoutengine.cpp.
References columnCount(), qMax(), rowCount(), QRectF::size(), QRectF::x(), and QRectF::y().
|
inline |
Definition at line 315 of file qgridlayoutengine_p.h.
References Qt::Horizontal.
Referenced by cellRect(), controlTypes(), itemAt(), setGeometries(), and sizeHint().
int QGridLayoutEngine::columnCount | ( | Qt::Orientation | orientation | ) | const |
Definition at line 771 of file qgridlayoutengine.cpp.
References QHVContainer< T >::transposed().
Referenced by QGraphicsLinearLayoutPrivate::gridColumn().
Qt::Orientation QGridLayoutEngine::constraintOrientation | ( | ) | const |
Definition at line 1640 of file qgridlayoutengine.cpp.
References ensureDynamicConstraint(), and void.
Referenced by sizeHint().
QLayoutPolicy::ControlTypes QGridLayoutEngine::controlTypes | ( | LayoutSide | side | ) | const |
Definition at line 1136 of file qgridlayoutengine.cpp.
References Bottom, columnCount(), effectiveFirstRow(), effectiveLastRow(), Qt::Horizontal, item, itemAt(), Left, Top, and Qt::Vertical.
|
inline |
Definition at line 352 of file qgridlayoutengine_p.h.
References QList< T >::clear(), Qt::Horizontal, qDeleteAll(), and Qt::Vertical.
QSizeF QGridLayoutEngine::dynamicallyConstrainedSizeHint | ( | Qt::SizeHint | which, |
const QSizeF & | constraint | ||
) | const |
Qt::Alignment QGridLayoutEngine::effectiveAlignment | ( | const QGridLayoutItem * | layoutItem | ) | const |
Definition at line 927 of file qgridlayoutengine.cpp.
References Qt::AlignHorizontal_Mask, Qt::AlignVertical_Mask, Qt::Horizontal, layoutItem(), rowAlignment(), and Qt::Vertical.
Referenced by setGeometries().
int QGridLayoutEngine::effectiveFirstRow | ( | Qt::Orientation | orientation = Qt::Vertical | ) | const |
Definition at line 787 of file qgridlayoutengine.cpp.
Referenced by controlTypes().
int QGridLayoutEngine::effectiveLastRow | ( | Qt::Orientation | orientation = Qt::Vertical | ) | const |
Definition at line 793 of file qgridlayoutengine.cpp.
Referenced by controlTypes().
bool QGridLayoutEngine::ensureDynamicConstraint | ( | ) | const |
returns false if the layout has contradicting constraints (i.e. some items with a horizontal constraint and other items with a vertical constraint)
Definition at line 1607 of file qgridlayoutengine.cpp.
References QList< T >::at(), i, item, NoConstraint, q_items, qWarning, QList< T >::size(), UnfeasibleConstraint, and UnknownConstraint.
Referenced by constraintOrientation(), and hasDynamicConstraint().
bool QGridLayoutEngine::hasDynamicConstraint | ( | ) | const |
Definition at line 1630 of file qgridlayoutengine.cpp.
References ensureDynamicConstraint(), and NoConstraint.
Referenced by sizeHint().
void QGridLayoutEngine::insertItem | ( | QGridLayoutItem * | item, |
int | index | ||
) |
The index is only used by QGraphicsLinearLayout to ensure that itemAt() reflects the order of visual arrangement. Strictly speaking it does not have to, but most people expect it to. (And if it didn't we would have to add itemArrangedAt(int index) or something..)
Definition at line 952 of file qgridlayoutengine.cpp.
References QList< T >::append(), i, QList< T >::insert(), item, itemAt(), j, q_items, qWarning, and QList< T >::size().
Referenced by addItem().
|
inline |
Definition at line 365 of file qgridlayoutengine_p.h.
void QGridLayoutEngine::invalidate | ( | ) |
Definition at line 1001 of file qgridlayoutengine.cpp.
References UnknownConstraint.
Referenced by QGridLayoutEngine(), removeItem(), QGraphicsGridLayoutEngine::setAlignment(), QQuickGridLayoutEngine::setAlignment(), setRowSpacing(), setSpacing(), QQuickGridLayoutEngine::setStretchFactor(), setUniformCellHeights(), setUniformCellWidths(), and transpose().
QGridLayoutItem * QGridLayoutEngine::itemAt | ( | int | index | ) | const |
Definition at line 781 of file qgridlayoutengine.cpp.
References QList< T >::at(), itemCount(), Q_ASSERT, and q_items.
Referenced by controlTypes(), insertItem(), and removeItem().
QGridLayoutItem * QGridLayoutEngine::itemAt | ( | int | row, |
int | column, | ||
Qt::Orientation | orientation = Qt::Vertical |
||
) | const |
Definition at line 992 of file qgridlayoutengine.cpp.
References QList< T >::at(), columnCount(), Qt::Horizontal, qSwap(), and rowCount().
int QGridLayoutEngine::itemCount | ( | ) | const |
Definition at line 776 of file qgridlayoutengine.cpp.
References q_items, and QList< T >::size().
Referenced by itemAt().
void QGridLayoutEngine::removeItem | ( | QGridLayoutItem * | item | ) |
Definition at line 975 of file qgridlayoutengine.cpp.
References QListSpecialMethodsBase< T >::contains(), i, invalidate(), item, itemAt(), j, Q_ASSERT, q_items, and QList< T >::removeAll().
Referenced by QGraphicsLinearLayoutPrivate::removeGridItem().
|
inline |
Definition at line 367 of file qgridlayoutengine_p.h.
Referenced by QGraphicsLinearLayoutPrivate::removeGridItem().
Qt::Alignment QGridLayoutEngine::rowAlignment | ( | int | row, |
Qt::Orientation | orientation | ||
) | const |
Definition at line 921 of file qgridlayoutengine.cpp.
References Q_ASSERT.
Referenced by effectiveAlignment().
|
inline |
Definition at line 314 of file qgridlayoutengine_p.h.
References Qt::Vertical.
Referenced by cellRect(), itemAt(), setGeometries(), and sizeHint().
int QGridLayoutEngine::rowCount | ( | Qt::Orientation | orientation | ) | const |
Definition at line 766 of file qgridlayoutengine.cpp.
Referenced by QGraphicsLinearLayoutPrivate::fixIndex(), and QGraphicsLinearLayoutPrivate::gridRow().
qreal QGridLayoutEngine::rowSizeHint | ( | Qt::SizeHint | which, |
int | row, | ||
Qt::Orientation | orientation = Qt::Vertical |
||
) | const |
Definition at line 875 of file qgridlayoutengine.cpp.
qreal QGridLayoutEngine::rowSpacing | ( | int | row, |
Qt::Orientation | orientation = Qt::Vertical |
||
) | const |
Definition at line 832 of file qgridlayoutengine.cpp.
References spacing.
int QGridLayoutEngine::rowStretchFactor | ( | int | row, |
Qt::Orientation | orientation = Qt::Vertical |
||
) | const |
Definition at line 853 of file qgridlayoutengine.cpp.
References QLayoutParameter< T >::isDefault(), and QLayoutParameter< T >::value().
void QGridLayoutEngine::setGeometries | ( | const QRectF & | contentsGeometry, |
const QAbstractLayoutStyleInfo * | styleInfo | ||
) |
Definition at line 1018 of file qgridlayoutengine.cpp.
References Qt::AlignBaseline, QList< T >::at(), columnCount(), effectiveAlignment(), i, item, QRectF::moveLeft(), QRectF::moveTop(), q_items, rowCount(), QList< T >::size(), QRectF::size(), visualDirection(), visualRect(), QRectF::x(), and QRectF::y().
void QGridLayoutEngine::setRowAlignment | ( | int | row, |
Qt::Alignment | alignment, | ||
Qt::Orientation | orientation | ||
) |
Definition at line 908 of file qgridlayoutengine.cpp.
References alignment, QGridLayoutRowInfo::alignments, Q_ASSERT, QList< T >::resize(), and QList< T >::size().
void QGridLayoutEngine::setRowSizeHint | ( | Qt::SizeHint | which, |
int | row, | ||
qreal | size, | ||
Qt::Orientation | orientation = Qt::Vertical |
||
) |
Definition at line 861 of file qgridlayoutengine.cpp.
References QGridLayoutRowInfo::boxes, Q_ASSERT, QList< T >::resize(), and QList< T >::size().
void QGridLayoutEngine::setRowSpacing | ( | int | row, |
qreal | spacing, | ||
Qt::Orientation | orientation = Qt::Vertical |
||
) |
Definition at line 818 of file qgridlayoutengine.cpp.
References invalidate(), Q_ASSERT, QList< T >::resize(), QList< T >::size(), spacing, and QGridLayoutRowInfo::spacings.
void QGridLayoutEngine::setRowStretchFactor | ( | int | row, |
int | stretch, | ||
Qt::Orientation | orientation = Qt::Vertical |
||
) |
Definition at line 840 of file qgridlayoutengine.cpp.
References Q_ASSERT, QList< T >::resize(), QList< T >::size(), and QGridLayoutRowInfo::stretches.
Definition at line 799 of file qgridlayoutengine.cpp.
References Qt::Horizontal, invalidate(), spacing, and Qt::Vertical.
void QGridLayoutEngine::setUniformCellHeights | ( | bool | uniformCellHeights | ) |
Definition at line 899 of file qgridlayoutengine.cpp.
References invalidate(), and uniformCellHeights().
void QGridLayoutEngine::setUniformCellWidths | ( | bool | uniformCellWidths | ) |
Definition at line 885 of file qgridlayoutengine.cpp.
References invalidate(), and uniformCellWidths().
void QGridLayoutEngine::setVisualDirection | ( | Qt::LayoutDirection | direction | ) |
Definition at line 1163 of file qgridlayoutengine.cpp.
References direction.
QSizeF QGridLayoutEngine::sizeHint | ( | Qt::SizeHint | which, |
const QSizeF & | constraint, | ||
const QAbstractLayoutStyleInfo * | styleInfo | ||
) | const |
Definition at line 1082 of file qgridlayoutengine.cpp.
References QGridLayoutRowData::calculateGeometries(), columnCount(), constraintOrientation(), QList< T >::data(), hasDynamicConstraint(), QSizeF::height(), Qt::Horizontal, QList< T >::resize(), rowCount(), Qt::Vertical, and QSizeF::width().
qreal QGridLayoutEngine::spacing | ( | Qt::Orientation | orientation, |
const QAbstractLayoutStyleInfo * | styleInfo | ||
) | const |
Definition at line 809 of file qgridlayoutengine.cpp.
References QAbstractLayoutStyleInfo::spacing().
void QGridLayoutEngine::transpose | ( | ) |
Definition at line 1150 of file qgridlayoutengine.cpp.
References QList< T >::at(), i, invalidate(), q_items, QList< T >::size(), QGridLayoutItem::transpose(), and QHVContainer< T >::transpose().
bool QGridLayoutEngine::uniformCellHeights | ( | ) | const |
Definition at line 894 of file qgridlayoutengine.cpp.
Referenced by setUniformCellHeights().
bool QGridLayoutEngine::uniformCellWidths | ( | ) | const |
Definition at line 880 of file qgridlayoutengine.cpp.
Referenced by setUniformCellWidths().
Qt::LayoutDirection QGridLayoutEngine::visualDirection | ( | ) | const |
Definition at line 1168 of file qgridlayoutengine.cpp.
Referenced by setGeometries().
|
friend |
Definition at line 453 of file qgridlayoutengine_p.h.
|
protected |
Definition at line 413 of file qgridlayoutengine_p.h.
Referenced by ensureDynamicConstraint(), QGraphicsGridLayoutEngine::findLayoutItem(), QQuickGridLayoutEngine::findLayoutItem(), QGraphicsGridLayoutEngine::indexOf(), QQuickGridLayoutEngine::indexOf(), insertItem(), itemAt(), itemCount(), removeItem(), setGeometries(), and transpose().