Qt 5.11 | Qt Charts | C++ Classes | QHCandlestickModelMapper

Qt Charts | Commercial or GPLv3

# QHCandlestickModelMapper Class

The QHCandlestickModelMapper class is a horizontal model mapper for a candlestick series. More...

Header: | #include <QHCandlestickModelMapper>
Since: | Qt 5.8
Instantiated By: | HCandlestickModelMapper
Inherits: | QCandlestickModelMapper

- List of all members, including inherited members

## Properties

- closeColumn : int
- firstSetRow : int
- highColumn : int
- lastSetRow : int

- lowColumn : int
- openColumn : int
- timestampColumn : int

- 2 properties inherited from QCandlestickModelMapper

## Public Functions

| QHCandlestickModelMapper(QObject *parent = nullptr)
int | closeColumn() const
int | firstSetRow() const
int | highColumn() const
int | lastSetRow() const
int | lowColumn() const
int | openColumn() const
void | setCloseColumn(int closeColumn)
void | setFirstSetRow(int firstSetRow)
void | setHighColumn(int highColumn)
void | setLastSetRow(int lastSetRow)
void | setLowColumn(int lowColumn)
void | setOpenColumn(int openColumn)
void | setTimestampColumn(int timestampColumn)
int | timestampColumn() const

## Reimplemented Public Functions

virtual Qt::Orientation | orientation() const

- 5 public functions inherited from QCandlestickModelMapper

## Signals

void | closeColumnChanged()
void | firstSetRowChanged()
void | highColumnChanged()
void | lastSetRowChanged()
void | lowColumnChanged()
void | openColumnChanged()
void | timestampColumnChanged()

- 2 signals inherited from QCandlestickModelMapper

### Additional Inherited Members

- 14 protected functions inherited from QCandlestickModelMapper

## Detailed Description

The QHCandlestickModelMapper class is a horizontal model mapper for a candlestick 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 QCandlestickSeries, so that each row in the data model defines a candlestick item and each column maps to the open, high, low, close, and timestamp values of the candlestick item.

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

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

See also QCandlestickSeries, QCandlestickSet, and QVCandlestickModelMapper.

## Property Documentation

### closeColumn : int

This property holds the column of the model that contains the close values of the candlestick items in the series.

The default value is -1 (invalid mapping).

Access functions:

int | closeColumn() const
void | setCloseColumn(int closeColumn)

Notifier signal:

void | closeColumnChanged()

### firstSetRow : int

This property holds the row of the model that is used as the data source for the first item.

The default value is -1 (invalid mapping).

Access functions:

int | firstSetRow() const
void | setFirstSetRow(int firstSetRow)

Notifier signal:

void | firstSetRowChanged()

### highColumn : int

This property holds the column of the model that contains the high values of the candlestick items in the series.

The default value is -1 (invalid mapping).

Access functions:

int | highColumn() const
void | setHighColumn(int highColumn)

Notifier signal:

void | highColumnChanged()

### lastSetRow : int

This property holds the row of the model that is used as the data source for the last item.

The default value is -1 (invalid mapping).

Access functions:

int | lastSetRow() const
void | setLastSetRow(int lastSetRow)

Notifier signal:

void | lastSetRowChanged()

### lowColumn : int

This property holds the column of the model that contains the low values of the candlestick items in the series.

The default value is -1 (invalid mapping).

Access functions:

int | lowColumn() const
void | setLowColumn(int lowColumn)

Notifier signal:

void | lowColumnChanged()

### openColumn : int

This property holds the column of the model that contains the open values of the candlestick items in the series.

The default value is -1 (invalid mapping).

Access functions:

int | openColumn() const
void | setOpenColumn(int openColumn)

Notifier signal:

void | openColumnChanged()

### timestampColumn : int

This property holds the column of the model that contains the timestamp values of the candlestick items in the series.

The default value is -1 (invalid mapping).

Access functions:

int | timestampColumn() const
void | setTimestampColumn(int timestampColumn)

Notifier signal:

void | timestampColumnChanged()

## Member Function Documentation

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

Constructs a horizontal model mapper object which is a child of parent.

### `[virtual]` Qt::Orientation QHCandlestickModelMapper::orientation() const

Reimplemented from QCandlestickModelMapper::orientation().

Returns Qt::Horizontal. This means that values of the item are read from rows.