ItemModelScatterDataProxy QML Type
用于在项目模型中通过Scatter3D 呈现数据的代理类。更多...
| Import Statement: | import QtDataVisualization 1.12 |
| Since: | QtDataVisualization 1.0 |
| In C++: | QItemModelScatterDataProxy |
| Inherits: | |
| Status: | Deprecated |
此类型已弃用。我们强烈建议在新代码中不要使用它。
属性
- itemModel : model
- rotationRole : string
- rotationRolePattern : regExp
- rotationRoleReplace : string
- xPosRole : string
- xPosRolePattern : regExp
- xPosRoleReplace : string
- yPosRole : string
- yPosRolePattern : regExp
- yPosRoleReplace : string
- zPosRole : string
- zPosRolePattern : regExp
- zPosRoleReplace : string
详细说明
此类型允许您将继承自 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 Data Visualization 数据处理》一文。
属性文档
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 。
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 。
© 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.