在本页

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"
}

另请参阅 ScatterDataProxyQt Graphs 3D 数据处理

属性文档

itemModel : model

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

rotationRole : string

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

rotationRolePattern : regExp

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

另请参阅 rotationRolerotationRoleReplace

rotationRoleReplace : string

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

另请参阅 rotationRolerotationRolePattern

scaleRole : string

模型可以以"x,y,z" 的变体形式提供比例值。第一个变量将直接用给定的值构建 vector3d。

scaleRolePattern : regExp

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

另请参阅 scaleRolescaleRoleReplace

scaleRoleReplace : string

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

另请参阅 scaleRolescaleRolePattern

type : AbstractDataProxy.DataType [read-only]

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

xPosRole : string

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

xPosRolePattern : regExp

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

另请参阅 xPosRolexPosRoleReplace

xPosRoleReplace : string

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

另请参阅 xPosRolexPosRolePattern

yPosRole : string

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

yPosRolePattern : regExp

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

另请参阅 yPosRoleyPosRoleReplace

yPosRoleReplace : string

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

另请参阅 yPosRoleyPosRolePattern

zPosRole : string

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

zPosRolePattern : regExp

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

另请参阅 zPosRolezPosRoleReplace

zPosRoleReplace : string

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

另请参阅 zPosRolezPosRolePattern

信号文档

itemModelChanged(model itemModel)

itemModel 更改为itemModel 时会发出该信号。

注: 相应的处理程序是onItemModelChanged

rotationRoleChanged(string role)

rotationRole 更改为role 时会发出该信号。

注: 相应的处理程序是onRotationRoleChanged

rotationRolePatternChanged(regExp pattern)

rotationRolePattern 更改为pattern 时会发出该信号。

注: 相应的处理程序是onRotationRolePatternChanged

rotationRoleReplaceChanged(string replace)

rotationRoleReplace 更改为replace 时会发出该信号。

注: 相应的处理程序是onRotationRoleReplaceChanged

scaleRoleChanged(string role)

scaleRole 更改为role 时会发出该信号。

注: 相应的处理程序是onScaleRoleChanged

scaleRolePatternChanged(regExp pattern)

scaleRolePattern 更改为pattern 时会发出该信号。

注: 相应的处理程序是onScaleRolePatternChanged

scaleRoleReplaceChanged(string replace)

scaleRoleReplace 更改为replace 时会发出该信号。

注: 相应的处理程序是onScaleRoleReplaceChanged

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.