| 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 CHARTBARCATEGORYAXISX_H | 
| 14 | #define CHARTBARCATEGORYAXISX_H | 
| 15 |  | 
| 16 | #include <private/horizontalaxis_p.h> | 
| 17 | #include <QtCharts/private/qchartglobal_p.h> | 
| 18 |  | 
| 19 | QT_BEGIN_NAMESPACE | 
| 20 |  | 
| 21 | class ChartPresenter; | 
| 22 | class QBarCategoryAxis; | 
| 23 |  | 
| 24 | class Q_CHARTS_EXPORT ChartBarCategoryAxisX : public HorizontalAxis | 
| 25 | { | 
| 26 |     Q_OBJECT | 
| 27 | public: | 
| 28 |     ChartBarCategoryAxisX(QBarCategoryAxis *axis, QGraphicsItem* item = 0); | 
| 29 |     ~ChartBarCategoryAxisX(); | 
| 30 |  | 
| 31 |     QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const override; | 
| 32 | protected: | 
| 33 |     QList<qreal> calculateLayout() const override; | 
| 34 |     void updateGeometry() override; | 
| 35 | private: | 
| 36 |     QStringList createCategoryLabels(const QList<qreal> &layout) const; | 
| 37 | public Q_SLOTS: | 
| 38 |     void handleCategoriesChanged(); | 
| 39 |  | 
| 40 | private: | 
| 41 |     QBarCategoryAxis *m_categoriesAxis; | 
| 42 | }; | 
| 43 |  | 
| 44 | QT_END_NAMESPACE | 
| 45 |  | 
| 46 | #endif /* CHARTBARCATEGORYAXISX_H */ | 
| 47 |  |