本页内容

QVCandlestickModelMapper Class

QVCandlestickModelMapper 类是一个用于 K 线序列的纵向模型映射器。更多...

Header: #include <QVCandlestickModelMapper>
In QML: VCandlestickModelMapper
Inherits: QCandlestickModelMapper
Status: Deprecated

该类已弃用。我们强烈建议不要在新代码中使用它。

属性

公共函数

QVCandlestickModelMapper(QObject *parent = nullptr)
int closeRow() const
int firstSetColumn() const
int highRow() const
int lastSetColumn() const
int lowRow() const
int openRow() const
void setCloseRow(int closeRow)
void setFirstSetColumn(int firstSetColumn)
void setHighRow(int highRow)
void setLastSetColumn(int lastSetColumn)
void setLowRow(int lowRow)
void setOpenRow(int openRow)
void setTimestampRow(int timestampRow)
int timestampRow() const

重新实现的公共函数

virtual Qt::Orientation orientation() const override

信号

详细说明

模型映射器允许将从QAbstractItemModel 类派生的数据模型用作图表的数据源。 垂直模型映射器用于在数据模型与QCandlestickSeries 之间建立连接,使得数据模型中的每一列都定义一个K线项目,每一行则映射到该K线项目的开盘价、最高价、最低价、收盘价和时间戳值。

既可以使用模型属性,也可以使用K线系列属性来操作数据。模型映射器会保持K线系列与数据模型之间的同步。

模型映射器确保烛线序列中的所有烛线项大小一致。因此,对某个烛线项添加或删除一个值,会导致烛线序列中所有烛线项发生相同的变更。

另请参阅 QCandlestickSeries 、QCandlestickSet 以及QHCandlestickModelMapper 。

属性文档

closeRow : int

该属性存储模型中包含该系列中K线项目收盘价的行。

默认值为 -1(映射无效)。

访问函数:

int closeRow() const
void setCloseRow(int closeRow)

通知器信号:

firstSetColumn : int

该属性存储了用作第一个项目数据源的模型中的列。

默认值为 -1(映射无效)。

访问函数:

int firstSetColumn() const
void setFirstSetColumn(int firstSetColumn)

通知器信号:

highRow : int

该属性存储模型中包含该系列 K 线项目最高值的行。

默认值为 -1(映射无效)。

访问函数:

int highRow() const
void setHighRow(int highRow)

通知信号:

lastSetColumn : int

该属性保存了用作最后一个项目数据源的模型列。

默认值为 -1(映射无效)。

访问函数:

int lastSetColumn() const
void setLastSetColumn(int lastSetColumn)

通知器信号:

lowRow : int

该属性存储模型中包含该系列 K 线项目最低值的行。

默认值为 -1(映射无效)。

访问函数:

int lowRow() const
void setLowRow(int lowRow)

通知器信号:

void lowRowChanged()

openRow : int

该属性存储模型中包含该系列蜡烛图项目开盘值的行。

默认值为 -1(映射无效)。

访问函数:

int openRow() const
void setOpenRow(int openRow)

通知器信号:

timestampRow : int

该属性存储模型中包含该系列内K线项时间戳值的行。

默认值为 -1(无效映射)。

访问函数:

int timestampRow() const
void setTimestampRow(int timestampRow)

通知器信号:

成员函数文档

[explicit] QVCandlestickModelMapper::QVCandlestickModelMapper(QObject *parent = nullptr)

构建一个垂直模型映射器对象,该对象是parent 的子对象。

[signal] void QVCandlestickModelMapper::closeRowChanged()

当模型中包含“close”值的行发生变化时触发。

注意: 这是属性closeRow的通知器 信号。

另请参阅 closeRow 。

[signal] void QVCandlestickModelMapper::firstSetColumnChanged()

当模型中包含第一个项目数据的列发生变化时触发。

注意: 这是属性firstSetColumn的通知器 信号。

另请参阅 firstSetColumn 。

[signal] void QVCandlestickModelMapper::highRowChanged()

当模型中包含高值的行发生变化时触发此事件。

注意: 这是属性highRow的通知器 信号。

另请参阅 highRow 。

[signal] void QVCandlestickModelMapper::lastSetColumnChanged()

当模型中包含最后一个项目数据的列发生变化时触发。

注意: 这是属性lastSetColumn的通知器 信号。

另请参阅 lastSetColumn 。

[signal] void QVCandlestickModelMapper::lowRowChanged()

当模型中包含低值的行发生变化时触发此事件。

注意: 这是属性lowRow的通知器 信号。

另请参阅 lowRow 。

[signal] void QVCandlestickModelMapper::openRowChanged()

当模型中包含未关闭值的行发生变化时触发。

注意: 这是属性openRow的通知器 信号。

另请参阅 openRow 。

[override virtual] Qt::Orientation QVCandlestickModelMapper::orientation() const

重写了:QCandlestickModelMapper::orientation() const。

返回Qt::Vertical 。这意味着该项的值是从列中读取的。

[signal] void QVCandlestickModelMapper::timestampRowChanged()

当模型中包含时间戳值的行发生变化时触发。

注意: 这是属性timestampRow 的Notifier 信号。

另请参阅 timestampRow 。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.