ItemModelSurfaceDataProxy QML Type

Proxy class for presenting data in item models with Surface3D. More...

Import Statement: import QtDataVisualization 1.14
Since: QtDataVisualization 1.0
Instantiates: QItemModelSurfaceDataProxy
Inherits:

SurfaceDataProxy

Properties

Detailed Description

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.

For more details, see QItemModelSurfaceDataProxy documentation.

Usage example:

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"
}

See also SurfaceDataProxy and Qt Data Visualization Data Handling.

Property Documentation

autoColumnCategories : bool

When set to 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. Defaults to true.


autoRowCategories : bool

When set to 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. Defaults to true.


columnCategories : list<String>

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.

See also 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.

See also 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<String>

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.

See also 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.

See also rowRole and rowRolePattern.


useModelCategories : bool

When set to 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 items.


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.

See also 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.

See also 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.

See also 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.

See also 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 items.


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.

See also 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.

See also zPosRole and zPosRolePattern.


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