The QHPieModelMapper is a horizontal model mapper for pie series. 更多...
| 頭: | #include <QHPieModelMapper> |
| 實例化: | HPieModelMapper |
| 繼承: | QPieModelMapper |
|
| QHPieModelMapper (QObject * parent = Q_NULLPTR) | |
| int | columnCount () const |
| int | firstColumn () const |
| int | labelsRow () const |
| QAbstractItemModel * | model () const |
| QPieSeries * | series () const |
| void | setColumnCount (int columnCount ) |
| void | setFirstColumn (int firstColumn ) |
| void | setLabelsRow (int labelsRow ) |
| void | setModel (QAbstractItemModel * model ) |
| void | setSeries (QPieSeries * series ) |
| void | setValuesRow (int valuesRow ) |
| int | valuesRow () const |
| void | columnCountChanged () |
| void | firstColumnChanged () |
| void | labelsRowChanged () |
| void | modelReplaced () |
| void | seriesReplaced () |
| void | valuesRowChanged () |
The QHPieModelMapper is a horizontal model mapper for pie series.
模型映射器允許使用的數據模型派生自 QAbstractItemModel class as a data source for a chart. A horizontal model mapper is used to create a connection between a data model and QPieSeries , so that each column in the data model defines a pie slice and each row 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 number of columns of the model that are mapped as the data for the pie series.
The minimum and default value is -1 (number limited to the number of columns in the model).
訪問函數:
| int | columnCount () const |
| void | setColumnCount (int columnCount ) |
通知程序信號:
| void | columnCountChanged () |
This property holds the column of the model that contains the first slice value.
最小且默認值為 0。
訪問函數:
| int | firstColumn () const |
| void | setFirstColumn (int firstColumn ) |
通知程序信號:
| void | firstColumnChanged () |
This property holds the row of the model that is kept in sync with the labels of the pie's slices.
默認值為 -1 (無效映射)。
訪問函數:
| int | labelsRow () const |
| void | setLabelsRow (int labelsRow ) |
通知程序信號:
| void | labelsRowChanged () |
此特性保持映射器使用的模型。
訪問函數:
| QAbstractItemModel * | model () const |
| void | setModel (QAbstractItemModel * model ) |
通知程序信號:
| void | modelReplaced () |
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 row of the model that is kept in sync with the values of the pie's slices.
默認值為 -1 (無效映射)。
訪問函數:
| int | valuesRow () const |
| void | setValuesRow (int valuesRow ) |
通知程序信號:
| void | valuesRowChanged () |
構造映射器對象為子級化 parent .
[signal]
void
QHPieModelMapper::
columnCountChanged
()
This signal is emitted when the number of columns changes.
注意: 通知程序信號對於特性 columnCount .
[signal]
void
QHPieModelMapper::
firstColumnChanged
()
This signal is emitted when the first column changes.
注意: 通知程序信號對於特性 firstColumn .
Returns the row of the model that is kept in sync with the labels of the pie's slices.
注意: getter 函數對於特性 labelsRow .
另請參閱 setLabelsRow ().
[signal]
void
QHPieModelMapper::
labelsRowChanged
()
This signal is emitted when the labels row changes.
注意: 通知程序信號對於特性 labelsRow .
[signal]
void
QHPieModelMapper::
modelReplaced
()
This signal is emitted when the model that the mapper is connected to changes.
注意: 通知程序信號對於特性 model .
[signal]
void
QHPieModelMapper::
seriesReplaced
()
This signal is emitted when the series that the mapper is connected to changes.
注意: 通知程序信號對於特性 series .
Sets the model row that is kept in sync with the pie slices' labels to labelsRow .
注意: setter 函數對於特性 labelsRow .
另請參閱 labelsRow ().
Sets the model row that is kept in sync with the pie slices' values to valuesRow .
注意: setter 函數對於特性 valuesRow .
另請參閱 valuesRow ().
Returns the row of the model that is kept in sync with the values of the pie's slices.
注意: getter 函數對於特性 valuesRow .
另請參閱 setValuesRow ().
[signal]
void
QHPieModelMapper::
valuesRowChanged
()
This signal is emitted when the values row changes.
注意: 通知程序信號對於特性 valuesRow .