summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/data/qheightmapsurfacedataproxy.h
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-09-20 09:58:22 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-09-20 10:01:25 +0300
commitd8662133def955c4aedf83e9b035fbece35a6710 (patch)
tree17400fb99e06ff5fef1029e1a47c5bbfc58da2cc /src/datavisualization/data/qheightmapsurfacedataproxy.h
parent61f323fde93cf105fb2c70c74cf756211e5aba4f (diff)
Surface: Implemented giving a height map via API
Task-number: QTRD-2273 Change-Id: Ib0c540d52711ced38421b744664de7eddd97b585 Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavisualization/data/qheightmapsurfacedataproxy.h')
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.h b/src/datavisualization/data/qheightmapsurfacedataproxy.h
new file mode 100644
index 00000000..8ca9f502
--- /dev/null
+++ b/src/datavisualization/data/qheightmapsurfacedataproxy.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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)
+
+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;
+
+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