summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/q3dsurface.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-10-29 09:45:41 +0200
committerMiikka Heikkinen <miikka.heikkinen@theqtcompany.com>2014-10-29 09:45:41 +0200
commite3a4f132ca2a42af3d4bb889d6a17948b88d26a2 (patch)
tree554d2b8b3020dc71438301aa696dea1e9a36943a /src/datavisualization/engine/q3dsurface.cpp
parentcc50608385cf77a0803431ece1385f341a400b75 (diff)
parentbf716cfdf0afecccdb1f2eabb2e6a172c620fbff (diff)
Merge branch 'develop'
Conflicts: .qmake.conf README src/datavisualization/global/qdatavisualizationglobal.h Change-Id: Ia6941dcf3e6aa17e2e9ebc6f60fac16ef5049f11
Diffstat (limited to 'src/datavisualization/engine/q3dsurface.cpp')
-rw-r--r--src/datavisualization/engine/q3dsurface.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/datavisualization/engine/q3dsurface.cpp b/src/datavisualization/engine/q3dsurface.cpp
index c5ce29d7..ce3e7f4c 100644
--- a/src/datavisualization/engine/q3dsurface.cpp
+++ b/src/datavisualization/engine/q3dsurface.cpp
@@ -98,6 +98,8 @@ Q3DSurface::Q3DSurface(const QSurfaceFormat *format, QWindow *parent)
dptr()->m_shared->initializeOpenGL();
QObject::connect(dptr()->m_shared, &Surface3DController::selectedSeriesChanged,
this, &Q3DSurface::selectedSeriesChanged);
+ QObject::connect(dptr()->m_shared, &Surface3DController::flipHorizontalGridChanged,
+ this, &Q3DSurface::flipHorizontalGridChanged);
}
/*!
@@ -230,6 +232,31 @@ QSurface3DSeries *Q3DSurface::selectedSeries() const
}
/*!
+ * \property Q3DSurface::flipHorizontalGrid
+ * \since QtDataVisualization 1.2
+ *
+ * In some use cases the horizontal axis grid is mostly covered by the surface, so it can be more
+ * useful to display the horizontal axis grid on top of the graph rather than on the bottom.
+ * A typical use case for this is showing 2D spectrograms using orthoGraphic projection with
+ * a top-down viewpoint.
+ *
+ * If \c{false}, the horizontal axis grid and labels are drawn on the horizontal background
+ * of the graph.
+ * If \c{true}, the horizontal axis grid and labels are drawn on the opposite side of the graph
+ * from the horizontal background.
+ * Defaults to \c{false}.
+ */
+void Q3DSurface::setFlipHorizontalGrid(bool flip)
+{
+ dptr()->m_shared->setFlipHorizontalGrid(flip);
+}
+
+bool Q3DSurface::flipHorizontalGrid() const
+{
+ return dptrc()->m_shared->flipHorizontalGrid();
+}
+
+/*!
* 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.