43 #include <QtWidgets/qtwidgetsglobal.h>
44 #include <QtWidgets/qsizepolicy.h>
45 #include <QtCore/qrect.h>
72 virtual bool hasHeightForWidth()
const;
73 virtual int heightForWidth(
int)
const;
74 virtual int minimumHeightForWidth(
int)
const;
75 virtual void invalidate();
83 virtual QSizePolicy::ControlTypes controlTypes()
const;
90 : align(aalignment) { }
101 void changeSize(
int w,
int h,
104 QSize sizeHint()
const override;
105 QSize minimumSize()
const override;
106 QSize maximumSize()
const override;
107 Qt::Orientations expandingDirections()
const override;
108 bool isEmpty()
const override;
109 void setGeometry(
const QRect&)
override;
110 QRect geometry()
const override;
129 QSize sizeHint()
const override;
130 QSize minimumSize()
const override;
131 QSize maximumSize()
const override;
132 Qt::Orientations expandingDirections()
const override;
133 bool isEmpty()
const override;
134 void setGeometry(
const QRect&)
override;
135 QRect geometry()
const override;
138 bool hasHeightForWidth()
const override;
139 int heightForWidth(
int)
const override;
140 int minimumHeightForWidth(
int)
const override;
141 QSizePolicy::ControlTypes controlTypes()
const override;
152 QSize sizeHint()
const override;
153 QSize minimumSize()
const override;
154 QSize maximumSize()
const override;
155 int heightForWidth(
int width)
const override;
158 enum { Dirty = -123, HfwCacheMaxSize = 3 };
160 inline bool useSizeCache()
const;
161 void updateCacheIfNecessary()
const;
162 inline void invalidateSizeCache() {
163 q_cachedMinimumSize.setWidth(Dirty);
167 mutable QSize q_cachedMinimumSize;
168 mutable QSize q_cachedSizeHint;
169 mutable QSize q_cachedMaximumSize;
170 mutable QSize q_cachedHfws[HfwCacheMaxSize];
171 mutable short q_firstCachedHfw;
172 mutable short q_hfwCacheSize;
The QLayout class is the base class of geometry managers.
The QLayoutItem class provides an abstract item that a QLayout manipulates.
QLayoutItem(Qt::Alignment alignment=Qt::Alignment())
virtual Qt::Orientations expandingDirections() const =0
virtual QSize minimumSize() const =0
virtual bool isEmpty() const =0
virtual QRect geometry() const =0
Qt::Alignment alignment() const
virtual void setGeometry(const QRect &)=0
virtual QSize maximumSize() const =0
virtual QSize sizeHint() const =0
The QRect class defines a rectangle in the plane using integer precision.
The QSize class defines the size of a two-dimensional object using integer point precision.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
The QSpacerItem class provides blank space in a layout.
QSpacerItem(int w, int h, QSizePolicy::Policy hData=QSizePolicy::Minimum, QSizePolicy::Policy vData=QSizePolicy::Minimum)
QSizePolicy sizePolicy() const
union Alignment_ Alignment
#define Q_DISABLE_COPY(Class)
constexpr QT_BEGIN_NAMESPACE int QLAYOUTSIZE_MAX
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLfloat GLfloat GLfloat GLfloat h
label setAlignment(Qt::AlignLeft|Qt::AlignTop)
[0]