1// Copyright (C) 2017 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 QQUICKITEMGROUP_P_H
5#define QQUICKITEMGROUP_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 purely as an
12// implementation detail. 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 <QtQuick/private/qquickimplicitsizeitem_p.h>
19#include <QtQuick/private/qquickitemchangelistener_p.h>
20#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class Q_QUICKCONTROLS2IMPL_PRIVATE_EXPORT QQuickItemGroup : public QQuickImplicitSizeItem, protected QQuickItemChangeListener
25{
26 Q_OBJECT
27 QML_NAMED_ELEMENT(ItemGroup)
28 QML_ADDED_IN_VERSION(2, 2)
29
30public:
31 explicit QQuickItemGroup(QQuickItem *parent = nullptr);
32 ~QQuickItemGroup();
33
34protected:
35 void watch(QQuickItem *item);
36 void unwatch(QQuickItem *item);
37
38 QSizeF calculateImplicitSize() const;
39 void updateImplicitSize();
40
41 void itemChange(ItemChange change, const ItemChangeData &data) override;
42 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
43
44 void itemImplicitWidthChanged(QQuickItem *item) override;
45 void itemImplicitHeightChanged(QQuickItem *item) override;
46};
47
48QT_END_NAMESPACE
49
50QML_DECLARE_TYPE(QQuickItemGroup)
51
52#endif // QQUICKITEMGROUP_P_H
53

source code of qtdeclarative/src/quickcontrolsimpl/qquickitemgroup_p.h