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 QCATEGORYAXIS_P_H
14#define QCATEGORYAXIS_P_H
15
16#include <QtCharts/QCategoryAxis>
17#include <private/qvalueaxis_p.h>
18#include <QtCharts/private/qchartglobal_p.h>
19#include <QtCore/qmap.h>
20#include <QtCore/qstring.h>
21#include <QtCore/qlist.h>
22
23QT_BEGIN_NAMESPACE
24
25typedef QPair<qreal, qreal> Range;
26
27class Q_CHARTS_PRIVATE_EXPORT QCategoryAxisPrivate : public QValueAxisPrivate
28{
29 Q_OBJECT
30
31public:
32 QCategoryAxisPrivate(QCategoryAxis *q);
33 ~QCategoryAxisPrivate();
34
35 void initializeGraphics(QGraphicsItem* parent) override;
36 int ticksCount() const;
37
38private:
39 QMap<QString , Range> m_categoriesMap;
40 QStringList m_categories;
41 qreal m_categoryMinimum;
42 QCategoryAxis::AxisLabelsPosition m_labelsPosition;
43
44private:
45 Q_DECLARE_PUBLIC(QCategoryAxis)
46};
47
48QT_END_NAMESPACE
49
50#endif // QCATEGORYAXIS_P_H
51

source code of qtcharts/src/charts/axis/categoryaxis/qcategoryaxis_p.h