1 | // Copyright (C) 2017 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #include "qabstractdataproxy_p.h" |
5 | #include "qabstract3dseries_p.h" |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | /*! |
10 | * \class QAbstractDataProxy |
11 | * \inmodule QtDataVisualization |
12 | * \brief The QAbstractDataProxy class is a base class for all data |
13 | * visualization data proxies. |
14 | * \since QtDataVisualization 1.0 |
15 | * |
16 | * The following visualization type specific inherited classes are used instead |
17 | * of the base class: QBarDataProxy, QScatterDataProxy, and QSurfaceDataProxy. |
18 | * |
19 | * For more information, see \l{Qt Data Visualization Data Handling}. |
20 | */ |
21 | |
22 | /*! |
23 | * \qmltype AbstractDataProxy |
24 | * \inqmlmodule QtDataVisualization |
25 | * \since QtDataVisualization 1.0 |
26 | * \ingroup datavisualization_qml |
27 | * \instantiates QAbstractDataProxy |
28 | * \brief Base type for all QtDataVisualization data proxies. |
29 | * |
30 | * This type is uncreatable, but contains properties that are exposed via the |
31 | * following subtypes: BarDataProxy, ScatterDataProxy, SurfaceDataProxy. |
32 | * |
33 | * For more information, see \l {Qt Data Visualization Data Handling}. |
34 | */ |
35 | |
36 | /*! |
37 | * \qmlproperty AbstractDataProxy.DataType AbstractDataProxy::type |
38 | * The type of the proxy. One of the QAbstractDataProxy::DataType values. |
39 | */ |
40 | |
41 | /*! |
42 | * \enum QAbstractDataProxy::DataType |
43 | * |
44 | * This enum type specifies the data type of the proxy. |
45 | * |
46 | * \value DataTypeNone |
47 | * No data type. |
48 | * \value DataTypeBar |
49 | * Data type for Q3DBars. |
50 | * \value DataTypeScatter |
51 | * Data type for Q3DScatter. |
52 | * \value DataTypeSurface |
53 | * Data type for Q3DSurface. |
54 | */ |
55 | |
56 | /*! |
57 | * \internal |
58 | */ |
59 | QAbstractDataProxy::QAbstractDataProxy(QAbstractDataProxyPrivate *d, QObject *parent) : |
60 | QObject(parent), |
61 | d_ptr(d) |
62 | { |
63 | } |
64 | |
65 | /*! |
66 | * Deletes the abstract data proxy. |
67 | */ |
68 | QAbstractDataProxy::~QAbstractDataProxy() |
69 | { |
70 | } |
71 | |
72 | /*! |
73 | * \property QAbstractDataProxy::type |
74 | * |
75 | * \brief The data type of the proxy. |
76 | */ |
77 | QAbstractDataProxy::DataType QAbstractDataProxy::type() const |
78 | { |
79 | return d_ptr->m_type; |
80 | } |
81 | |
82 | // QAbstractDataProxyPrivate |
83 | |
84 | QAbstractDataProxyPrivate::QAbstractDataProxyPrivate(QAbstractDataProxy *q, |
85 | QAbstractDataProxy::DataType type) |
86 | : QObject(0), |
87 | q_ptr(q), |
88 | m_type(type), |
89 | m_series(0) |
90 | { |
91 | } |
92 | |
93 | QAbstractDataProxyPrivate::~QAbstractDataProxyPrivate() |
94 | { |
95 | } |
96 | |
97 | void QAbstractDataProxyPrivate::setSeries(QAbstract3DSeries *series) |
98 | { |
99 | q_ptr->setParent(series); |
100 | m_series = series; |
101 | } |
102 | |
103 | QT_END_NAMESPACE |
104 | |