- Qt 6.12
- 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>`
In QML: | HCandlestickModelMapper
Inherits: | QCandlestickModelMapper
Status: | Deprecated

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

- List of all members, including inherited members

## Properties

closeColumn : int firstSetRow : int highColumn : int lastSetRow : int | lowColumn : int openColumn : int timestampColumn : int

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

## Signals

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

## Detailed Description

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

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

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

### `[signal]` void QHCandlestickModelMapper::closeColumnChanged()

Emitted when the column of the model that contains close values is changed.

Note: Notifier signal for property closeColumn.

See also closeColumn.

### `[signal]` void QHCandlestickModelMapper::firstSetRowChanged()

Emitted when the row of the model that contains the data of the first item is changed.

Note: Notifier signal for property firstSetRow.

See also firstSetRow.

### `[signal]` void QHCandlestickModelMapper::highColumnChanged()

Emitted when the column of the model that contains high values is changed.

Note: Notifier signal for property highColumn.

See also highColumn.

### `[signal]` void QHCandlestickModelMapper::lastSetRowChanged()

Emitted when the row of the model that contains the data of the last item is changed.

Note: Notifier signal for property lastSetRow.

See also lastSetRow.

### `[signal]` void QHCandlestickModelMapper::lowColumnChanged()

Emitted when the column of the model that contains low values is changed.

Note: Notifier signal for property lowColumn.

See also lowColumn.

### `[signal]` void QHCandlestickModelMapper::openColumnChanged()

Emitted when the column of the model that contains open values is changed.

Note: Notifier signal for property openColumn.

See also openColumn.

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

Reimplements: QCandlestickModelMapper::orientation() const.

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

### `[signal]` void QHCandlestickModelMapper::timestampColumnChanged()

Emitted when the column of the model that contains timestamp values is changed

Note: Notifier signal for property timestampColumn.

See also timestampColumn.