1 | // Copyright (C) 2024 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 QtGraphs 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 <QtGraphs/QDateTimeAxis> |
17 | #include <private/qabstractaxis_p.h> |
18 | |
19 | QT_BEGIN_NAMESPACE |
20 | |
21 | class QDateTimeAxisPrivate : public QAbstractAxisPrivate |
22 | { |
23 | public: |
24 | QDateTimeAxisPrivate(); |
25 | ~QDateTimeAxisPrivate() override; |
26 | |
27 | protected: |
28 | qreal m_min = QDateTime::fromMSecsSinceEpoch(msecs: 0, timeZone: QTimeZone::UTC).toMSecsSinceEpoch(); |
29 | qreal m_max = QDateTime::fromMSecsSinceEpoch(msecs: 0, timeZone: QTimeZone::UTC).addYears(years: 10).toMSecsSinceEpoch(); |
30 | qreal m_tickInterval = 0.0; |
31 | qsizetype m_subTickCount = 0; |
32 | QString m_format = QStringLiteral("dd-MMMM-yy"); |
33 | |
34 | public: |
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 | void setRange(qreal min, qreal max) override; |
39 | qreal min() override { return m_min; } |
40 | qreal max() override { return m_max; } |
41 | |
42 | private: |
43 | Q_DECLARE_PUBLIC(QDateTimeAxis) |
44 | }; |
45 | |
46 | QT_END_NAMESPACE |
47 | |
48 | #endif // QDATETIMEAXIS_P_H |
49 |