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