/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc ** All rights reserved. ** For any questions to Digia, please use contact form at http://qt.digia.com ** ** This file is part of the QtDataVisualization module. ** ** Licensees holding valid Qt Enterprise licenses may use this file in ** accordance with the Qt Enterprise License Agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. ** ** If you have questions regarding the use of this file, please use ** contact form at http://qt.digia.com ** ****************************************************************************/ /*! \qmltype AbstractGraph3D \inqmlmodule QtDataVisualization \since QtDataVisualization 1.0 \ingroup datavisualization_qml \brief Base type for 3D visualizations. This type is the base type for all 3D visualizations in QtDataVisualization. Note that this type is uncreatable, but contains properties that are shared between the 3D visualizations. For AbstractGraph3D enums, see \l QAbstract3DGraph::SelectionFlag, \l QAbstract3DGraph::ShadowQuality, and \l QAbstract3DGraph::ElementType \sa Bars3D, Scatter3D, Surface3D, {Qt Data Visualization C++ Classes} */ /*! \qmlproperty AbstractGraph3D.SelectionMode AbstractGraph3D::selectionMode Active selection mode in the visualization. */ /*! \qmlproperty AbstractGraph3D.ShadowQuality AbstractGraph3D::shadowQuality Shadow quality. */ /*! \qmlproperty bool AbstractGraph3D::shadowsSupported This read-only property indicates if shadows are supported with the current configuration or not. OpenGL ES2 configurations do not support shadows. */ /*! \qmlproperty Scene3D AbstractGraph3D::scene Read only Q3DScene that can be used to access e.g. camera object. */ /*! \qmlproperty AbstractInputHandler3D AbstractGraph3D::inputHandler Input handler. You can disable default input handlers by setting this property to \c null. */ /*! \qmlproperty Theme3D AbstractGraph3D::theme The active theme of the graph. */ /*! \qmlproperty AbstractGraph3D.RenderingMode AbstractGraph3D::renderingMode Defaults to \c{RenderIndirect}. \table \header \li Render Mode \li Description \row \li RenderDirectToBackground \li Indicates the graph will be rendered directly on the window background. This mode also clears the whole window before rendering the graph, including the areas outside the graph. Since the graphs in this rendering mode are drawn on the window background under other QML items, the regular QML window clearing before rendering is suppressed. The graphs handle the clearing themselves instead. If the surface format of the window supports antialiasing, it will be used (see \c {QtDataVisualization::qDefaultSurfaceFormat()}). This rendering mode offers the best performance at the expense of non-standard QML behavior. For example, the graphs do not obey the Z ordering of QML items and the opacity value has no effect on them. \row \li RenderDirectToBackground_NoClear \li Similar to RenderDirectToBackground mode, except that the graph will not clear the whole window before rendering the graph. This mode is better for windows where you have other custom items besides the graphs that also draw on the window background. In that case you need to either take care of the window clearing yourself or ensure that all areas of the window are fully covered with opaque items. If one graph in the window uses either of the direct rendering modes, then all other graphs in the same window also drawn in direct modes should use the exact same direct rendering mode. Otherwise some graphs may not show up, depending on the drawing order of the graphs. \row \li RenderIndirect \li Indicates the graph will be first rendered to an offscreen surface that is then drawn during normal QML item rendering. The rendered image is antialiased using multisampling method if it is supported in the current environment and the msaaSamples property value is greater than zero. This rendering mode offers good quality and normal QML item behavior at the expense of performance. \endtable \note Antialiasing is not supported in OpenGL ES2 environments in any rendering mode. \note Setting the \c antialiasing property of the graphs doesn't do anything. However, it is set by the graph itself if the current rendering mode uses antialiasing. \sa msaaSamples */ /*! \qmlproperty int AbstractGraph3D::msaaSamples The number of samples used in multisample antialiasing when renderingMode is \c RenderIndirect. When renderingMode is \c RenderDirectToBackground or \c RenderDirectToBackground_NoClear, this property value is read-only and returns the number of samples specified by the window surface format. Defaults to 4. \sa renderingMode */ /*! * \qmlproperty bool AbstractGraph3D::measureFps * \since QtDataVisualization 1.1 * * If \c true, the rendering is done continuously instead of on demand, and currentFps property * is updated. Defaults to false. * * \sa currentFps */ /*! * \qmlproperty int AbstractGraph3D::currentFps * \since QtDataVisualization 1.1 * * When fps measuring is enabled, the results for the last second are stored in this read-only * property. It takes at least a second before this value updates after measurement is activated. * * \sa measureFps */ /*! * \qmlmethod void AbstractGraph3D::clearSelection() * Clears selection from all attached series. */ /*! * \qmlmethod int AbstractGraph3D::addCustomItem(Custom3DItem item) * * Adds a Custom3DItem \a item to the graph. Graph takes ownership of the added item. * * \return index to the added item if add was successful, -1 if trying to add a null item, and * index of the item if trying to add an already added item. * * \sa removeCustomItems(), removeCustomItem(), removeCustomItemAt() * * \since Qt Data Visualization 1.1 */ /*! * \qmlmethod void AbstractGraph3D::removeCustomItems() * * Removes all custom items. Deletes the resources allocated to them. * * \since Qt Data Visualization 1.1 */ /*! * \qmlmethod void AbstractGraph3D::removeCustomItem(Custom3DItem item) * * Removes the custom \a {item}. Deletes the resources allocated to it. * * \since Qt Data Visualization 1.1 */ /*! * \qmlmethod void AbstractGraph3D::removeCustomItemAt(vector3d position) * * Removes all custom items at \a {position}. Deletes the resources allocated to them. * * \since Qt Data Visualization 1.1 */ /*! * \qmlmethod int AbstractGraph3D::selectedLabelIndex() * * Can be used to query the index of the selected label after receiving elementSelected signal with * any label type. Selection is valid until the next elementSelected signal. * * \return index of the selected label, or -1. * * \since Qt Data Visualization 1.1 */ /*! * \qmlmethod Abstract3DAxis AbstractGraph3D::selectedAxis() * * Can be used to get the selected axis after receiving elementSelected signal with any label type. * Selection is valid until the next elementSelected signal. * * \return the selected axis, or null. * * \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 */