1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | #ifndef QPOLARCHART_H |
5 | #define QPOLARCHART_H |
6 | |
7 | #include <QtCharts/QChart> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QAbstractSeries; |
12 | class QAbstractAxis; |
13 | |
14 | class Q_CHARTS_EXPORT QPolarChart : public QChart |
15 | { |
16 | Q_OBJECT |
17 | Q_ENUMS(PolarOrientation) |
18 | Q_FLAGS(PolarOrientations) |
19 | |
20 | public: |
21 | enum PolarOrientation { |
22 | PolarOrientationRadial = 0x1, |
23 | PolarOrientationAngular = 0x2 |
24 | }; |
25 | Q_DECLARE_FLAGS(PolarOrientations, PolarOrientation) |
26 | |
27 | public: |
28 | explicit QPolarChart(QGraphicsItem *parent = nullptr, Qt::WindowFlags wFlags = Qt::WindowFlags()); |
29 | ~QPolarChart(); |
30 | |
31 | void addAxis(QAbstractAxis *axis, PolarOrientation polarOrientation); |
32 | |
33 | QList<QAbstractAxis*> axes(PolarOrientations polarOrientation = PolarOrientations(PolarOrientationRadial | PolarOrientationAngular), QAbstractSeries *series = nullptr) const; |
34 | |
35 | static PolarOrientation axisPolarOrientation(QAbstractAxis *axis); |
36 | |
37 | private: |
38 | Q_DISABLE_COPY(QPolarChart) |
39 | }; |
40 | |
41 | QT_END_NAMESPACE |
42 | |
43 | #endif // QCHART_H |
44 |