QCandlestickModelMapper Class
用于K线序列的抽象模型映射器类。更多...
| Header: | #include <QCandlestickModelMapper> |
| Inherits: | QObject |
| Inherited By: | |
| Status: | Deprecated |
该类已弃用。我们强烈建议不要在新代码中使用它。
属性
公共函数
| QCandlestickModelMapper(QObject *parent = nullptr) | |
| QAbstractItemModel * | model() const |
| virtual Qt::Orientation | orientation() const = 0 |
| QCandlestickSeries * | series() const |
| void | setModel(QAbstractItemModel *model) |
| void | setSeries(QCandlestickSeries *series) |
信号
| void | modelReplaced() |
| void | seriesReplaced() |
受保护函数
| 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 |
详细说明
模型映射器允许将QAbstractItemModel 派生的模型用作图表系列的数据源,从而在QCandlestickSeries 与模型对象之间建立连接。模型映射器会确保所有QCandlestickSets 的行数保持一致。
注意: 所使用的模型 必须支持添加和删除行/列,以及修改单元格中的数据。
属性文档
model : QAbstractItemModel*
定义映射器所使用的模型。
访问函数:
| QAbstractItemModel * | model() const |
| void | setModel(QAbstractItemModel *model) |
通知器信号:
| void | modelReplaced() |
series : QCandlestickSeries*
定义映射器所使用的 QCandlestickSeries 对象。
注意: 将该系列设置到映射器时,其中的所有 数据都会被丢弃。当指定新系列时,旧系列将被断开连接(其数据将被保留)。
访问函数:
| QCandlestickSeries * | series() const |
| void | setSeries(QCandlestickSeries *series) |
通知器信号:
| void | seriesReplaced() |
成员函数文档
[explicit] QCandlestickModelMapper::QCandlestickModelMapper(QObject *parent = nullptr)
创建一个模型映射器对象,并将其作为parent 的子对象。
[protected] int QCandlestickModelMapper::close() const
返回模型中包含该序列中各集合收盘价的行/列。默认值为 -1(映射无效)。
另请参阅 setClose()。
[protected] int QCandlestickModelMapper::firstSetSection() const
返回用作第一个K线集数据源的模型部分。默认值为-1(映射无效)。
另请参阅 setFirstSetSection()。
[protected] int QCandlestickModelMapper::high() const
返回模型中包含该序列各集合最高值的行/列。默认值为 -1(映射无效)。
另请参阅 setHigh()。
[protected] int QCandlestickModelMapper::lastSetSection() const
返回用作最后一个K线集数据源的模型部分。默认值为-1(映射无效)。
另请参阅 setLastSetSection()。
[protected] int QCandlestickModelMapper::low() const
返回模型中包含该序列各集合最低值的行/列。默认值为 -1(映射无效)。
另请参阅 setLow()。
[signal] void QCandlestickModelMapper::modelReplaced()
当映射器所连接的模型发生变化时触发该信号。
注意: 这是属性 `model`的通知器 信号。
另请参阅 model 。
[protected] int QCandlestickModelMapper::open() const
返回模型中包含该序列中各集合开盘价的行/列。默认值为 -1(映射无效)。
另请参阅 setOpen()。
[pure virtual] Qt::Orientation QCandlestickModelMapper::orientation() const
返回QCandlestickModelMapper 访问模型时使用的方向。这决定了集合中连续的值是从行(Qt::Horizontal )还是从列(Qt::Vertical )读取的。
[signal] void QCandlestickModelMapper::seriesReplaced()
当映射器所连接的系列发生变化时触发。
注意: 这是属性series的通知 信号。
另请参阅 series 。
[protected] void QCandlestickModelMapper::setClose(int close)
设置模型中包含该序列中各集合的close 值的行/列。默认值为-1(映射无效)。
另请参阅 close()。
[protected] void QCandlestickModelMapper::setFirstSetSection(int firstSetSection)
设置模型中用作第一个K线集数据源的部分。参数firstSetSection 指定模型中的该部分。默认值为-1。
另请参阅 firstSetSection()。
[protected] void QCandlestickModelMapper::setHigh(int high)
设置模型中包含该序列中各集合的high 值的行/列。默认值为-1(映射无效)。
另请参阅 high()。
[protected] void QCandlestickModelMapper::setLastSetSection(int lastSetSection)
设置模型中用作最后一个K线集数据源的部分。参数lastSetSection 指定模型中的该部分。默认值为-1。
另请参阅 lastSetSection()。
[protected] void QCandlestickModelMapper::setLow(int low)
设置模型中包含该序列中各集合的low 值的行/列。默认值为-1(映射无效)。
另请参阅 low()。
[protected] void QCandlestickModelMapper::setOpen(int open)
设置模型中包含该序列中各集合的open 值的行/列。默认值为-1(映射无效)。
另请参阅 open()。
[protected] void QCandlestickModelMapper::setTimestamp(int timestamp)
设置模型中包含该序列中各集合的timestamp 值的行/列。默认值为-1(映射无效)。
另请参阅 timestamp()。
[protected] int QCandlestickModelMapper::timestamp() const
返回模型中包含该时间序列各数据集的时间戳值的行/列。默认值为 -1(映射无效)。
另请参阅 setTimestamp()。
© 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.