| 1 | // Copyright (C) 2023 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QABSTRACTSERIES_P_H |
| 5 | #define QABSTRACTSERIES_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the QtGraphs API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | |
| 17 | #include <QtGraphs/qabstractseries.h> |
| 18 | #include <memory> |
| 19 | #include <private/qobject_p.h> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | class QAbstractAxis; |
| 24 | class QGraphsView; |
| 25 | |
| 26 | class QAbstractSeriesPrivate : public QObjectPrivate |
| 27 | { |
| 28 | Q_DECLARE_PUBLIC(QAbstractSeries) |
| 29 | public: |
| 30 | explicit QAbstractSeriesPrivate(); |
| 31 | ~QAbstractSeriesPrivate() override; |
| 32 | |
| 33 | void setLegendData(const QList<QLegendData> &legendData); |
| 34 | void clearLegendData(); |
| 35 | |
| 36 | static void appendSeriesChildren(QQmlListProperty<QObject> *list, QObject *element); |
| 37 | |
| 38 | protected: |
| 39 | QGraphsView *m_graph = nullptr; |
| 40 | |
| 41 | private: |
| 42 | QString m_name; |
| 43 | bool m_visible = true; |
| 44 | bool m_loaded = false; |
| 45 | bool m_selectable = false; |
| 46 | bool m_hoverable = false; |
| 47 | qreal m_opacity = 1.0; |
| 48 | qreal m_valuesMultiplier = 1.0; |
| 49 | QList<QLegendData> m_legendData; |
| 50 | }; |
| 51 | |
| 52 | QT_END_NAMESPACE |
| 53 | |
| 54 | #endif |
| 55 | |