The QSurfaceDataProxy class is the data proxy for a 3D surface graph. 更多...
头: | #include <QSurfaceDataProxy> |
qmake: | QT += datavisualization |
Since: | QtDataVisualization 1.0 |
实例化: | SurfaceDataProxy |
继承: | QAbstractDataProxy |
继承者: |
该类在 QtDataVisualization 1.0 引入。
QSurfaceDataProxy (QObject * parent = nullptr) | |
virtual | ~QSurfaceDataProxy () |
int | addRow (QSurfaceDataRow * row ) |
int | addRows (const QSurfaceDataArray & rows ) |
const QSurfaceDataArray * | array () const |
int | columnCount () const |
void | insertRow (int rowIndex , QSurfaceDataRow * row ) |
void | insertRows (int rowIndex , const QSurfaceDataArray & rows ) |
const QSurfaceDataItem * | itemAt (int rowIndex , int columnIndex ) const |
const QSurfaceDataItem * | itemAt (const QPoint & position ) const |
void | removeRows (int rowIndex , int removeCount ) |
void | resetArray (QSurfaceDataArray * newArray ) |
int | rowCount () const |
QSurface3DSeries * | series () const |
void | setItem (int rowIndex , int columnIndex , const QSurfaceDataItem & item ) |
void | setItem (const QPoint & position , const QSurfaceDataItem & item ) |
void | setRow (int rowIndex , QSurfaceDataRow * row ) |
void | setRows (int rowIndex , const QSurfaceDataArray & rows ) |
void | arrayReset () |
void | columnCountChanged (int count ) |
void | itemChanged (int rowIndex , int columnIndex ) |
void | rowCountChanged (int count ) |
void | rowsAdded (int startIndex , int count ) |
void | rowsChanged (int startIndex , int count ) |
void | rowsInserted (int startIndex , int count ) |
void | rowsRemoved (int startIndex , int count ) |
void | seriesChanged (QSurface3DSeries * series ) |
typedef | QSurfaceDataArray |
typedef | QSurfaceDataRow |
A surface data proxy handles surface related data in rows. For this it provides two auxiliary typedefs: QtDataVisualization::QSurfaceDataArray and QtDataVisualization::QSurfaceDataRow.
QSurfaceDataArray
是
QList
that controls the rows.
QSurfaceDataRow
是
QVector
that contains
QSurfaceDataItem
objects. For more information about how to feed the data to the proxy, see the sample code in the
Q3DSurface
文档编制。
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.
注意: 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.
注意: Surfaces with less than two rows or columns are not considered valid surfaces and will not be rendered.
注意: 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.
另请参阅 Qt Data Visualization 数据处理 .
This property holds the number of columns in the data array.
访问函数:
int | columnCount () const |
通知程序信号:
void | columnCountChanged (int count ) |
This property holds the number of rows in the data array.
访问函数:
int | rowCount () const |
通知程序信号:
void | rowCountChanged (int count ) |
This property holds the series this proxy is attached to.
访问函数:
QSurface3DSeries * | series () const |
通知程序信号:
void | seriesChanged (QSurface3DSeries * series ) |
Constructs QSurfaceDataProxy with the given parent .
[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.
[signal]
void
QSurfaceDataProxy::
itemChanged
(
int
rowIndex
,
int
columnIndex
)
This signal is emitted when the item at the position specified by rowIndex and columnIndex changes. If the item is changed in the array without calling setItem (), this signal needs to be emitted to update the graph.
[signal]
void
QSurfaceDataProxy::
rowsAdded
(
int
startIndex
,
int
count
)
This signal is emitted when the number of rows specified by count is added starting at the position startIndex . If rows are added to the array without calling addRow () 或 addRows (), this signal needs to be emitted to update the graph.
[signal]
void
QSurfaceDataProxy::
rowsChanged
(
int
startIndex
,
int
count
)
This signal is emitted when the number of rows specified by count is changed starting at the position startIndex . If rows are changed in the array without calling setRow () 或 setRows (), this signal needs to be emitted to update the graph.
[signal]
void
QSurfaceDataProxy::
rowsInserted
(
int
startIndex
,
int
count
)
This signal is emitted when the number of rows specified by count is inserted at the position startIndex .
If rows are inserted into the array without calling insertRow () 或 insertRows (), this signal needs to be emitted to update the graph.
[signal]
void
QSurfaceDataProxy::
rowsRemoved
(
int
startIndex
,
int
count
)
This signal is emitted when the number of rows specified by count is 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.
[虚拟]
QSurfaceDataProxy::
~QSurfaceDataProxy
()
Deletes the surface data proxy.
Adds the new row row to 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.
Adds new rows to 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.
Returns the pointer to the data array.
Inserts the new row row into rowIndex 。若 rowIndex is 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.
Inserts new rows into rowIndex 。若 rowIndex is equal to the array size, the rows are added to the end of the array. The new rows must have the same number of columns as the rows in the initial array.
Returns the pointer to the item at the position specified by rowIndex and columnIndex . It is guaranteed to be valid only until the next call that modifies data.
Returns the pointer to the item at the position position . The x-value of position indicates the row and the y-value indicates the column. The item is guaranteed to be valid only until the next call that modifies data.
Removes the number of rows specified by removeCount starting at the position rowIndex . Attempting to remove rows past the end of the array does nothing.
Takes ownership of the array newArray . Clears the existing array if the new array differs from it. If the arrays are the same, this function just triggers the arrayReset () 信号。
Passing a null array deletes the old array and creates a new empty array. All rows in newArray must be of same length.
Changes a single item at the position specified by rowIndex and columnIndex to the item item .
Changes a single item at the position position to the item item . The x-value of position indicates the row and the y-value indicates the column.
Changes an existing row by replacing the row at the position rowIndex with 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.
Changes existing rows by replacing the rows starting at the position rowIndex with the new rows specifies by rows . The rows in the rows array 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.
A list of pointers to QSurfaceDataRow 对象。
A vector of QSurfaceDataItem 对象。