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
QLayoutPrivate Class Reference

#include <qlayout_p.h>

+ Inheritance diagram for QLayoutPrivate:
+ Collaboration diagram for QLayoutPrivate:

Public Types

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

 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.
 
virtual QLayoutItemreplaceAt (int, QLayoutItem *)
 
- 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
 

Static Public Member Functions

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)
 

Public Attributes

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
 

Static Public Attributes

static QWidgetItemFactoryMethod widgetItemFactoryMethod = nullptr
 
static QSpacerItemFactoryMethod spacerItemFactoryMethod = nullptr
 

Detailed Description

Definition at line 29 of file qlayout_p.h.

Member Typedef Documentation

◆ QSpacerItemFactoryMethod

typedef QSpacerItem *(* QLayoutPrivate::QSpacerItemFactoryMethod) (const QLayout *layout, int w, int h, QSizePolicy::Policy hPolicy, QSizePolicy::Policy)

Definition at line 35 of file qlayout_p.h.

◆ QWidgetItemFactoryMethod

typedef QWidgetItem *(* QLayoutPrivate::QWidgetItemFactoryMethod) (const QLayout *layout, QWidget *widget)

Definition at line 34 of file qlayout_p.h.

Constructor & Destructor Documentation

◆ QLayoutPrivate()

QLayoutPrivate::QLayoutPrivate ( )

Definition at line 119 of file qlayout.cpp.

Member Function Documentation

◆ checkLayout()

bool QLayoutPrivate::checkLayout ( QLayout * otherLayout) const

Returns true if the otherLayout can be added to the layout; otherwise returns false.

Definition at line 812 of file qlayout.cpp.

References Q_UNLIKELY, qUtf16Printable, and qWarning.

◆ checkWidget()

bool QLayoutPrivate::checkWidget ( QWidget * widget) const

Returns true if the widget can be added to the layout; otherwise returns false.

Definition at line 791 of file qlayout.cpp.

References QObject::objectName, QWidget::parentWidget(), Q_UNLIKELY, qUtf16Printable, qWarning, and widget.

+ Here is the call graph for this function:

◆ createSpacerItem()

QSpacerItem * QLayoutPrivate::createSpacerItem ( const QLayout * layout,
int w,
int h,
QSizePolicy::Policy hPolicy = QSizePolicy::Minimum,
QSizePolicy::Policy vPolicy = QSizePolicy::Minimum )
static

Definition at line 156 of file qlayout.cpp.

References layout, and spacerItemFactoryMethod.

Referenced by QBoxLayout::addStrut(), QBoxLayout::insertSpacing(), and QBoxLayout::insertStretch().

+ Here is the caller graph for this function:

◆ createWidgetItem()

QWidgetItem * QLayoutPrivate::createWidgetItem ( const QLayout * layout,
QWidget * widget )
static

Definition at line 148 of file qlayout.cpp.

References layout, widget, and widgetItemFactoryMethod.

Referenced by QGridBox::QGridBox(), QGridLayout::addWidget(), QLayout::addWidget(), QStackedLayout::insertWidget(), QBoxLayout::insertWidget(), and QFormLayoutPrivate::setWidget().

+ Here is the caller graph for this function:

◆ doResize()

void QLayoutPrivate::doResize ( )

Definition at line 498 of file qlayout.cpp.

References QRect::left(), menubar, menuBarHeightForWidth(), QWidget::parentWidget(), rect, QWidget::setGeometry(), QRect::setTop(), QRect::top(), Qt::WA_LayoutOnEntireRect, and QRect::width().

+ Here is the call graph for this function:

◆ getMargin()

void QLayoutPrivate::getMargin ( int * result,
int userMargin,
QStyle::PixelMetric pm ) const

Definition at line 126 of file qlayout.cpp.

References QWidget::parentWidget(), and topLevel.

+ Here is the call graph for this function:

◆ reparentChildWidgets()

void QLayoutPrivate::reparentChildWidgets ( QWidget * mw)

Definition at line 755 of file qlayout.cpp.

References QWidgetPrivate::get(), i, QMetaObject::invokeMethod(), item, menubar, QWidget::parentWidget(), Q_UNLIKELY, Qt::QueuedConnection, qUtf16Printable, qWarning, and QWidget::setParent().

+ Here is the call graph for this function:

◆ replaceAt()

virtual QLayoutItem * QLayoutPrivate::replaceAt ( int ,
QLayoutItem *  )
inlinevirtual

Reimplemented in QBoxLayoutPrivate, QFormLayoutPrivate, QGridLayoutPrivate, and QStackedLayoutPrivate.

Definition at line 47 of file qlayout_p.h.

Member Data Documentation

◆ activated

uint QLayoutPrivate::activated

Definition at line 59 of file qlayout_p.h.

◆ autoNewChild

uint QLayoutPrivate::autoNewChild

Definition at line 60 of file qlayout_p.h.

◆ constraint

QLayout::SizeConstraint QLayoutPrivate::constraint

Definition at line 61 of file qlayout_p.h.

◆ enabled

uint QLayoutPrivate::enabled

Definition at line 58 of file qlayout_p.h.

◆ insideSpacing

int QLayoutPrivate::insideSpacing

Definition at line 52 of file qlayout_p.h.

◆ menubar

QWidget* QLayoutPrivate::menubar

Definition at line 63 of file qlayout_p.h.

Referenced by doResize(), and reparentChildWidgets().

◆ rect

QRect QLayoutPrivate::rect

◆ spacerItemFactoryMethod

QLayoutPrivate::QSpacerItemFactoryMethod QLayoutPrivate::spacerItemFactoryMethod = nullptr
static

Definition at line 50 of file qlayout_p.h.

Referenced by createSpacerItem().

◆ topLevel

uint QLayoutPrivate::topLevel

Definition at line 57 of file qlayout_p.h.

Referenced by getMargin().

◆ userBottomMargin

int QLayoutPrivate::userBottomMargin

Definition at line 56 of file qlayout_p.h.

◆ userLeftMargin

int QLayoutPrivate::userLeftMargin

Definition at line 53 of file qlayout_p.h.

◆ userRightMargin

int QLayoutPrivate::userRightMargin

Definition at line 55 of file qlayout_p.h.

◆ userTopMargin

int QLayoutPrivate::userTopMargin

Definition at line 54 of file qlayout_p.h.

◆ widgetItemFactoryMethod

QLayoutPrivate::QWidgetItemFactoryMethod QLayoutPrivate::widgetItemFactoryMethod = nullptr
static

Definition at line 49 of file qlayout_p.h.

Referenced by createWidgetItem().


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