blob: a86d7c46a93f36496aef4d73c127065897939986 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
// -------------
//
// This file is not part of the QtGraphs API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
#ifndef QVALUE3DAXISFORMATTER_P_H
#define QVALUE3DAXISFORMATTER_P_H
#include <QtCore/QLocale>
#include <QtCore/private/qobject_p.h>
#include "qvalue3daxisformatter.h"
#include "utils_p.h"
QT_BEGIN_NAMESPACE
class QValue3DAxis;
class QValue3DAxisFormatterPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QValue3DAxisFormatter)
public:
QValue3DAxisFormatterPrivate();
~QValue3DAxisFormatterPrivate() override;
void recalculate();
void doRecalculate();
void populateCopy(QValue3DAxisFormatter ©);
void doPopulateCopy(QValue3DAxisFormatterPrivate ©);
QString stringForValue(qreal value, const QString &format);
float positionAt(float value) const;
float valueAt(float position) const;
void setAxis(QValue3DAxis *axis);
void markDirty(bool labelsChange);
protected:
bool m_needsRecalculate;
float m_min;
float m_max;
float m_rangeNormalizer;
QList<float> m_gridPositions;
QList<float> m_subGridPositions;
QList<float> m_labelPositions;
QStringList m_labelStrings;
QValue3DAxis *m_axis;
QString m_previousLabelFormat;
QByteArray m_labelFormatArray;
Utils::ParamType m_preparsedParamType;
bool m_allowNegatives;
bool m_allowZero;
QLocale m_locale;
QString m_formatPreStr;
QString m_formatPostStr;
int m_formatPrecision;
char m_formatSpec;
bool m_cLocaleInUse;
};
QT_END_NAMESPACE
#endif
|