QVBarModelMapper Class | Qt Charts 5.7

Qt 5.7 | Qt Charts | C++ Classes | QVBarModelMapper

Qt 5.7.0 Reference Documentation

# QVBarModelMapper Class

Vertical model mapper for bar series. More...

Header: | #include <QVBarModelMapper>
Instantiated By: | VBarModelMapper
Inherits: | QBarModelMapper

- List of all members, including inherited members

## Properties

- firstBarSetColumn : int
- firstRow : int
- lastBarSetColumn : int

- model : QAbstractItemModel *
- rowCount : int
- series : QAbstractBarSeries *

- 1 property inherited from QObject

## Public Functions

| QVBarModelMapper(QObject *parent = Q_NULLPTR)
int | firstBarSetColumn() const
int | firstRow() const
int | lastBarSetColumn() const
QAbstractItemModel * | model() const
int | rowCount() const
QAbstractBarSeries * | series() const
void | setFirstBarSetColumn(int firstBarSetColumn)
void | setFirstRow(int firstRow)
void | setLastBarSetColumn(int lastBarSetColumn)
void | setModel(QAbstractItemModel *model)
void | setRowCount(int rowCount)
void | setSeries(QAbstractBarSeries *series)

- 31 public functions inherited from QObject

## Signals

void | firstBarSetColumnChanged()
void | firstRowChanged()
void | lastBarSetColumnChanged()
void | modelReplaced()
void | rowCountChanged()
void | seriesReplaced()

- 2 signals inherited from QObject

### Additional Inherited Members

- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 14 protected functions inherited from QBarModelMapper
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

Vertical model mapper for bar series.

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 QAbstractBarSeries and QAbstractItemModel derived model object. Model mapper maintains equal size of all the BarSets. Adding/removing value from the BarSet causes the the same change in the rest of the BarSets added to the same series.

Note: Used model has to support adding/removing rows/columns and modifying the data of the cells.

## Property Documentation

### firstBarSetColumn : int

This property defines which column of the model is used as the data source for the first bar set.

Default value is: -1 (invalid mapping)

Access functions:

int | firstBarSetColumn() const
void | setFirstBarSetColumn(int firstBarSetColumn)

Notifier signal:

void | firstBarSetColumnChanged()

### firstRow : int

This property defines which row of the model contains the first values of the QBarSets in the series.

Minimal and default value is: 0

Access functions:

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

Notifier signal:

void | firstRowChanged()

### lastBarSetColumn : int

This property defines which column of the model is used as the data source for the last bar set.

Default value is: -1 (invalid mapping)

Access functions:

int | lastBarSetColumn() const
void | setLastBarSetColumn(int lastBarSetColumn)

Notifier signal:

void | lastBarSetColumnChanged()

### 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 QAbstractBarSeries.

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 : QAbstractBarSeries *

This property defines the QBarSeries 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:

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

Notifier signal:

void | seriesReplaced()

## Member Function Documentation

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

Constructs a mapper object which is a child of parent.

### `[signal]` void QVBarModelMapper::firstBarSetColumnChanged()

Emitted when the firstBarSetColumn has changed.

Note: Notifier signal for property firstBarSetColumn.

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

Emitted when the firstRow has changed.

Note: Notifier signal for property firstRow.

### `[signal]` void QVBarModelMapper::lastBarSetColumnChanged()

Emitted when the lastBarSetColumn has changed.

Note: Notifier signal for property lastBarSetColumn.

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

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

Note: Notifier signal for property model.

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

Emitted when the rowCount has changed.

Note: Notifier signal for property rowCount.

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

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

Note: Notifier signal for property series.