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
33Q_SIGNALS:
34 void widthChanged();
35 void capStyleChanged();
36
37protected:
38 QLineSeries(QLineSeriesPrivate &dd, QObject *parent = nullptr);
39
40 void componentComplete() override;
41
42private:
43 Q_DECLARE_PRIVATE(QLineSeries)
44 Q_DISABLE_COPY(QLineSeries)
45};
46
47QT_END_NAMESPACE
48
49#endif // QTGRAPHS_QLINESERIES_H
50

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

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