ItemModelScatterDataProxy QML Type
用于在Scatter3D 中呈现项模型数据的代理类。更多内容...
| Import Statement: | import QtGraphs |
| In C++: | QItemModelScatterDataProxy |
| Inherits: |
- 所有成员列表(包括继承的成员)
- ItemModelScatterDataProxy 是Qt Graphs 3D QML 类型的一部分。
属性
- itemModel : model
- rotationRole : string
- rotationRolePattern : regExp
- rotationRoleReplace : string
- scaleRole : string
- scaleRolePattern : regExp
- scaleRoleReplace : string
- type : AbstractDataProxy.DataType
- xPosRole : string
- xPosRolePattern : regExp
- xPosRoleReplace : string
- yPosRole : string
- yPosRolePattern : regExp
- yPosRoleReplace : string
- zPosRole : string
- zPosRolePattern : regExp
- zPosRoleReplace : string
信号
- itemModelChanged(model itemModel)
- rotationRoleChanged(string role)
- rotationRolePatternChanged(regExp pattern)
- rotationRoleReplaceChanged(string replace)
- scaleRoleChanged(string role)
- scaleRolePatternChanged(regExp pattern)
- scaleRoleReplaceChanged(string replace)
- xPosRoleChanged(string role)
- xPosRolePatternChanged(regExp pattern)
- xPosRoleReplaceChanged(string replace)
- yPosRoleChanged(string role)
- yPosRolePatternChanged(regExp pattern)
- yPosRoleReplaceChanged(string replace)
- zPosRoleChanged(string role)
- zPosRolePatternChanged(regExp pattern)
- zPosRoleReplaceChanged(string replace)
详细说明
此类型允许您将从 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 。
scaleRole : string
该模型可以将缩放值作为变体"x,y,z" 提供。前者将直接使用给定的值构建vector3d。
scaleRolePattern : regExp
启用此属性后,在将由“scale”角色映射的值用作项目刻度之前,会对其进行查找和替换操作。该属性指定用于查找映射值中待替换部分的正则表达式,而scaleRoleReplace 属性则包含替换字符串。
另请参阅 scaleRole 和scaleRoleReplace 。
scaleRoleReplace : string
该属性定义了与scaleRolePattern 配合使用的替换内容。默认值为空字符串。有关使用正则表达式进行搜索和替换的工作原理的更多信息,请参阅QString::replace (constQRegularExpression &rx, constQString &after)函数的文档。
另请参阅 scaleRole 和scaleRolePattern 。
type : AbstractDataProxy.DataType [read-only]
代理的类型。QAbstractDataProxy::DataType 中的某个值。
xPosRole : string
要映射到 X 位置的项模型角色。
xPosRolePattern : regExp
设置此属性后,在将由 x-position 角色映射的值用作项目位置值之前,会对其进行搜索和替换操作。该属性指定用于查找映射值中待替换部分的正则表达式,而xPosRoleReplace 属性则包含替换字符串。
另请参阅 xPosRole 和xPosRoleReplace 。
xPosRoleReplace : string
该属性定义了与xPosRolePattern 配合使用的替换内容。默认值为空字符串。有关使用正则表达式进行搜索和替换的工作原理的更多信息,请参阅QString::replace (constQRegularExpression &rx, constQString &after)函数的文档。
另请参阅 xPosRole 和xPosRolePattern 。
yPosRole : string
要映射到 Y 位置的项模型角色。
yPosRolePattern : regExp
设置此属性后,在将由 y-position 角色映射的值用作项目位置值之前,会对该值进行查找和替换操作。该属性指定用于查找映射值中待替换部分的正则表达式,而yPosRoleReplace 属性则包含替换字符串。
另请参阅 yPosRole 和yPosRoleReplace 。
yPosRoleReplace : string
该属性定义了与yPosRolePattern 配合使用的替换内容。默认值为空字符串。有关使用正则表达式进行搜索和替换的工作原理的更多信息,请参阅QString::replace (constQRegularExpression &rx, constQString &after)函数的文档。
另请参阅 yPosRole 和yPosRolePattern 。
zPosRole : string
要映射到 Z 位置的对象模型角色。
zPosRolePattern : regExp
设置此属性后,在将 z-position 角色映射的值用作项目位置值之前,会对其进行搜索和替换操作。该属性指定用于查找映射值中待替换部分的正则表达式,而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 。
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.