| 1 | // Copyright (C) 2023 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 Graphs 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 QXYSERIES_P_H | 
| 14 | #define QXYSERIES_P_H | 
| 15 | |
| 16 | #include <QtGraphs/qxyseries.h> | 
| 17 | #include <private/qabstractseries_p.h> | 
| 18 | #include <private/qgraphtransition_p.h> | 
| 19 | |
| 20 | QT_BEGIN_NAMESPACE | 
| 21 | |
| 22 | class QAbstractAxis; | 
| 23 | |
| 24 | class QXYSeriesPrivate : public QAbstractSeriesPrivate | 
| 25 | { | 
| 26 | public: | 
| 27 | static QXYSeriesPrivate *get(QXYSeries *item) { return item->d_func(); } | 
| 28 | static const QXYSeriesPrivate *get(const QXYSeries *item) { return item->d_func(); } | 
| 29 | |
| 30 | QXYSeriesPrivate(); | 
| 31 | |
| 32 | void setPointSelected(qsizetype index, bool selected, bool &callSignal); | 
| 33 | bool isPointSelected(qsizetype index) const; | 
| 34 | |
| 35 | void append(const QList<QPointF> &points); | 
| 36 | |
| 37 | protected: | 
| 38 | QList<QPointF> m_points; | 
| 39 | QSet<qsizetype> m_selectedPoints; | 
| 40 | QColor m_color = QColor(Qt::transparent); | 
| 41 | QColor m_selectedColor = QColor(Qt::transparent); | 
| 42 | QQmlComponent *m_pointDelegate = nullptr; | 
| 43 | QGraphTransition *m_graphTransition = nullptr; | 
| 44 | bool m_draggable = false; | 
| 45 | |
| 46 | private: | 
| 47 | Q_DECLARE_PUBLIC(QXYSeries) | 
| 48 | |
| 49 | friend class QGraphPointAnimation; | 
| 50 | friend class QGraphTransition; | 
| 51 | }; | 
| 52 | |
| 53 | QT_END_NAMESPACE | 
| 54 | |
| 55 | #endif | 
| 56 | 
