QCandlestickModelMapper Class
烛台系列的抽象模型映射器类。更多
Header: | #include <QCandlestickModelMapper> |
Inherits: | QObject |
Inherited By: |
属性
公共功能
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) |
Notifier 信号:
void | seriesReplaced() |
成员函数文档
[explicit]
QCandlestickModelMapper::QCandlestickModelMapper(QObject *parent = nullptr)
构造一个模型映射器对象,作为parent 的子对象。
[protected]
int QCandlestickModelMapper::close() const
返回模型中包含系列中集合的闭合值的行/列。默认值为-1(无效映射)。
另请参阅 setClose()。
[protected]
int QCandlestickModelMapper::firstSetSection() const
返回用作第一组蜡烛图数据源的模型部分。默认值为-1(映射无效)。
另请参阅 setFirstSetSection().
[protected]
int QCandlestickModelMapper::high() const
返回模型中包含系列中集合高值的行/列。默认值为-1(映射无效)。
另请参阅 setHigh()。
[protected]
int QCandlestickModelMapper::lastSetSection() const
返回用作最后一组蜡烛图数据源的模型部分。默认值为-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)
设置用作第一组蜡烛图数据源的模型部分。参数firstSetSection 指定模型的部分。默认值为-1。
另请参阅 firstSetSection() 。
[protected]
void QCandlestickModelMapper::setHigh(int high)
设置模型中包含high 系列中集合值的行/列。默认值为-1(无效映射)。
另请参阅 high() 。
[protected]
void QCandlestickModelMapper::setLastSetSection(int lastSetSection)
设置用作最后一组蜡烛图数据源的模型部分。参数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()。
© 2025 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.