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>.
|
#include <qgridlayoutengine_p.h>
Protected Attributes | |
QList< QGridLayoutItem * > | q_items |
Friends | |
class | QGridLayoutItem |
Definition at line 309 of file qgridlayoutengine_p.h.
QGridLayoutEngine::QGridLayoutEngine | ( | Qt::Alignment | defaultAlignment = { }, |
bool | snapToPixelGrid = false ) |
Definition at line 760 of file qgridlayoutengine.cpp.
References invalidate(), and Qt::LeftToRight.
|
inline |
Definition at line 313 of file qgridlayoutengine_p.h.
References qDeleteAll().
void QGridLayoutEngine::addItem | ( | QGridLayoutItem * | item | ) |
Definition at line 977 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 1064 of file qgridlayoutengine.cpp.
References columnCount(), qMax(), and rowCount().
|
inline |
Definition at line 318 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 775 of file qgridlayoutengine.cpp.
References QHVContainer< T >::transposed().
Referenced by QGraphicsLinearLayoutPrivate::gridColumn().
Qt::Orientation QGridLayoutEngine::constraintOrientation | ( | ) | const |
Definition at line 1647 of file qgridlayoutengine.cpp.
References ensureDynamicConstraint(), and void.
Referenced by sizeHint().
QLayoutPolicy::ControlTypes QGridLayoutEngine::controlTypes | ( | LayoutSide | side | ) | const |
Definition at line 1143 of file qgridlayoutengine.cpp.
References Bottom, columnCount(), effectiveFirstRow(), effectiveLastRow(), Qt::Horizontal, item, itemAt(), Left, Top, and Qt::Vertical.
|
inline |
Definition at line 355 of file qgridlayoutengine_p.h.
References 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 931 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 791 of file qgridlayoutengine.cpp.
Referenced by controlTypes().
int QGridLayoutEngine::effectiveLastRow | ( | Qt::Orientation | orientation = Qt::Vertical | ) | const |
Definition at line 797 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 1614 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 1637 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 956 of file qgridlayoutengine.cpp.
References QList< T >::append(), i, QList< T >::insert(), item, itemAt(), j, q_items, qPrintable, qWarning, and QList< T >::size().
Referenced by addItem().
|
inline |
Definition at line 368 of file qgridlayoutengine_p.h.
void QGridLayoutEngine::invalidate | ( | ) |
Definition at line 1008 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 785 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 999 of file qgridlayoutengine.cpp.
References QList< T >::at(), columnCount(), Qt::Horizontal, qSwap(), and rowCount().
int QGridLayoutEngine::itemCount | ( | ) | const |
Definition at line 780 of file qgridlayoutengine.cpp.
References q_items, and QList< T >::size().
Referenced by itemAt().
void QGridLayoutEngine::removeItem | ( | QGridLayoutItem * | item | ) |
Definition at line 982 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 370 of file qgridlayoutengine_p.h.
Referenced by QGraphicsLinearLayoutPrivate::removeGridItem().
Qt::Alignment QGridLayoutEngine::rowAlignment | ( | int | row, |
Qt::Orientation | orientation ) const |
Definition at line 925 of file qgridlayoutengine.cpp.
References Q_ASSERT.
Referenced by effectiveAlignment().
|
inline |
Definition at line 317 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 770 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 879 of file qgridlayoutengine.cpp.
qreal QGridLayoutEngine::rowSpacing | ( | int | row, |
Qt::Orientation | orientation = Qt::Vertical ) const |
Definition at line 836 of file qgridlayoutengine.cpp.
References spacing.
int QGridLayoutEngine::rowStretchFactor | ( | int | row, |
Qt::Orientation | orientation = Qt::Vertical ) const |
Definition at line 857 of file qgridlayoutengine.cpp.
References QLayoutParameter< T >::isDefault(), and QLayoutParameter< T >::value().
void QGridLayoutEngine::setGeometries | ( | const QRectF & | contentsGeometry, |
const QAbstractLayoutStyleInfo * | styleInfo ) |
Definition at line 1025 of file qgridlayoutengine.cpp.
References Qt::AlignBaseline, QList< T >::at(), columnCount(), effectiveAlignment(), i, item, QRectF::moveLeft(), QRectF::moveTop(), q_items, rowCount(), QList< T >::size(), visualDirection(), visualRect(), QRectF::x(), and QRectF::y().
void QGridLayoutEngine::setRowAlignment | ( | int | row, |
Qt::Alignment | alignment, | ||
Qt::Orientation | orientation ) |
Definition at line 912 of file qgridlayoutengine.cpp.
void QGridLayoutEngine::setRowSizeHint | ( | Qt::SizeHint | which, |
int | row, | ||
qreal | size, | ||
Qt::Orientation | orientation = Qt::Vertical ) |
Definition at line 865 of file qgridlayoutengine.cpp.
References Q_ASSERT.
void QGridLayoutEngine::setRowSpacing | ( | int | row, |
qreal | spacing, | ||
Qt::Orientation | orientation = Qt::Vertical ) |
Definition at line 822 of file qgridlayoutengine.cpp.
References invalidate(), Q_ASSERT, and spacing.
void QGridLayoutEngine::setRowStretchFactor | ( | int | row, |
int | stretch, | ||
Qt::Orientation | orientation = Qt::Vertical ) |
Definition at line 844 of file qgridlayoutengine.cpp.
References Q_ASSERT.
Definition at line 803 of file qgridlayoutengine.cpp.
References Qt::Horizontal, invalidate(), spacing, and Qt::Vertical.
void QGridLayoutEngine::setUniformCellHeights | ( | bool | uniformCellHeights | ) |
Definition at line 903 of file qgridlayoutengine.cpp.
References invalidate(), and uniformCellHeights().
void QGridLayoutEngine::setUniformCellWidths | ( | bool | uniformCellWidths | ) |
Definition at line 889 of file qgridlayoutengine.cpp.
References invalidate(), and uniformCellWidths().
void QGridLayoutEngine::setVisualDirection | ( | Qt::LayoutDirection | direction | ) |
Definition at line 1170 of file qgridlayoutengine.cpp.
References direction.
QSizeF QGridLayoutEngine::sizeHint | ( | Qt::SizeHint | which, |
const QSizeF & | constraint, | ||
const QAbstractLayoutStyleInfo * | styleInfo ) const |
Definition at line 1089 of file qgridlayoutengine.cpp.
References QGridLayoutRowData::calculateGeometries(), columnCount(), constraintOrientation(), hasDynamicConstraint(), QSizeF::height(), Qt::Horizontal, rowCount(), Qt::Vertical, and QSizeF::width().
qreal QGridLayoutEngine::spacing | ( | Qt::Orientation | orientation, |
const QAbstractLayoutStyleInfo * | styleInfo ) const |
Definition at line 813 of file qgridlayoutengine.cpp.
References QAbstractLayoutStyleInfo::spacing().
void QGridLayoutEngine::transpose | ( | ) |
Definition at line 1157 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 898 of file qgridlayoutengine.cpp.
Referenced by setUniformCellHeights().
bool QGridLayoutEngine::uniformCellWidths | ( | ) | const |
Definition at line 884 of file qgridlayoutengine.cpp.
Referenced by setUniformCellWidths().
Qt::LayoutDirection QGridLayoutEngine::visualDirection | ( | ) | const |
Definition at line 1175 of file qgridlayoutengine.cpp.
Referenced by setGeometries().
|
friend |
Definition at line 456 of file qgridlayoutengine_p.h.
|
protected |
Definition at line 416 of file qgridlayoutengine_p.h.
Referenced by ensureDynamicConstraint(), QGraphicsGridLayoutEngine::findLayoutItem(), QQuickGridLayoutEngine::findLayoutItem(), QGraphicsGridLayoutEngine::indexOf(), QQuickGridLayoutEngine::indexOf(), insertItem(), itemAt(), itemCount(), removeItem(), setGeometries(), and transpose().