58 #define COMBINE_SIZE(result, size) \
60 if ((result).width() < 0 || (result).height() < 0) \
61 combineSize((result), (size)); \
90 if (minimum >= 0 && maximum >= 0 && minimum > maximum)
94 if (minimum >= 0 && preferred < minimum) {
96 }
else if (maximum >= 0 && preferred > maximum) {
101 if (minimum >= 0 && descent > minimum)
138 const bool hasConstraint = constraint.
width() >= 0 || constraint.
height() >= 0;
150 sizeHintCache[
i] = constraint;
168 expandSize(maxS, prefS);
169 expandSize(maxS, minS);
173 expandSize(minS,
QSizeF(0, 0));
174 boundSize(minS, prefS);
175 boundSize(minS, maxS);
178 expandSize(prefS, minS);
179 boundSize(prefS, maxS);
190 return sizeHintCache;
245 }
else if (
size.width() < 0 &&
size.height() < 0) {
267 if (
value == userValue)
279 for (
int i =
l->count() - 1;
i >= 0; --
i) {
291 return q->sizePolicy().hasHeightForWidth();
299 for (
int i =
l->count() - 1;
i >= 0; --
i) {
311 return q->sizePolicy().hasWidthForHeight();
416 if (parentLI && parentLI->
isLayout()) {
419 for (
int i = lay->
count() - 1;
i >= 0; --
i) {
485 return d->sizePolicy;
807 if (!
d->userSizeHints && constraint.
isValid())
825 d->sizeHintCacheDirty =
true;
826 d->sizeHintWithConstraintCacheDirty =
true;
842 bool isHidden =
false;
859 return d_func()->parent;
869 d_func()->parent =
parent;
881 return d_func()->isLayout;
910 return d_func()->ownedByLayout;
921 d_func()->ownedByLayout = ownership;
933 return d_func()->graphicsItem;
948 d_func()->graphicsItem =
item;
small capitals from c petite p scientific i
[1]
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
virtual int count() const =0
virtual QGraphicsLayoutItem * itemAt(int i) const =0
virtual void removeAt(int index)=0
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.
void setPreferredWidth(qreal width)
void setMaximumWidth(qreal width)
void setGraphicsItem(QGraphicsItem *item)
QGraphicsItem * graphicsItem() const
QSizeF effectiveSizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
QScopedPointer< QGraphicsLayoutItemPrivate > d_ptr
void setMaximumSize(const QSizeF &size)
void setSizePolicy(const QSizePolicy &policy)
void setOwnedByLayout(bool ownedByLayout)
virtual void updateGeometry()
virtual bool isEmpty() const
bool ownedByLayout() const
void setPreferredHeight(qreal height)
void setPreferredSize(const QSizeF &size)
QGraphicsLayoutItem * parentLayoutItem() const
void setMinimumSize(const QSizeF &size)
void setMaximumHeight(qreal height)
void setParentLayoutItem(QGraphicsLayoutItem *parent)
virtual void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const
QRectF contentsRect() const
QSizeF minimumSize() const
virtual void setGeometry(const QRectF &rect)
virtual ~QGraphicsLayoutItem()
QSizePolicy sizePolicy() const
QSizeF preferredSize() const
QSizeF maximumSize() const
void setMinimumWidth(qreal width)
void setMinimumHeight(qreal height)
QGraphicsLayoutItem(QGraphicsLayoutItem *parent=nullptr, bool isLayout=false)
QSizeF * effectiveSizeHints(const QSizeF &constraint) const
void ensureUserSizeHints()
bool hasWidthForHeight() const
void setSizeComponent(Qt::SizeHint which, SizeComponent component, qreal value)
void setSize(Qt::SizeHint which, const QSizeF &size)
QGraphicsLayoutItem * parent
static QGraphicsLayoutItemPrivate * get(QGraphicsLayoutItem *q)
virtual ~QGraphicsLayoutItemPrivate()
QGraphicsLayoutItemPrivate(QGraphicsLayoutItem *parent, bool isLayout)
quint32 sizeHintCacheDirty
quint32 sizeHintWithConstraintCacheDirty
QGraphicsItem * parentItem() const
QSizeF cachedSizeHints[Qt::NSizeHints]
QSizeF cachedSizeHintsWithConstraints[Qt::NSizeHints]
bool hasHeightForWidth() const
The QPointF class defines a point in the plane using floating point precision.
The QRectF class defines a finite rectangle in the plane using floating point precision.
constexpr QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const noexcept
The QSizeF class defines the size of a two-dimensional object using floating point precision.
constexpr qreal & rwidth() noexcept
constexpr bool isValid() const noexcept
constexpr qreal & rheight() noexcept
constexpr qreal width() const noexcept
constexpr qreal height() const noexcept
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
constexpr bool retainSizeWhenHidden() const noexcept
EGLOutputLayerEXT EGLint EGLAttrib value
QT_END_INCLUDE_NAMESPACE typedef double qreal
#define COMBINE_SIZE(result, size)
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble GLdouble GLdouble q
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent