| 1 | // Copyright (C) 2016 The Qt Company Ltd. | 
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only | 
| 3 |  | 
| 4 | #ifndef QPIEMODELMAPPER_H | 
| 5 | #define QPIEMODELMAPPER_H | 
| 6 |  | 
| 7 | #include <QtCharts/QChartGlobal> | 
| 8 | #include <QtCore/QObject> | 
| 9 |  | 
| 10 | Q_MOC_INCLUDE(<QtCharts/qpieseries.h>) | 
| 11 |  | 
| 12 | QT_BEGIN_NAMESPACE | 
| 13 | class QAbstractItemModel; | 
| 14 | QT_END_NAMESPACE | 
| 15 |  | 
| 16 | QT_BEGIN_NAMESPACE | 
| 17 |  | 
| 18 | class QPieModelMapperPrivate; | 
| 19 | class QPieSeries; | 
| 20 |  | 
| 21 | class Q_CHARTS_EXPORT QPieModelMapper : public QObject | 
| 22 | { | 
| 23 |     Q_OBJECT | 
| 24 |  | 
| 25 | protected: | 
| 26 |     explicit QPieModelMapper(QObject *parent = nullptr); | 
| 27 |  | 
| 28 |     QAbstractItemModel *model() const; | 
| 29 |     void setModel(QAbstractItemModel *model); | 
| 30 |  | 
| 31 |     QPieSeries *series() const; | 
| 32 |     void setSeries(QPieSeries *series); | 
| 33 |  | 
| 34 |     int first() const; | 
| 35 |     void setFirst(int first); | 
| 36 |  | 
| 37 |     int count() const; | 
| 38 |     void setCount(int count); | 
| 39 |  | 
| 40 |     int valuesSection() const; | 
| 41 |     void setValuesSection(int valuesSection); | 
| 42 |  | 
| 43 |     int labelsSection() const; | 
| 44 |     void setLabelsSection(int labelsSection); | 
| 45 |  | 
| 46 |     Qt::Orientation orientation() const; | 
| 47 |     void setOrientation(Qt::Orientation orientation); | 
| 48 |  | 
| 49 | protected: | 
| 50 |     QPieModelMapperPrivate * const d_ptr; | 
| 51 |     Q_DECLARE_PRIVATE(QPieModelMapper) | 
| 52 | }; | 
| 53 |  | 
| 54 | QT_END_NAMESPACE | 
| 55 |  | 
| 56 | #endif // QPIEMODELMAPPER_H | 
| 57 |  |