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
10Q_MOC_INCLUDE(<QtCharts/qabstractbarseries.h>)
11Q_MOC_INCLUDE(<QtCharts/qvbarmodelmapper.h>)
12
13QT_BEGIN_NAMESPACE
14class QAbstractItemModel;
15QT_END_NAMESPACE
16
17QT_BEGIN_NAMESPACE
18
19class QBarModelMapperPrivate;
20class QAbstractBarSeries;
21
22class Q_CHARTS_EXPORT QBarModelMapper : public QObject
23{
24 Q_OBJECT
25
26protected:
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
50protected:
51 QBarModelMapperPrivate * const d_ptr;
52 Q_DECLARE_PRIVATE(QBarModelMapper)
53};
54
55QT_END_NAMESPACE
56
57#endif // QBARMODELMAPPER_H
58

source code of qtcharts/src/charts/barchart/qbarmodelmapper.h