summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/qabstract3dgraph.cpp
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2014-04-16 12:25:14 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2014-04-16 12:26:06 +0300
commitbf8ed99fb5a474aa6a56d61c9e3a1b5e44d6b6cf (patch)
treebf0e9956fbad9c689e58f4c33eafbd286185a587 /src/datavisualization/engine/qabstract3dgraph.cpp
parenta30c0c304e55ffe30545ab0838e4dbe11a99b8da (diff)
Add custom item support, part 2
Task-number: QTRD-2866 + Added custom item rendering Change-Id: If24400fed7c0467d8ebbd554d6e4df3ec5a205f3 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine/qabstract3dgraph.cpp')
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/datavisualization/engine/qabstract3dgraph.cpp b/src/datavisualization/engine/qabstract3dgraph.cpp
index 0d1bdfc9..1c46427d 100644
--- a/src/datavisualization/engine/qabstract3dgraph.cpp
+++ b/src/datavisualization/engine/qabstract3dgraph.cpp
@@ -389,6 +389,9 @@ void QAbstract3DGraph::clearSelection()
*
* \return index to the added item.
*
+ * \note No validity checks are made for the position of the item, so it is up to the user to
+ * provide a valid position. Items positioned outside axis ranges are still rendered.
+ *
* \sa removeCustomItemAt()
*
* \since Qt Data Visualization 1.1
@@ -404,6 +407,9 @@ int QAbstract3DGraph::addCustomItem(const QString &meshFile, const QVector3D &po
/*!
* Removes the custom item at \a {index}. Deletes the resource allocated to it.
*
+ * \note The index of the remaining items will change if the item removed is other than
+ * the last.
+ *
* \since Qt Data Visualization 1.1
*/
void QAbstract3DGraph::removeCustomItemAt(int index)
@@ -412,6 +418,19 @@ void QAbstract3DGraph::removeCustomItemAt(int index)
}
/*!
+ * Removes the custom item at \a {position}. Deletes the resource allocated to it.
+ *
+ * \note The index of the remaining items will change if an item is removed from a position that
+ * is not at the last index.
+ *
+ * \since Qt Data Visualization 1.1
+ */
+void QAbstract3DGraph::removeCustomItemAt(const QVector3D &position)
+{
+ d_ptr->m_visualController->deleteCustomItem(position);
+}
+
+/*!
* Renders current frame to an image of \a imageSize. Default size is the window size. Image is
* rendered with antialiasing level given in \a msaaSamples. Default level is \c{0}.
*