QSurfaceDataProxy Class

The QSurfaceDataProxy class is the data proxy for a 3D surface graph. More...

Header: #include <QSurfaceDataProxy>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
Since: QtDataVisualization 1.0
Instantiated By: SurfaceDataProxy
Inherits: QAbstractDataProxy
Inherited By:

QHeightMapSurfaceDataProxy and QItemModelSurfaceDataProxy

Properties

Public Functions

virtual ~QSurfaceDataProxy()
const QSurfaceDataArray *array() const
int columnCount() const
int rowCount() const
QSurface3DSeries *series() const

Signals

Detailed Description

A surface data proxy handles surface related data in rows. For this it provides two auxiliary typedefs: QtDataVisualization::QSurfaceDataArray and QtDataVisualization::QSurfaceDataRow. QSurfaceDataArray is a QList that controls the rows. QSurfaceDataRow is a QList that contains QSurfaceDataItem objects. For more information about how to feed the data to the proxy, see the sample code in the Q3DSurface documentation.

All rows must have the same number of items.

QSurfaceDataProxy takes ownership of all QSurfaceDataRow objects passed to it, whether directly or in a QSurfaceDataArray container. To use surface data row pointers to directly modify data after adding the array to the proxy, the appropriate signal must be emitted to update the graph.

To make a sensible surface, the x-value of each successive item in all rows must be either ascending or descending throughout the row. Similarly, the z-value of each successive item in all columns must be either ascending or descending throughout the column.

Note: Currently only surfaces with straight rows and columns are fully supported. Any row with items that do not have the exact same z-value or any column with items that do not have the exact same x-value may get clipped incorrectly if the whole surface does not completely fit within the visible x-axis or z-axis ranges.

Note: Surfaces with less than two rows or columns are not considered valid surfaces and will not be rendered.

Note: On some environments, surfaces with a lot of visible vertices may not render, because they exceed the per-draw vertex count supported by the graphics driver. This is mostly an issue on 32-bit and OpenGL ES2 platforms.

See also Qt Data Visualization Data Handling.

Property Documentation

[read-only] columnCount : const int

This property holds the number of columns in the data array.

Access functions:

int columnCount() const

Notifier signal:

void columnCountChanged()

[read-only] rowCount : const int

This property holds the number of rows in the data array.

Access functions:

int rowCount() const

Notifier signal:

void rowCountChanged()

[read-only] series : QSurface3DSeries* const

This property holds the series this proxy is attached to.

Access functions:

QSurface3DSeries *series() const

Notifier signal:

void seriesChanged()

Member Function Documentation

[virtual] QSurfaceDataProxy::~QSurfaceDataProxy()

Deletes the surface data proxy.

const QSurfaceDataArray *QSurfaceDataProxy::array() const

Returns the pointer to the data array.

[signal] void QSurfaceDataProxy::arrayReset()

This signal is emitted when the data array is reset. If the contents of the whole array are changed without calling resetArray(), this signal needs to be emitted to update the graph.

Related Non-Members

QSurfaceDataArray

A list of pointers to QSurfaceDataRow objects.

QSurfaceDataRow

A list of QSurfaceDataItem objects.