PySide6.QtGraphs.QSurfaceDataProxy¶
- class QSurfaceDataProxy¶
- The - QSurfaceDataProxyclass is the data proxy for a 3D surface graph.- Details- A surface data proxy handles surface related data in rows. For this it provides two auxiliary type aliases: QtGraphs::QSurfaceDataArray and QtGraphs::QSurfaceDataRow. - QSurfaceDataArrayis a QList that controls the rows.- QSurfaceDataRowis a QList that contains- QSurfaceDataItemobjects. For more information about how to feed the data to the proxy, see the sample code in the- Q3DSurfaceWidgetItemdocumentation. Since data is stored in series, it is necessary to create a series associated with the proxy before using these functions for the dataset.- All rows must have the same number of items. - QSurfaceDataProxytakes ownership of all- QSurfaceDataRowobjects passed to it, whether directly or in a- QSurfaceDataArraycontainer. 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 rendered as lines. - 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 - Inherited by: - QItemModelSurfaceDataProxy,- QHeightMapSurfaceDataProxy- Synopsis¶- Properties¶- columnCountᅟ- Number of columns in the data array
- rowCountᅟ- Number of rows in the data array
- seriesᅟ- This proxy is attached to
 - Methods¶- def - __init__()
- def - addRow()
- def - addRows()
- def - columnCount()
- def - insertRow()
- def - insertRows()
- def - itemAt()
- def - removeRows()
- def - resetArray()
- def - resetArrayNp()
- def - rowCount()
- def - series()
- def - setItem()
- def - setRow()
- def - setRows()
 - Signals¶- def - arrayReset()
- def - itemChanged()
- def - rowsAdded()
- def - rowsChanged()
- def - rowsInserted()
- def - rowsRemoved()
- def - seriesChanged()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property columnCountᅟ: int¶
 - This property holds The number of columns in the data array.. - Access functions:
 - property rowCountᅟ: int¶
 - This property holds The number of rows in the data array.. - Access functions:
- Signal - rowCountChanged()
 
 - property seriesᅟ: QSurface3DSeries¶
 - This property holds The series this proxy is attached to.. - Access functions:
- Signal - seriesChanged()
 
 - Constructs - QSurfaceDataProxywith the given- parent.- addRow(row)¶
- Parameters:
- row – .list of QSurfaceDataItem 
- Return type:
- int 
 
 - Adds the new row - rowto the end of an array. The new row must have the same number of columns as the rows in the initial array.- Returns the index of the added row. - addRows(rows)¶
- Parameters:
- rows – .list of list of QSurfaceDataItem 
- Return type:
- int 
 
 - Adds new - rowsto the end of an array. The new rows must have the same number of columns as the rows in the initial array.- Returns the index of the first added row. - 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.- columnCount()¶
- Return type:
- int 
 
 - Getter of property - columnCountᅟ.- columnCountChanged(count)¶
- Parameters:
- count – int 
 
 - Notification signal of property - columnCountᅟ.- insertRow(rowIndex, row)¶
- Parameters:
- rowIndex – int 
- row – .list of QSurfaceDataItem 
 
 
 - Inserts the new row - rowinto- rowIndex. If- rowIndexis equal to the array size, the rows are added to the end of the array. The new row must have the same number of columns as the rows in the initial array.- insertRows(rowIndex, rows)¶
- Parameters:
- rowIndex – int 
- rows – .list of list of QSurfaceDataItem 
 
 
 - Inserts new - rowsinto- rowIndex. If- rowIndexis equal to the array size, the rows are added to the end of the array. The new- rowsmust have the same number of columns as the rows in the initial array.- Returns the pointer to the item at the position - position. The x-value of- positionindicates the row and the y-value indicates the column. The item is guaranteed to be valid only until the next call that modifies data.- itemAt(rowIndex, columnIndex)
- Parameters:
- rowIndex – int 
- columnIndex – int 
 
- Return type:
 
 - Returns the pointer to the item at the position specified by - rowIndexand- columnIndex. It is guaranteed to be valid only until the next call that modifies data.- itemChanged(rowIndex, columnIndex)¶
- Parameters:
- rowIndex – int 
- columnIndex – int 
 
 
 - This signal is emitted when the item at the position specified by - rowIndexand- columnIndexchanges. If the item is changed in the array without calling- setItem(), this signal needs to be emitted to update the graph.- removeRows(rowIndex, removeCount)¶
- Parameters:
- rowIndex – int 
- removeCount – int 
 
 
 - Removes the number of rows specified by - removeCountstarting at the position- rowIndex. Attempting to remove rows past the end of the array does nothing.- resetArray()¶
 - Clears the existing array and triggers the - arrayReset()signal.- resetArray(newArray)
- Parameters:
- newArray – .list of list of QSurfaceDataItem 
 
 - * Sets the array from - newArray. If the new array is equal to the * existing one, this function simply triggers the- arrayReset()signal.- resetArrayNp(x, deltaX, z, deltaZ, data)¶
- Parameters:
- x – float 
- deltaX – float 
- z – float 
- deltaZ – float 
- data – - PyArrayObject
 
 
 - Populates the data from a 2 dimensional numpy array containing the y values for a range starting a - x,- zwith steps of- deltaX,- deltaZ, respectively.- rowCount()¶
- Return type:
- int 
 
 - Getter of property - rowCountᅟ.- rowCountChanged(count)¶
- Parameters:
- count – int 
 
 - Notification signal of property - rowCountᅟ.- rowsAdded(startIndex, count)¶
- Parameters:
- startIndex – int 
- count – int 
 
 
 - This signal is emitted when the number of rows specified by - countis added, starting at the position- startIndex. If rows are added to the array without calling- addRow()or- addRows(), this signal needs to be emitted to update the graph.- rowsChanged(startIndex, count)¶
- Parameters:
- startIndex – int 
- count – int 
 
 
 - This signal is emitted when the number of rows specified by - countis changed, starting at the position- startIndex. If rows are changed in the array without calling- setRow()or- setRows(), this signal needs to be emitted to update the graph.- rowsInserted(startIndex, count)¶
- Parameters:
- startIndex – int 
- count – int 
 
 
 - This signal is emitted when the number of rows specified by - countis inserted at the position- startIndex.- If rows are inserted into the array without calling - insertRow()or- insertRows(), this signal needs to be emitted to update the graph.- rowsRemoved(startIndex, count)¶
- Parameters:
- startIndex – int 
- count – int 
 
 
 - This signal is emitted when the number of rows specified by - countis removed, starting at the position- startIndex.- The index is the current array size if the rows were removed from the end of the array. If rows are removed from the array without calling - removeRows(), this signal needs to be emitted to update the graph.- series()¶
- Return type:
 
 - Getter of property - seriesᅟ.- seriesChanged(series)¶
- Parameters:
- series – - QSurface3DSeries
 
 - Notification signal of property - seriesᅟ.- setItem(position, item)¶
- Parameters:
- position – - QPoint
- item – - QSurfaceDataItem
 
 
 - Changes a single item at the position - positionto the item- item. The x-value of- positionindicates the row and the y-value indicates the column.- setItem(rowIndex, columnIndex, item)
- Parameters:
- rowIndex – int 
- columnIndex – int 
- item – - QSurfaceDataItem
 
 
 - Changes a single item at the position specified by - rowIndexand- columnIndexto the item- item.- setRow(rowIndex, row)¶
- Parameters:
- rowIndex – int 
- row – .list of QSurfaceDataItem 
 
 
 - Changes an existing row by replacing the row at the position - rowIndexwith the new row specified by- row. The new row can be the same as the existing row already stored at the- rowIndex. The new row must have the same number of columns as the row it is replacing.- setRows(rowIndex, rows)¶
- Parameters:
- rowIndex – int 
- rows – .list of list of QSurfaceDataItem 
 
 
 - Changes existing rows by replacing the rows starting at the position - rowIndexwith the new rows specifies by- rows. The rows in the- rowsarray can be the same as the existing rows already stored at the- rowIndex. The new rows must have the same number of columns as the rows they are replacing.