From 604d8a652cc088a4b3a4307ec291916757e03201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Tue, 13 May 2014 08:26:06 +0300 Subject: API to query custom item selection Task-number: QTRD-3046 + Added missing elementSelected signal to QML Change-Id: I5e79d8e910d2730e3d2ae5550ce576f01aac0b18 Change-Id: I5e79d8e910d2730e3d2ae5550ce576f01aac0b18 Reviewed-by: Miikka Heikkinen --- ...tdatavisualization-qml-abstractdeclarative.qdoc | 37 ++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'src/datavisualization/doc/src') diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc index fc91e795..9995c508 100644 --- a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc +++ b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc @@ -28,8 +28,8 @@ Note that this type is uncreatable, but contains properties that are shared between the 3D visualizations. - For AbstractGraph3D enums, see \l QAbstract3DGraph::SelectionFlag and - \l QAbstract3DGraph::ShadowQuality + For AbstractGraph3D enums, see \l QAbstract3DGraph::SelectionFlag, + \l QAbstract3DGraph::ShadowQuality, and \l QAbstract3DGraph::ElementType \sa Bars3D, Scatter3D, Surface3D, {Qt Data Visualization C++ Classes} */ @@ -207,3 +207,36 @@ * * \since Qt Data Visualization 1.1 */ + +/*! + * \qmlmethod int AbstractGraph3D::selectedCustomItemIndex() + * + * Can be used to query the index of the selected custom item after receiving elementSelected signal + * with \l{QAbstract3DGraph::ElementCustomItem}{ElementCustomItem} type. Selection is valid until + * the next elementSelected signal. + * + * \return index of the selected custom item, or -1. + * + * \since Qt Data Visualization 1.1 + */ + +/*! + * \qmlmethod Custom3DItem AbstractGraph3D::selectedCustomItem() + * + * Can be used to get the selected custom item after receiving elementSelected signal with + * \l{QAbstract3DGraph::ElementCustomItem}{ElementCustomItem} type. Ownership of the item remains + * with the graph. Selection is valid until the next elementSelected signal. + * + * \return the selected custom item, or null. + * + * \since Qt Data Visualization 1.1 + */ + +/*! \qmlsignal AbstractGraph3D::elementSelected(ElementType type) + * + * Emits selection \a type when a selection is made in the graph. + * + * \sa selectedLabelIndex(), selectedAxis(), selectedCustomItemIndex(), selectedCustomItem() + * + * \since Qt Data Visualization 1.1 + */ -- cgit v1.2.3