The QPieModelMapper is a model mapper for pie series. 更多...
| 頭: |
#include <QPieModelMapper>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Graphs)
target_link_libraries(mytarget PRIVATE Qt6::Graphs)
|
| qmake: |
QT += graphs
|
| 在 QML: | PieModelMapper |
| 繼承: | QObject |
|
|
| qsizetype | count () const |
| qsizetype | first () const |
| qsizetype | labelsSection () const |
| QAbstractItemModel * | model () const |
| Qt::Orientation | orientation () const |
| QPieSeries * | series () const |
| void | setCount (qsizetype count ) |
| void | setFirst (qsizetype first ) |
| void | setLabelsSection (qsizetype labelsSection ) |
| void | setModel (QAbstractItemModel * model ) |
| void | setOrientation (Qt::Orientation orientation ) |
| void | setSeries (QPieSeries * series ) |
| void | setValuesSection (qsizetype valuesSection ) |
| qsizetype | valuesSection () const |
| void | countChanged () |
| void | firstChanged () |
| void | labelsSectionChanged () |
| void | modelChanged () |
| void | orientationChanged () |
| void | seriesChanged () |
| void | valuesSectionChanged () |
模型映射器允許使用的數據模型派生自 QAbstractItemModel class as a data source for a graph. A model mapper is used to create a connection between a data model and QPieSeries .
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 or 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).
訪問函數:
| qsizetype | count () const |
| void | setCount (qsizetype count ) |
通知程序信號:
| void | countChanged () |
另請參閱 QPieModelMapper::orientation .
This property holds the column or row of the model that contains the first slice value.
最小且默認值為 0。
訪問函數:
| qsizetype | 第一 () const |
| void | setFirst (qsizetype first ) |
通知程序信號:
| void | firstChanged () |
另請參閱 QPieModelMapper::orientation .
This property holds the column or row of the model that is kept in sync with the labels of the pie's slices.
默認值為 -1 (無效映射)。
訪問函數:
| qsizetype | labelsSection () const |
| void | setLabelsSection (qsizetype labelsSection ) |
通知程序信號:
| void | labelsSectionChanged () |
另請參閱 QPieModelMapper::orientation .
此特性保持映射器使用的模型。
訪問函數:
| QAbstractItemModel * | model () const |
| void | setModel (QAbstractItemModel * model ) |
通知程序信號:
| void | modelChanged () |
Tells the modelmapper how to map data from a model. If
Qt::Vertical
is used, each of the model's rows defines a pie slice, and the model's columns define the label or the value of the pie slice. When the orientation is set to
Qt::Horizontal
, each of the model's columns defines a pie slice, and the model's rows define the label or the value of the pie slice.
默認值為
Qt::Vertical
訪問函數:
| Qt::Orientation | orientation () const |
| void | setOrientation (Qt::Orientation orientation ) |
通知程序信號:
| void | orientationChanged () |
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 | seriesChanged () |
This property holds the column or row of the model that is kept in sync with the values of the pie's slices.
默認值為 -1 (無效映射)。
訪問函數:
| qsizetype | valuesSection () const |
| void | setValuesSection (qsizetype valuesSection ) |
通知程序信號:
| void | valuesSectionChanged () |
另請參閱 QPieModelMapper::orientation .