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 .