diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-12 07:58:26 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-12 08:26:00 +0300 |
commit | 2dc1b3809943e3d294e2363a2b0d185607b8854f (patch) | |
tree | d077d9ee51d9df83adc38b65fab3fc3da6462dcc /src/datavisualization/data | |
parent | d93f5f3b64fdb52cc150232f6b6d80ffdb57db78 (diff) |
QML documentation
Task-number: QTRD-2133
Change-Id: I2568b3cd6e83ee933536d7fec2e48f9f121b213e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization/data')
10 files changed, 255 insertions, 1 deletions
diff --git a/src/datavisualization/data/qabstractdataproxy.cpp b/src/datavisualization/data/qabstractdataproxy.cpp index 19eac436..9267e93e 100644 --- a/src/datavisualization/data/qabstractdataproxy.cpp +++ b/src/datavisualization/data/qabstractdataproxy.cpp @@ -32,6 +32,24 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype AbstractDataProxy + * \instantiates QAbstractDataProxy + */ + +/*! + * \qmlproperty AbstractDataProxy.DataType AbstractDataProxy::type + * The type of the proxy. + */ + +/*! + * \qmlproperty string AbstractDataProxy::itemLabelFormat + * + * Label format for data items in this proxy. This format is used for single item labels, + * e.g. when an item is selected. How the format is interpreted depends on proxy type. See + * each proxy class documentation for more information. + */ + +/*! * \enum QAbstractDataProxy::DataType * * Data type of the proxy. @@ -64,6 +82,8 @@ QAbstractDataProxy::~QAbstractDataProxy() /*! * \property QAbstractDataProxy::type + * + * The type of the proxy. */ QAbstractDataProxy::DataType QAbstractDataProxy::type() const { diff --git a/src/datavisualization/data/qbardataproxy.cpp b/src/datavisualization/data/qbardataproxy.cpp index 418bb747..79821aca 100644 --- a/src/datavisualization/data/qbardataproxy.cpp +++ b/src/datavisualization/data/qbardataproxy.cpp @@ -71,6 +71,33 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype BarDataProxy + * \instantiates QBarDataProxy + * \inherits AbstractDataProxy + * + * This type handles adding, inserting, changing and removing rows of data with Qt Quick 2. + */ + +/*! + * \qmlproperty int BarDataProxy::rowCount + * Row count in the array. + */ + +/*! + * \qmlproperty list BarDataProxy::rowLabels + * + * Optional row labels for the array. Indexes in this array match row indexes in data array. + * If the list is shorter than row count, all rows will not get labels. + */ + +/*! + * \qmlproperty list BarDataProxy::columnLabels + * + * Optional column labels for the array. Indexes in this array match column indexes in rows. + * If the list is shorter than the longest row, all columns will not get labels. + */ + +/*! * Constructs QBarDataProxy with the given \a parent. */ QBarDataProxy::QBarDataProxy(QObject *parent) : @@ -304,7 +331,6 @@ int QBarDataProxy::rowCount() const * Optional row labels for the array. Indexes in this array match row indexes in data array. * If the list is shorter than row count, all rows will not get labels. */ - QStringList QBarDataProxy::rowLabels() const { return dptrc()->m_rowLabels; diff --git a/src/datavisualization/data/qitemmodelbardatamapping.cpp b/src/datavisualization/data/qitemmodelbardatamapping.cpp index 4577a614..2c47bda4 100644 --- a/src/datavisualization/data/qitemmodelbardatamapping.cpp +++ b/src/datavisualization/data/qitemmodelbardatamapping.cpp @@ -47,6 +47,45 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype BarDataMapping + * \instantiates QItemModelBarDataMapping + * + * This type is used to map roles of AbstractItemModel to rows, columns, and values of Bars3D. For + * more complete description, see QItemModelBarDataMapping. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 4 + * + * \sa ItemModelBarDataProxy + */ + +/*! + * \qmlproperty string BarDataMapping::rowRole + * The row role of the mapping. + */ + +/*! + * \qmlproperty string BarDataMapping::columnRole + * The column role of the mapping. + */ + +/*! + * \qmlproperty string BarDataMapping::valueRole + * The value role of the mapping. + */ + +/*! + * \qmlproperty list BarDataMapping::rowCategories + * The row categories of the mapping. + */ + +/*! + * \qmlproperty list BarDataMapping::columnCategories + * The column categories of the mapping. + */ + +/*! * Constructs QItemModelBarDataMapping with the given \a parent. */ QItemModelBarDataMapping::QItemModelBarDataMapping(QObject *parent) diff --git a/src/datavisualization/data/qitemmodelbardataproxy.cpp b/src/datavisualization/data/qitemmodelbardataproxy.cpp index 49905be5..7c989aef 100644 --- a/src/datavisualization/data/qitemmodelbardataproxy.cpp +++ b/src/datavisualization/data/qitemmodelbardataproxy.cpp @@ -36,6 +36,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ItemModelBarDataProxy + * \instantiates QItemModelBarDataProxy + * \inherits BarDataProxy + * + * This type allows you to use AbstractItemModel derived models as a data source for Bars3D. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 7 + * + * \sa BarDataProxy, BarDataMapping + */ + +/*! + * \qmlproperty list ItemModelBarDataProxy::itemModel + * The item model. + */ + +/*! + * \qmlproperty list ItemModelBarDataProxy::activeMapping + * The active mapping. Modifying a mapping that is set to the proxy will trigger data set + * re-resolving. + */ + +/*! * Constructs QItemModelBarDataProxy. */ QItemModelBarDataProxy::QItemModelBarDataProxy() : diff --git a/src/datavisualization/data/qitemmodelscatterdatamapping.cpp b/src/datavisualization/data/qitemmodelscatterdatamapping.cpp index 1243c19e..4b2be700 100644 --- a/src/datavisualization/data/qitemmodelscatterdatamapping.cpp +++ b/src/datavisualization/data/qitemmodelscatterdatamapping.cpp @@ -43,6 +43,35 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ScatterDataMapping + * \instantiates QItemModelScatterDataMapping + * + * This type is used to map roles of AbstractItemModel to the XYZ-values of Scatter3D points. For + * more complete description, see QItemModelScatterDataMapping. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 5 + * + * \sa ItemModelScatterDataProxy + */ + +/*! + * \qmlproperty string ScatterDataMapping::xPosRole + * The X position role of the mapping. + */ + +/*! + * \qmlproperty string ScatterDataMapping::yPosRole + * The Y position role of the mapping. + */ + +/*! + * \qmlproperty string ScatterDataMapping::zPosRole + * The Z position role of the mapping. + */ + +/*! * Constructs QItemModelScatterDataMapping with the given \a parent. */ QItemModelScatterDataMapping::QItemModelScatterDataMapping(QObject *parent) diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp index d647e5bc..df94483a 100644 --- a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp +++ b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp @@ -33,6 +33,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ItemModelScatterDataProxy + * \instantiates QItemModelScatterDataProxy + * \inherits ScatterDataProxy + * + * This type allows you to use AbstractItemModel derived models as a data source for Scatter3D. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 8 + * + * \sa ScatterDataProxy, ScatterDataMapping + */ + +/*! + * \qmlproperty list ItemModelScatterDataProxy::itemModel + * The item model. + */ + +/*! + * \qmlproperty list ItemModelScatterDataProxy::activeMapping + * The active mapping. Modifying a mapping that is set to the proxy will trigger data set + * re-resolving. + */ + +/*! * Constructs QItemModelScatterDataProxy. */ QItemModelScatterDataProxy::QItemModelScatterDataProxy() : diff --git a/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp b/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp index 4b90f320..79f310ea 100644 --- a/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp +++ b/src/datavisualization/data/qitemmodelsurfacedatamapping.cpp @@ -32,6 +32,45 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype SurfaceDataMapping + * \instantiates QItemModelSurfaceDataMapping + * + * This type is used to map roles of AbstractItemModel to rows, columns, and values of Surface3D. + * For more complete description, see QItemModelSurfaceDataMapping. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 6 + * + * \sa ItemModelSurfaceDataProxy + */ + +/*! + * \qmlproperty string SurfaceDataMapping::rowRole + * The row role of the mapping. + */ + +/*! + * \qmlproperty string SurfaceDataMapping::columnRole + * The column role of the mapping. + */ + +/*! + * \qmlproperty string SurfaceDataMapping::valueRole + * The value role of the mapping. + */ + +/*! + * \qmlproperty list SurfaceDataMapping::rowCategories + * The row categories of the mapping. + */ + +/*! + * \qmlproperty list SurfaceDataMapping::columnCategories + * The column categories of the mapping. + */ + +/*! * Constructs QItemModelSurfaceDataMapping with the given \a parent. */ QItemModelSurfaceDataMapping::QItemModelSurfaceDataMapping(QObject *parent) diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp index 4e85542b..77eb571a 100644 --- a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp +++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp @@ -35,6 +35,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ItemModelSurfaceDataProxy + * \instantiates QItemModelSurfaceDataProxy + * \inherits SurfaceDataProxy + * + * This type allows you to use AbstractItemModel derived models as a data source for Surface3D. + * + * Usage example: + * + * \snippet doc_src_qmldatavisualization.cpp 9 + * + * \sa SurfaceDataProxy, SurfaceDataMapping + */ + +/*! + * \qmlproperty list ItemModelSurfaceDataProxy::itemModel + * The item model. + */ + +/*! + * \qmlproperty list ItemModelSurfaceDataProxy::activeMapping + * The active mapping. Modifying a mapping that is set to the proxy will trigger data set + * re-resolving. + */ + +/*! * Constructs QItemModelSurfaceDataProxy. */ QItemModelSurfaceDataProxy::QItemModelSurfaceDataProxy() : diff --git a/src/datavisualization/data/qscatterdataproxy.cpp b/src/datavisualization/data/qscatterdataproxy.cpp index 27fa3aca..f020ac12 100644 --- a/src/datavisualization/data/qscatterdataproxy.cpp +++ b/src/datavisualization/data/qscatterdataproxy.cpp @@ -55,6 +55,19 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype ScatterDataProxy + * \instantiates QScatterDataProxy + * \inherits AbstractDataProxy + * + * This type handles adding, inserting, changing and removing data items. + */ + +/*! + * \qmlproperty int ScatterDataProxy::itemCount + * Item count in the array. + */ + +/*! * Constructs QScatterDataProxy with the given \a parent. */ QScatterDataProxy::QScatterDataProxy(QObject *parent) : diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp index 2bf8af8b..a1c4b534 100644 --- a/src/datavisualization/data/qsurfacedataproxy.cpp +++ b/src/datavisualization/data/qsurfacedataproxy.cpp @@ -32,6 +32,19 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE */ /*! + * \qmltype SurfaceDataProxy + * \instantiates QSurfaceDataProxy + * \inherits AbstractDataProxy + * + * DOCUMENTATION GOES HERE TOO + */ + +/*! + * \qmlproperty int SurfaceDataProxy::itemCount + * Item count in the array. + */ + +/*! * Constructs QSurfaceDataProxy with the given \a parent. */ QSurfaceDataProxy::QSurfaceDataProxy(QObject *parent) : |