| 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 QHEIGHTMAPSURFACEDATAPROXY_P_H |
| 15 | #define QHEIGHTMAPSURFACEDATAPROXY_P_H |
| 16 | |
| 17 | #include "qheightmapsurfacedataproxy.h" |
| 18 | #include "qsurfacedataproxy_p.h" |
| 19 | #include <QtCore/QTimer> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | class QHeightMapSurfaceDataProxyPrivate : public QSurfaceDataProxyPrivate |
| 24 | { |
| 25 | Q_DECLARE_PUBLIC(QHeightMapSurfaceDataProxy) |
| 26 | |
| 27 | public: |
| 28 | QHeightMapSurfaceDataProxyPrivate(); |
| 29 | ~QHeightMapSurfaceDataProxyPrivate() override; |
| 30 | |
| 31 | void setValueRanges(float minX, float maxX, float minZ, float maxZ); |
| 32 | void setMinXValue(float min); |
| 33 | void setMaxXValue(float max); |
| 34 | void setMinZValue(float min); |
| 35 | void setMaxZValue(float max); |
| 36 | void setMinYValue(float min); |
| 37 | void setMaxYValue(float max); |
| 38 | void setAutoScaleY(bool enabled); |
| 39 | |
| 40 | private: |
| 41 | void handlePendingResolve(); |
| 42 | |
| 43 | QImage m_heightMap; |
| 44 | QString m_heightMapFile; |
| 45 | QTimer m_resolveTimer; |
| 46 | |
| 47 | float m_minXValue; |
| 48 | float m_maxXValue; |
| 49 | float m_minZValue; |
| 50 | float m_maxZValue; |
| 51 | float m_minYValue; |
| 52 | float m_maxYValue; |
| 53 | bool m_autoScaleY; |
| 54 | }; |
| 55 | |
| 56 | QT_END_NAMESPACE |
| 57 | |
| 58 | #endif |
| 59 |
