| 1 | // Copyright (C) 2024 The Qt Company Ltd. | 
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only | 
| 3 | |
| 4 | #ifndef QTGRAPHS_QSPLINESERIES_H | 
| 5 | #define QTGRAPHS_QSPLINESERIES_H | 
| 6 | |
| 7 | #include <QtCore/qobject.h> | 
| 8 | #include <QtGraphs/qxyseries.h> | 
| 9 | |
| 10 | QT_BEGIN_NAMESPACE | 
| 11 | |
| 12 | class QSplineSeriesPrivate; | 
| 13 | |
| 14 | class Q_GRAPHS_EXPORT QSplineSeries : public QXYSeries | 
| 15 | { | 
| 16 | Q_OBJECT | 
| 17 | Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged FINAL) | 
| 18 | Q_PROPERTY(Qt::PenCapStyle capStyle READ capStyle WRITE setCapStyle NOTIFY capStyleChanged FINAL) | 
| 19 | |
| 20 | QML_NAMED_ELEMENT(SplineSeries) | 
| 21 | public: | 
| 22 | explicit QSplineSeries(QObject *parent = nullptr); | 
| 23 | ~QSplineSeries() override; | 
| 24 | QAbstractSeries::SeriesType type() const override; | 
| 25 | |
| 26 | |
| 27 | qreal width() const; | 
| 28 | void setWidth(qreal newWidth); | 
| 29 | |
| 30 | Qt::PenCapStyle capStyle() const; | 
| 31 | void setCapStyle(Qt::PenCapStyle newCapStyle); | 
| 32 | |
| 33 | QList<QPointF> &getControlPoints(); | 
| 34 | |
| 35 | Q_SIGNALS: | 
| 36 | void widthChanged(); | 
| 37 | void capStyleChanged(); | 
| 38 | |
| 39 | protected: | 
| 40 | QSplineSeries(QSplineSeriesPrivate &dd, QObject *parent = nullptr); | 
| 41 | |
| 42 | void componentComplete() override; | 
| 43 | |
| 44 | private: | 
| 45 | Q_DECLARE_PRIVATE(QSplineSeries) | 
| 46 | Q_DISABLE_COPY(QSplineSeries) | 
| 47 | |
| 48 | friend class QSplineControlAnimation; | 
| 49 | friend class QGraphTransition; | 
| 50 | }; | 
| 51 | |
| 52 | QT_END_NAMESPACE | 
| 53 | |
| 54 | #endif // QTGRAPHS_QSPLINESERIES_H | 
| 55 | 
