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 <QtCore/private/qobject_p.h>
18#include "qabstract3daxis.h"
19
20QT_BEGIN_NAMESPACE
21
22class QAbstract3DAxisPrivate : public QObjectPrivate
23{
24 Q_DECLARE_PUBLIC(QAbstract3DAxis)
25
26public:
27 QAbstract3DAxisPrivate(QAbstract3DAxis::AxisType type);
28 ~QAbstract3DAxisPrivate() override;
29
30 void setOrientation(QAbstract3DAxis::AxisOrientation orientation);
31
32 bool isDefaultAxis() { return m_isDefaultAxis; }
33 void setDefaultAxis(bool isDefault) { m_isDefaultAxis = isDefault; }
34
35 virtual void setRange(float min, float max, bool suppressWarnings = false);
36 virtual void setMin(float min);
37 virtual void setMax(float max);
38
39protected:
40 virtual void updateLabels();
41 virtual bool allowZero() = 0;
42 virtual bool allowNegatives() = 0;
43 virtual bool allowMinMaxSame() = 0;
44
45 QString m_title;
46 QStringList m_labels;
47 QAbstract3DAxis::AxisOrientation m_orientation;
48 QAbstract3DAxis::AxisType m_type;
49 bool m_isDefaultAxis;
50 float m_min;
51 float m_max;
52 bool m_autoAdjust;
53 float m_labelAutoAngle;
54 float m_titleOffset;
55 bool m_titleVisible;
56 bool m_labelsVisible;
57 bool m_titleFixed;
58
59 friend class QScatterDataProxyPrivate;
60 friend class QSurfaceDataProxyPrivate;
61};
62
63QT_END_NAMESPACE
64
65#endif
66

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

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