PySide6.QtGraphs.QScatterDataProxy¶
- class QScatterDataProxy¶
QScatterDataProxy类是用于3D散点图的数据代理。更多…继承自:
QItemModelScatterDataProxy概要¶
属性¶
itemCountᅟ- 数组中的项目数量seriesᅟ- 此代理已附加到
方法¶
def
__init__()def
addItem()def
addItems()def
insertItem()def
insertItems()def
itemAt()def
itemCount()def
removeItems()def
resetArray()def
series()def
setItem()def
setItems()
信号¶
def
arrayReset()def
itemsAdded()def
itemsChanged()def
itemsInserted()def
itemsRemoved()def
seriesChanged()
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
散点数据代理处理添加、插入、更改和删除数据项。由于数据存储在系列中,因此在使用这些函数处理数据集之前,需要创建一个与代理关联的系列。
QScatterDataProxy拥有所有传递给它的 QtGraphs::QScatterDataArray 和QScatterDataItem对象的所有权。另请参阅
使用3D处理Qt图形数据
注意
当使用
from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。- property itemCountᅟ: int¶
此属性保存数组中的项目数量。
- Access functions:
- property seriesᅟ: QScatter3DSeries¶
此属性保存此代理附加到的系列。
- Access functions:
使用给定的
parent构造QScatterDataProxy。- addItem(item)¶
- Parameters:
项目 –
QScatterDataItem- Return type:
整数
将项目
item添加到数组的末尾。返回添加项的索引。
- addItems(items)¶
- Parameters:
items – QScatterDataItem 的列表
- Return type:
整数
将
items指定的项目添加到数组的末尾。返回第一个添加项的索引。
- arrayReset()¶
当数据数组被重置时,会发出此信号。如果整个数组的内容在没有调用
resetArray()的情况下被更改,则需要发出此信号以更新图表。- insertItem(index, item)¶
- Parameters:
index – 整数
项目 –
QScatterDataItem
将项目
item插入到位置index。如果索引等于数据数组的大小,则将项目添加到数组中。- insertItems(index, items)¶
- Parameters:
index – 整数
items – QScatterDataItem 的列表
将
items指定的项目插入到位置index。如果索引等于数据数组的大小,则将项目添加到数组中。- itemAt(index)¶
- Parameters:
索引 – int
- Return type:
返回指向索引
index处项目的指针。保证仅在下次修改数据的调用之前有效。- itemCount()¶
- Return type:
整数
属性
itemCountᅟ的获取器。- itemCountChanged(count)¶
- Parameters:
count – int
属性
itemCountᅟ的通知信号。- itemsAdded(startIndex, count)¶
- Parameters:
startIndex – int
count – int
当从位置
startIndex开始添加由count指定的项目数量时,会发出此信号。如果项目被添加到数组中而没有调用addItem()或addItems(),则需要发出此信号以更新图表。- itemsChanged(startIndex, count)¶
- Parameters:
startIndex – int
count – int
当从位置
startIndex开始,由count指定的项目数量发生变化时,会发出此信号。如果在数组中更改了项目而没有调用setItem()或setItems(),则需要发出此信号以更新图表。- itemsInserted(startIndex, count)¶
- Parameters:
startIndex – int
count – int
当从位置
startIndex开始插入由count指定的项目数量时,会发出此信号。如果项目被插入到数组中而没有调用insertItem()或insertItems(),则需要发出此信号以更新图表。- itemsRemoved(startIndex, count)¶
- Parameters:
startIndex – int
count – int
当从位置
startIndex开始移除由count指定的行数时,会发出此信号。如果从末尾移除项目,索引可能大于当前数组大小。如果从数组中移除项目而不调用removeItems(),则需要发出此信号以更新图表。- removeItems(index, removeCount)¶
- Parameters:
index – 整数
removeCount – int
从位置
index开始,移除由removeCount指定的项目数量。尝试移除超出数组末尾的项目不会产生任何效果。- resetArray()¶
清除现有数组并触发
arrayReset()信号。- resetArray(newArray)
- Parameters:
newArray – QScatterDataItem 的列表
从
newArray设置数组。如果新数组与现有数组相同,此函数仅触发arrayReset()信号。- series()¶
- Return type:
属性
seriesᅟ的获取器。- seriesChanged(series)¶
- Parameters:
series –
QScatter3DSeries
属性
seriesᅟ的通知信号。- setItem(index, item)¶
- Parameters:
index – 整数
项目 –
QScatterDataItem
用项目
item替换位置index处的项目。- setItems(index, items)¶
- Parameters:
index – 整数
items – QScatterDataItem 的列表
从位置
index开始,用items指定的项目替换项目。