Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qlayoutengine.cpp File Reference
#include "qlayout.h"
#include "private/qlayoutengine_p.h"
#include "qlist.h"
#include "qwidget.h"
#include <qvarlengtharray.h>
#include <qdebug.h>
#include <algorithm>
+ Include dependency graph for qlayoutengine.cpp:

Go to the source code of this file.

Functions

static Fixed64 toFixed (int i)
 
static int fRound (Fixed64 i)
 
void qGeomCalc (QList< QLayoutStruct > &chain, int start, int count, int pos, int space, int spacer)
 
Q_WIDGETS_EXPORT QSize qSmartMinSize (const QSize &sizeHint, const QSize &minSizeHint, const QSize &minSize, const QSize &maxSize, const QSizePolicy &sizePolicy)
 
Q_WIDGETS_EXPORT QSize qSmartMinSize (const QWidgetItem *i)
 
Q_WIDGETS_EXPORT QSize qSmartMinSize (const QWidget *w)
 
Q_WIDGETS_EXPORT QSize qSmartMaxSize (const QSize &sizeHint, const QSize &minSize, const QSize &maxSize, const QSizePolicy &sizePolicy, Qt::Alignment align)
 
Q_WIDGETS_EXPORT QSize qSmartMaxSize (const QWidgetItem *i, Qt::Alignment align)
 
Q_WIDGETS_EXPORT QSize qSmartMaxSize (const QWidget *w, Qt::Alignment align)
 
Q_WIDGETS_EXPORT int qSmartSpacing (const QLayout *layout, QStyle::PixelMetric pm)
 

Variables

QT_BEGIN_NAMESPACE typedef qint64 Fixed64
 

Function Documentation

◆ fRound()

static int fRound ( Fixed64  i)
inlinestatic

Definition at line 21 of file qlayoutengine.cpp.

References i.

Referenced by qGeomCalc().

+ Here is the caller graph for this function:

◆ qGeomCalc()

void qGeomCalc ( QList< QLayoutStruct > &  chain,
int  start,
int  count,
int  pos,
int  space,
int  spacer 
)

Definition at line 40 of file qlayoutengine.cpp.

References QList< T >::at(), QVarLengthArray< T, Prealloc >::at(), QVarLengthArray< T, Prealloc >::begin(), QList< T >::empty(), QVarLengthArray< T, Prealloc >::end(), Fixed64, fRound(), i, items, pos, qDebug, qMin(), QVarLengthArray< T, Prealloc >::reserve(), QList< T >::size(), sum, and toFixed().

Referenced by QBoxLayoutPrivate::calcHfw(), QGridLayoutPrivate::distribute(), distributeMultiBox(), QSplitterPrivate::doResize(), QDockAreaLayoutInfo::fitItems(), QDockAreaLayout::fitLayout(), QGridLayoutPrivate::heightForWidth(), QToolBarLayout::layoutActions(), QTabBarPrivate::layoutTabs(), QBoxLayout::setGeometry(), and QFormLayout::setGeometry().

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

◆ qSmartMaxSize() [1/3]

Q_WIDGETS_EXPORT QSize qSmartMaxSize ( const QSize sizeHint,
const QSize minSize,
const QSize maxSize,
const QSizePolicy sizePolicy,
Qt::Alignment  align 
)

Definition at line 353 of file qlayoutengine.cpp.

References Qt::AlignHorizontal_Mask, Qt::AlignVertical_Mask, QSize::expandedTo(), QSizePolicy::GrowFlag, hint(), QLAYOUTSIZE_MAX, QWIDGETSIZE_MAX, and QSize::setWidth().

Referenced by QSplitterPrivate::addContribution(), QLayout::closestAcceptableSize(), QSplitterPrivate::doMove(), QSplitterPrivate::doResize(), QWidgetItem::maximumSize(), qSmartMaxSize(), qSmartMaxSize(), QSplitterPrivate::recalc(), and QScrollAreaPrivate::updateScrollBars().

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

◆ qSmartMaxSize() [2/3]

Q_WIDGETS_EXPORT QSize qSmartMaxSize ( const QWidget w,
Qt::Alignment  align 
)

Definition at line 383 of file qlayoutengine.cpp.

References qSmartMaxSize().

+ Here is the call graph for this function:

◆ qSmartMaxSize() [3/3]

Q_WIDGETS_EXPORT QSize qSmartMaxSize ( const QWidgetItem i,
Qt::Alignment  align 
)

Definition at line 376 of file qlayoutengine.cpp.

References i, and qSmartMaxSize().

+ Here is the call graph for this function:

◆ qSmartMinSize() [1/3]

Q_WIDGETS_EXPORT QSize qSmartMinSize ( const QSize sizeHint,
const QSize minSizeHint,
const QSize minSize,
const QSize maxSize,
const QSizePolicy sizePolicy 
)

◆ qSmartMinSize() [2/3]

Q_WIDGETS_EXPORT QSize qSmartMinSize ( const QWidget w)

Definition at line 346 of file qlayoutengine.cpp.

References qSmartMinSize().

+ Here is the call graph for this function:

◆ qSmartMinSize() [3/3]

Q_WIDGETS_EXPORT QSize qSmartMinSize ( const QWidgetItem i)

Definition at line 338 of file qlayoutengine.cpp.

References i, and qSmartMinSize().

+ Here is the call graph for this function:

◆ qSmartSpacing()

Q_WIDGETS_EXPORT int qSmartSpacing ( const QLayout layout,
QStyle::PixelMetric  pm 
)

Definition at line 389 of file qlayoutengine.cpp.

References layout, QObject::parent(), parent, QStyle::pixelMetric(), spacing, and QWidget::style().

Referenced by QFormLayout::horizontalSpacing(), QGridLayout::horizontalSpacing(), QLayout::spacing(), QBoxLayout::spacing(), QFormLayout::verticalSpacing(), and QGridLayout::verticalSpacing().

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

◆ toFixed()

static Fixed64 toFixed ( int  i)
inlinestatic

Definition at line 20 of file qlayoutengine.cpp.

References Fixed64, and i.

Referenced by qGeomCalc().

+ Here is the caller graph for this function:

Variable Documentation

◆ Fixed64

QT_BEGIN_NAMESPACE typedef qint64 Fixed64

Definition at line 19 of file qlayoutengine.cpp.

Referenced by qGeomCalc(), and toFixed().