ItemModelSurfaceDataProxy QML Type

Proxy class for presenting data in item models with Surface3D . 更多...

导入语句: import QtDataVisualization 1.2
Since: QtDataVisualization 1.0
实例化: QItemModelSurfaceDataProxy
继承:

SurfaceDataProxy

特性

详细描述

This type allows you to use AbstractItemModel derived models as a data source for Surface3D .

Data is resolved asynchronously whenever the mapping or the model changes.

For ItemModelSurfaceDataProxy enums, see 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 and Qt Data Visualization 数据处理 .

特性文档编制

autoColumnCategories : bool

当设为 true , the mapping ignores any explicitly set column categories and overwrites them with automatically generated ones whenever the data from the model is resolved. Proxy minimum and maximum column values are also autogenerated from the data when this is set to true 。默认为 true .


autoRowCategories : bool

当设为 true , the mapping ignores any explicitly set row categories and overwrites them with automatically generated ones whenever the data from the model is resolved. Proxy minimum and maximum row values are also autogenerated from the data when this is set to true 。默认为 true .


columnCategories : list < 字符串 >

The column categories of the mapping. Only items with column roles that are found in this list are included when data is resolved. The columns are ordered in the same order as they are in this list.


columnRole : string

The item model role to map to the column category. In addition to defining which column the data belongs to, the value indicated by the column role is also set as the X-coordinate value of QSurfaceDataItem when model data is resolved, unless a separate x position role is also defined.


columnRolePattern : regExp

When set, a search and replace is done on the value mapped by the column role before it is used as a column category. This property specifies the regular expression to find the portion of the mapped value to replace and the columnRoleReplace property contains the replacement string.

另请参阅 columnRole and columnRoleReplace .


columnRoleReplace : string

The replace content to be used in conjunction with columnRolePattern . Defaults to an empty string. For more information on how the search and replace using regular expressions works, see the QString::replace (const QRegExp &rx, const QString &after) function documentation.

另请参阅 columnRole and columnRolePattern .


itemModel : model

The item model used as a data source for Surface3D .


multiMatchBehavior : ItemModelSurfaceDataProxy . MultiMatchBehavior

Defines how multiple matches for each row/column combination are handled. Defaults to ItemModelSurfaceDataProxy.MMBLast .

For example, you might have an item model with timestamped data taken at irregular intervals and you want to visualize an average position of data items on each hour with a surface graph. This can be done by specifying row and column categories so that each surface point represents an hour, and setting multiMatchBehavior to ItemModelSurfaceDataProxy.MMBAverage .


rowCategories : list < 字符串 >

The row categories of the mapping. Only items with row roles that are found in this list are included when data is resolved. The rows are ordered in the same order as they are in this list.


rowRole : string

The item model role to map to the row category. In addition to defining which row the data belongs to, the value indicated by the row role is also set as the Z-coordinate value of QSurfaceDataItem when model data is resolved, unless a separate z position role is also defined.


rowRolePattern : regExp

When set, a search and replace is done on the value mapped by the row role before it is used as a row category. This property specifies the regular expression to find the portion of the mapped value to replace and the rowRoleReplace property contains the replacement string.

另请参阅 rowRole and rowRoleReplace .


rowRoleReplace : string

The replace content to be used in conjunction with rowRolePattern . Defaults to an empty string. For more information on how the search and replace using regular expressions works, see the QString::replace (const QRegExp &rx, const QString &after) function documentation.

另请参阅 rowRole and rowRolePattern .


useModelCategories : bool

当设为 true , the mapping ignores row and column roles and categories, and uses the rows and columns from the model instead. Defaults to false .


xPosRole : string

The item model role to map to the X position. If this role is not defined, columnRole is used to determine the X-coordinate value of the resolved QSurfaceDataItem 项。


xPosRolePattern : regExp

When set, a search and replace is done on the value mapped by the x position role before it is used as an item position value. This property specifies the regular expression to find the portion of the mapped value to replace and the xPosRoleReplace property contains the replacement string.

另请参阅 xPosRole and xPosRoleReplace .


xPosRoleReplace : string

The replace content to be used in conjunction with xPosRolePattern . Defaults to an empty string. For more information on how the search and replace using regular expressions works, see the QString::replace (const QRegExp &rx, const QString &after) function documentation.

另请参阅 xPosRole and xPosRolePattern .


yPosRole : string

The item model role to map to the Y position.


yPosRolePattern : regExp

When set, a search and replace is done on the value mapped by the y position role before it is used as an item position value. This property specifies the regular expression to find the portion of the mapped value to replace and the yPosRoleReplace property contains the replacement string.

另请参阅 yPosRole and yPosRoleReplace .


yPosRoleReplace : string

The replace content to be used in conjunction with yPosRolePattern . Defaults to an empty string. For more information on how the search and replace using regular expressions works, see the QString::replace (const QRegExp &rx, const QString &after) function documentation.

另请参阅 yPosRole and yPosRolePattern .


zPosRole : string

The item model role to map to the Z position. If this role is not defined, rowRole is used to determine the Z-coordinate value of the resolved QSurfaceDataItem 项。


zPosRolePattern : regExp

When set, a search and replace is done on the value mapped by the z position role before it is used as an item position value. This property specifies the regular expression to find the portion of the mapped value to replace and the zPosRoleReplace property contains the replacement string.

另请参阅 zPosRole and zPosRoleReplace .


zPosRoleReplace : string

The replace content to be used in conjunction with zPosRolePattern . Defaults to an empty string. For more information on how the search and replace using regular expressions works, see the QString::replace (const QRegExp &rx, const QString &after) function documentation.

另请参阅 zPosRole and zPosRolePattern .