summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/q3dbars.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-09-19 13:32:31 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-09-22 09:35:46 +0300
commit36bc54f5720bddb9899e64d665117ac1e1b5bc94 (patch)
tree71d903cacc81c7a664ce0e05a167791234f7cf62 /src/datavisualization/engine/q3dbars.cpp
parent105e85170d35f7086dc96d1853298fcf8d680e06 (diff)
Allow setting the floor level on bar graphs.
Task-number: QTRD-3313 Change-Id: Ie0f8e36af8698081a6937c360043773da895b6e6 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine/q3dbars.cpp')
-rw-r--r--src/datavisualization/engine/q3dbars.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/datavisualization/engine/q3dbars.cpp b/src/datavisualization/engine/q3dbars.cpp
index bb7aca89..d42c11b7 100644
--- a/src/datavisualization/engine/q3dbars.cpp
+++ b/src/datavisualization/engine/q3dbars.cpp
@@ -331,6 +331,26 @@ QBar3DSeries *Q3DBars::selectedSeries() const
}
/*!
+ * \property Q3DBars::floorLevel
+ *
+ * The desired floor level for the bar graph in Y-axis data coordinates.
+ * The actual floor level cannot go below Y-axis minimum or above Y-axis maximum.
+ * Defaults to zero.
+ */
+void Q3DBars::setFloorLevel(float level)
+{
+ if (level != floorLevel()) {
+ dptr()->m_shared->setFloorLevel(level);
+ emit floorLevelChanged(level);
+ }
+}
+
+float Q3DBars::floorLevel() const
+{
+ return dptrc()->m_shared->floorLevel();
+}
+
+/*!
* Adds \a axis to the graph. The axes added via addAxis are not yet taken to use,
* addAxis is simply used to give the ownership of the \a axis to the graph.
* The \a axis must not be null or added to another graph.