ItemModelSurfaceDataProxy QML Type

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

Import Statement: import QtGraphs
In C++: QItemModelSurfaceDataProxy
Inherits:

SurfaceDataProxy

Properties

Signals

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 Graphs Data Handling with 3D.

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 the 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 replacement 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 QRegularExpression &rx, const QString &after) function documentation.

See also columnRole and columnRolePattern.


itemModel : model

The item model used as a data source for Surface3D.


multiMatchBehavior : enumeration

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

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.MultiMatchBehavior.Average.


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 the 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 replacement 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 QRegularExpression &rx, const QString &after) function documentation.

See also rowRole and rowRolePattern.


type : AbstractDataProxy.DataType [read-only]

The type of the proxy. One of the QAbstractDataProxy::DataType values.


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 replacement 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 QRegularExpression &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 replacement 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 QRegularExpression &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 replacement 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 QRegularExpression &rx, const QString &after) function documentation.

See also zPosRole and zPosRolePattern.


Signal Documentation

autoColumnCategoriesChanged(bool enable)

This signal is emitted when autoColumnCategories changes to enable.

Note: The corresponding handler is onAutoColumnCategoriesChanged.


autoRowCategoriesChanged(bool enable)

This signal is emitted when autoRowCategories changes to enable.

Note: The corresponding handler is onAutoRowCategoriesChanged.


columnCategoriesChanged()

This signal is emitted when columnCategories changes.

Note: The corresponding handler is onColumnCategoriesChanged.


columnRoleChanged(string role)

This signal is emitted when columnRole changes to role.

Note: The corresponding handler is onColumnRoleChanged.


columnRolePatternChanged(regExp pattern)

This signal is emitted when columnRolePattern changes to pattern.

Note: The corresponding handler is onColumnRolePatternChanged.


columnRoleReplaceChanged(string replace)

This signal is emitted when columnRoleReplace changes to replace.

Note: The corresponding handler is onColumnRoleReplaceChanged.


itemModelChanged(model itemModel)

This signal is emitted when itemModel changes to itemModel.

Note: The corresponding handler is onItemModelChanged.


multiMatchBehaviorChanged(enumeration behavior)

This signal is emitted when multiMatchBehavior changes to behavior.

Note: The corresponding handler is onMultiMatchBehaviorChanged.


rowCategoriesChanged()

This signal is emitted when rowCategories changes.

Note: The corresponding handler is onRowCategoriesChanged.


rowRoleChanged(string role)

This signal is emitted when rowRole changes to role.

Note: The corresponding handler is onRowRoleChanged.


rowRolePatternChanged(regExp pattern)

This signal is emitted when rowRolePattern changes to pattern.

Note: The corresponding handler is onRowRolePatternChanged.


rowRoleReplaceChanged(string replace)

This signal is emitted when rowRoleReplace changes to replace.

Note: The corresponding handler is onRowRoleReplaceChanged.


useModelCategoriesChanged(bool enable)

This signal is emitted when useModelCategories changes to enable.

Note: The corresponding handler is onUseModelCategoriesChanged.


xPosRoleChanged(string role)

This signal is emitted when xPosRole changes to role.

Note: The corresponding handler is onXPosRoleChanged.


xPosRolePatternChanged(regExp pattern)

This signal is emitted when xPosRolePattern changes to pattern.

Note: The corresponding handler is onXPosRolePatternChanged.


xPosRoleReplaceChanged(string replace)

This signal is emitted when xPosRoleReplace changes to replace.

Note: The corresponding handler is onXPosRoleReplaceChanged.


yPosRoleChanged(string role)

This signal is emitted when yPosRole changes to role.

Note: The corresponding handler is onYPosRoleChanged.


yPosRolePatternChanged(regExp pattern)

This signal is emitted when yPosRolePattern changes to pattern.

Note: The corresponding handler is onYPosRolePatternChanged.


yPosRoleReplaceChanged(string replace)

This signal is emitted when yPosRoleReplace changes to replace.

Note: The corresponding handler is onYPosRoleReplaceChanged.


zPosRoleChanged(string role)

This signal is emitted when zPosRole changes to role.

Note: The corresponding handler is onZPosRoleChanged.


zPosRolePatternChanged(regExp pattern)

This signal is emitted when zPosRolePattern changes to pattern.

Note: The corresponding handler is onZPosRolePatternChanged.


zPosRoleReplaceChanged(string replace)

This signal is emitted when zPosRoleReplace changes to replace.

Note: The corresponding handler is onZPosRoleReplaceChanged.


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