1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB).
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5#ifndef QHBOXPLOTMODELMAPPER_H
6#define QHBOXPLOTMODELMAPPER_H
7
8#include <QtCharts/QBoxPlotModelMapper>
9
10Q_MOC_INCLUDE(<QtCharts/qboxplotseries.h>)
11Q_MOC_INCLUDE(<QtCore/qabstractitemmodel.h>)
12
13QT_BEGIN_NAMESPACE
14/* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */
15class Q_CHARTS_EXPORT QHBoxPlotModelMapper : public QBoxPlotModelMapper
16{
17 Q_OBJECT
18 Q_PROPERTY(QBoxPlotSeries *series READ series WRITE setSeries NOTIFY seriesReplaced)
19 Q_PROPERTY(QAbstractItemModel *model READ model WRITE setModel NOTIFY modelReplaced)
20 Q_PROPERTY(int firstBoxSetRow READ firstBoxSetRow WRITE setFirstBoxSetRow NOTIFY firstBoxSetRowChanged)
21 Q_PROPERTY(int lastBoxSetRow READ lastBoxSetRow WRITE setLastBoxSetRow NOTIFY lastBoxSetRowChanged)
22 Q_PROPERTY(int firstColumn READ firstColumn WRITE setFirstColumn NOTIFY firstColumnChanged)
23 Q_PROPERTY(int columnCount READ columnCount WRITE setColumnCount NOTIFY columnCountChanged)
24
25public:
26 explicit QHBoxPlotModelMapper(QObject *parent = nullptr);
27
28 QAbstractItemModel *model() const;
29 void setModel(QAbstractItemModel *model);
30
31 QBoxPlotSeries *series() const;
32 void setSeries(QBoxPlotSeries *series);
33
34 int firstBoxSetRow() const;
35 void setFirstBoxSetRow(int firstBoxSetRow);
36
37 int lastBoxSetRow() const;
38 void setLastBoxSetRow(int lastBoxSetRow);
39
40 int firstColumn() const;
41 void setFirstColumn(int firstColumn);
42
43 int columnCount() const;
44 void setColumnCount(int rowCount);
45
46Q_SIGNALS:
47 void seriesReplaced();
48 void modelReplaced();
49 void firstBoxSetRowChanged();
50 void lastBoxSetRowChanged();
51 void firstColumnChanged();
52 void columnCountChanged();
53};
54
55QT_END_NAMESPACE
56
57#endif // QHBOXPLOTMODELMAPPER_H
58

source code of qtcharts/src/charts/boxplotchart/qhboxplotmodelmapper.h