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
QFormLayoutPrivate Class Reference
+ Inheritance diagram for QFormLayoutPrivate:
+ Collaboration diagram for QFormLayoutPrivate:

Public Types

using ItemMatrix = QtPrivate::FixedColumnMatrix<QFormLayoutItem *, 2>
 
- Public Types inherited from QLayoutPrivate
typedef QWidgetItem *(* QWidgetItemFactoryMethod) (const QLayout *layout, QWidget *widget)
 
typedef QSpacerItem *(* QSpacerItemFactoryMethod) (const QLayout *layout, int w, int h, QSizePolicy::Policy hPolicy, QSizePolicy::Policy)
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

 QFormLayoutPrivate ()
 
 ~QFormLayoutPrivate ()
 
int insertRow (int row)
 
void insertRows (int row, int count)
 
void removeRow (int row)
 
bool setItem (int row, QFormLayout::ItemRole role, QLayoutItem *item)
 
void setLayout (int row, QFormLayout::ItemRole role, QLayout *layout)
 
void setWidget (int row, QFormLayout::ItemRole role, QWidget *widget)
 
void arrangeWidgets (const QList< QLayoutStruct > &layouts, QRect &rect)
 
void updateSizes ()
 
void setupVerticalLayoutData (int width)
 
void setupHorizontalLayoutData (int width)
 
QStylegetStyle () const
 
bool haveHfwCached (int width) const
 
void recalcHFW (int w)
 
void setupHfwLayoutData ()
 
void calcSizeHints ()
 
QLayoutItemreplaceAt (int index, QLayoutItem *) override
 
- Public Member Functions inherited from QLayoutPrivate
 QLayoutPrivate ()
 
void getMargin (int *result, int userMargin, QStyle::PixelMetric pm) const
 
void doResize ()
 
void reparentChildWidgets (QWidget *mw)
 
bool checkWidget (QWidget *widget) const
 Returns true if the widget can be added to the layout; otherwise returns false.
 
bool checkLayout (QLayout *otherLayout) const
 Returns true if the otherLayout can be added to the layout; otherwise returns false.
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

uint fieldGrowthPolicy: 8
 
uint rowWrapPolicy: 8
 
uint has_hfw: 2
 
uint dirty: 2
 
uint sizesDirty: 2
 
uint expandVertical: 1
 
uint expandHorizontal: 1
 
Qt::Alignment labelAlignment
 
Qt::Alignment formAlignment
 
ItemMatrix m_matrix
 
QList< QFormLayoutItem * > m_things
 
int layoutWidth = -1
 
int hfw_width = -1
 
int hfw_height = -1
 
int hfw_sh_height = -1
 
int hfw_sh_minheight = -1
 
int min_width = -1
 
int sh_width = -1
 
int thresh_width = QLAYOUTSIZE_MAX
 
QSize minSize
 
QSize prefSize
 
int formMaxWidth
 
QList< QLayoutStructvLayouts
 
int vLayoutCount
 
int maxLabelWidth
 
QList< QLayoutStructhfwLayouts
 
int hSpacing = -1
 
int vSpacing = -1
 
- Public Attributes inherited from QLayoutPrivate
int insideSpacing
 
int userLeftMargin
 
int userTopMargin
 
int userRightMargin
 
int userBottomMargin
 
uint topLevel: 1
 
uint enabled: 1
 
uint activated: 1
 
uint autoNewChild: 1
 
QLayout::SizeConstraint constraint
 
QRect rect
 
QWidgetmenubar
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Static Public Member Functions inherited from QLayoutPrivate
static QWidgetItemcreateWidgetItem (const QLayout *layout, QWidget *widget)
 
static QSpacerItemcreateSpacerItem (const QLayout *layout, int w, int h, QSizePolicy::Policy hPolicy=QSizePolicy::Minimum, QSizePolicy::Policy vPolicy=QSizePolicy::Minimum)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 
- Static Public Attributes inherited from QLayoutPrivate
static QWidgetItemFactoryMethod widgetItemFactoryMethod = nullptr
 
static QSpacerItemFactoryMethod spacerItemFactoryMethod = nullptr
 

Detailed Description

Definition at line 148 of file qformlayout.cpp.

Member Typedef Documentation

◆ ItemMatrix

Constructor & Destructor Documentation

◆ QFormLayoutPrivate()

QFormLayoutPrivate::QFormLayoutPrivate ( )

Definition at line 222 of file qformlayout.cpp.

◆ ~QFormLayoutPrivate()

QFormLayoutPrivate::~QFormLayoutPrivate ( )
inline

Definition at line 156 of file qformlayout.cpp.

Member Function Documentation

◆ arrangeWidgets()

◆ calcSizeHints()

void QFormLayoutPrivate::calcSizeHints ( )

Definition at line 886 of file qformlayout.cpp.

References QList< T >::at(), i, min_width, QLayoutStruct::minimumSize, minSize, prefSize, QLAYOUTSIZE_MAX, qMin(), QSize::rheight(), QSize::rwidth(), setupVerticalLayoutData(), sh_width, QLayoutStruct::sizeHint, spacing, QLayoutStruct::spacing, updateSizes(), vLayoutCount, and vLayouts.

Referenced by QFormLayout::minimumSize(), and QFormLayout::sizeHint().

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

◆ getStyle()

QStyle * QFormLayoutPrivate::getStyle ( ) const

Definition at line 985 of file qformlayout.cpp.

References QWidget::parentWidget(), and QApplication::style().

+ Here is the call graph for this function:

◆ haveHfwCached()

bool QFormLayoutPrivate::haveHfwCached ( int width) const
inline

Definition at line 174 of file qformlayout.cpp.

References hfw_sh_height, hfw_width, and sh_width.

◆ insertRow()

int QFormLayoutPrivate::insertRow ( int row)

Definition at line 916 of file qformlayout.cpp.

References insertRows(), m_matrix, and QtPrivate::FixedColumnMatrix< T, NumColumns >::rowCount().

+ Here is the call graph for this function:

◆ insertRows()

void QFormLayoutPrivate::insertRows ( int row,
int count )

Definition at line 926 of file qformlayout.cpp.

References QtPrivate::FixedColumnMatrix< T, NumColumns >::insertRow(), and m_matrix.

Referenced by insertRow().

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

◆ recalcHFW()

void QFormLayoutPrivate::recalcHFW ( int w)

Definition at line 457 of file qformlayout.cpp.

References QList< T >::at(), hfw_height, hfw_sh_height, hfw_sh_minheight, hfw_width, hfwLayouts, QLayoutStruct::minimumSize, QLAYOUTSIZE_MAX, qMin(), setupHfwLayoutData(), sh_width, QLayoutStruct::sizeHint, spacing, QLayoutStruct::spacing, and vLayoutCount.

+ Here is the call graph for this function:

◆ removeRow()

void QFormLayoutPrivate::removeRow ( int row)

Definition at line 934 of file qformlayout.cpp.

References m_matrix, QtPrivate::FixedColumnMatrix< T, NumColumns >::removeRow(), and QtPrivate::FixedColumnMatrix< T, NumColumns >::rowCount().

+ Here is the call graph for this function:

◆ replaceAt()

QLayoutItem * QFormLayoutPrivate::replaceAt ( int index,
QLayoutItem * newitem )
overridevirtual

Reimplemented from QLayoutPrivate.

Definition at line 996 of file qformlayout.cpp.

References item, m_matrix, m_things, Q_ASSERT, Q_UNLIKELY, qWarning, storageIndexFromLayoutItem(), QtPrivate::FixedColumnMatrix< QFormLayoutItem *, 2 >::storageIndexToPosition(), and QList< T >::value().

+ Here is the call graph for this function:

◆ setItem()

bool QFormLayoutPrivate::setItem ( int row,
QFormLayout::ItemRole role,
QLayoutItem * item )

Definition at line 940 of file qformlayout.cpp.

References QList< T >::append(), i, item, m_matrix, m_things, Q_UNLIKELY, qWarning, QtPrivate::FixedColumnMatrix< T, NumColumns >::rowCount(), and QFormLayout::SpanningRole.

Referenced by setLayout(), and setWidget().

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

◆ setLayout()

void QFormLayoutPrivate::setLayout ( int row,
QFormLayout::ItemRole role,
QLayout * layout )

Definition at line 965 of file qformlayout.cpp.

References layout, and setItem().

+ Here is the call graph for this function:

◆ setupHfwLayoutData()

void QFormLayoutPrivate::setupHfwLayoutData ( )

Definition at line 479 of file qformlayout.cpp.

References QList< T >::at(), QList< T >::clear(), QSize::height(), QFormLayoutItem::heightForWidth(), hfwLayouts, i, QFormLayoutItem::isHfw, QFormLayoutItem::layoutWidth, m_matrix, QLayoutStruct::minimumSize, QFormLayoutItem::minSize, qMax(), QList< T >::resize(), QtPrivate::FixedColumnMatrix< T, NumColumns >::rowCount(), QFormLayoutItem::sideBySide, QFormLayoutItem::sizeHint, QLayoutStruct::sizeHint, vLayoutCount, QFormLayoutItem::vLayoutIndex, and vLayouts.

Referenced by recalcHFW().

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

◆ setupHorizontalLayoutData()

void QFormLayoutPrivate::setupHorizontalLayoutData ( int width)

◆ setupVerticalLayoutData()

void QFormLayoutPrivate::setupVerticalLayoutData ( int width)

◆ setWidget()

void QFormLayoutPrivate::setWidget ( int row,
QFormLayout::ItemRole role,
QWidget * widget )

Definition at line 974 of file qformlayout.cpp.

References QLayoutPrivate::createWidgetItem(), item, setItem(), and widget.

+ Here is the call graph for this function:

◆ updateSizes()

Member Data Documentation

◆ dirty

uint QFormLayoutPrivate::dirty

Definition at line 185 of file qformlayout.cpp.

Referenced by setupVerticalLayoutData().

◆ expandHorizontal

uint QFormLayoutPrivate::expandHorizontal

Definition at line 188 of file qformlayout.cpp.

Referenced by QFormLayout::expandingDirections(), and updateSizes().

◆ expandVertical

uint QFormLayoutPrivate::expandVertical

Definition at line 187 of file qformlayout.cpp.

Referenced by QFormLayout::expandingDirections(), and updateSizes().

◆ fieldGrowthPolicy

uint QFormLayoutPrivate::fieldGrowthPolicy

Definition at line 182 of file qformlayout.cpp.

◆ formAlignment

Qt::Alignment QFormLayoutPrivate::formAlignment

Definition at line 190 of file qformlayout.cpp.

Referenced by arrangeWidgets(), and setupVerticalLayoutData().

◆ formMaxWidth

int QFormLayoutPrivate::formMaxWidth

Definition at line 208 of file qformlayout.cpp.

Referenced by arrangeWidgets(), and setupHorizontalLayoutData().

◆ has_hfw

uint QFormLayoutPrivate::has_hfw

Definition at line 184 of file qformlayout.cpp.

Referenced by updateSizes().

◆ hfw_height

int QFormLayoutPrivate::hfw_height = -1

Definition at line 198 of file qformlayout.cpp.

Referenced by recalcHFW().

◆ hfw_sh_height

int QFormLayoutPrivate::hfw_sh_height = -1

Definition at line 200 of file qformlayout.cpp.

Referenced by haveHfwCached(), and recalcHFW().

◆ hfw_sh_minheight

int QFormLayoutPrivate::hfw_sh_minheight = -1

Definition at line 201 of file qformlayout.cpp.

Referenced by recalcHFW().

◆ hfw_width

int QFormLayoutPrivate::hfw_width = -1

Definition at line 197 of file qformlayout.cpp.

Referenced by haveHfwCached(), and recalcHFW().

◆ hfwLayouts

QList<QLayoutStruct> QFormLayoutPrivate::hfwLayouts

Definition at line 215 of file qformlayout.cpp.

Referenced by recalcHFW(), and setupHfwLayoutData().

◆ hSpacing

int QFormLayoutPrivate::hSpacing = -1

Definition at line 217 of file qformlayout.cpp.

◆ labelAlignment

Qt::Alignment QFormLayoutPrivate::labelAlignment

Definition at line 189 of file qformlayout.cpp.

◆ layoutWidth

int QFormLayoutPrivate::layoutWidth = -1

Definition at line 195 of file qformlayout.cpp.

Referenced by setupVerticalLayoutData().

◆ m_matrix

◆ m_things

QList<QFormLayoutItem *> QFormLayoutPrivate::m_things

Definition at line 193 of file qformlayout.cpp.

Referenced by replaceAt(), and setItem().

◆ maxLabelWidth

int QFormLayoutPrivate::maxLabelWidth

Definition at line 213 of file qformlayout.cpp.

Referenced by setupHorizontalLayoutData(), and setupVerticalLayoutData().

◆ min_width

int QFormLayoutPrivate::min_width = -1

Definition at line 203 of file qformlayout.cpp.

Referenced by calcSizeHints(), and updateSizes().

◆ minSize

QSize QFormLayoutPrivate::minSize

Definition at line 206 of file qformlayout.cpp.

Referenced by calcSizeHints().

◆ prefSize

QSize QFormLayoutPrivate::prefSize

Definition at line 207 of file qformlayout.cpp.

Referenced by calcSizeHints().

◆ rowWrapPolicy

uint QFormLayoutPrivate::rowWrapPolicy

Definition at line 183 of file qformlayout.cpp.

Referenced by setupVerticalLayoutData().

◆ sh_width

int QFormLayoutPrivate::sh_width = -1

Definition at line 204 of file qformlayout.cpp.

Referenced by calcSizeHints(), haveHfwCached(), recalcHFW(), and updateSizes().

◆ sizesDirty

uint QFormLayoutPrivate::sizesDirty

Definition at line 186 of file qformlayout.cpp.

Referenced by setupVerticalLayoutData(), and updateSizes().

◆ thresh_width

int QFormLayoutPrivate::thresh_width = QLAYOUTSIZE_MAX

Definition at line 205 of file qformlayout.cpp.

Referenced by setupVerticalLayoutData(), and updateSizes().

◆ vLayoutCount

int QFormLayoutPrivate::vLayoutCount

◆ vLayouts

QList<QLayoutStruct> QFormLayoutPrivate::vLayouts

Definition at line 211 of file qformlayout.cpp.

Referenced by calcSizeHints(), setupHfwLayoutData(), and setupVerticalLayoutData().

◆ vSpacing

int QFormLayoutPrivate::vSpacing = -1

Definition at line 218 of file qformlayout.cpp.


The documentation for this class was generated from the following file: