1// Copyright (C) 2016 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 QtDataVisualization 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 "datavisualizationglobal_p.h"
18#include "qabstract3daxis.h"
19
20QT_BEGIN_NAMESPACE
21
22class QAbstract3DAxisPrivate : public QObject
23{
24 Q_OBJECT
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 QAbstract3DAxis;
59 friend class QValue3DAxis;
60 friend class QCategory3DAxis;
61 friend class QScatterDataProxyPrivate;
62 friend class QSurfaceDataProxyPrivate;
63};
64
65QT_END_NAMESPACE
66
67#endif
68

source code of qtdatavis3d/src/datavisualization/axis/qabstract3daxis_p.h