| 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 | |
| 10 | Q_MOC_INCLUDE(<QtCharts/qboxplotseries.h>) |
| 11 | Q_MOC_INCLUDE(<QtCore/qabstractitemmodel.h>) |
| 12 | |
| 13 | QT_BEGIN_NAMESPACE |
| 14 | /* Comment line for syncqt to generate the fwd-include correctly, due to QTBUG-22432 */ |
| 15 | class 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 | |
| 25 | public: |
| 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 | |
| 46 | Q_SIGNALS: |
| 47 | void seriesReplaced(); |
| 48 | void modelReplaced(); |
| 49 | void firstBoxSetRowChanged(); |
| 50 | void lastBoxSetRowChanged(); |
| 51 | void firstColumnChanged(); |
| 52 | void columnCountChanged(); |
| 53 | }; |
| 54 | |
| 55 | QT_END_NAMESPACE |
| 56 | |
| 57 | #endif // QHBOXPLOTMODELMAPPER_H |
| 58 | |