ItemModelScatterDataProxy QML Type

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

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

ScatterDataProxy

Properties

Signals

Detailed Description

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

The data is resolved asynchronously whenever the mapping or the model changes. QScatterDataProxy::arrayReset() is emitted when the data has been resolved.

For more details, see QItemModelScatterDataProxy documentation.

Usage example:

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

See also ScatterDataProxy and Qt Graphs Data Handling with 3D.

Property Documentation

itemModel : model

The item model to use as a data source for Scatter3D.


rotationRole : string

The item model role to map into item rotation. The model may supply the value for rotation as either variant that is directly convertible to quaternion, or as one of the string representations: "scalar,x,y,z" or "@angle,x,y,z". The first format will construct the quaternion directly with given values, and the second one will construct the quaternion using QQuaternion::fromAxisAndAngle() method.


rotationRolePattern : regExp

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

See also rotationRole and rotationRoleReplace.


rotationRoleReplace : string

This property defines the replacement content to be used in conjunction with rotationRolePattern. 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 rotationRole and rotationRolePattern.


type : AbstractDataProxy.DataType [read-only]

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


xPosRole : string

The item model role to map into the X position.


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 xPosRoleReplace property contains the replacement string.

See also xPosRole and xPosRoleReplace.


xPosRoleReplace : string

This property defines 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 into 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 yPosRoleReplace property contains the replacement string.

See also yPosRole and yPosRoleReplace.


yPosRoleReplace : string

This property defines 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 into the Z position.


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 zPosRoleReplace property contains the replacement string.

See also zPosRole and zPosRoleReplace.


zPosRoleReplace : string

This property defines 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

itemModelChanged(model itemModel)

This signal is emitted when itemModel changes to itemModel.

Note: The corresponding handler is onItemModelChanged.


rotationRoleChanged(string role)

This signal is emitted when rotationRole changes to role.

Note: The corresponding handler is onRotationRoleChanged.


rotationRolePatternChanged(regExp pattern)

This signal is emitted when rotationRolePattern changes to pattern.

Note: The corresponding handler is onRotationRolePatternChanged.


rotationRoleReplaceChanged(string replace)

This signal is emitted when rotationRoleReplace changes to replace.

Note: The corresponding handler is onRotationRoleReplaceChanged.


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.