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
qgraphicslayoutitem_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QGRAPHICSLAYOUTITEM_P_H
5#define QGRAPHICSLAYOUTITEM_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtWidgets/private/qtwidgetsglobal_p.h>
19#include <QtCore/QSizeF>
20#include <QtWidgets/QSizePolicy>
21
22QT_REQUIRE_CONFIG(graphicsview);
23
25
28{
29 Q_DECLARE_PUBLIC(QGraphicsLayoutItem)
30public:
32 QGraphicsLayoutItemPrivate(QGraphicsLayoutItem *parent, bool isLayout);
33 static QGraphicsLayoutItemPrivate *get(QGraphicsLayoutItem *q) { return q->d_func();}
34 static const QGraphicsLayoutItemPrivate *get(const QGraphicsLayoutItem *q) { return q->d_func();}
35
36 void init();
37 QSizeF *effectiveSizeHints(const QSizeF &constraint) const;
38 QGraphicsItem *parentItem() const;
39 void ensureUserSizeHints();
40 void setSize(Qt::SizeHint which, const QSizeF &size);
41 enum SizeComponent { Width, Height };
42 void setSizeComponent(Qt::SizeHint which, SizeComponent component, qreal value);
43
44 bool hasHeightForWidth() const;
45 bool hasWidthForHeight() const;
46
49
51 mutable QSizeF cachedSizeHints[Qt::NSizeHints];
53 mutable QSizeF cachedSizeHintsWithConstraints[Qt::NSizeHints];
54
59
63};
64
66
67#endif //QGRAPHICSLAYOUTITEM_P_H
68
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
static const QGraphicsLayoutItemPrivate * get(const QGraphicsLayoutItem *q)
static QGraphicsLayoutItemPrivate * get(QGraphicsLayoutItem *q)
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore
Definition qsize.h:208
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
Definition qsizepolicy.h:18
Combined button and popup list for selecting options.
@ NSizeHints
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
static qreal component(const QPointF &point, unsigned int i)
#define Q_AUTOTEST_EXPORT
#define QT_REQUIRE_CONFIG(feature)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
unsigned int quint32
Definition qtypes.h:50
double qreal
Definition qtypes.h:187