summaryrefslogtreecommitdiffstats
path: root/src/datavis3d/engine/q3dmaps.h
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-05-02 13:29:07 +0300
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-05-03 06:27:35 +0300
commite949b92bd00fe97b609a4fdb43f1159dc36b4212 (patch)
tree4f4ed2cffd397cf1abc91718baec4747ab16b563 /src/datavis3d/engine/q3dmaps.h
parent5a080d1ae09eed5b441d838db63773eb21b9bff5 (diff)
Q3DMaps: Added support for visualizing value in selected dimension
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ää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavis3d/engine/q3dmaps.h')
-rw-r--r--src/datavis3d/engine/q3dmaps.h21
1 files changed, 15 insertions, 6 deletions
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<QDataItem*> &data);
+ bool addData(const QVector<QDataItem*> &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<QDataItem*> &data);
+ bool setData(const QVector<QDataItem*> &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);