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.
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 .
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 .
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 ().
[signal]
void
QVPieModelMapper::
valuesColumnChanged
()
This signal is emitted when the values column changes.
注意: 通知程序信號對於特性 valuesColumn .