diff options
Diffstat (limited to 'src/datavisualization/engine/q3dsurface.cpp')
-rw-r--r-- | src/datavisualization/engine/q3dsurface.cpp | 27 |
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. |