From e949b92bd00fe97b609a4fdb43f1159dc36b4212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 2 May 2013 13:29:07 +0300 Subject: Q3DMaps: Added support for visualizing value in selected dimension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Value can now be visualized in height, width, depth, radius (=width+depth) or all Added some real data to example. More will be added. Change-Id: Ib0effe13ff295f3dc82ba82220b195b6aebf0ed4 Reviewed-by: Tomi Korpipää --- src/datavis3d/engine/q3dmaps.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/datavis3d/engine/q3dmaps.h') diff --git a/src/datavis3d/engine/q3dmaps.h b/src/datavis3d/engine/q3dmaps.h index ce9aa3cf..d0681f00 100644 --- a/src/datavis3d/engine/q3dmaps.h +++ b/src/datavis3d/engine/q3dmaps.h @@ -61,6 +61,14 @@ class LabelItem; class QTCOMMERCIALDATAVIS3D_EXPORT Q3DMaps : public Q3DWindow { Q_OBJECT +public: + enum AdjustmentDirection { + AdjustHeight = 0, // map value to y + AdjustWidth, // map value to x + AdjustDepth, // map value to z + AdjustRadius, // map value to x and z + AdjustAll // map value to all (x, y, z) + }; public: explicit Q3DMaps(); @@ -72,22 +80,23 @@ public: // Add data item. New data item is appended to old data. // ownership of data is transferred - void addDataItem(QDataItem *dataItem); + bool addDataItem(QDataItem *dataItem); // Add data set. New data is appended to old data. // ownership of data is transferred - void addData(const QVector &data); + bool addData(const QVector &data); // ownership of data is transferred - void addData(const QDataRow &data); + bool addData(const QDataRow &data); // Add data set. Old data is deleted. // ownership of data is transferred - void setData(const QVector &data); + bool setData(const QVector &data); // ownership of data is transferred - void setData(QDataRow *data); + bool setData(QDataRow *data); // bar specifications; base thickness in x, y and z, enum to indicate which direction is increased with value - void setBarSpecs(const QVector3D &thickness = QVector3D(1.0f, 0.0f, 1.0f));//, joku enumi); + void setBarSpecs(const QVector3D &thickness = QVector3D(1.0f, 0.0f, 1.0f), + AdjustmentDirection direction = AdjustHeight); // bar type; bars (=cubes), pyramids, cones, cylinders, balls, etc. void setBarType(BarStyle style, bool smooth = false); -- cgit v1.2.3