在本页

ItemModelScatterDataProxy QML Type

代理类,用于在Scatter3D 项目模型中显示数据。更多

Import Statement: import QtGraphs
In C++: QItemModelScatterDataProxy
Inherits:

ScatterDataProxy

属性

信号

详细描述

该类型允许您使用 AbstractItemModel 派生模型作为Scatter3D 的数据源。

每当映射或模型发生变化时,数据都会被异步解析。QScatterDataProxy::arrayReset(数据解析完成后,将发出()。

有关详细信息,请参阅QItemModelScatterDataProxy 文档。

使用示例:

ItemModelScatterDataProxy {
    itemModel: model // E.g. a list model defined elsewhere containing point coordinates.
    // Mapping model roles to scatter series item coordinates.
    xPosRole: "xPos"
    yPosRole: "yPos"
    zPosRole: "zPos"
}

另请参阅 ScatterDataProxy 和Qt Graphs 3D 数据处理。

属性文档

itemModel : model

用作Scatter3D 数据源的项目模型。


rotationRole : string

映射到项目旋转的项目模型角色。模型可以提供可直接转换为quaternion 的旋转值,也可以提供字符串表示:"scalar,x,y,z" 或"@angle,x,y,z" 。第一种格式将使用给定值直接构造quaternion ,第二种格式将使用QQuaternion::fromAxisAndAngle() 方法构造quaternion 。


rotationRolePattern : regExp

设置后,将对旋转角色映射的值进行搜索和替换,然后再将其用作项目旋转。该属性指定正则表达式,用于查找要替换的映射值部分,而rotationRoleReplace 属性则包含替换字符串。

另请参阅 rotationRole 和rotationRoleReplace 。


rotationRoleReplace : string

该属性定义了与rotationRolePattern 一起使用的替换内容。默认为空字符串。有关使用正则表达式进行搜索和替换的工作原理,请参阅QString::replace(constQRegularExpression &rx, constQString &after) 函数文档。

另请参阅 rotationRole 和rotationRolePattern 。


type : AbstractDataProxy.DataType [read-only]

代理类型。QAbstractDataProxy::DataType 值之一。


xPosRole : string

要映射到 X 位置的项目模型角色。


xPosRolePattern : regExp

设置后,将对 x 位置角色映射的值进行搜索和替换,然后再将其用作项目位置值。该属性指定了正则表达式,用于查找要替换的映射值部分,而xPosRoleReplace 属性则包含替换字符串。

另请参阅 xPosRole 和xPosRoleReplace 。


xPosRoleReplace : string

该属性定义了与xPosRolePattern 一起使用的替换内容。默认为空字符串。有关使用正则表达式进行搜索和替换的工作原理,请参阅QString::replace(constQRegularExpression &rx, constQString &after) 函数文档。

另请参阅 xPosRole 和xPosRolePattern 。


yPosRole : string

映射到 Y 位置的项目模型角色。


yPosRolePattern : regExp

设置后,将对 Y 位置角色映射的值进行搜索和替换,然后再将其用作项目位置值。该属性指定正则表达式,用于查找要替换的映射值部分,yPosRoleReplace 属性包含替换字符串。

另请参阅 yPosRole 和yPosRoleReplace 。


yPosRoleReplace : string

该属性定义了与yPosRolePattern 一起使用的替换内容。默认为空字符串。有关使用正则表达式进行搜索和替换的工作原理,请参阅QString::replace(constQRegularExpression &rx, constQString &after) 函数文档。

另请参阅 yPosRole 和yPosRolePattern 。


zPosRole : string

映射到 Z 位置的项目模型角色。


zPosRolePattern : regExp

设置后,将对 Z 位置角色映射的值进行搜索和替换,然后再将其用作项目位置值。该属性指定正则表达式,用于查找要替换的映射值部分,zPosRoleReplace 属性包含替换字符串。

另请参阅 zPosRole 和zPosRoleReplace 。


zPosRoleReplace : string

该属性定义了与zPosRolePattern 一起使用的替换内容。默认为空字符串。有关使用正则表达式进行搜索和替换的工作原理,请参阅QString::replace(constQRegularExpression &rx, constQString &after) 函数文档。

另请参阅 zPosRole 和zPosRolePattern 。


信号文档

itemModelChanged(model itemModel)

当itemModel 更改为itemModel 时,将发出该信号。

注: 相应的处理程序是onItemModelChanged 。


rotationRoleChanged(string role)

当rotationRole 变更为role 时,发出此信号。

注: 相应的处理程序是onRotationRoleChanged 。


rotationRolePatternChanged(regExp pattern)

当rotationRolePattern 变更为pattern 时,发出该信号。

注: 相应的处理程序是onRotationRolePatternChanged 。


rotationRoleReplaceChanged(string replace)

当rotationRoleReplace 变更为replace 时,发出此信号。

注: 相应的处理程序是onRotationRoleReplaceChanged 。


xPosRoleChanged(string role)

当xPosRole 变更为role 时,发出此信号。

注: 相应的处理程序是onXPosRoleChanged 。


xPosRolePatternChanged(regExp pattern)

当xPosRolePattern 变更为pattern 时,发出此信号。

注: 相应的处理程序是onXPosRolePatternChanged 。


xPosRoleReplaceChanged(string replace)

当xPosRoleReplace 变更为replace 时,发出此信号。

注: 相应的处理程序是onXPosRoleReplaceChanged 。


yPosRoleChanged(string role)

当yPosRole 变更为role 时,发出此信号。

注: 相应的处理程序是onYPosRoleChanged 。


yPosRolePatternChanged(regExp pattern)

当yPosRolePattern 变更为pattern 时,发出此信号。

注: 相应的处理程序是onYPosRolePatternChanged 。


yPosRoleReplaceChanged(string replace)

当yPosRoleReplace 变更为replace 时,发出此信号。

注: 相应的处理程序是onYPosRoleReplaceChanged 。


zPosRoleChanged(string role)

当zPosRole 变更为role 时,发出此信号。

注: 相应的处理程序是onZPosRoleChanged 。


zPosRolePatternChanged(regExp pattern)

当zPosRolePattern 变更为pattern 时,发出此信号。

注: 相应的处理程序是onZPosRolePatternChanged 。


zPosRoleReplaceChanged(string replace)

当zPosRoleReplace 变更为replace 时,发出此信号。

注: 相应的处理程序是onZPosRoleReplaceChanged 。


© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.