1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the QtDataVisualization API. It exists purely as an
9// implementation detail. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13
14#ifndef DECLARATIVESCENE_P_H
15#define DECLARATIVESCENE_P_H
16
17#include <QtQml/qqml.h>
18#include <private/datavisualizationglobal_p.h>
19#include <QtDataVisualization/q3dscene.h>
20
21QT_BEGIN_NAMESPACE
22
23class Declarative3DScene : public Q3DScene
24{
25 Q_OBJECT
26 // This property is overloaded to use QPointF instead of QPoint to work around qml bug
27 // where Qt.point(0, 0) can't be assigned due to error "Cannot assign QPointF to QPoint".
28 Q_PROPERTY(QPointF selectionQueryPosition READ selectionQueryPosition WRITE setSelectionQueryPosition NOTIFY selectionQueryPositionChanged)
29 // This is static method in parent class, overload as constant property for qml.
30 Q_PROPERTY(QPoint invalidSelectionPoint READ invalidSelectionPoint CONSTANT)
31
32 QML_NAMED_ELEMENT(Scene3D)
33 QML_ADDED_IN_VERSION(1, 0)
34 QML_UNCREATABLE("Trying to create uncreatable: Scene3D.")
35
36public:
37 Declarative3DScene(QObject *parent = 0);
38 virtual ~Declarative3DScene();
39
40 void setSelectionQueryPosition(const QPointF &point);
41 QPointF selectionQueryPosition() const;
42 QPoint invalidSelectionPoint() const;
43
44Q_SIGNALS:
45 void selectionQueryPositionChanged(const QPointF &position);
46};
47
48QT_END_NAMESPACE
49
50#endif
51

source code of qtdatavis3d/src/datavisualizationqml/declarativescene_p.h