summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/surface3dcontroller.cpp
diff options
context:
space:
mode:
authorTomi Korpipää <tomi.korpipaa@digia.com>2013-11-04 13:40:09 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-11-04 13:46:52 +0200
commit0d5caf7904098186e50009627996191dc7f8687b (patch)
treeabff5454cd8839e77f6e9484f92556bb733f3cb1 /src/datavisualization/engine/surface3dcontroller.cpp
parent9cb3cf372155e2a57c15e4044a3684694ff1b1bd (diff)
Surface toggling API implemented
Task-number: QTRD-2337 Change-Id: I59695a042c864faed90839c4e566fcece5cb94f4 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src/datavisualization/engine/surface3dcontroller.cpp')
-rw-r--r--src/datavisualization/engine/surface3dcontroller.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/datavisualization/engine/surface3dcontroller.cpp b/src/datavisualization/engine/surface3dcontroller.cpp
index ec1cae30..04943bf9 100644
--- a/src/datavisualization/engine/surface3dcontroller.cpp
+++ b/src/datavisualization/engine/surface3dcontroller.cpp
@@ -34,6 +34,7 @@ Surface3DController::Surface3DController(QRect rect)
: Abstract3DController(rect),
m_renderer(0),
m_isSmoothSurfaceEnabled(false),
+ m_isSurfaceEnabled(true),
m_isSurfaceGridEnabled(true),
m_selectedPoint(noSelectionPoint())
{
@@ -91,6 +92,11 @@ void Surface3DController::synchDataToRenderer()
emit smoothSurfaceEnabledChanged(m_isSmoothSurfaceEnabled);
}
+ if (m_changeTracker.surfaceVisibilityChanged) {
+ m_renderer->updateSurfaceVisibilityStatus(m_isSurfaceEnabled);
+ m_changeTracker.surfaceVisibilityChanged = false;
+ }
+
if (m_changeTracker.surfaceGridChanged) {
m_renderer->updateSurfaceGridStatus(m_isSurfaceGridEnabled);
m_changeTracker.surfaceGridChanged = false;
@@ -145,6 +151,18 @@ bool Surface3DController::smoothSurface()
return m_isSmoothSurfaceEnabled;
}
+void Surface3DController::setSurfaceVisible(bool visible)
+{
+ m_isSurfaceEnabled = visible;
+ m_changeTracker.surfaceVisibilityChanged = true;
+ emitNeedRender();
+}
+
+bool Surface3DController::surfaceVisible() const
+{
+ return m_isSurfaceEnabled;
+}
+
void Surface3DController::setSurfaceGrid(bool enable)
{
m_isSurfaceGridEnabled = enable;