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

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtgraphs/src/graphs2d/splinechart/qsplineseries.h