Qt 5.7 | Qt Charts | C++ Classes | QVXYModelMapper

Qt 5.7.1 Reference Documentation

# QVXYModelMapper Class

Vertical model mapper for QXYSeries. More...

Header: | #include <QVXYModelMapper>
Instantiated By: | VXYModelMapper
Inherits: | QXYModelMapper

- List of all members, including inherited members

## Properties

- firstRow : int
- model : QAbstractItemModel *
- rowCount : int

- series : QXYSeries *
- xColumn : int
- yColumn : int

## Public Functions

| QVXYModelMapper(QObject *parent = Q_NULLPTR)
int | firstRow() const
QAbstractItemModel * | model() const
int | rowCount() const
QXYSeries * | series() const
void | setFirstRow(int firstRow)
void | setModel(QAbstractItemModel *model)
void | setRowCount(int rowCount)
void | setSeries(QXYSeries *series)
void | setXColumn(int xColumn)
void | setYColumn(int yColumn)
int | xColumn() const
int | yColumn() const

## Signals

void | firstRowChanged()
void | modelReplaced()
void | rowCountChanged()
void | seriesReplaced()
void | xColumnChanged()
void | yColumnChanged()

### Additional Inherited Members

- 6 protected functions inherited from QXYModelMapper

## Detailed Description

Vertical model mapper for QXYSeries.

Model mappers allow you to use QAbstractItemModel derived models as a data source for a chart series. Vertical model mapper is used to create a connection between QXYSeries and QAbstractItemModel derived model object. It is possible to use both QAbstractItemModel and QXYSeries model API. QXYModelMapper makes sure that QXYSeries and the model are kept in sync. Note: used model has to support adding/removing rows/columns and modifying the data of the cells.

## Property Documentation

### firstRow : int

This property defines which row of the model contains the data for the first point of the series.

Minimal and default value is: 0

Access functions:

int | firstRow() const
void | setFirstRow(int firstRow)

Notifier signal:

void | firstRowChanged()

### model : QAbstractItemModel *

This property defines the model that is used by the mapper.

Access functions:

QAbstractItemModel * | model() const
void | setModel(QAbstractItemModel *model)

Notifier signal:

void | modelReplaced()

### rowCount : int

This property defines the number of rows of the model that are mapped as the data for series.

Minimal and default value is: -1 (count limited by the number of rows in the model)

Access functions:

int | rowCount() const
void | setRowCount(int rowCount)

Notifier signal:

void | rowCountChanged()

### series : QXYSeries *

This property defines the QXYSeries 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)

Access functions:

QXYSeries * | series() const
void | setSeries(QXYSeries *series)

Notifier signal:

void | seriesReplaced()

### xColumn : int

This property defines which column of the model is kept in sync with the x values of QXYSeries.

Default value is: -1 (invalid mapping)

Access functions:

int | xColumn() const
void | setXColumn(int xColumn)

Notifier signal:

void | xColumnChanged()

### yColumn : int

This property defines which column of the model is kept in sync with the y values of QXYSeries.

Default value is: -1 (invalid mapping)

Access functions:

int | yColumn() const
void | setYColumn(int yColumn)

Notifier signal:

void | yColumnChanged()

## Member Function Documentation

### QVXYModelMapper::QVXYModelMapper(QObject *parent = Q_NULLPTR)

Constructs a mapper object which is a child of parent.

### `[signal]` void QVXYModelMapper::firstRowChanged()

Emitted when the firstRow has changed.

Note: Notifier signal for property firstRow.

### `[signal]` void QVXYModelMapper::modelReplaced()

Emitted when the model to which mapper is connected to has changed.

Note: Notifier signal for property model.

### `[signal]` void QVXYModelMapper::rowCountChanged()

Emitted when the rowCount has changed.

Note: Notifier signal for property rowCount.

### `[signal]` void QVXYModelMapper::seriesReplaced()

Emitted when the series to which mapper is connected to has changed.

Note: Notifier signal for property series.

### `[signal]` void QVXYModelMapper::xColumnChanged()

Emitted when the xColumn has changed.

Note: Notifier signal for property xColumn.

### `[signal]` void QVXYModelMapper::yColumnChanged()

Emitted when the yColumn has changed.

Note: Notifier signal for property yColumn.