1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
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 QT3DCORE_COMPONENT_H
5#define QT3DCORE_COMPONENT_H
6
7#include <Qt3DCore/qnode.h>
8#include <Qt3DCore/qt3dcore_global.h>
9
10QT_BEGIN_NAMESPACE
11
12namespace Qt3DCore {
13
14class QEntity;
15class QComponentPrivate;
16
17class Q_3DCORESHARED_EXPORT QComponent : public QNode
18{
19 Q_OBJECT
20 Q_PROPERTY(bool isShareable READ isShareable WRITE setShareable NOTIFY shareableChanged)
21
22public:
23 explicit QComponent(QNode *parent = nullptr);
24 ~QComponent();
25
26 bool isShareable() const;
27
28 QList<QEntity *> entities() const;
29
30public Q_SLOTS:
31 void setShareable(bool isShareable);
32
33Q_SIGNALS:
34 void shareableChanged(bool isShareable);
35 void addedToEntity(QEntity *entity);
36 void removedFromEntity(QEntity *entity);
37
38protected:
39 explicit QComponent(QComponentPrivate &dd, QNode *parent = nullptr);
40
41private:
42 Q_DECLARE_PRIVATE(QComponent)
43};
44
45} // namespace Qt3DCore
46
47QT_END_NAMESPACE
48
49#endif // QT3DCORE_COMPONENT_H
50

source code of qt3d/src/core/nodes/qcomponent.h