QVBoxPlotModelMapper Class

QVBoxPlotModelMapper 是用于方框图系列的垂直模型映射器。更多

Header: #include <QVBoxPlotModelMapper>
In QML: VBoxPlotModelMapper
Inherits: QObject

属性

公共功能

QVBoxPlotModelMapper(QObject *parent = nullptr)
int firstBoxSetColumn() const
int firstRow() const
int lastBoxSetColumn() const
QAbstractItemModel *model() const
int rowCount() const
QBoxPlotSeries *series() const
void setFirstBoxSetColumn(int firstBoxSetColumn)
void setFirstRow(int firstRow)
void setLastBoxSetColumn(int lastBoxSetColumn)
void setModel(QAbstractItemModel *model)
void setRowCount(int rowCount)
void setSeries(QBoxPlotSeries *series)

信号

详细说明

模型映射器可将源自QAbstractItemModel 类的数据模型用作图表的数据源。垂直模型映射器用于在数据模型和QBoxPlotSeries 对象之间创建连接,这样,数据模型中的每一列都定义了一个框-须项,而每一行都映射到框-须项的范围和三个中值。

模型和序列属性都可用于操作数据。模型映射器使系列和数据模型保持同步。

模型映射器可确保方框图系列中的所有条形框-须项大小相等。因此,添加或删除方框-须项中的值会导致方框图系列中的所有方框-须项发生相同的变化。

另请参阅 QHBoxPlotModelMapper

属性文档

firstBoxSetColumn : int

此属性用于保存模型中用作第一个框须项数据源的列。

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

访问功能:

int firstBoxSetColumn() const
void setFirstBoxSetColumn(int firstBoxSetColumn)

通知信号:

firstRow : int

该属性用于保存模型中包含盒状图序列中盒须项第一个值的行。

最小默认值为 0。

访问功能:

int firstRow() const
void setFirstRow(int firstRow)

通知信号:

lastBoxSetColumn : int

该属性用于保存模型中作为最后一个框须项数据源的列。

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

访问功能:

int lastBoxSetColumn() const
void setLastBoxSetColumn(int lastBoxSetColumn)

通知信号:

model : QAbstractItemModel*

该属性包含映射器使用的模型。

访问功能:

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

Notifier 信号:

void modelReplaced()

rowCount : int

此属性用于保存被映射为方框图系列数据的模型行数。

最小值和默认值均为-1(行数与模型中的列数相同)。

访问功能:

int rowCount() const
void setRowCount(int rowCount)

Notifier 信号:

series : QBoxPlotSeries*

该属性包含映射器使用的盒状图系列。

该系列中的所有数据在设置给绘图器时都会被丢弃。指定新系列时,旧系列将被断开(但保留其数据)。

访问功能:

QBoxPlotSeries *series() const
void setSeries(QBoxPlotSeries *series)

Notifier 信号:

成员函数文档

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

构造一个parent 的子映射器对象。

[signal] void QVBoxPlotModelMapper::firstBoxSetColumnChanged()

该信号在第一个框须项目列发生变化时发出。

注: 属性firstBoxSetColumn 的通知信号。

[signal] void QVBoxPlotModelMapper::firstRowChanged()

该信号在第一行发生变化时发出。

注: 属性firstRow 的通知信号。

[signal] void QVBoxPlotModelMapper::lastBoxSetColumnChanged()

该信号在最后一列方括号项目发生变化时发出。

注: 属性lastBoxSetColumn 的通知信号。

[signal] void QVBoxPlotModelMapper::modelReplaced()

当映射器所连接的模型发生变化时会发出该信号。

注: 用于属性model 的 Notifier 信号。

[signal] void QVBoxPlotModelMapper::rowCountChanged()

行数发生变化时会发出该信号。

注: 属性rowCount 的通知信号。

[signal] void QVBoxPlotModelMapper::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.