summaryrefslogtreecommitdiffstats
path: root/examples/datavisualization/qmlsurfacelayers/doc
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-02-13 09:59:52 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-02-13 10:09:17 +0200
commit88cd10aa7b3559b092cf5575b0a17d002dc100ae (patch)
tree9d6e7efdec49419558bb4ef4a9bc02ae3cb1cfc4 /examples/datavisualization/qmlsurfacelayers/doc
parentecabd51692b476567dc42a745f51996ec665b385 (diff)
Fix examples installation
Had to add one folder to the examples structure so installation works correctly. Change-Id: Ic92dfe9997413a6243abcf5eeba12744ba9e938c Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/datavisualization/qmlsurfacelayers/doc')
-rw-r--r--examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.pngbin0 -> 86259 bytes
-rw-r--r--examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc80
2 files changed, 80 insertions, 0 deletions
diff --git a/examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.png b/examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.png
new file mode 100644
index 00000000..a5b179fb
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.png
Binary files differ
diff --git a/examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc b/examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc
new file mode 100644
index 00000000..eab9f17f
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+/*!
+ \example qmlsurfacelayers
+ \title Qt Quick 2 Surface Multiseries Example
+ \ingroup qtdatavisualization_examples
+ \brief Using multiple series with Surface3D in a QML application.
+
+ The Qt Quick 2 surface example shows how to make a 3D surface plot displaying 3 layers using
+ Surface3D with Qt Quick 2.
+
+ \image qmlsurfacelayers-example.png
+
+ The focus in this example is on generating a multiseries surface plot from 3 different height
+ map images, so in this section we skip explaining the application creation. For a more detailed
+ QML example documentation, see \l{Qt Quick 2 Scatter Example}.
+
+ \section1 Adding data to the graph
+
+ This example shows how to add several surface series to one graph using using
+ HeightMapSurfaceDataProxies and how to control their visibilities individually.
+
+ Let's start by creating a specific gradient for each layer:
+
+ \snippet ../examples/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 0
+
+ Then we'll create the series themselves. It happens simply by adding 3 separate Surface3DSeries
+ to the Surface3D graph as children:
+
+ \dots 0
+ \snippet ../examples/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 1
+ \dots 0
+
+ You'll notice we added the created gradients to the \c baseGradient properties of the series.
+ We could have added them to the \c baseGradients property of the Theme3D in Surface3D instead,
+ but doing it this way ensures each gradient is applied to a correct series:
+
+ \snippet ../examples/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 2
+ \dots
+
+ \section1 Controlling the graph
+
+ Let's add some checkboxes to control the visibility of layers:
+
+ \snippet ../examples/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 3
+
+ We don't need to do anything on the \c onCheckedChanged as we bound the \c checked state to
+ the \c visible property of the series directly:
+
+ \dots 0
+ \snippet ../examples/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 4
+ \dots 0
+
+ Let's add some more checkboxes to control how the layers are displayed, when visible:
+
+ \snippet ../examples/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 5
+
+ In addition to these we have two buttons, one of which is of special interest to us. It is used
+ to control whether we want to slice into only one layer, or all of them:
+
+ \snippet ../examples/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 6
+
+ \section1 Example contents
+*/