diff options
Diffstat (limited to 'src/datavisualization/data/qheightmapsurfacedataproxy.h')
-rw-r--r-- | src/datavisualization/data/qheightmapsurfacedataproxy.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.h b/src/datavisualization/data/qheightmapsurfacedataproxy.h new file mode 100644 index 00000000..3306059f --- /dev/null +++ b/src/datavisualization/data/qheightmapsurfacedataproxy.h @@ -0,0 +1,75 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtDataVisualization module. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ + +#ifndef QHEIGHTMAPSURFACEDATAPROXY_H +#define QHEIGHTMAPSURFACEDATAPROXY_H + +#include <QtDataVisualization/qsurfacedataproxy.h> + +#include <QImage> + +QT_DATAVISUALIZATION_BEGIN_NAMESPACE + +class QHeightMapSurfaceDataProxyPrivate; + +class QT_DATAVISUALIZATION_EXPORT QHeightMapSurfaceDataProxy : public QSurfaceDataProxy +{ + Q_OBJECT + + Q_PROPERTY(QImage heightMap READ heightMap WRITE setHeightMap) + Q_PROPERTY(QString heightMapFile READ heightMapFile WRITE setHeightMapFile) + Q_PROPERTY(float minXValue READ minXValue WRITE setMinXValue) + Q_PROPERTY(float maxXValue READ maxXValue WRITE setMaxXValue) + Q_PROPERTY(float minZValue READ minZValue WRITE setMinZValue) + Q_PROPERTY(float maxZValue READ maxZValue WRITE setMaxZValue) + +public: + explicit QHeightMapSurfaceDataProxy(QObject *parent = 0); + explicit QHeightMapSurfaceDataProxy(const QImage &image, QObject *parent = 0); + virtual ~QHeightMapSurfaceDataProxy(); + + void setHeightMap(const QImage &image); + QImage heightMap() const; + + void setHeightMapFile(const QString &filename); + QString heightMapFile() const; + + void setValueRanges(float minX, float maxX, float minZ, float maxZ); + void setMinXValue(float min); + float minXValue() const; + void setMaxXValue(float max); + float maxXValue() const; + void setMinZValue(float min); + float minZValue() const; + void setMaxZValue(float max); + float maxZValue() const; + +protected: + explicit QHeightMapSurfaceDataProxy(QHeightMapSurfaceDataProxyPrivate *d, QObject *parent = 0); + QHeightMapSurfaceDataProxyPrivate *dptr(); + const QHeightMapSurfaceDataProxyPrivate *dptrc() const; + +private: + Q_DISABLE_COPY(QHeightMapSurfaceDataProxy) + + friend class Surface3DController; +}; + +QT_DATAVISUALIZATION_END_NAMESPACE + +#endif |