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
qgraphicslayout.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 QGRAPHICSLAYOUT_H
5#define QGRAPHICSLAYOUT_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qgraphicslayoutitem.h>
9
10QT_REQUIRE_CONFIG(graphicsview);
11
13
16class QGraphicsWidget;
17
18class Q_WIDGETS_EXPORT QGraphicsLayout : public QGraphicsLayoutItem
19{
20public:
21 QGraphicsLayout(QGraphicsLayoutItem *parent = nullptr);
23
24 void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom);
25 void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const override;
26
27 void activate();
28 bool isActivated() const;
29 virtual void invalidate();
30 virtual void updateGeometry() override;
31
32 virtual void widgetEvent(QEvent *e);
33
34 virtual int count() const = 0;
35 virtual QGraphicsLayoutItem *itemAt(int i) const = 0;
36 virtual void removeAt(int index) = 0;
37
38 static void setInstantInvalidatePropagation(bool enable);
39 static bool instantInvalidatePropagation();
40protected:
42 void addChildLayoutItem(QGraphicsLayoutItem *layoutItem);
43
44private:
45 Q_DISABLE_COPY(QGraphicsLayout)
46 Q_DECLARE_PRIVATE(QGraphicsLayout)
47 friend class QGraphicsWidget;
48};
49
50#ifndef Q_QDOC
51Q_DECLARE_INTERFACE(QGraphicsLayout, "org.qt-project.Qt.QGraphicsLayout")
52#endif
53
55
56#endif
\inmodule QtCore
Definition qcoreevent.h:45
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
virtual int count() const =0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to return the numbe...
virtual QGraphicsLayoutItem * itemAt(int i) const =0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to return a pointer...
virtual void removeAt(int index)=0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to remove the item ...
The QGraphicsWidget class is the base class for all widget items in a QGraphicsScene.
Combined button and popup list for selecting options.
#define Q_DECLARE_INTERFACE(IFace, IId)
Definition qobject.h:460
GLuint index
[2]
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLint left
GLint GLint bottom
GLboolean enable
static void layoutItem(QQuickItem *item, qreal y, qreal width)
#define QT_REQUIRE_CONFIG(feature)
double qreal
Definition qtypes.h:187