QCandlestickModelMapper Class

Abstract model mapper class for candlestick series. 更多...

头文件: #include <QCandlestickModelMapper>
开始支持版本: Qt 5.8
基类: QObject
派生类:

QHCandlestickModelMapper and QVCandlestickModelMapper

属性

  • model : QAbstractItemModel *
  • series : QCandlestickSeries *

公有函数

QCandlestickModelMapper(QObject *parent = nullptr)
QAbstractItemModel *model() const
virtual Qt::Orientation orientation() const = 0
QCandlestickSeries *series() const
void setModel(QAbstractItemModel *model)
void setSeries(QCandlestickSeries *series)
  • 32 个公有函数继承自 QObject

信号

受保护的函数

int close() const
int firstSetSection() const
int high() const
int lastSetSection() const
int low() const
int open() const
void setClose(int close)
void setFirstSetSection(int firstSetSection)
void setHigh(int high)
void setLastSetSection(int lastSetSection)
void setLow(int low)
void setOpen(int open)
void setTimestamp(int timestamp)
int timestamp() const
  • 9 个受保护的函数继承自 QObject

其他继承的成员

  • 1 个公有槽函数继承自 QObject
  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

Abstract model mapper class for candlestick series.

Model mappers allow the use of a QAbstractItemModel-derived model as a data source for a chart series, creating a connection between a QCandlestickSeries and the model object. A model mapper maintains an equal size across all QCandlestickSets.

Note: The model used must support adding and removing rows/columns and modifying the data of the cells.

属性

model : QAbstractItemModel *

Defines the model that is used by the mapper.

访问函数:

QAbstractItemModel *model() const
void setModel(QAbstractItemModel *model)

Notifier signal:

void modelReplaced()

series : QCandlestickSeries *

Defines the QCandlestickSeries object that is used by the mapper.

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

访问函数:

QCandlestickSeries *series() const
void setSeries(QCandlestickSeries *series)

Notifier signal:

成员函数

QCandlestickModelMapper::QCandlestickModelMapper(QObject *parent = nullptr)

Constructs a model mapper object as a child of parent.

[protected] int QCandlestickModelMapper::close() const

Returns the row/column of the model that contains the close values of the sets in the series. Default value is -1 (invalid mapping).

参见 setClose().

[protected] int QCandlestickModelMapper::firstSetSection() const

Returns the section of the model that is used as the data source for the first candlestick set. Default value is -1 (invalid mapping).

参见 setFirstSetSection().

[protected] int QCandlestickModelMapper::high() const

Returns the row/column of the model that contains the high values of the sets in the series. Default value is -1 (invalid mapping).

参见 setHigh().

[protected] int QCandlestickModelMapper::lastSetSection() const

Returns the section of the model that is used as the data source for the last candlestick set. Default value is -1 (invalid mapping).

参见 setLastSetSection().

[protected] int QCandlestickModelMapper::low() const

Returns the row/column of the model that contains the low values of the sets in the series. Default value is -1 (invalid mapping).

参见 setLow().

[signal] void QCandlestickModelMapper::modelReplaced()

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

Note: Notifier signal for property model.

参见 model.

[protected] int QCandlestickModelMapper::open() const

Returns the row/column of the model that contains the open values of the sets in the series. Default value is -1 (invalid mapping).

参见 setOpen().

[pure virtual] Qt::Orientation QCandlestickModelMapper::orientation() const

Returns the orientation that is used when QCandlestickModelMapper accesses the model. This determines whether the consecutive values of the set are read from rows (Qt::Horizontal) or from columns (Qt::Vertical).

[signal] void QCandlestickModelMapper::seriesReplaced()

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

Note: Notifier signal for property series.

参见 series.

[protected] void QCandlestickModelMapper::setClose(int close)

Sets the row/column of the model that contains the close values of the sets in the series. Default value is -1 (invalid mapping).

参见 close().

[protected] void QCandlestickModelMapper::setFirstSetSection(int firstSetSection)

Sets the section of the model that is used as the data source for the first candlestick set. Parameter firstSetSection specifies the section of the model. Default value is -1.

参见 firstSetSection().

[protected] void QCandlestickModelMapper::setHigh(int high)

Sets the row/column of the model that contains the high values of the sets in the series. Default value is -1 (invalid mapping).

参见 high().

[protected] void QCandlestickModelMapper::setLastSetSection(int lastSetSection)

Sets the section of the model that is used as the data source for the last candlestick set. Parameter lastSetSection specifies the section of the model. Default value is -1.

参见 lastSetSection().

[protected] void QCandlestickModelMapper::setLow(int low)

Sets the row/column of the model that contains the low values of the sets in the series. Default value is -1 (invalid mapping).

参见 low().

[protected] void QCandlestickModelMapper::setOpen(int open)

Sets the row/column of the model that contains the open values of the sets in the series. Default value is -1 (invalid mapping).

参见 open().

[protected] void QCandlestickModelMapper::setTimestamp(int timestamp)

Sets the row/column of the model that contains the timestamp values of the sets in the series. Default value is -1 (invalid mapping).

参见 timestamp().

[protected] int QCandlestickModelMapper::timestamp() const

Returns the row/column of the model that contains the timestamp values of the sets in the series. Default value is -1 (invalid mapping).

参见 setTimestamp().