| 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 POLARDOMAIN_H | 
| 14 | #define POLARDOMAIN_H | 
| 15 | #include <private/abstractdomain_p.h> | 
| 16 | #include <QtCharts/private/qchartglobal_p.h> | 
| 17 | #include <QtCore/QRectF> | 
| 18 | #include <QtCore/QSizeF> | 
| 19 |  | 
| 20 | QT_BEGIN_NAMESPACE | 
| 21 |  | 
| 22 | class Q_CHARTS_EXPORT PolarDomain: public AbstractDomain | 
| 23 | { | 
| 24 |     Q_OBJECT | 
| 25 | public: | 
| 26 |     explicit PolarDomain(QObject *object = 0); | 
| 27 |     virtual ~PolarDomain(); | 
| 28 |  | 
| 29 |     void setSize(const QSizeF &size) override; | 
| 30 |  | 
| 31 |     QPointF calculateGeometryPoint(const QPointF &point, bool &ok) const override; | 
| 32 |     QList<QPointF> calculateGeometryPoints(const QList<QPointF> &list) const override; | 
| 33 |  | 
| 34 |     virtual qreal toAngularCoordinate(qreal value, bool &ok) const = 0; | 
| 35 |     virtual qreal toRadialCoordinate(qreal value, bool &ok) const = 0; | 
| 36 |  | 
| 37 | protected: | 
| 38 |     QPointF polarCoordinateToPoint(qreal angularCoordinate, qreal radialCoordinate) const; | 
| 39 |  | 
| 40 |     QPointF m_center; | 
| 41 |     qreal m_radius; | 
| 42 | }; | 
| 43 |  | 
| 44 | QT_END_NAMESPACE | 
| 45 |  | 
| 46 | #endif // POLARDOMAIN_H | 
| 47 |  |