- class QScatterDataProxy¶
The
QScatterDataProxy
class is the data proxy for 3D scatter graphs. More…Inherited by:
QItemModelScatterDataProxy
Synopsis¶
Properties¶
itemCountᅟ
- Number of items in the arrayseriesᅟ
- This proxy is attached to
Methods¶
def
__init__()
def
addItem()
def
addItems()
def
insertItem()
def
insertItems()
def
itemAt()
def
itemCount()
def
removeItems()
def
resetArray()
def
series()
def
setItem()
def
setItems()
Signals¶
def
arrayReset()
def
itemsAdded()
def
itemsChanged()
def
itemsInserted()
def
itemsRemoved()
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
Detailed Description¶
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 andQScatterDataItem
objects passed to it.See also
Qt Graphs Data Handling with 3D
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property itemCountᅟ: int¶
This property holds The number of items in the array..
- Access functions:
Signal
itemCountChanged()
- property seriesᅟ: QScatter3DSeries¶
This property holds The series this proxy is attached to..
- Access functions:
Signal
seriesChanged()
Constructs
QScatterDataProxy
with the givenparent
.- addItem(item)¶
- Parameters:
item –
QScatterDataItem
- Return type:
int
Adds the item
item
to the end of the array.Returns the index of the added item.
- addItems(items)¶
- Parameters:
items – .list of QScatterDataItem
- Return type:
int
Adds the items specified by
items
to the end of the array.Returns the index of the first added item.
- 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.- insertItem(index, item)¶
- Parameters:
index – int
item –
QScatterDataItem
Inserts the item
item
to the positionindex
. If the index is equal to the data array size, the item is added to the array.- insertItems(index, items)¶
- Parameters:
index – int
items – .list of QScatterDataItem
Inserts the items specified by
items
to the positionindex
. If the index is equal to data array size, the items are added to the array.- itemAt(index)¶
- Parameters:
index – int
- Return type:
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()¶
- Return type:
int
Getter of property
itemCountᅟ
.- itemCountChanged(count)¶
- Parameters:
count – int
Notification signal of property
itemCountᅟ
.- itemsAdded(startIndex, count)¶
- Parameters:
startIndex – int
count – int
This signal is emitted when the number of items specified by
count
are added, starting at the positionstartIndex
. If items are added to the array without callingaddItem()
oraddItems()
, this signal needs to be emitted to update the graph.- itemsChanged(startIndex, count)¶
- Parameters:
startIndex – int
count – int
This signal is emitted when the number of items specified by
count
are changed, starting at the positionstartIndex
. If items are changed in the array without callingsetItem()
orsetItems()
, this signal needs to be emitted to update the graph.- itemsInserted(startIndex, count)¶
- Parameters:
startIndex – int
count – int
This signal is emitted when the number of items specified by
count
are inserted, starting at the positionstartIndex
. If items are inserted into the array without callinginsertItem()
orinsertItems()
, this signal needs to be emitted to update the graph.- itemsRemoved(startIndex, count)¶
- Parameters:
startIndex – int
count – int
This signal is emitted when the number of rows specified by
count
are removed, starting at the positionstartIndex
. 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 callingremoveItems()
, this signal needs to be emitted to update the graph.- removeItems(index, removeCount)¶
- Parameters:
index – int
removeCount – int
Removes the number of items specified by
removeCount
starting at the positionindex
. Attempting to remove items past the end of the array does nothing.- resetArray()¶
Clears the existing array and triggers the
arrayReset()
signal.- resetArray(newArray)
- Parameters:
newArray – .list of QScatterDataItem
Sets the array from
newArray
. If the new array is equal to the existing one, this function simply triggers thearrayReset()
signal.- series()¶
- Return type:
Getter of property
seriesᅟ
.- seriesChanged(series)¶
- Parameters:
series –
QScatter3DSeries
Notification signal of property
seriesᅟ
.- setItem(index, item)¶
- Parameters:
index – int
item –
QScatterDataItem
Replaces the item at the position
index
with the itemitem
.- setItems(index, items)¶
- Parameters:
index – int
items – .list of QScatterDataItem
Replaces the items starting from the position
index
with the items specified byitems
.