QVPieModelMapper Class
The QVPieModelMapper is a vertical model mapper for pie series. 更多...
头文件: | #include <QVPieModelMapper> |
Instantiated By: | VPieModelMapper |
基类: | QPieModelMapper |
属性
|
|
- 1 个属性继承自 QObject
公有函数
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 |
- 32 个公有函数继承自 QObject
信号
void | firstRowChanged() |
void | labelsColumnChanged() |
void | modelReplaced() |
void | rowCountChanged() |
void | seriesReplaced() |
void | valuesColumnChanged() |
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有槽函数继承自 QObject
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 14 个受保护的函数继承自 QPieModelMapper
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The QVPieModelMapper is a vertical model mapper for pie series.
Model mappers enable using a data model derived from the 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.
The minimum and default value is 0.
访问函数:
int | firstRow() const |
void | setFirstRow(int firstRow) |
Notifier signal:
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.
The default value is -1 (invalid mapping).
访问函数:
int | labelsColumn() const |
void | setLabelsColumn(int labelsColumn) |
Notifier signal:
void | labelsColumnChanged() |
model : QAbstractItemModel *
This property holds the model that is used by the mapper.
访问函数:
QAbstractItemModel * | model() const |
void | setModel(QAbstractItemModel *model) |
Notifier signal:
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) |
Notifier signal:
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) |
Notifier signal:
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.
The default value is -1 (invalid mapping).
访问函数:
int | valuesColumn() const |
void | setValuesColumn(int valuesColumn) |
Notifier signal:
void | valuesColumnChanged() |
成员函数
QVPieModelMapper::QVPieModelMapper(QObject *parent = Q_NULLPTR)
Constructs a mapper object that is a child of parent.
[signal]
void QVPieModelMapper::firstRowChanged()
This signal is emitted when the first row changes.
Note: Notifier signal for property firstRow.
int QVPieModelMapper::labelsColumn() const
Returns the column of the model that is kept in sync with the labels of the pie's slices.
Note: Getter function for property labelsColumn.
参见 setLabelsColumn().
[signal]
void QVPieModelMapper::labelsColumnChanged()
This signal is emitted when the labels column changes.
Note: Notifier signal for property labelsColumn.
[signal]
void QVPieModelMapper::modelReplaced()
This signal is emitted when the model that the mapper is connected to changes.
Note: Notifier signal for property model.
[signal]
void QVPieModelMapper::rowCountChanged()
This signal is emitted when the number of rows changes.
Note: Notifier signal for property rowCount.
[signal]
void QVPieModelMapper::seriesReplaced()
This signal is emitted when the series that the mapper is connected to changes.
Note: Notifier signal for property series.
void QVPieModelMapper::setLabelsColumn(int labelsColumn)
Sets the model column that is kept in sync with the pies slices' labels to labelsColumn.
Note: Setter function for property labelsColumn.
参见 labelsColumn().
void QVPieModelMapper::setValuesColumn(int valuesColumn)
Sets the model column that is kept in sync with the pie slices' values to valuesColumn.
Note: Setter function for property 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.
Note: Getter function for property valuesColumn.
参见 setValuesColumn().
[signal]
void QVPieModelMapper::valuesColumnChanged()
This signal is emitted when the values column changes.
Note: Notifier signal for property valuesColumn.