QVPieModelMapper 是用于饼图系列的垂直模型映射器。 更多...
头: | #include <QVPieModelMapper> |
实例化: | VPieModelMapper |
继承: | QPieModelMapper |
|
|
QVPieModelMapper (QObject * parent = 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 () |
模型映射器允许使用的数据模型派生自 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.
This property holds the row of the model that contains the first slice value.
最小且默认值为 0。
访问函数:
int | firstRow () const |
void | setFirstRow (int firstRow ) |
通知程序信号:
void | firstRowChanged () |
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 () |
此特性保持映射器使用的模型。
访问函数:
QAbstractItemModel * | model () const |
void | setModel (QAbstractItemModel * model ) |
通知程序信号:
void | modelReplaced () |
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 () |
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 () |
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 () |
构造映射器对象为子级化 parent .
[signal]
void
QVPieModelMapper::
firstRowChanged
()
This signal is emitted when the first row changes.
注意: 通知程序信号对于特性 firstRow .
[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 .
[signal]
void
QVPieModelMapper::
valuesColumnChanged
()
This signal is emitted when the values column changes.
注意: 通知程序信号对于特性 valuesColumn .
Returns the column of the model that is kept in sync with the labels of the pie's slices.
注意: getter 函数对于特性 labelsColumn。
另请参阅 setLabelsColumn ().
Sets the model column that is kept in sync with the pies slices' labels to labelsColumn .
注意: setter 函数对于特性 labelsColumn .
另请参阅 labelsColumn ().
Sets the model column that is kept in sync with the pie slices' values to valuesColumn .
注意: setter 函数对于特性 valuesColumn .
另请参阅 valuesColumn ().
Returns the column of the model that is kept in sync with the values of the pie's slices.
注意: getter 函数对于特性 valuesColumn。
另请参阅 setValuesColumn ().