| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | // |
| 5 | // W A R N I N G |
| 6 | // ------------- |
| 7 | // |
| 8 | // This file is not part of the QtDataVisualization API. It exists purely as an |
| 9 | // implementation detail. This header file may change from version to |
| 10 | // version without notice, or even be removed. |
| 11 | // |
| 12 | // We mean it. |
| 13 | |
| 14 | #ifndef QBARDATAPROXY_P_H |
| 15 | #define QBARDATAPROXY_P_H |
| 16 | |
| 17 | #include "qbardataproxy.h" |
| 18 | #include "qabstractdataproxy_p.h" |
| 19 | |
| 20 | QT_BEGIN_NAMESPACE |
| 21 | |
| 22 | class QBarDataProxyPrivate : public QAbstractDataProxyPrivate |
| 23 | { |
| 24 | Q_OBJECT |
| 25 | public: |
| 26 | QBarDataProxyPrivate(QBarDataProxy *q); |
| 27 | virtual ~QBarDataProxyPrivate(); |
| 28 | |
| 29 | void resetArray(QBarDataArray *newArray, const QStringList *rowLabels, |
| 30 | const QStringList *columnLabels); |
| 31 | void setRow(int rowIndex, QBarDataRow *row, const QString *label); |
| 32 | void setRows(int rowIndex, const QBarDataArray &rows, const QStringList *labels); |
| 33 | void setItem(int rowIndex, int columnIndex, const QBarDataItem &item); |
| 34 | int addRow(QBarDataRow *row, const QString *label); |
| 35 | int addRows(const QBarDataArray &rows, const QStringList *labels); |
| 36 | void insertRow(int rowIndex, QBarDataRow *row, const QString *label); |
| 37 | void insertRows(int rowIndex, const QBarDataArray &rows, const QStringList *labels); |
| 38 | void removeRows(int rowIndex, int removeCount, bool removeLabels); |
| 39 | |
| 40 | QPair<GLfloat, GLfloat> limitValues(int startRow, int startColumn, int rowCount, |
| 41 | int columnCount) const; |
| 42 | |
| 43 | void setSeries(QAbstract3DSeries *series) override; |
| 44 | |
| 45 | private: |
| 46 | QBarDataProxy *qptr(); |
| 47 | void clearRow(int rowIndex); |
| 48 | void clearArray(); |
| 49 | void fixRowLabels(int startIndex, int count, const QStringList &newLabels, bool isInsert); |
| 50 | |
| 51 | QBarDataArray *m_dataArray; |
| 52 | QStringList m_rowLabels; |
| 53 | QStringList m_columnLabels; |
| 54 | |
| 55 | private: |
| 56 | friend class QBarDataProxy; |
| 57 | }; |
| 58 | |
| 59 | QT_END_NAMESPACE |
| 60 | |
| 61 | #endif |
| 62 | |