From 2dc1b3809943e3d294e2363a2b0d185607b8854f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 12 Sep 2013 07:58:26 +0300 Subject: QML documentation Task-number: QTRD-2133 Change-Id: I2568b3cd6e83ee933536d7fec2e48f9f121b213e Reviewed-by: Miikka Heikkinen --- src/datavisualization/data/qabstractdataproxy.cpp | 20 +++++++++++ src/datavisualization/data/qbardataproxy.cpp | 28 +++++++++++++++- .../data/qitemmodelbardatamapping.cpp | 39 ++++++++++++++++++++++ .../data/qitemmodelbardataproxy.cpp | 25 ++++++++++++++ .../data/qitemmodelscatterdatamapping.cpp | 29 ++++++++++++++++ .../data/qitemmodelscatterdataproxy.cpp | 25 ++++++++++++++ .../data/qitemmodelsurfacedatamapping.cpp | 39 ++++++++++++++++++++++ .../data/qitemmodelsurfacedataproxy.cpp | 25 ++++++++++++++ src/datavisualization/data/qscatterdataproxy.cpp | 13 ++++++++ src/datavisualization/data/qsurfacedataproxy.cpp | 13 ++++++++ 10 files changed, 255 insertions(+), 1 deletion(-) (limited to 'src/datavisualization/data') 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 @@ -31,6 +31,24 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \sa QBarDataProxy, QScatterDataProxy, QSurfaceDataProxy */ +/*! + * \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 * @@ -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 @@ -70,6 +70,33 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \snippet doc_src_qtdatavisualization.cpp 1 */ +/*! + * \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. */ @@ -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 @@ -46,6 +46,45 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \sa QItemModelBarDataProxy */ +/*! + * \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. */ 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 @@ -35,6 +35,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \sa QItemModelBarDataMapping */ +/*! + * \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. */ 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 @@ -42,6 +42,35 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \sa QItemModelScatterDataProxy */ +/*! + * \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. */ 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 @@ -32,6 +32,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * for Q3DScatter. It maps roles defined in QItemModelScatterDataMapping to roles in the model. */ +/*! + * \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. */ 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 @@ -31,6 +31,45 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \sa QItemModelSurfaceDataProxy */ +/*! + * \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. */ 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 @@ -34,6 +34,31 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * for Q3DSurface. It maps roles defined in QItemModelSurfaceDataMapping to roles in the model. */ +/*! + * \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. */ 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 @@ -54,6 +54,19 @@ QT_DATAVISUALIZATION_BEGIN_NAMESPACE * \snippet doc_src_qtdatavisualization.cpp 2 */ +/*! + * \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. */ 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 @@ -31,6 +31,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. */ -- cgit v1.2.3