ItemModelSurfaceDataProxy QML Type
Import Statement: | import QtGraphs |
In C++: | QItemModelSurfaceDataProxy |
Inherits: |
- 所有成员(包括继承成员)的列表
- ItemModelSurfaceDataProxy 是Qt Graphs QML Types for 3D 的一部分。
属性
- autoColumnCategories : bool
- autoRowCategories : bool
- columnCategories : list<String>
- columnRole : string
- columnRolePattern : regExp
- columnRoleReplace : string
- itemModel : model
- multiMatchBehavior : enumeration
- rowCategories : list<String>
- rowRole : string
- rowRolePattern : regExp
- rowRoleReplace : string
- type : AbstractDataProxy.DataType
- useModelCategories : bool
- xPosRole : string
- xPosRolePattern : regExp
- xPosRoleReplace : string
- yPosRole : string
- yPosRolePattern : regExp
- yPosRoleReplace : string
- zPosRole : string
- zPosRolePattern : regExp
- zPosRoleReplace : string
信号
- autoColumnCategoriesChanged(bool enable)
- autoRowCategoriesChanged(bool enable)
- columnCategoriesChanged()
- columnRoleChanged(string role)
- columnRolePatternChanged(regExp pattern)
- columnRoleReplaceChanged(string replace)
- itemModelChanged(model itemModel)
- multiMatchBehaviorChanged(enumeration behavior)
- rowCategoriesChanged()
- rowRoleChanged(string role)
- rowRolePatternChanged(regExp pattern)
- rowRoleReplaceChanged(string replace)
- useModelCategoriesChanged(bool enable)
- 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
派生模型作为Surface3D 的数据源。
只要映射或模型发生变化,数据就会异步解析。
有关 ItemModelSurfaceDataProxy 枚举,请参见QItemModelSurfaceDataProxy::MultiMatchBehavior 。
更多详情,请参阅QItemModelSurfaceDataProxy 文档。
使用示例:
ItemModelSurfaceDataProxy { itemModel: model // E.g. a list model defined elsewhere containing population data. // Mapping model roles to surface series rows, columns, and values. rowRole: "longitude" columnRole: "latitude" valueRole: "pop_density" }
另请参阅 SurfaceDataProxy 和Qt Graphs 3D 数据处理。
属性文档
autoColumnCategories : bool |
当设置为true
时,映射会忽略任何显式设置的列类别,并在解析模型数据时用自动生成的列类别覆盖它们。当设置为true
时,也会根据数据自动生成代理最小和最大列值。默认为true
。
autoRowCategories : bool |
当设置为true
时,映射会忽略任何显式设置的行类别,并在解析模型数据时用自动生成的类别覆盖它们。当设置为true
时,也会根据数据自动生成代理最小和最大行值。默认为true
。
columnCategories : list<String> |
映射的列类别。解析数据时,只包含在此列表中具有列角色的项目。列的顺序与此列表中的顺序相同。
columnRole : string |
要映射到列类别的项目模型角色。除了定义数据属于哪一列外,列角色指示的值还会在解析模型数据时设置为QSurfaceDataItem 的 X 坐标值,除非还定义了单独的 X 位置角色。
columnRolePattern : regExp |
设置后,在将列角色映射的值用作列类别之前,会对其进行搜索和替换。该属性指定了正则表达式,用于查找要替换的映射值部分,而columnRoleReplace 属性则包含替换字符串。
另请参阅 columnRole 和columnRoleReplace 。
columnRoleReplace : string |
与columnRolePattern 一起使用的替换内容。默认为空字符串。有关如何使用正则表达式进行搜索和替换的详细信息,请参阅QString::replace(constQRegularExpression &rx, constQString &after) 函数文档。
另请参阅 columnRole 和columnRolePattern 。
itemModel : model |
用作Surface3D 数据源的项目模型。
multiMatchBehavior : enumeration |
定义如何处理每行/列组合的多个匹配项。默认为ItemModelSurfaceDataProxy.MultiMatchBehavior.Last 。
例如,您可能有一个带有时间戳数据的项目模型,这些数据以不规则的时间间隔采集,您希望用曲面图直观显示数据项在每个小时的平均位置。为此,您可以指定行和列的类别,使每个曲面点代表一个小时,并将 multiMatchBehavior 设置为ItemModelSurfaceDataProxy.MultiMatchBehavior.Average 。
rowCategories : list<String> |
映射的行类别。在解析数据时,只包含此列表中具有行角色的项目。行的顺序与此列表中的顺序相同。
rowRole : string |
要映射到行类别的项目模型角色。除了定义数据属于哪一行外,行角色指示的值还会在解析模型数据时设置为QSurfaceDataItem 的 Z 坐标值,除非还定义了单独的 Z 位置角色。
rowRolePattern : regExp |
设置后,将对行角色映射的值进行搜索和替换,然后再将其用作行类别。该属性指定正则表达式,用于查找要替换的映射值部分,而rowRoleReplace 属性包含替换字符串。
另请参阅 rowRole 和rowRoleReplace 。
rowRoleReplace : string |
与rowRolePattern 一起使用的替换内容。默认为空字符串。有关如何使用正则表达式进行搜索和替换的详细信息,请参阅QString::replace(constQRegularExpression &rx, constQString &after) 函数文档。
另请参阅 rowRole 和rowRolePattern 。
type : AbstractDataProxy.DataType |
代理类型。QAbstractDataProxy::DataType 值之一。
useModelCategories : bool |
设置为true
时,映射会忽略行和列的角色和类别,而使用模型中的行和列。默认值为false
。
xPosRole : string |
要映射到 X 位置的项目模型角色。如果未定义此角色,则columnRole 用于确定已解析的QSurfaceDataItem
项目的 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 。
zPosRolePattern : regExp |
设置后,将对 Z 位置角色映射的值进行搜索和替换,然后再将其用作项目位置值。该属性指定了正则表达式,用于查找要替换的映射值部分,而zPosRoleReplace 属性则包含替换字符串。
另请参阅 zPosRole 和zPosRoleReplace 。
zPosRoleReplace : string |
与zPosRolePattern 一起使用的替换内容。默认为空字符串。有关如何使用正则表达式进行搜索和替换的详细信息,请参阅QString::replace(constQRegularExpression &rx, constQString &after) 函数文档。
另请参阅 zPosRole 和zPosRolePattern 。
信号文档
autoColumnCategoriesChanged(bool enable) |
当autoColumnCategories 更改为enable 时,将发出该信号。
注: 相应的处理程序是onAutoColumnCategoriesChanged
。
autoRowCategoriesChanged(bool enable) |
当autoRowCategories 变更为enable 时,发出此信号。
注: 相应的处理程序是onAutoRowCategoriesChanged
。
columnCategoriesChanged() |
当columnCategories 变更时,发出此信号。
注: 相应的处理程序是onColumnCategoriesChanged
。
columnRoleChanged(string role) |
当columnRole 变更为role 时会发出该信号。
注: 相应的处理程序是onColumnRoleChanged
。
columnRolePatternChanged(regExp pattern) |
当columnRolePattern 变更为pattern 时,发出此信号。
注: 相应的处理程序是onColumnRolePatternChanged
。
columnRoleReplaceChanged(string replace) |
当columnRoleReplace 变更为replace 时,发出此信号。
注: 相应的处理程序是onColumnRoleReplaceChanged
。
itemModelChanged(model itemModel) |
当itemModel 变更为itemModel 时,发出此信号。
注: 相应的处理程序是onItemModelChanged
。
multiMatchBehaviorChanged(enumeration behavior) |
当multiMatchBehavior 变更为behavior 时,发出此信号。
注: 相应的处理程序是onMultiMatchBehaviorChanged
。
rowCategoriesChanged() |
当rowCategories 变更时发出此信号。
注: 相应的处理程序是onRowCategoriesChanged
。
rowRolePatternChanged(regExp pattern) |
当rowRolePattern 变更为pattern 时,发出此信号。
注: 相应的处理程序是onRowRolePatternChanged
。
rowRoleReplaceChanged(string replace) |
当rowRoleReplace 变更为replace 时,发出此信号。
注: 相应的处理程序是onRowRoleReplaceChanged
。
useModelCategoriesChanged(bool enable) |
当useModelCategories 变更为enable 时,发出此信号。
注: 相应的处理程序是onUseModelCategoriesChanged
。
xPosRolePatternChanged(regExp pattern) |
当xPosRolePattern 变更为pattern 时发出此信号。
注: 相应的处理程序是onXPosRolePatternChanged
。
xPosRoleReplaceChanged(string replace) |
当xPosRoleReplace 变更为replace 时,发出此信号。
注: 相应的处理程序是onXPosRoleReplaceChanged
。
yPosRolePatternChanged(regExp pattern) |
当yPosRolePattern 变更为pattern 时,发出该信号。
注: 相应的处理程序是onYPosRolePatternChanged
。
yPosRoleReplaceChanged(string replace) |
当yPosRoleReplace 变更为replace 时,发出该信号。
注: 相应的处理程序是onYPosRoleReplaceChanged
。
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.