QHBoxPlotModelMapper Class | Qt Charts 5.9

Qt 5.9 | Qt Charts | C++ Classes | QHBoxPlotModelMapper

Qt 5.9.2 Reference Documentation

# QHBoxPlotModelMapper Class

The QHBoxPlotModelMapper class is a horizontal model mapper for box plot series. More...

Header: | #include <QHBoxPlotModelMapper>
Instantiated By: | HBoxPlotModelMapper
Inherits: | QObject

- List of all members, including inherited members

## Properties

- columnCount : int
- firstBoxSetRow : int
- firstColumn : int

- lastBoxSetRow : int
- model : QAbstractItemModel *
- series : QBoxPlotSeries *

- 1 property inherited from QObject

## Public Functions

| QHBoxPlotModelMapper(QObject *parent = nullptr)
int | columnCount() const
int | firstBoxSetRow() const
int | firstColumn() const
int | lastBoxSetRow() const
QAbstractItemModel * | model() const
QBoxPlotSeries * | series() const
void | setColumnCount(int rowCount)
void | setFirstBoxSetRow(int firstBoxSetRow)
void | setFirstColumn(int firstColumn)
void | setLastBoxSetRow(int lastBoxSetRow)
void | setModel(QAbstractItemModel *model)
void | setSeries(QBoxPlotSeries *series)

- 32 public functions inherited from QObject

## Signals

void | columnCountChanged()
void | firstBoxSetRowChanged()
void | firstColumnChanged()
void | lastBoxSetRowChanged()
void | modelReplaced()
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
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

The QHBoxPlotModelMapper class is a horizontal model mapper for box plot series.

Model mappers enable using a data model derived from the QAbstractItemModel class as a data source for a chart. A horizontal model mapper is used to create a connection between a data model and QBoxPlotSeries object, so that each row in the data model defines a box-and-whiskers item and each column 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 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 QVBoxPlotModelMapper.

## Property Documentation

### columnCount : int

This property holds the number of columns 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 | columnCount() const
void | setColumnCount(int rowCount)

Notifier signal:

void | columnCountChanged()

### firstBoxSetRow : int

This property holds the row 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 | firstBoxSetRow() const
void | setFirstBoxSetRow(int firstBoxSetRow)

Notifier signal:

void | firstBoxSetRowChanged()

### firstColumn : int

This property holds the column 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 | firstColumn() const
void | setFirstColumn(int firstColumn)

Notifier signal:

void | firstColumnChanged()

### lastBoxSetRow : int

This property holds the row 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 | lastBoxSetRow() const
void | setLastBoxSetRow(int lastBoxSetRow)

Notifier signal:

void | lastBoxSetRowChanged()

### 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()

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

### QHBoxPlotModelMapper::QHBoxPlotModelMapper(QObject *parent = nullptr)

Constructs a mapper object that is a child of parent.

### `[signal]` void QHBoxPlotModelMapper::columnCountChanged()

This signal is emitted when the number of columns changes.

Note: Notifier signal for property columnCount.

### `[signal]` void QHBoxPlotModelMapper::firstBoxSetRowChanged()

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

Note: Notifier signal for property firstBoxSetRow.

### `[signal]` void QHBoxPlotModelMapper::firstColumnChanged()

This signal is emitted when the first column changes.

Note: Notifier signal for property firstColumn.

### `[signal]` void QHBoxPlotModelMapper::lastBoxSetRowChanged()

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

Note: Notifier signal for property lastBoxSetRow.

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

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

Note: Notifier signal for property model.

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

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

Note: Notifier signal for property series.