QVPieModelMapper 类

The QVPieModelMapper is a vertical model mapper for pie series. 更多...

头: #include <QVPieModelMapper>
实例化: VPieModelMapper
继承: QPieModelMapper

特性

公共函数

QVPieModelMapper (QObject * parent = Q_NULLPTR)
int firstRow () const
int labelsColumn () const
QAbstractItemModel * model () const
int rowCount () const
QPieSeries * series () const
void setFirstRow (int firstRow )
void setLabelsColumn (int labelsColumn )
void setModel (QAbstractItemModel * model )
void setRowCount (int rowCount )
void setSeries (QPieSeries * series )
void setValuesColumn (int valuesColumn )
int valuesColumn () const

信号

void firstRowChanged ()
void labelsColumnChanged ()
void modelReplaced ()
void rowCountChanged ()
void seriesReplaced ()
void valuesColumnChanged ()

额外继承成员

详细描述

The QVPieModelMapper is a vertical model mapper for pie series.

模型映射器允许使用的数据模型派生自 QAbstractItemModel class as a data source for a chart. A vertical model mapper is used to create a connection between a data model and QPieSeries , so that each row in the data model defines a pie slice and each column maps to the label or the value of the pie slice.

Both model and pie series properties can be used to manipulate the data. The model mapper keeps the pie series and the data model in sync.

特性文档编制

firstRow : int

This property holds the row of the model that contains the first slice value.

最小且默认值为 0。

访问函数:

int firstRow () const
void setFirstRow (int firstRow )

通知程序信号:

void firstRowChanged ()

labelsColumn : int

This property holds the column of the model that is kept in sync with the labels of the pie's slices.

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

访问函数:

int labelsColumn () const
void setLabelsColumn (int labelsColumn )

通知程序信号:

void labelsColumnChanged ()

model : QAbstractItemModel *

此特性保持映射器使用的模型。

访问函数:

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

通知程序信号:

void modelReplaced ()

rowCount : int

This property holds the number of rows of the model that are mapped as the data for a pie series.

The minimum and default value is -1 (number limited by the number of rows in the model).

访问函数:

int rowCount () const
void setRowCount (int rowCount )

通知程序信号:

void rowCountChanged ()

series : QPieSeries *

This property holds the pie series that is used by the mapper.

All the data in the series is discarded when it is set to the mapper. When a new series is specified, the old series is disconnected (but it preserves its data).

访问函数:

QPieSeries * series () const
void setSeries (QPieSeries * series )

通知程序信号:

void seriesReplaced ()

valuesColumn : int

This property holds the column of the model that is kept in sync with the values of the pie's slices.

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

访问函数:

int valuesColumn () const
void setValuesColumn (int valuesColumn )

通知程序信号:

void valuesColumnChanged ()

成员函数文档编制

QVPieModelMapper:: QVPieModelMapper ( QObject * parent = Q_NULLPTR)

构造映射器对象为子级化 parent .

[signal] void QVPieModelMapper:: firstRowChanged ()

This signal is emitted when the first row changes.

注意: 通知程序信号对于特性 firstRow .

int QVPieModelMapper:: labelsColumn () const

Returns the column of the model that is kept in sync with the labels of the pie's slices.

注意: Getter 函数对于特性 labelsColumn .

另请参阅 setLabelsColumn ().

[signal] void QVPieModelMapper:: labelsColumnChanged ()

This signal is emitted when the labels column changes.

注意: 通知程序信号对于特性 labelsColumn .

[signal] void QVPieModelMapper:: modelReplaced ()

This signal is emitted when the model that the mapper is connected to changes.

注意: 通知程序信号对于特性 model .

[signal] void QVPieModelMapper:: rowCountChanged ()

This signal is emitted when the number of rows changes.

注意: 通知程序信号对于特性 rowCount .

[signal] void QVPieModelMapper:: seriesReplaced ()

This signal is emitted when the series that the mapper is connected to changes.

注意: 通知程序信号对于特性 series .

void QVPieModelMapper:: setLabelsColumn ( int labelsColumn )

Sets the model column that is kept in sync with the pies slices' labels to labelsColumn .

注意: Setter 函数对于特性 labelsColumn .

另请参阅 labelsColumn ().

void QVPieModelMapper:: setValuesColumn ( int valuesColumn )

Sets the model column that is kept in sync with the pie slices' values to valuesColumn .

注意: Setter 函数对于特性 valuesColumn .

另请参阅 valuesColumn ().

int QVPieModelMapper:: valuesColumn () const

Returns the column of the model that is kept in sync with the values of the pie's slices.

注意: Getter 函数对于特性 valuesColumn .

另请参阅 setValuesColumn ().

[signal] void QVPieModelMapper:: valuesColumnChanged ()

This signal is emitted when the values column changes.

注意: 通知程序信号对于特性 valuesColumn .