QScatterDataProxy — PyQt Documentation v6.9.0 (original) (raw)
PyQt6.QtGraphs.QScatterDataProxy
Inherits from QAbstractDataProxy.
Inherited by QItemModelScatterDataProxy.
Description¶
The QScatterDataProxy class is the data proxy for 3D scatter graphs.
A scatter data proxy handles adding, inserting, changing, and removing data items. Since data is stored in series, it is necessary to create a series associated with the proxy before using these functions for the dataset.
QScatterDataProxy takes ownership of all QtGraphs::QScatterDataArray and QScatterDataItem objects passed to it.
Methods¶
__init__(parent: QObject = None)
Constructs QScatterDataProxy with the given parent.
addItem(QScatterDataItem) → int
Adds the item item to the end of the array.
Returns the index of the added item.
addItems(Iterable[QScatterDataItem]) → int
Adds the items specified by items to the end of the array.
Returns the index of the first added item.
insertItem(int, QScatterDataItem)
Inserts the item item to the position index. If the index is equal to the data array size, the item is added to the array.
insertItems(int, Iterable[QScatterDataItem])
Inserts the items specified by items to the position index. If the index is equal to data array size, the items are added to the array.
itemAt(int) → QScatterDataItem
Returns the pointer to the item at the index index. It is guaranteed to be valid only until the next call that modifies data.
itemCount() → int
TODO
removeItems(int, int)
Removes the number of items specified by removeCount starting at the position index. Attempting to remove items past the end of the array does nothing.
resetArray()
Clears the existing array and triggers the arrayReset signal.
resetArray(Iterable[QScatterDataItem])
Sets the array from newArray. If the new array is equal to the existing one, this function simply triggers the arrayReset signal.
series() → QScatter3DSeries
TODO
setItem(int, QScatterDataItem)
Replaces the item at the position index with the item item.
setItems(int, Iterable[QScatterDataItem])
Replaces the items starting from the position index with the items specified by items.
Signals¶
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.
itemCountChanged(int)
TODO
itemsAdded(int, int)
This signal is emitted when the number of items specified by count are added, starting at the position startIndex. If items are added to the array without calling addItem() or addItems(), this signal needs to be emitted to update the graph.
itemsChanged(int, int)
This signal is emitted when the number of items specified by count are changed, starting at the position startIndex. If items are changed in the array without calling setItem() or setItems(), this signal needs to be emitted to update the graph.
itemsInserted(int, int)
This signal is emitted when the number of items specified by count are inserted, starting at the position startIndex. If items are inserted into the array without calling insertItem() or insertItems(), this signal needs to be emitted to update the graph.
itemsRemoved(int, int)
This signal is emitted when the number of rows specified by count are removed, starting at the position startIndex. The index may be larger than the current array size if items are removed from the end. If items are removed from the array without calling removeItems(), this signal needs to be emitted to update the graph.
seriesChanged(QScatter3DSeries)
TODO