| 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 LOGXLOGYDOMAIN_H | 
| 14 | #define LOGXLOGYDOMAIN_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 LogXLogYDomain: public AbstractDomain | 
| 23 | { | 
| 24 | Q_OBJECT | 
| 25 | public: | 
| 26 | explicit LogXLogYDomain(QObject *object = 0); | 
| 27 | virtual ~LogXLogYDomain(); | 
| 28 | |
| 29 | DomainType type() override { return AbstractDomain::LogXLogYDomain; } | 
| 30 | |
| 31 | void setRange(qreal minX, qreal maxX, qreal minY, qreal maxY) override; | 
| 32 | |
| 33 | friend bool Q_AUTOTEST_EXPORT operator== (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2); | 
| 34 | friend bool Q_AUTOTEST_EXPORT operator!= (const LogXLogYDomain &domain1, const LogXLogYDomain &domain2); | 
| 35 | friend QDebug Q_AUTOTEST_EXPORT operator<<(QDebug dbg, const LogXLogYDomain &domain); | 
| 36 | |
| 37 | void zoomIn(const QRectF &rect) override; | 
| 38 | void zoomOut(const QRectF &rect) override; | 
| 39 | void move(qreal dx, qreal dy) override; | 
| 40 | |
| 41 | QPointF calculateGeometryPoint(const QPointF &point, bool &ok) const override; | 
| 42 | QPointF calculateDomainPoint(const QPointF &point) const override; | 
| 43 | QList<QPointF> calculateGeometryPoints(const QList<QPointF> &list) const override; | 
| 44 | |
| 45 | bool attachAxis(QAbstractAxis *axis) override; | 
| 46 | bool detachAxis(QAbstractAxis *axis) override; | 
| 47 | |
| 48 | public Q_SLOTS: | 
| 49 | void handleVerticalAxisBaseChanged(qreal baseY); | 
| 50 | void handleHorizontalAxisBaseChanged(qreal baseX); | 
| 51 | |
| 52 | private: | 
| 53 | qreal m_logLeftX; | 
| 54 | qreal m_logRightX; | 
| 55 | qreal m_logBaseX; | 
| 56 | qreal m_logLeftY; | 
| 57 | qreal m_logRightY; | 
| 58 | qreal m_logBaseY; | 
| 59 | }; | 
| 60 | |
| 61 | QT_END_NAMESPACE | 
| 62 | |
| 63 | #endif // LOGXLOGYDOMAIN_H | 
| 64 | 
