| 1 | // Copyright (C) 2021 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 QCOLORAXIS_P_H | 
| 14 | #define QCOLORAXIS_P_H | 
| 15 | |
| 16 | #include <QtCharts/QColorAxis> | 
| 17 | #include <private/qabstractaxis_p.h> | 
| 18 | #include <QtCharts/private/qchartglobal_p.h> | 
| 19 | |
| 20 | QT_BEGIN_NAMESPACE | 
| 21 | |
| 22 | class Q_CHARTS_EXPORT QColorAxisPrivate : public QAbstractAxisPrivate | 
| 23 | { | 
| 24 | Q_OBJECT | 
| 25 | public: | 
| 26 | explicit QColorAxisPrivate(QColorAxis *q); | 
| 27 | ~QColorAxisPrivate(); | 
| 28 | |
| 29 | void initializeGraphics(QGraphicsItem *parent) override; | 
| 30 | void initializeDomain(AbstractDomain *domain) override; | 
| 31 | |
| 32 | qreal min() override { return m_min; } | 
| 33 | qreal max() override { return m_max; } | 
| 34 | void setRange(qreal min,qreal max) override; | 
| 35 | |
| 36 | void updateSeries(); | 
| 37 | |
| 38 | protected: | 
| 39 | void setMin(const QVariant &min) override; | 
| 40 | void setMax(const QVariant &max) override; | 
| 41 | void setRange(const QVariant &min, const QVariant &max) override; | 
| 42 | |
| 43 | private: | 
| 44 | qreal m_min; | 
| 45 | qreal m_max; | 
| 46 | int m_tickCount; | 
| 47 | qreal m_size; | 
| 48 | bool m_autoRange; | 
| 49 | QLinearGradient m_gradient; | 
| 50 | Q_DECLARE_PUBLIC(QColorAxis) | 
| 51 | }; | 
| 52 | |
| 53 | QT_END_NAMESPACE | 
| 54 | |
| 55 | #endif // QCOLORAXIS_P_H | 
| 56 | 
