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>.
Loading...
Searching...
No Matches
qlayoutengine.cpp File Reference

(05fc3aef53348fb58be6308076e000825b704e58)

#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 Fixed64, fRound(), i, items, pos, qDebug, qMin(), 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, and QWIDGETSIZE_MAX.

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 QObject::isWidgetType(), layout, QObject::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().