1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef Q3DOBJECT_H
5#define Q3DOBJECT_H
6
7#include <QtDataVisualization/qdatavisualizationglobal.h>
8#include <QtCore/QObject>
9#include <QtGui/QVector3D>
10
11Q_MOC_INCLUDE(<QtDataVisualization/q3dscene.h>)
12
13QT_BEGIN_NAMESPACE
14
15class Q3DObjectPrivate;
16class Q3DScene;
17
18class Q_DATAVISUALIZATION_EXPORT Q3DObject : public QObject
19{
20 Q_OBJECT
21 Q_PROPERTY(Q3DScene* parentScene READ parentScene)
22 Q_PROPERTY(QVector3D position READ position WRITE setPosition NOTIFY positionChanged)
23
24public:
25 explicit Q3DObject(QObject *parent = nullptr);
26 virtual ~Q3DObject();
27
28 virtual void copyValuesFrom(const Q3DObject &source);
29
30 Q3DScene *parentScene();
31
32 QVector3D position() const;
33 void setPosition(const QVector3D &position);
34
35Q_SIGNALS:
36 void positionChanged(const QVector3D &position);
37
38protected:
39 void setDirty(bool dirty);
40 bool isDirty() const;
41
42private:
43 QScopedPointer<Q3DObjectPrivate> d_ptr;
44
45 Q_DISABLE_COPY(Q3DObject)
46
47 friend class Q3DScenePrivate;
48};
49
50QT_END_NAMESPACE
51
52#endif
53

source code of qtdatavis3d/src/datavisualization/engine/q3dobject.h