Qt 5.7 | Qt Charts | QML Types | HXYModelMapper QML Type

Qt 5.7.1 Reference Documentation

# HXYModelMapper QML Type

Horizontal model mapper for QXYSeries More...

Import Statement: | import QtCharts 2.1
Instantiates: | QHXYModelMapper

- List of all members, including inherited members

## Properties

- columnCount : int
- firstColumn : int
- model : SomeModel
- series : XYSeries
- xRow : int
- yRow : int

## Detailed Description

HXYModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source for XYSeries based series. It is possible to use both QAbstractItemModel and XYSeries data API to manipulate data. HXYModelMapper keeps the series and the model in sync.

## Property Documentation

columnCount : int

Defines the number of columns of the model that are mapped as the data for series. The default value is -1 (count limited by the number of columns in the model)

firstColumn : int

Defines which column of the model contains the data for the first point of the series. The default value is 0.

model : SomeModel

The QAbstractItemModel based model that is used by the mapper. You need to implement the model and expose it to QML. Note: the model has to support adding/removing rows/columns and modifying the data of the cells.

series : XYSeries

Defines the XYSeries object that is used by the mapper. All the data in the series is discarded when it is set to the mapper. When new series is specified the old series is disconnected (it preserves its data).

xRow : int

Defines which row of the model is kept in sync with the x values of the series. Default value is -1 (invalid mapping).

yRow : int

Defines which row of the model is kept in sync with the y values of the series. Default value is -1 (invalid mapping).