QHBoxPlotModelMapper Class
QHBoxPlotModelMapper 类是盒状图系列的水平模型映射器。更多
Header: | #include <QHBoxPlotModelMapper> |
In QML: | HBoxPlotModelMapper |
Inherits: | QObject |
属性
|
|
公共功能
QHBoxPlotModelMapper(QObject *parent = nullptr) | |
int | columnCount() const |
int | firstBoxSetRow() const |
int | firstColumn() const |
int | lastBoxSetRow() const |
QAbstractItemModel * | model() const |
QBoxPlotSeries * | series() const |
void | setColumnCount(int rowCount) |
void | setFirstBoxSetRow(int firstBoxSetRow) |
void | setFirstColumn(int firstColumn) |
void | setLastBoxSetRow(int lastBoxSetRow) |
void | setModel(QAbstractItemModel *model) |
void | setSeries(QBoxPlotSeries *series) |
信号
void | columnCountChanged() |
void | firstBoxSetRowChanged() |
void | firstColumnChanged() |
void | lastBoxSetRowChanged() |
void | modelReplaced() |
void | seriesReplaced() |
详细说明
模型映射器可将源自QAbstractItemModel 类的数据模型用作图表的数据源。水平模型映射器用于在数据模型和QBoxPlotSeries 对象之间创建连接,这样数据模型中的每一行都定义了一个方框-须项,而每一列都映射到方框-须项的范围和三个中值。
模型和序列属性都可用于操作数据。模型映射器使系列和数据模型保持同步。
模型映射器可确保盒状图系列中的所有盒须项大小相等。因此,添加或删除方框-须项中的值会导致方框图系列中的所有方框-须项发生相同的变化。
另请参阅 QVBoxPlotModelMapper 。
属性文档
columnCount : int
此属性用于保存被映射为方框图系列数据的模型列数。
最小值和默认值均为-1(数量限制为模型中的列数)。
访问功能:
int | columnCount() const |
void | setColumnCount(int rowCount) |
Notifier 信号:
void | columnCountChanged() |
firstBoxSetRow : int
该属性用于保存作为第一个框须项数据源的模型行。
默认值为-1(无效映射)。
访问功能:
int | firstBoxSetRow() const |
void | setFirstBoxSetRow(int firstBoxSetRow) |
通知信号:
void | firstBoxSetRowChanged() |
firstColumn : int
该属性用于保存模型中包含盒状图序列中盒须项首值的列。
最小默认值为 0。
访问功能:
int | firstColumn() const |
void | setFirstColumn(int firstColumn) |
通知信号:
void | firstColumnChanged() |
lastBoxSetRow : int
该属性用于保存模型中作为最后一个框须项数据源的行。
默认值为-1(无效映射)。
访问功能:
int | lastBoxSetRow() const |
void | setLastBoxSetRow(int lastBoxSetRow) |
通知信号:
void | lastBoxSetRowChanged() |
model : QAbstractItemModel*
该属性包含映射器使用的模型。
访问功能:
QAbstractItemModel * | model() const |
void | setModel(QAbstractItemModel *model) |
Notifier 信号:
void | modelReplaced() |
series : QBoxPlotSeries*
该属性包含映射器使用的盒状图系列。
该系列中的所有数据在设置给绘图器时都会被丢弃。指定新系列时,旧系列将被断开(但保留其数据)。
访问功能:
QBoxPlotSeries * | series() const |
void | setSeries(QBoxPlotSeries *series) |
Notifier 信号:
void | seriesReplaced() |
成员函数文档
[explicit]
QHBoxPlotModelMapper::QHBoxPlotModelMapper(QObject *parent = nullptr)
构造一个parent 的子映射器对象。
[signal]
void QHBoxPlotModelMapper::columnCountChanged()
列数发生变化时会发出该信号。
注: 属性columnCount 的通知信号。
[signal]
void QHBoxPlotModelMapper::firstBoxSetRowChanged()
该信号在第一个盒须条目行发生变化时发出。
注: 属性firstBoxSetRow 的通知信号。
[signal]
void QHBoxPlotModelMapper::firstColumnChanged()
该信号在第一列发生变化时发出。
注: 属性firstColumn 的通知信号。
[signal]
void QHBoxPlotModelMapper::lastBoxSetRowChanged()
当最后一列盒须条目行发生变化时发出该信号。
注: 属性lastBoxSetRow 的通知信号。
[signal]
void QHBoxPlotModelMapper::modelReplaced()
当映射器所连接的模型发生变化时会发出该信号。
注: 用于属性model 的 Notifier 信号。
[signal]
void QHBoxPlotModelMapper::seriesReplaced()
当映射器连接的系列发生变化时,会发出该信号。
注: 用于属性series 的通知信号。
© 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.