1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QTGRAPHS_QLINESERIES_H
5#define QTGRAPHS_QLINESERIES_H
6
7#include <QtGraphs/qxyseries.h>
8#include <QtGraphs/qgraphsglobal.h>
9
10QT_BEGIN_NAMESPACE
11
12class QLineSeriesPrivate;
13
14class Q_GRAPHS_EXPORT QLineSeries : 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(LineSeries)
21public:
22 explicit QLineSeries(QObject *parent = nullptr);
23 ~QLineSeries() 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 Q_REVISION(6, 10) Q_INVOKABLE QPointF dataPointCoordinatesAt(qreal x, qreal y);
34
35Q_SIGNALS:
36 void widthChanged();
37 void capStyleChanged();
38
39protected:
40 QLineSeries(QLineSeriesPrivate &dd, QObject *parent = nullptr);
41
42 void componentComplete() override;
43
44private:
45 Q_DECLARE_PRIVATE(QLineSeries)
46 Q_DISABLE_COPY(QLineSeries)
47};
48
49QT_END_NAMESPACE
50
51#endif // QTGRAPHS_QLINESERIES_H
52

source code of qtgraphs/src/graphs2d/linechart/qlineseries.h