1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
3 | |
4 | // W A R N I N G |
5 | // ------------- |
6 | // |
7 | // This file is not part of the Qt Chart API. It exists purely as an |
8 | // implementation detail. This header file may change from version to |
9 | // version without notice, or even be removed. |
10 | // |
11 | // We mean it. |
12 | |
13 | #ifndef POLARCHARTAXIS_P_H |
14 | #define POLARCHARTAXIS_P_H |
15 | |
16 | #include <private/chartaxiselement_p.h> |
17 | #include <QtCharts/private/qchartglobal_p.h> |
18 | |
19 | QT_BEGIN_NAMESPACE |
20 | |
21 | class Q_CHARTS_PRIVATE_EXPORT PolarChartAxis : public ChartAxisElement |
22 | { |
23 | Q_OBJECT |
24 | Q_INTERFACES(QGraphicsLayoutItem) |
25 | public: |
26 | PolarChartAxis(QAbstractAxis *axis, QGraphicsItem *item, bool intervalAxis = false); |
27 | ~PolarChartAxis(); |
28 | |
29 | void setGeometry(const QRectF &axis, const QRectF &grid) override; |
30 | virtual qreal preferredAxisRadius(const QSizeF &maxSize) = 0; |
31 | int tickWidth() { return 3; } |
32 | |
33 | public: // from ChartAxisElement |
34 | QRectF gridGeometry() const override; |
35 | bool emptyAxis() const override; |
36 | |
37 | protected: |
38 | void updateLayout(const QList<qreal> &layout) override; |
39 | |
40 | protected: // virtual functions |
41 | virtual void createItems(int count) = 0; |
42 | virtual void createAxisLabels(const QList<qreal> &layout) = 0; |
43 | virtual void updateMinorTickItems() = 0; |
44 | |
45 | public Q_SLOTS: |
46 | void handleShadesBrushChanged(const QBrush &brush) override; |
47 | void handleShadesPenChanged(const QPen &pen) override; |
48 | |
49 | private: |
50 | void deleteItems(int count); |
51 | }; |
52 | |
53 | QT_END_NAMESPACE |
54 | |
55 | #endif // POLARCHARTAXIS_P_H |
56 | |