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


type : AbstractDataProxy.DataType [read-only]

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


xPosRole : string

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


xPosRolePattern : regExp

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

另请参阅 xPosRolexPosRoleReplace


xPosRoleReplace : string

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

另请参阅 xPosRolexPosRolePattern


yPosRole : string

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


yPosRolePattern : regExp

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

另请参阅 yPosRoleyPosRoleReplace


yPosRoleReplace : string

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

另请参阅 yPosRoleyPosRolePattern


zPosRole : string

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


zPosRolePattern : regExp

设置后,将对 Z 位置角色映射的值进行搜索和替换,然后再将其用作项目位置值。该属性指定正则表达式,用于查找要替换的映射值部分,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


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


© 2025 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.