| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | // W A R N I N G |
| 5 | // ------------- |
| 6 | // |
| 7 | // This file is not part of the Qt Chart API. It exists purely as an |
| 8 | // implementation detail. This header file may change from version to |
| 9 | // version without notice, or even be removed. |
| 10 | // |
| 11 | // We mean it. |
| 12 | |
| 13 | #ifndef QBOXSET_P_H |
| 14 | #define QBOXSET_P_H |
| 15 | |
| 16 | #include <QtCharts/QBoxSet> |
| 17 | #include <QtCharts/private/qchartglobal_p.h> |
| 18 | #include <QtCore/QMap> |
| 19 | #include <QtGui/QPen> |
| 20 | #include <QtGui/QBrush> |
| 21 | #include <QtGui/QFont> |
| 22 | |
| 23 | QT_BEGIN_NAMESPACE |
| 24 | |
| 25 | class QBoxPlotSeriesPrivate; |
| 26 | |
| 27 | class Q_CHARTS_EXPORT QBoxSetPrivate : public QObject |
| 28 | { |
| 29 | Q_OBJECT |
| 30 | |
| 31 | public: |
| 32 | QBoxSetPrivate(const QString label, QBoxSet *parent); |
| 33 | ~QBoxSetPrivate(); |
| 34 | |
| 35 | bool append(qreal value); |
| 36 | bool append(const QList<qreal> &values); |
| 37 | |
| 38 | int remove(const int index, const int count); |
| 39 | void clear(); |
| 40 | |
| 41 | void setValue(const int index, const qreal value); |
| 42 | |
| 43 | qreal value(const int index); |
| 44 | |
| 45 | Q_SIGNALS: |
| 46 | void restructuredBox(); |
| 47 | void updatedBox(); |
| 48 | void updatedLayout(); |
| 49 | |
| 50 | private: |
| 51 | const QBoxSet *q_ptr; |
| 52 | QString m_label; |
| 53 | const int m_valuesCount; |
| 54 | qreal *m_values; |
| 55 | int m_appendCount; |
| 56 | QPen m_pen; |
| 57 | QBrush m_brush; |
| 58 | QBrush m_labelBrush; |
| 59 | QFont m_labelFont; |
| 60 | QBoxPlotSeriesPrivate *m_series; |
| 61 | |
| 62 | friend class QBoxSet; |
| 63 | friend class QBoxPlotSeriesPrivate; |
| 64 | }; |
| 65 | |
| 66 | QT_END_NAMESPACE |
| 67 | |
| 68 | #endif // QBOXSET_P_H |
| 69 | |