Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-05 08:38:51

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 // Qt-Security score:significant reason:default
0004 
0005 #ifndef QGRAPHICSLAYOUT_H
0006 #define QGRAPHICSLAYOUT_H
0007 
0008 #include <QtWidgets/qtwidgetsglobal.h>
0009 #include <QtWidgets/qgraphicslayoutitem.h>
0010 
0011 QT_REQUIRE_CONFIG(graphicsview);
0012 
0013 QT_BEGIN_NAMESPACE
0014 
0015 class QGraphicsLayoutPrivate;
0016 class QGraphicsLayoutItem;
0017 class QGraphicsWidget;
0018 
0019 class Q_WIDGETS_EXPORT QGraphicsLayout : public QGraphicsLayoutItem
0020 {
0021 public:
0022     QGraphicsLayout(QGraphicsLayoutItem *parent = nullptr);
0023     ~QGraphicsLayout();
0024 
0025     void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom);
0026     void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const override;
0027 
0028     void activate();
0029     bool isActivated() const;
0030     virtual void invalidate();
0031     virtual void updateGeometry() override;
0032 
0033     virtual void widgetEvent(QEvent *e);
0034 
0035     virtual int count() const = 0;
0036     virtual QGraphicsLayoutItem *itemAt(int i) const = 0;
0037     virtual void removeAt(int index) = 0;
0038 
0039     static void setInstantInvalidatePropagation(bool enable);
0040     static bool instantInvalidatePropagation();
0041 protected:
0042     QGraphicsLayout(QGraphicsLayoutPrivate &, QGraphicsLayoutItem *);
0043     void addChildLayoutItem(QGraphicsLayoutItem *layoutItem);
0044 
0045 private:
0046     Q_DISABLE_COPY(QGraphicsLayout)
0047     Q_DECLARE_PRIVATE(QGraphicsLayout)
0048     friend class QGraphicsWidget;
0049 };
0050 
0051 #ifndef Q_QDOC
0052 Q_DECLARE_INTERFACE(QGraphicsLayout, "org.qt-project.Qt.QGraphicsLayout")
0053 #endif
0054 
0055 QT_END_NAMESPACE
0056 
0057 #endif