1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the QtGraphs API. It exists purely as an
9// implementation detail. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13
14#ifndef QABSTRACT3DAXIS_P_H
15#define QABSTRACT3DAXIS_P_H
16
17#include "qabstract3daxis.h"
18
19QT_BEGIN_NAMESPACE
20
21class QAbstract3DAxisPrivate
22{
23 Q_DECLARE_PUBLIC(QAbstract3DAxis)
24
25public:
26 QAbstract3DAxisPrivate(QAbstract3DAxis *q, QAbstract3DAxis::AxisType type);
27 virtual ~QAbstract3DAxisPrivate();
28
29 void setOrientation(QAbstract3DAxis::AxisOrientation orientation);
30
31 inline bool isDefaultAxis() { return m_isDefaultAxis; }
32 inline void setDefaultAxis(bool isDefault) { m_isDefaultAxis = isDefault; }
33
34 virtual void setRange(float min, float max, bool suppressWarnings = false);
35 virtual void setMin(float min);
36 virtual void setMax (float max);
37
38protected:
39 virtual void updateLabels();
40 virtual bool allowZero() = 0;
41 virtual bool allowNegatives() = 0;
42 virtual bool allowMinMaxSame() = 0;
43
44 QAbstract3DAxis *q_ptr;
45
46 QString m_title;
47 QStringList m_labels;
48 QAbstract3DAxis::AxisOrientation m_orientation;
49 QAbstract3DAxis::AxisType m_type;
50 bool m_isDefaultAxis;
51 float m_min;
52 float m_max;
53 bool m_autoAdjust;
54 float m_labelAutoRotation;
55 bool m_titleVisible;
56 bool m_titleFixed;
57
58 friend class QScatterDataProxyPrivate;
59 friend class QSurfaceDataProxyPrivate;
60};
61
62QT_END_NAMESPACE
63
64#endif
65

source code of qtgraphs/src/graphs/axis/qabstract3daxis_p.h