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 QDATETIMEAXIS_P_H
14#define QDATETIMEAXIS_P_H
15
16#include <QtCharts/QDateTimeAxis>
17#include <QtCharts/private/qchartglobal_p.h>
18#include <private/qabstractaxis_p.h>
19#include <QtCore/QDateTime>
20
21QT_BEGIN_NAMESPACE
22
23class Q_CHARTS_PRIVATE_EXPORT QDateTimeAxisPrivate : public QAbstractAxisPrivate
24{
25 Q_OBJECT
26public:
27 QDateTimeAxisPrivate(QDateTimeAxis *q);
28 ~QDateTimeAxisPrivate();
29
30public:
31 void initializeGraphics(QGraphicsItem* parent) override;
32 void initializeDomain(AbstractDomain *domain) override;
33
34 //interface for manipulating range form base class
35 void setMin(const QVariant &min) override;
36 void setMax(const QVariant &max) override;
37 void setRange(const QVariant &min, const QVariant &max) override;
38
39 //interface manipulating range form domain
40 qreal min() override { return m_min; }
41 qreal max() override { return m_max; }
42 void setRange(qreal min,qreal max) override;
43
44protected:
45 int tickCount() const;
46
47protected:
48 qreal m_min;
49 qreal m_max;
50 int m_tickCount;
51 QString m_format;
52 Q_DECLARE_PUBLIC(QDateTimeAxis)
53};
54
55QT_END_NAMESPACE
56
57#endif // QDATETIMEAXIS_P_H
58

source code of qtcharts/src/charts/axis/datetimeaxis/qdatetimeaxis_p.h