| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2017 The Qt Company Ltd. |
| 4 | ** Contact: https://www.qt.io/licensing/ |
| 5 | ** |
| 6 | ** This file is part of the Qt Data Visualization module of the Qt Toolkit. |
| 7 | ** |
| 8 | ** $QT_BEGIN_LICENSE:GPL$ |
| 9 | ** Commercial License Usage |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in |
| 11 | ** accordance with the commercial license agreement provided with the |
| 12 | ** Software or, alternatively, in accordance with the terms contained in |
| 13 | ** a written agreement between you and The Qt Company. For licensing terms |
| 14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
| 15 | ** information use the contact form at https://www.qt.io/contact-us. |
| 16 | ** |
| 17 | ** GNU General Public License Usage |
| 18 | ** Alternatively, this file may be used under the terms of the GNU |
| 19 | ** General Public License version 3 or (at your option) any later version |
| 20 | ** approved by the KDE Free Qt Foundation. The licenses are as published by |
| 21 | ** the Free Software Foundation and appearing in the file LICENSE.GPL3 |
| 22 | ** included in the packaging of this file. Please review the following |
| 23 | ** information to ensure the GNU General Public License requirements will |
| 24 | ** be met: https://www.gnu.org/licenses/gpl-3.0.html. |
| 25 | ** |
| 26 | ** $QT_END_LICENSE$ |
| 27 | ** |
| 28 | ****************************************************************************/ |
| 29 | |
| 30 | #include "qabstractdataproxy_p.h" |
| 31 | #include "qabstract3dseries_p.h" |
| 32 | |
| 33 | QT_BEGIN_NAMESPACE_DATAVISUALIZATION |
| 34 | |
| 35 | /*! |
| 36 | * \class QAbstractDataProxy |
| 37 | * \inmodule QtDataVisualization |
| 38 | * \brief The QAbstractDataProxy class is a base class for all data |
| 39 | * visualization data proxies. |
| 40 | * \since QtDataVisualization 1.0 |
| 41 | * |
| 42 | * The following visualization type specific inherited classes are used instead |
| 43 | * of the base class: QBarDataProxy, QScatterDataProxy, and QSurfaceDataProxy. |
| 44 | * |
| 45 | * For more information, see \l{Qt Data Visualization Data Handling}. |
| 46 | */ |
| 47 | |
| 48 | /*! |
| 49 | * \qmltype AbstractDataProxy |
| 50 | * \inqmlmodule QtDataVisualization |
| 51 | * \since QtDataVisualization 1.0 |
| 52 | * \ingroup datavisualization_qml |
| 53 | * \instantiates QAbstractDataProxy |
| 54 | * \brief Base type for all QtDataVisualization data proxies. |
| 55 | * |
| 56 | * This type is uncreatable, but contains properties that are exposed via the |
| 57 | * following subtypes: BarDataProxy, ScatterDataProxy, SurfaceDataProxy. |
| 58 | * |
| 59 | * For more information, see \l {Qt Data Visualization Data Handling}. |
| 60 | */ |
| 61 | |
| 62 | /*! |
| 63 | * \qmlproperty AbstractDataProxy.DataType AbstractDataProxy::type |
| 64 | * The type of the proxy. One of the QAbstractDataProxy::DataType values. |
| 65 | */ |
| 66 | |
| 67 | /*! |
| 68 | * \enum QAbstractDataProxy::DataType |
| 69 | * |
| 70 | * This enum type specifies the data type of the proxy. |
| 71 | * |
| 72 | * \value DataTypeNone |
| 73 | * No data type. |
| 74 | * \value DataTypeBar |
| 75 | * Data type for Q3DBars. |
| 76 | * \value DataTypeScatter |
| 77 | * Data type for Q3DScatter. |
| 78 | * \value DataTypeSurface |
| 79 | * Data type for Q3DSurface. |
| 80 | */ |
| 81 | |
| 82 | /*! |
| 83 | * \internal |
| 84 | */ |
| 85 | QAbstractDataProxy::QAbstractDataProxy(QAbstractDataProxyPrivate *d, QObject *parent) : |
| 86 | QObject(parent), |
| 87 | d_ptr(d) |
| 88 | { |
| 89 | } |
| 90 | |
| 91 | /*! |
| 92 | * Deletes the abstract data proxy. |
| 93 | */ |
| 94 | QAbstractDataProxy::~QAbstractDataProxy() |
| 95 | { |
| 96 | } |
| 97 | |
| 98 | /*! |
| 99 | * \property QAbstractDataProxy::type |
| 100 | * |
| 101 | * \brief The data type of the proxy. |
| 102 | */ |
| 103 | QAbstractDataProxy::DataType QAbstractDataProxy::type() const |
| 104 | { |
| 105 | return d_ptr->m_type; |
| 106 | } |
| 107 | |
| 108 | // QAbstractDataProxyPrivate |
| 109 | |
| 110 | QAbstractDataProxyPrivate::QAbstractDataProxyPrivate(QAbstractDataProxy *q, |
| 111 | QAbstractDataProxy::DataType type) |
| 112 | : QObject(0), |
| 113 | q_ptr(q), |
| 114 | m_type(type), |
| 115 | m_series(0) |
| 116 | { |
| 117 | } |
| 118 | |
| 119 | QAbstractDataProxyPrivate::~QAbstractDataProxyPrivate() |
| 120 | { |
| 121 | } |
| 122 | |
| 123 | void QAbstractDataProxyPrivate::setSeries(QAbstract3DSeries *series) |
| 124 | { |
| 125 | q_ptr->setParent(series); |
| 126 | m_series = series; |
| 127 | } |
| 128 | |
| 129 | QT_END_NAMESPACE_DATAVISUALIZATION |
| 130 | |