- Qt 6.12
- Qt Charts
- C++ Classes
- QVBoxPlotModelMapper
- Qt Charts | Commercial or GPLv3

# QVBoxPlotModelMapper Class

The QVBoxPlotModelMapper is a vertical model mapper for box plot series. More...

Header: | `#include <QVBoxPlotModelMapper>`
In QML: | VBoxPlotModelMapper
Inherits: | QObject
Status: | Deprecated

This class is deprecated. We strongly advise against using it in new code.

- List of all members, including inherited members

## Properties

firstBoxSetColumn : int firstRow : int lastBoxSetColumn : int | model : QAbstractItemModel* rowCount : int series : QBoxPlotSeries*

## Public Functions

| QVBoxPlotModelMapper(QObject *parent = nullptr)
int | firstBoxSetColumn() const
int | firstRow() const
int | lastBoxSetColumn() const
QAbstractItemModel * | model() const
int | rowCount() const
QBoxPlotSeries * | series() const
void | setFirstBoxSetColumn(int firstBoxSetColumn)
void | setFirstRow(int firstRow)
void | setLastBoxSetColumn(int lastBoxSetColumn)
void | setModel(QAbstractItemModel *model)
void | setRowCount(int rowCount)
void | setSeries(QBoxPlotSeries *series)

## Signals

void | firstBoxSetColumnChanged()
void | firstRowChanged()
void | lastBoxSetColumnChanged()
void | modelReplaced()
void | rowCountChanged()
void | seriesReplaced()

## Detailed Description

Model mappers enable using a data model derived from the QAbstractItemModel class as a data source for a chart. A vertical model mapper is used to create a connection between a data model and a QBoxPlotSeries object, so that each column in the data model defines a box-and-whiskers item and each row maps to the range and three median values of the box-and-whiskers item.

Both model and series properties can be used to manipulate the data. The model mapper keeps the series and the data model in sync.

The model mapper ensures that all the bar box-and-whiskers items in the box plot series have equal sizes. Therefore, adding or removing a value from a box-and-whiskers item causes the same change to be made in all the box-and-whiskers items in the box plot series.

See also QHBoxPlotModelMapper.

## Property Documentation

### firstBoxSetColumn : int

This property holds the column of the model that is used as the data source for the first box-and-whiskers item.

The default value is -1 (invalid mapping).

Access functions:

int | firstBoxSetColumn() const
void | setFirstBoxSetColumn(int firstBoxSetColumn)

Notifier signal:

void | firstBoxSetColumnChanged()

### firstRow : int

This property holds the row of the model that contains the first values of the box-and-whiskers items in the box plot series.

The minimum and default value is 0.

Access functions:

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

Notifier signal:

void | firstRowChanged()

### lastBoxSetColumn : int

This property holds the column of the model that is used as the data source for the last box-and-whiskers item.

The default value is -1 (invalid mapping).

Access functions:

int | lastBoxSetColumn() const
void | setLastBoxSetColumn(int lastBoxSetColumn)

Notifier signal:

void | lastBoxSetColumnChanged()

### model : QAbstractItemModel*

This property holds 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 holds the number of rows of the model that are mapped as the data for the box plot series.

The minimum and default value is -1 (number limited to the number of columns in the model).

Access functions:

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

Notifier signal:

void | rowCountChanged()

### series : QBoxPlotSeries*

This property holds the box plot series that is used by the mapper.

All the data in the series is discarded when it is set to the mapper. When a new series is specified, the old series is disconnected (but it preserves its data).

Access functions:

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

Notifier signal:

void | seriesReplaced()

## Member Function Documentation

### `[explicit]` QVBoxPlotModelMapper::QVBoxPlotModelMapper(QObject *parent = nullptr)

Constructs a mapper object that is a child of parent.

### `[signal]` void QVBoxPlotModelMapper::firstBoxSetColumnChanged()

This signal is emitted when the first box-and-whiskers item column changes.

Note: Notifier signal for property firstBoxSetColumn.

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

This signal is emitted when the first row changes.

Note: Notifier signal for property firstRow.

### `[signal]` void QVBoxPlotModelMapper::lastBoxSetColumnChanged()

This signal is emitted when the last box-and-whiskers item column changes.

Note: Notifier signal for property lastBoxSetColumn.

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

This signal is emitted when the model that the mapper is connected to changes.

Note: Notifier signal for property model.

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

This signal is emitted when the number of rows changes.

Note: Notifier signal for property rowCount.

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

This signal is emitted when the series that the mapper is connected to changes.

Note: Notifier signal for property series.