summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-02-26 13:55:25 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-02-26 13:57:49 +0200
commitd6e8b26e2e5441750f342da4f78c6aa1be1ea452 (patch)
treeffe94467846662cd161a966008b5e2046dcb6638 /examples
parentb368e57e59351736f9ad06834a743a7c1b49d368 (diff)
parentcd334eb5eb93314a958dd58a0df57adcd2a198c5 (diff)
Merge branch 'develop'
Diffstat (limited to 'examples')
-rw-r--r--examples/bars/doc/images/bars-example.pngbin135242 -> 0 bytes
-rw-r--r--examples/datavisualization/audiolevels/audiolevels.cpp (renamed from examples/audiolevels/audiolevels.cpp)4
-rw-r--r--examples/datavisualization/audiolevels/audiolevels.h (renamed from examples/audiolevels/audiolevels.h)0
-rw-r--r--examples/datavisualization/audiolevels/audiolevels.pro (renamed from examples/audiolevels/audiolevels.pro)3
-rw-r--r--examples/datavisualization/audiolevels/audiolevelsiodevice.cpp (renamed from examples/audiolevels/audiolevelsiodevice.cpp)2
-rw-r--r--examples/datavisualization/audiolevels/audiolevelsiodevice.h (renamed from examples/audiolevels/audiolevelsiodevice.h)2
-rw-r--r--examples/datavisualization/audiolevels/doc/images/audiolevels-example.png (renamed from examples/audiolevels/doc/images/audiolevels-example.png)bin120978 -> 120978 bytes
-rw-r--r--examples/datavisualization/audiolevels/doc/src/audiolevels.qdoc (renamed from examples/audiolevels/doc/src/audiolevels.qdoc)14
-rw-r--r--examples/datavisualization/audiolevels/main.cpp (renamed from examples/audiolevels/main.cpp)4
-rw-r--r--examples/datavisualization/bars/bars.pro (renamed from examples/bars/bars.pro)2
-rw-r--r--examples/datavisualization/bars/doc/images/bars-example.pngbin0 -> 151337 bytes
-rw-r--r--examples/datavisualization/bars/doc/src/bars.qdoc (renamed from examples/bars/doc/src/bars.qdoc)37
-rw-r--r--examples/datavisualization/bars/graphmodifier.cpp (renamed from examples/bars/graphmodifier.cpp)26
-rw-r--r--examples/datavisualization/bars/graphmodifier.h (renamed from examples/bars/graphmodifier.h)9
-rw-r--r--examples/datavisualization/bars/main.cpp (renamed from examples/bars/main.cpp)41
-rw-r--r--examples/datavisualization/custominput/custominput.pro (renamed from examples/custominput/custominput.pro)2
-rw-r--r--examples/datavisualization/custominput/custominput.qrc (renamed from examples/custominput/custominput.qrc)0
-rw-r--r--examples/datavisualization/custominput/custominputhandler.cpp (renamed from examples/custominput/custominputhandler.cpp)0
-rw-r--r--examples/datavisualization/custominput/custominputhandler.h (renamed from examples/custominput/custominputhandler.h)0
-rw-r--r--examples/datavisualization/custominput/data/data.txt (renamed from examples/custominput/data/data.txt)0
-rw-r--r--examples/datavisualization/custominput/doc/images/custominput-example.png (renamed from examples/custominput/doc/images/custominput-example.png)bin62422 -> 62422 bytes
-rw-r--r--examples/datavisualization/custominput/doc/src/custominput.qdoc (renamed from examples/custominput/doc/src/custominput.qdoc)12
-rw-r--r--examples/datavisualization/custominput/main.cpp (renamed from examples/custominput/main.cpp)22
-rw-r--r--examples/datavisualization/custominput/scatterdatamodifier.cpp (renamed from examples/custominput/scatterdatamodifier.cpp)4
-rw-r--r--examples/datavisualization/custominput/scatterdatamodifier.h (renamed from examples/custominput/scatterdatamodifier.h)6
-rw-r--r--examples/datavisualization/customproxy/customproxy.pro (renamed from examples/customproxy/customproxy.pro)8
-rw-r--r--examples/datavisualization/customproxy/customproxy.qrc (renamed from examples/customproxy/customproxy.qrc)0
-rw-r--r--examples/datavisualization/customproxy/data/raindata.txt (renamed from examples/customproxy/data/raindata.txt)0
-rw-r--r--examples/datavisualization/customproxy/doc/images/customproxy-example.png (renamed from examples/customproxy/doc/images/customproxy-example.png)bin125698 -> 125698 bytes
-rw-r--r--examples/datavisualization/customproxy/doc/src/customproxy.qdoc (renamed from examples/customproxy/doc/src/customproxy.qdoc)26
-rw-r--r--examples/datavisualization/customproxy/main.cpp (renamed from examples/customproxy/main.cpp)2
-rw-r--r--examples/datavisualization/customproxy/rainfallgraph.cpp (renamed from examples/customproxy/rainfallgraph.cpp)10
-rw-r--r--examples/datavisualization/customproxy/rainfallgraph.h (renamed from examples/customproxy/rainfallgraph.h)0
-rw-r--r--examples/datavisualization/customproxy/variantbardatamapping.cpp (renamed from examples/customproxy/variantbardatamapping.cpp)0
-rw-r--r--examples/datavisualization/customproxy/variantbardatamapping.h (renamed from examples/customproxy/variantbardatamapping.h)2
-rw-r--r--examples/datavisualization/customproxy/variantbardataproxy.cpp (renamed from examples/customproxy/variantbardataproxy.cpp)0
-rw-r--r--examples/datavisualization/customproxy/variantbardataproxy.h (renamed from examples/customproxy/variantbardataproxy.h)6
-rw-r--r--examples/datavisualization/customproxy/variantdataset.cpp (renamed from examples/customproxy/variantdataset.cpp)0
-rw-r--r--examples/datavisualization/customproxy/variantdataset.h (renamed from examples/customproxy/variantdataset.h)4
-rw-r--r--examples/datavisualization/datavisualization.pro21
-rw-r--r--examples/datavisualization/examples.pri14
-rw-r--r--examples/datavisualization/itemmodel/doc/images/itemmodel-example-2.png (renamed from examples/itemmodel/doc/images/itemmodel-example-2.png)bin78536 -> 78536 bytes
-rw-r--r--examples/datavisualization/itemmodel/doc/images/itemmodel-example.png (renamed from examples/itemmodel/doc/images/itemmodel-example.png)bin45381 -> 45381 bytes
-rw-r--r--examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc (renamed from examples/itemmodel/doc/src/itemmodel.qdoc)34
-rw-r--r--examples/datavisualization/itemmodel/itemmodel.pro (renamed from examples/itemmodel/itemmodel.pro)2
-rw-r--r--examples/datavisualization/itemmodel/main.cpp (renamed from examples/itemmodel/main.cpp)21
-rw-r--r--examples/datavisualization/qmlbars/doc/images/qmlbars-example.png (renamed from examples/qmlbars/doc/images/qmlbars-example.png)bin149167 -> 149167 bytes
-rw-r--r--examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc (renamed from examples/qmlbars/doc/src/qmlbars.qdoc)18
-rw-r--r--examples/datavisualization/qmlbars/main.cpp (renamed from examples/qmlbars/main.cpp)30
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml (renamed from examples/qmlbars/qml/qmlbars/axes.qml)0
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/Data.qml (renamed from examples/qmlbars/qml/qmlbars/data.qml)0
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/main.qml (renamed from examples/qmlbars/qml/qmlbars/main.qml)2
-rw-r--r--examples/datavisualization/qmlbars/qmlbars.pro12
-rw-r--r--examples/datavisualization/qmlbars/qmlbars.qrc7
-rw-r--r--examples/datavisualization/qmlcustominput/doc/images/qmlcustominput-example.pngbin0 -> 73150 bytes
-rw-r--r--examples/datavisualization/qmlcustominput/doc/src/qmlcustominput.qdoc (renamed from examples/qmlcustominput/doc/src/qmlcustominput.qdoc)22
-rw-r--r--examples/datavisualization/qmlcustominput/main.cpp (renamed from examples/qmlcustominput/main.cpp)31
-rw-r--r--examples/datavisualization/qmlcustominput/qml/qmlcustominput/Data.qml (renamed from examples/qmlcustominput/qml/qmlcustominput/data.qml)12
-rw-r--r--examples/datavisualization/qmlcustominput/qml/qmlcustominput/NewButton.qml (renamed from examples/qmlcustominput/qml/qmlcustominput/newbutton.qml)0
-rw-r--r--examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml (renamed from examples/qmlcustominput/qml/qmlcustominput/main.qml)36
-rw-r--r--examples/datavisualization/qmlcustominput/qmlcustominput.pro12
-rw-r--r--examples/datavisualization/qmlcustominput/qmlcustominput.qrc7
-rw-r--r--examples/datavisualization/qmllegend/doc/images/qmllegend-example.png (renamed from examples/qmllegend/doc/images/qmllegend-example.png)bin98023 -> 98023 bytes
-rw-r--r--examples/datavisualization/qmllegend/doc/src/qmllegend.qdoc (renamed from examples/qmllegend/doc/src/qmllegend.qdoc)12
-rw-r--r--examples/datavisualization/qmllegend/main.cpp (renamed from examples/qmllegend/main.cpp)31
-rw-r--r--examples/datavisualization/qmllegend/qml/qmllegend/Data.qml (renamed from examples/qmllegend/qml/qmllegend/data.qml)0
-rw-r--r--examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml (renamed from examples/qmllegend/qml/qmllegend/legenditem.qml)0
-rw-r--r--examples/datavisualization/qmllegend/qml/qmllegend/NewButton.qml (renamed from examples/qmllegend/qml/qmllegend/newbutton.qml)0
-rw-r--r--examples/datavisualization/qmllegend/qml/qmllegend/main.qml (renamed from examples/qmllegend/qml/qmllegend/main.qml)2
-rw-r--r--examples/datavisualization/qmllegend/qmllegend.pro13
-rw-r--r--examples/datavisualization/qmllegend/qmllegend.qrc8
-rw-r--r--examples/datavisualization/qmlmultigraph/doc/images/qmlmultigraph-example.pngbin0 -> 82347 bytes
-rw-r--r--examples/datavisualization/qmlmultigraph/doc/src/qmlmultigraph.qdoc (renamed from examples/qmlmultigraph/doc/src/qmlmultigraph.qdoc)11
-rw-r--r--examples/datavisualization/qmlmultigraph/main.cpp (renamed from examples/qmlmultigraph/main.cpp)33
-rw-r--r--examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml48
-rw-r--r--examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/NewButton.qml (renamed from examples/qmlmultigraph/qml/qmlmultigraph/newbutton.qml)0
-rw-r--r--examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml210
-rw-r--r--examples/datavisualization/qmlmultigraph/qmlmultigraph.pro12
-rw-r--r--examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc7
-rw-r--r--examples/datavisualization/qmloscilloscope/datasource.cpp172
-rw-r--r--examples/datavisualization/qmloscilloscope/datasource.h54
-rw-r--r--examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.pngbin0 -> 134021 bytes
-rw-r--r--examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc126
-rw-r--r--examples/datavisualization/qmloscilloscope/main.cpp65
-rw-r--r--examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/NewButton.qml (renamed from examples/qmlscatter/qml/qmlscatter/newbutton.qml)0
-rw-r--r--examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml306
-rw-r--r--examples/datavisualization/qmloscilloscope/qmloscilloscope.pro16
-rw-r--r--examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc6
-rw-r--r--examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.png (renamed from examples/qmlscatter/doc/images/qmlscatter-example.png)bin98086 -> 98086 bytes
-rw-r--r--examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc (renamed from examples/qmlscatter/doc/src/qmlscatter.qdoc)110
-rw-r--r--examples/datavisualization/qmlscatter/main.cpp (renamed from examples/qmlscatter/main.cpp)46
-rw-r--r--examples/datavisualization/qmlscatter/qml/qmlscatter/Data.qml (renamed from examples/qmlscatter/qml/qmlscatter/data.qml)0
-rw-r--r--examples/datavisualization/qmlscatter/qml/qmlscatter/NewButton.qml (renamed from examples/qmlsurface/qml/qmlsurface/newbutton.qml)0
-rw-r--r--examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml (renamed from examples/qmlscatter/qml/qmlscatter/main.qml)2
-rw-r--r--examples/datavisualization/qmlscatter/qmlscatter.pro12
-rw-r--r--examples/datavisualization/qmlscatter/qmlscatter.qrc7
-rw-r--r--examples/datavisualization/qmlsurface/doc/images/qmlsurface-example.pngbin0 -> 334593 bytes
-rw-r--r--examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc (renamed from examples/qmlsurface/doc/src/qmlsurface.qdoc)20
-rw-r--r--examples/datavisualization/qmlsurface/heightmap.png (renamed from examples/qmlsurface/heightmap.png)bin38634 -> 38634 bytes
-rw-r--r--examples/datavisualization/qmlsurface/main.cpp (renamed from examples/qmlsurface/main.cpp)29
-rw-r--r--examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml (renamed from examples/qmlsurface/qml/qmlsurface/data.qml)0
-rw-r--r--examples/datavisualization/qmlsurface/qml/qmlsurface/NewButton.qml52
-rw-r--r--examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml (renamed from examples/qmlsurface/qml/qmlsurface/main.qml)104
-rw-r--r--examples/datavisualization/qmlsurface/qmlsurface.pro12
-rw-r--r--examples/datavisualization/qmlsurface/qmlsurface.qrc10
-rw-r--r--examples/datavisualization/qmlsurfacelayers/doc/images/qmlsurfacelayers-example.pngbin0 -> 91579 bytes
-rw-r--r--examples/datavisualization/qmlsurfacelayers/doc/src/qmlsurfacelayers.qdoc80
-rw-r--r--examples/datavisualization/qmlsurfacelayers/layer_1.png (renamed from examples/surface/mountain.png)bin34540 -> 34540 bytes
-rw-r--r--examples/datavisualization/qmlsurfacelayers/layer_2.pngbin0 -> 10553 bytes
-rw-r--r--examples/datavisualization/qmlsurfacelayers/layer_3.pngbin0 -> 13022 bytes
-rw-r--r--examples/datavisualization/qmlsurfacelayers/main.cpp52
-rw-r--r--examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/NewButton.qml52
-rw-r--r--examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml278
-rw-r--r--examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.pro12
-rw-r--r--examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc11
-rw-r--r--examples/datavisualization/rotations/doc/images/rotations-example.pngbin0 -> 69487 bytes
-rw-r--r--examples/datavisualization/rotations/doc/src/rotations.qdoc68
-rw-r--r--examples/datavisualization/rotations/main.cpp87
-rw-r--r--examples/datavisualization/rotations/mesh/largesphere.obj1938
-rw-r--r--examples/datavisualization/rotations/mesh/narrowarrow.obj413
-rw-r--r--examples/datavisualization/rotations/rotations.pro13
-rw-r--r--examples/datavisualization/rotations/rotations.qrc6
-rw-r--r--examples/datavisualization/rotations/scatterdatamodifier.cpp183
-rw-r--r--examples/datavisualization/rotations/scatterdatamodifier.h56
-rw-r--r--examples/datavisualization/scatter/doc/images/scatter-example.pngbin0 -> 142496 bytes
-rw-r--r--examples/datavisualization/scatter/doc/src/scatter.qdoc (renamed from examples/scatter/doc/src/scatter.qdoc)39
-rw-r--r--examples/datavisualization/scatter/main.cpp (renamed from examples/scatter/main.cpp)28
-rw-r--r--examples/datavisualization/scatter/scatter.pro (renamed from examples/scatter/scatter.pro)2
-rw-r--r--examples/datavisualization/scatter/scatterdatamodifier.cpp (renamed from examples/scatter/scatterdatamodifier.cpp)43
-rw-r--r--examples/datavisualization/scatter/scatterdatamodifier.h (renamed from examples/scatter/scatterdatamodifier.h)3
-rw-r--r--examples/datavisualization/surface/doc/images/surface-example.png (renamed from examples/surface/doc/images/surface-example.png)bin149046 -> 149046 bytes
-rw-r--r--examples/datavisualization/surface/doc/src/surface.qdoc (renamed from examples/surface/doc/src/surface.qdoc)36
-rw-r--r--examples/datavisualization/surface/main.cpp (renamed from examples/surface/main.cpp)1
-rw-r--r--examples/datavisualization/surface/mountain.pngbin0 -> 34540 bytes
-rw-r--r--examples/datavisualization/surface/surface.pro (renamed from examples/surface/surface.pro)2
-rw-r--r--examples/datavisualization/surface/surface.qrc (renamed from examples/surface/surface.qrc)0
-rw-r--r--examples/datavisualization/surface/surfacegraph.cpp (renamed from examples/surface/surfacegraph.cpp)4
-rw-r--r--examples/datavisualization/surface/surfacegraph.h (renamed from examples/surface/surfacegraph.h)0
-rw-r--r--examples/examples.pri111
-rw-r--r--examples/examples.pro18
-rw-r--r--examples/qmlbars/qmlbars.desktop11
-rw-r--r--examples/qmlbars/qmlbars.pro25
-rw-r--r--examples/qmlbars/qmlbars.qrc7
-rw-r--r--examples/qmlbars/qmlbars64.pngbin3400 -> 0 bytes
-rw-r--r--examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.cpp81
-rw-r--r--examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.h33
-rw-r--r--examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.pri180
-rw-r--r--examples/qmlcustominput/doc/images/qmlcustominput-example.pngbin57821 -> 0 bytes
-rw-r--r--examples/qmlcustominput/qmlcustominput.desktop11
-rw-r--r--examples/qmlcustominput/qmlcustominput.pro26
-rw-r--r--examples/qmlcustominput/qmlcustominput.qrc7
-rw-r--r--examples/qmlcustominput/qmlcustominput64.pngbin3400 -> 0 bytes
-rw-r--r--examples/qmlcustominput/qmlcustominput80.pngbin4945 -> 0 bytes
-rw-r--r--examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.cpp81
-rw-r--r--examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.h33
-rw-r--r--examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.pri180
-rw-r--r--examples/qmllegend/qmllegend.desktop11
-rw-r--r--examples/qmllegend/qmllegend.pro25
-rw-r--r--examples/qmllegend/qmllegend.qrc8
-rw-r--r--examples/qmllegend/qmllegend64.pngbin3400 -> 0 bytes
-rw-r--r--examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.cpp81
-rw-r--r--examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.h33
-rw-r--r--examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.pri180
-rw-r--r--examples/qmlmultigraph/doc/images/qmlmultigraph-example.pngbin39416 -> 0 bytes
-rw-r--r--examples/qmlmultigraph/qml/qmlmultigraph/data.qml76
-rw-r--r--examples/qmlmultigraph/qml/qmlmultigraph/main.qml169
-rw-r--r--examples/qmlmultigraph/qmlmultigraph.desktop11
-rw-r--r--examples/qmlmultigraph/qmlmultigraph.pro25
-rw-r--r--examples/qmlmultigraph/qmlmultigraph.qrc7
-rw-r--r--examples/qmlmultigraph/qmlmultigraph64.pngbin3400 -> 0 bytes
-rw-r--r--examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.cpp81
-rw-r--r--examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.h33
-rw-r--r--examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.pri180
-rw-r--r--examples/qmlscatter/doc/images/qmlscatter-newproject.pngbin37045 -> 0 bytes
-rw-r--r--examples/qmlscatter/qmlscatter.desktop11
-rw-r--r--examples/qmlscatter/qmlscatter.pro25
-rw-r--r--examples/qmlscatter/qmlscatter.qrc7
-rw-r--r--examples/qmlscatter/qmlscatter64.pngbin3400 -> 0 bytes
-rw-r--r--examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.cpp81
-rw-r--r--examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.h33
-rw-r--r--examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.pri180
-rw-r--r--examples/qmlsurface/doc/images/qmlsurface-example.pngbin195500 -> 0 bytes
-rw-r--r--examples/qmlsurface/qmlsurface.desktop11
-rw-r--r--examples/qmlsurface/qmlsurface.pro25
-rw-r--r--examples/qmlsurface/qmlsurface.qrc10
-rw-r--r--examples/qmlsurface/qmlsurface64.pngbin3400 -> 0 bytes
-rw-r--r--examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.cpp81
-rw-r--r--examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.h33
-rw-r--r--examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.pri180
-rw-r--r--examples/scatter/doc/images/scatter-example.pngbin131518 -> 0 bytes
190 files changed, 4982 insertions, 2891 deletions
diff --git a/examples/bars/doc/images/bars-example.png b/examples/bars/doc/images/bars-example.png
deleted file mode 100644
index 6cc94455..00000000
--- a/examples/bars/doc/images/bars-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/audiolevels/audiolevels.cpp b/examples/datavisualization/audiolevels/audiolevels.cpp
index 18c1342a..81059460 100644
--- a/examples/audiolevels/audiolevels.cpp
+++ b/examples/datavisualization/audiolevels/audiolevels.cpp
@@ -26,8 +26,8 @@
#include <QtDataVisualization/qbar3dseries.h>
#include <QtDataVisualization/q3dtheme.h>
-#include <QAudioDeviceInfo>
-#include <QAudioInput>
+#include <QtMultimedia/QAudioDeviceInfo>
+#include <QtMultimedia/QAudioInput>
using namespace QtDataVisualization;
diff --git a/examples/audiolevels/audiolevels.h b/examples/datavisualization/audiolevels/audiolevels.h
index 84d9b4c4..84d9b4c4 100644
--- a/examples/audiolevels/audiolevels.h
+++ b/examples/datavisualization/audiolevels/audiolevels.h
diff --git a/examples/audiolevels/audiolevels.pro b/examples/datavisualization/audiolevels/audiolevels.pro
index 7df4379b..73a68471 100644
--- a/examples/audiolevels/audiolevels.pro
+++ b/examples/datavisualization/audiolevels/audiolevels.pro
@@ -13,8 +13,5 @@ SOURCES += main.cpp \
HEADERS += audiolevels.h \
audiolevelsiodevice.h
-INSTALLS += target
-
OTHER_FILES += doc/src/* \
doc/images/*
-
diff --git a/examples/audiolevels/audiolevelsiodevice.cpp b/examples/datavisualization/audiolevels/audiolevelsiodevice.cpp
index c0cd70e3..27ddce4f 100644
--- a/examples/audiolevels/audiolevelsiodevice.cpp
+++ b/examples/datavisualization/audiolevels/audiolevelsiodevice.cpp
@@ -17,7 +17,7 @@
****************************************************************************/
#include "audiolevelsiodevice.h"
-#include <QDebug>
+#include <QtCore/QDebug>
using namespace QtDataVisualization;
diff --git a/examples/audiolevels/audiolevelsiodevice.h b/examples/datavisualization/audiolevels/audiolevelsiodevice.h
index 45f17626..7510db35 100644
--- a/examples/audiolevels/audiolevelsiodevice.h
+++ b/examples/datavisualization/audiolevels/audiolevelsiodevice.h
@@ -20,7 +20,7 @@
#define AUDIOLEVELSIODEVICE_H
#include <QtDataVisualization/qbardataproxy.h>
-#include <QIODevice>
+#include <QtCore/QIODevice>
using namespace QtDataVisualization;
diff --git a/examples/audiolevels/doc/images/audiolevels-example.png b/examples/datavisualization/audiolevels/doc/images/audiolevels-example.png
index ec79eb5a..ec79eb5a 100644
--- a/examples/audiolevels/doc/images/audiolevels-example.png
+++ b/examples/datavisualization/audiolevels/doc/images/audiolevels-example.png
Binary files differ
diff --git a/examples/audiolevels/doc/src/audiolevels.qdoc b/examples/datavisualization/audiolevels/doc/src/audiolevels.qdoc
index 189db184..11bea3c3 100644
--- a/examples/audiolevels/doc/src/audiolevels.qdoc
+++ b/examples/datavisualization/audiolevels/doc/src/audiolevels.qdoc
@@ -39,23 +39,23 @@
In the header file for \c AudioLevels class we declare necessary members:
- \snippet ../examples/audiolevels/audiolevels.h 0
+ \snippet audiolevels/audiolevels.h 0
And initialize the microphone listening in the source:
- \snippet ../examples/audiolevels/audiolevels.cpp 0
+ \snippet audiolevels/audiolevels.cpp 0
In the header file for \c AudioLevelsIODevice class we store pointers to the data proxy and
also the data array we give to the proxy, because we reuse the same array to keep memory
reallocations to the minimum:
- \snippet ../examples/audiolevels/audiolevelsiodevice.h 0
+ \snippet audiolevels/audiolevelsiodevice.h 0
In the source file we define some static constants to define size of the data array and
the middle row index, as well as the resolution of the visualization. You may need to adjust
these values to get decent performance in low-end devices:
- \snippet ../examples/audiolevels/audiolevelsiodevice.cpp 1
+ \snippet audiolevels/audiolevelsiodevice.cpp 1
The \c resolution constant indicates the sample rate, for example, value 8 means every eighth
byte from audio input is visualized. This is necessary to make the data readable, as it would
@@ -63,13 +63,13 @@
In the \c AudioLevelsIODevice class constructor we initialize the data array:
- \snippet ../examples/audiolevels/audiolevelsiodevice.cpp 0
+ \snippet audiolevels/audiolevelsiodevice.cpp 0
The \c AudioLevelsIODevice::writeData function is called whenever there is new audio data
available to be visualized. There we move the old data along the rows and insert new
data in the beginning of the rows:
- \snippet ../examples/audiolevels/audiolevelsiodevice.cpp 2
+ \snippet audiolevels/audiolevelsiodevice.cpp 2
We use a couple of techniques here to improve performance. First, we reuse
the existing data array, as this allows us to avoid any extra memory allocations in our
@@ -80,6 +80,6 @@
\note In the future versions of Qt Data Visualization, QBarDataItem might get extended so that
it does allocate some memory to store other optional bar properties besides the value.
- In use cases where those optional properties are used, using \c memmove and \c memcpy would lead to
+ In use cases where those optional properties are used, using \c memmove and \c memcpy could lead to
memory leaks, so use them with care.
*/
diff --git a/examples/audiolevels/main.cpp b/examples/datavisualization/audiolevels/main.cpp
index 9dd07b1b..4f9c01cb 100644
--- a/examples/audiolevels/main.cpp
+++ b/examples/datavisualization/audiolevels/main.cpp
@@ -18,8 +18,8 @@
#include "audiolevels.h"
-#include <QGuiApplication>
-#include <QAudio>
+#include <QtGui/QGuiApplication>
+#include <QtMultimedia/QAudio>
using namespace QtDataVisualization;
diff --git a/examples/bars/bars.pro b/examples/datavisualization/bars/bars.pro
index e4e2c5fa..f2a1a2be 100644
--- a/examples/bars/bars.pro
+++ b/examples/datavisualization/bars/bars.pro
@@ -7,7 +7,5 @@ HEADERS += graphmodifier.h
QT += widgets
-INSTALLS += target
-
OTHER_FILES += doc/src/* \
doc/images/*
diff --git a/examples/datavisualization/bars/doc/images/bars-example.png b/examples/datavisualization/bars/doc/images/bars-example.png
new file mode 100644
index 00000000..5bd2c7d9
--- /dev/null
+++ b/examples/datavisualization/bars/doc/images/bars-example.png
Binary files differ
diff --git a/examples/bars/doc/src/bars.qdoc b/examples/datavisualization/bars/doc/src/bars.qdoc
index 9c80b804..58f6bdc4 100644
--- a/examples/bars/doc/src/bars.qdoc
+++ b/examples/datavisualization/bars/doc/src/bars.qdoc
@@ -42,7 +42,7 @@
First, in main.cpp, we create a QApplication, instantiate Q3DBars and a window container
for it:
- \snippet ../examples/bars/main.cpp 0
+ \snippet bars/main.cpp 0
The call to QWidget::createWindowContainer is required, as all data visualization types
(Q3DBars, Q3DScatter, Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
@@ -51,7 +51,7 @@
Then we'll create horizontal and vertical layouts. We'll add the graph and the vertical
layout into the horizontal one:
- \snippet ../examples/bars/main.cpp 1
+ \snippet bars/main.cpp 1
We're not using the vertical layout for anything yet, but we'll get back to it in
\l {Using widgets to control the graph}
@@ -60,51 +60,51 @@
graph. Let's call it \c GraphModifier (See \l {Setting up the graph} and
\l {Adding data to the graph} for details):
- \snippet ../examples/bars/main.cpp 2
+ \snippet bars/main.cpp 2
The application main is done and we can show the graph and start the event loop:
- \snippet ../examples/bars/main.cpp 3
+ \snippet bars/main.cpp 3
\section1 Setting up the graph
Let's set up the graph in the constructor of the \c GraphModifier class we instantiated in the
application main:
- \snippet ../examples/bars/graphmodifier.cpp 0
+ \snippet bars/graphmodifier.cpp 0
Let's take a closer look at parts of the code.
First we're creating the axes and the series into member variables to support changing them
easily later on, if we want to:
- \snippet ../examples/bars/graphmodifier.cpp 1
+ \snippet bars/graphmodifier.cpp 1
Then we're setting some of the visual qualities for the graph:
- \snippet ../examples/bars/graphmodifier.cpp 2
+ \snippet bars/graphmodifier.cpp 2
We're also setting up the axes and setting them to the graph as active axes:
- \snippet ../examples/bars/graphmodifier.cpp 3
+ \snippet bars/graphmodifier.cpp 3
Next we initialize the visual properties of the series.
Note that the second series is initially not visible:
- \snippet ../examples/bars/graphmodifier.cpp 8
+ \snippet bars/graphmodifier.cpp 8
The series need to be added to the graph to show them:
- \snippet ../examples/bars/graphmodifier.cpp 4
+ \snippet bars/graphmodifier.cpp 4
Finally, we set the camera angle by calling the same method the camera angle change button
in the UI uses to cycle through various camera angles:
- \snippet ../examples/bars/graphmodifier.cpp 6
+ \snippet bars/graphmodifier.cpp 6
There you can see that the camera is controlled via the scene object of the graph:
- \snippet ../examples/bars/graphmodifier.cpp 10
+ \snippet bars/graphmodifier.cpp 10
For more information about using scene and cameras, see Q3DScene and Q3DCamera.
@@ -114,11 +114,11 @@
At the end of the constructor there's a call:
- \snippet ../examples/bars/graphmodifier.cpp 9
+ \snippet bars/graphmodifier.cpp 9
This method is used to add data to the proxies of the two series:
- \snippet ../examples/bars/graphmodifier.cpp 5
+ \snippet bars/graphmodifier.cpp 5
Now the series have data to show.
@@ -127,24 +127,24 @@
There isn't much interaction yet, so let's continue by adding some widgets back in the
application main. Let's just focus on two as an example:
- \snippet ../examples/bars/main.cpp 4
+ \snippet bars/main.cpp 4
We can use these slider widgets to rotate the graph instead of just using the mouse or
touch.
Let's add them to the vertical layout we created earlier:
- \snippet ../examples/bars/main.cpp 5
+ \snippet bars/main.cpp 5
Then we'll connect them to methods in \c GraphModifier:
- \snippet ../examples/bars/main.cpp 6
+ \snippet bars/main.cpp 6
Here are the methods in \c GraphModifier the signals were connected to. The camera
is controlled via the scene object. This time we specify the actual camera position
along the orbit around the center point, instead of specifying a preset camera angle:
- \snippet ../examples/bars/graphmodifier.cpp 7
+ \snippet bars/graphmodifier.cpp 7
Now these two sliders can be used to rotate the graph.
@@ -158,6 +158,7 @@
\li Grid visibility
\li Bar shading smoothness
\li Visibility of the second bar series
+ \li Data range to be shown
\li Bar style
\li Selection mode
\li Theme
diff --git a/examples/bars/graphmodifier.cpp b/examples/datavisualization/bars/graphmodifier.cpp
index 06b36b7f..5df4066c 100644
--- a/examples/bars/graphmodifier.cpp
+++ b/examples/datavisualization/bars/graphmodifier.cpp
@@ -24,8 +24,8 @@
#include <QtDataVisualization/q3dcamera.h>
#include <QtDataVisualization/qbar3dseries.h>
#include <QtDataVisualization/q3dtheme.h>
-#include <QTime>
-#include <QComboBox>
+#include <QtCore/QTime>
+#include <QtWidgets/QComboBox>
using namespace QtDataVisualization;
@@ -60,14 +60,14 @@ GraphModifier::GraphModifier(Q3DBars *bargraph)
//! [2]
m_months << "January" << "February" << "March" << "April" << "May" << "June" << "July" << "August" << "September" << "October" << "November" << "December";
- m_years << "2006" << "2007" << "2008" << "2009" << "2010" << "2011" << "2012";
+ m_years << "2006" << "2007" << "2008" << "2009" << "2010" << "2011" << "2012" << "2013";
//! [3]
m_temperatureAxis->setTitle("Average temperature");
m_temperatureAxis->setSegmentCount(m_segments);
m_temperatureAxis->setSubSegmentCount(m_subSegments);
m_temperatureAxis->setRange(m_minval, m_maxval);
- m_temperatureAxis->setLabelFormat(QString(QStringLiteral("%d ") + celsiusString));
+ m_temperatureAxis->setLabelFormat(QString(QStringLiteral("%.1f ") + celsiusString));
m_yearAxis->setTitle("Year");
m_monthAxis->setTitle("Month");
@@ -112,24 +112,26 @@ void GraphModifier::resetTemperatureData()
{
//! [5]
// Set up data
- static const float tempOulu[7][12] = {
+ static const float tempOulu[8][12] = {
{-6.7f, -11.7f, -9.7f, 3.3f, 9.2f, 14.0f, 16.3f, 17.8f, 10.2f, 2.1f, -2.6f, -0.3f}, // 2006
{-6.8f, -13.3f, 0.2f, 1.5f, 7.9f, 13.4f, 16.1f, 15.5f, 8.2f, 5.4f, -2.6f, -0.8f}, // 2007
{-4.2f, -4.0f, -4.6f, 1.9f, 7.3f, 12.5f, 15.0f, 12.8f, 7.6f, 5.1f, -0.9f, -1.3f}, // 2008
{-7.8f, -8.8f, -4.2f, 0.7f, 9.3f, 13.2f, 15.8f, 15.5f, 11.2f, 0.6f, 0.7f, -8.4f}, // 2009
{-14.4f, -12.1f, -7.0f, 2.3f, 11.0f, 12.6f, 18.8f, 13.8f, 9.4f, 3.9f, -5.6f, -13.0f}, // 2010
{-9.0f, -15.2f, -3.8f, 2.6f, 8.3f, 15.9f, 18.6f, 14.9f, 11.1f, 5.3f, 1.8f, -0.2f}, // 2011
- {-8.7f, -11.3f, -2.3f, 0.4f, 7.5f, 12.2f, 16.4f, 14.1f, 9.2f, 3.1f, 0.3f, -12.1f} // 2012
+ {-8.7f, -11.3f, -2.3f, 0.4f, 7.5f, 12.2f, 16.4f, 14.1f, 9.2f, 3.1f, 0.3f, -12.1f}, // 2012
+ {-7.9f, -5.3f, -9.1f, 0.8f, 11.6f, 16.6f, 15.9f, 15.5f, 11.2f, 4.0f, 0.1f, -1.9f} // 2013
};
- static const float tempHelsinki[7][12] = {
+ static const float tempHelsinki[8][12] = {
{-3.7f, -7.8f, -5.4f, 3.4f, 10.7f, 15.4f, 18.6f, 18.7f, 14.3f, 8.5f, 2.9f, 4.1f}, // 2006
{-1.2f, -7.5f, 3.1f, 5.5f, 10.3f, 15.9f, 17.4f, 17.9f, 11.2f, 7.3f, 1.1f, 0.5f}, // 2007
{-0.6f, 1.2f, 0.2f, 6.3f, 10.2f, 13.8f, 18.1f, 15.1f, 10.1f, 9.4f, 2.5f, 0.4f}, // 2008
{-2.9f, -3.5f, -0.9f, 4.7f, 10.9f, 14.0f, 17.4f, 16.8f, 13.2f, 4.1f, 2.6f, -2.3f}, // 2009
{-10.2f, -8.0f, -1.9f, 6.6f, 11.3f, 14.5f, 21.0f, 18.8f, 12.6f, 6.1f, -0.5f, -7.3f}, // 2010
{-4.4f, -9.1f, -2.0f, 5.5f, 9.9f, 15.6f, 20.8f, 17.8f, 13.4f, 8.9f, 3.6f, 1.5f}, // 2011
- {-3.5f, -3.2f, -0.7f, 4.0f, 11.1f, 13.4f, 17.3f, 15.8f, 13.1f, 6.4f, 4.1f, -5.1f} // 2012
+ {-3.5f, -3.2f, -0.7f, 4.0f, 11.1f, 13.4f, 17.3f, 15.8f, 13.1f, 6.4f, 4.1f, -5.1f}, // 2012
+ {-4.8f, -1.8f, -5.0f, 2.9f, 12.8f, 17.2f, 18.0f, 17.1f, 12.5f, 7.5f, 4.5f, 2.3f} // 2013
};
// Create data arrays
@@ -159,6 +161,14 @@ void GraphModifier::resetTemperatureData()
//! [5]
}
+void GraphModifier::changeRange(int range)
+{
+ if (range >= m_years.count())
+ m_yearAxis->setRange(0, m_years.count() - 1);
+ else
+ m_yearAxis->setRange(range, range);
+}
+
void GraphModifier::changeStyle(int style)
{
QComboBox *comboBox = qobject_cast<QComboBox *>(sender());
diff --git a/examples/bars/graphmodifier.h b/examples/datavisualization/bars/graphmodifier.h
index cfb1ceec..cac002a1 100644
--- a/examples/bars/graphmodifier.h
+++ b/examples/datavisualization/bars/graphmodifier.h
@@ -23,10 +23,10 @@
#include <QtDataVisualization/qbardataproxy.h>
#include <QtDataVisualization/qabstract3dseries.h>
-#include <QFont>
-#include <QDebug>
-#include <QStringList>
-#include <QPointer>
+#include <QtGui/QFont>
+#include <QtCore/QDebug>
+#include <QtCore/QStringList>
+#include <QtCore/QPointer>
using namespace QtDataVisualization;
@@ -50,6 +50,7 @@ public:
void setSeriesVisibility(int enabled);
public slots:
+ void changeRange(int range);
void changeStyle(int style);
void changeSelectionMode(int selectionMode);
void changeTheme(int theme);
diff --git a/examples/bars/main.cpp b/examples/datavisualization/bars/main.cpp
index 0b934aac..e6461202 100644
--- a/examples/bars/main.cpp
+++ b/examples/datavisualization/bars/main.cpp
@@ -18,17 +18,17 @@
#include "graphmodifier.h"
-#include <QApplication>
-#include <QWidget>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QPushButton>
-#include <QCheckBox>
-#include <QSlider>
-#include <QFontComboBox>
-#include <QLabel>
-#include <QScreen>
-#include <QFontDatabase>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QSlider>
+#include <QtWidgets/QFontComboBox>
+#include <QtWidgets/QLabel>
+#include <QtGui/QScreen>
+#include <QtGui/QFontDatabase>
int main(int argc, char **argv)
{
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
hLayout->addLayout(vLayout);
//! [1]
- widget->setWindowTitle(QStringLiteral("Average temperatures in Oulu and Helsinki, Finland (2006-2012)"));
+ widget->setWindowTitle(QStringLiteral("Average temperatures in Oulu and Helsinki, Finland (2006-2013)"));
QComboBox *themeList = new QComboBox(widget);
themeList->addItem(QStringLiteral("Qt"));
@@ -167,6 +167,18 @@ int main(int argc, char **argv)
shadowQuality->addItem(QStringLiteral("High Soft"));
shadowQuality->setCurrentIndex(5);
+ QComboBox *rangeList = new QComboBox(widget);
+ rangeList->addItem(QStringLiteral("2006"));
+ rangeList->addItem(QStringLiteral("2007"));
+ rangeList->addItem(QStringLiteral("2008"));
+ rangeList->addItem(QStringLiteral("2009"));
+ rangeList->addItem(QStringLiteral("2010"));
+ rangeList->addItem(QStringLiteral("2011"));
+ rangeList->addItem(QStringLiteral("2012"));
+ rangeList->addItem(QStringLiteral("2013"));
+ rangeList->addItem(QStringLiteral("All"));
+ rangeList->setCurrentIndex(8);
+
//! [5]
vLayout->addWidget(new QLabel(QStringLiteral("Rotate horizontally")));
vLayout->addWidget(rotationSliderX, 0, Qt::AlignTop);
@@ -179,6 +191,8 @@ int main(int argc, char **argv)
vLayout->addWidget(gridCheckBox);
vLayout->addWidget(smoothCheckBox);
vLayout->addWidget(seriesCheckBox);
+ vLayout->addWidget(new QLabel(QStringLiteral("Show year")));
+ vLayout->addWidget(rangeList);
vLayout->addWidget(new QLabel(QStringLiteral("Change bar style")));
vLayout->addWidget(barStyleList);
vLayout->addWidget(new QLabel(QStringLiteral("Change selection mode")));
@@ -220,6 +234,9 @@ int main(int argc, char **argv)
QObject::connect(modifier, &GraphModifier::gridEnabledChanged,
gridCheckBox, &QCheckBox::setChecked);
+ QObject::connect(rangeList, SIGNAL(currentIndexChanged(int)), modifier,
+ SLOT(changeRange(int)));
+
QObject::connect(barStyleList, SIGNAL(currentIndexChanged(int)), modifier,
SLOT(changeStyle(int)));
diff --git a/examples/custominput/custominput.pro b/examples/datavisualization/custominput/custominput.pro
index 9a94cfcd..532a3f41 100644
--- a/examples/custominput/custominput.pro
+++ b/examples/datavisualization/custominput/custominput.pro
@@ -9,8 +9,6 @@ HEADERS += scatterdatamodifier.h \
QT += widgets
-INSTALLS += target
-
RESOURCES += custominput.qrc
OTHER_FILES += doc/src/* \
diff --git a/examples/custominput/custominput.qrc b/examples/datavisualization/custominput/custominput.qrc
index 8ced2b91..8ced2b91 100644
--- a/examples/custominput/custominput.qrc
+++ b/examples/datavisualization/custominput/custominput.qrc
diff --git a/examples/custominput/custominputhandler.cpp b/examples/datavisualization/custominput/custominputhandler.cpp
index a5734e16..a5734e16 100644
--- a/examples/custominput/custominputhandler.cpp
+++ b/examples/datavisualization/custominput/custominputhandler.cpp
diff --git a/examples/custominput/custominputhandler.h b/examples/datavisualization/custominput/custominputhandler.h
index 60c88ef7..60c88ef7 100644
--- a/examples/custominput/custominputhandler.h
+++ b/examples/datavisualization/custominput/custominputhandler.h
diff --git a/examples/custominput/data/data.txt b/examples/datavisualization/custominput/data/data.txt
index d0689b1f..d0689b1f 100644
--- a/examples/custominput/data/data.txt
+++ b/examples/datavisualization/custominput/data/data.txt
diff --git a/examples/custominput/doc/images/custominput-example.png b/examples/datavisualization/custominput/doc/images/custominput-example.png
index b2656b69..b2656b69 100644
--- a/examples/custominput/doc/images/custominput-example.png
+++ b/examples/datavisualization/custominput/doc/images/custominput-example.png
Binary files differ
diff --git a/examples/custominput/doc/src/custominput.qdoc b/examples/datavisualization/custominput/doc/src/custominput.qdoc
index 88c53b4d..59d3c090 100644
--- a/examples/custominput/doc/src/custominput.qdoc
+++ b/examples/datavisualization/custominput/doc/src/custominput.qdoc
@@ -34,19 +34,19 @@
The default input handling mechanism is replaced by setting the active input handler of \l Q3DScatter
to \c CustomInputHandler that implements the custom behavior.
- \snippet ../examples/custominput/scatterdatamodifier.cpp 0
+ \snippet custominput/scatterdatamodifier.cpp 0
\section1 Implementing custom selection handling
The on mouseover selection handling is implemented in the \c CustomInputHandler that captures the mouse events.
It then stores the last known coordinates to the \l QAbstract3DInputHandler::inputPosition property.
- \snippet ../examples/custominput/custominputhandler.cpp 0
+ \snippet custominput/custominputhandler.cpp 0
As the selection is one shot, and is cleared each time a 3D frame is rendered, a timer is setup to retrigger selection so that the selection moves to the item
currently under the mouse cursor as the camera animates around the graph even when the mouse cursor is not moving.
- \snippet ../examples/custominput/scatterdatamodifier.cpp 1
+ \snippet custominput/scatterdatamodifier.cpp 1
\section1 Implementing custom zoom handling
@@ -54,17 +54,17 @@
between 10% and 500%. This range is then divided to four subranges where \c angleDelta is scaled to different amount of zoom change
based on the current subrange.
- \snippet ../examples/custominput/custominputhandler.cpp 1
+ \snippet custominput/custominputhandler.cpp 1
\section1 Implementing custom camera handling
The camera is animated to constantly rotate around the graph with two animations. The rotation around the graph is done with
a simple QPropertyAnimation that just increments during 20 seconds from 0 degrees to 360 degrees and sets the \l Q3DCamera::xRotation property.
- \snippet ../examples/custominput/scatterdatamodifier.cpp 2
+ \snippet custominput/scatterdatamodifier.cpp 2
The camera movement up and down is implemented with a QSequentialAnimationGroup that varies the \l Q3DCamera::yRotation property of the camera
from 5 degrees to 45 degrees and back with in and out easing.
- \snippet ../examples/custominput/scatterdatamodifier.cpp 3
+ \snippet custominput/scatterdatamodifier.cpp 3
*/
diff --git a/examples/custominput/main.cpp b/examples/datavisualization/custominput/main.cpp
index 069a5b0a..5dd31499 100644
--- a/examples/custominput/main.cpp
+++ b/examples/datavisualization/custominput/main.cpp
@@ -18,17 +18,17 @@
#include "scatterdatamodifier.h"
-#include <QApplication>
-#include <QWidget>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QPushButton>
-#include <QCheckBox>
-#include <QComboBox>
-#include <QFontComboBox>
-#include <QLabel>
-#include <QScreen>
-#include <QFontDatabase>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QComboBox>
+#include <QtWidgets/QFontComboBox>
+#include <QtWidgets/QLabel>
+#include <QtGui/QScreen>
+#include <QtGui/QFontDatabase>
int main(int argc, char **argv)
{
diff --git a/examples/custominput/scatterdatamodifier.cpp b/examples/datavisualization/custominput/scatterdatamodifier.cpp
index a2a5bea9..2b812ba1 100644
--- a/examples/custominput/scatterdatamodifier.cpp
+++ b/examples/datavisualization/custominput/scatterdatamodifier.cpp
@@ -24,7 +24,9 @@
#include <QtDataVisualization/Q3DCamera>
#include <QtDataVisualization/QScatter3DSeries>
#include <QtDataVisualization/Q3DTheme>
-#include <qmath.h>
+#include <QtCore/qmath.h>
+#include <QtCore/QTextStream>
+#include <QtCore/QDebug>
using namespace QtDataVisualization;
diff --git a/examples/custominput/scatterdatamodifier.h b/examples/datavisualization/custominput/scatterdatamodifier.h
index 9ea6a5c8..8b185711 100644
--- a/examples/custominput/scatterdatamodifier.h
+++ b/examples/datavisualization/custominput/scatterdatamodifier.h
@@ -24,9 +24,9 @@
#include <QtDataVisualization/q3dscatter.h>
#include <QtGui/QFont>
#include <QtCore/QTimer>
-#include <QPropertyAnimation>
-#include <QSequentialAnimationGroup>
-#include <QVector3D>
+#include <QtCore/QPropertyAnimation>
+#include <QtCore/QSequentialAnimationGroup>
+#include <QtGui/QVector3D>
using namespace QtDataVisualization;
diff --git a/examples/customproxy/customproxy.pro b/examples/datavisualization/customproxy/customproxy.pro
index 2b764a41..cb9daccf 100644
--- a/examples/customproxy/customproxy.pro
+++ b/examples/datavisualization/customproxy/customproxy.pro
@@ -14,11 +14,9 @@ HEADERS += \
variantbardataproxy.h \
variantbardatamapping.h
-INSTALLS += target
-
RESOURCES += customproxy.qrc
-OTHER_FILES += data/raindata.txt \
- doc/src/* \
- doc/images/*
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ data/raindata.txt
diff --git a/examples/customproxy/customproxy.qrc b/examples/datavisualization/customproxy/customproxy.qrc
index 53cd4915..53cd4915 100644
--- a/examples/customproxy/customproxy.qrc
+++ b/examples/datavisualization/customproxy/customproxy.qrc
diff --git a/examples/customproxy/data/raindata.txt b/examples/datavisualization/customproxy/data/raindata.txt
index 531d66be..531d66be 100644
--- a/examples/customproxy/data/raindata.txt
+++ b/examples/datavisualization/customproxy/data/raindata.txt
diff --git a/examples/customproxy/doc/images/customproxy-example.png b/examples/datavisualization/customproxy/doc/images/customproxy-example.png
index 753b8951..753b8951 100644
--- a/examples/customproxy/doc/images/customproxy-example.png
+++ b/examples/datavisualization/customproxy/doc/images/customproxy-example.png
Binary files differ
diff --git a/examples/customproxy/doc/src/customproxy.qdoc b/examples/datavisualization/customproxy/doc/src/customproxy.qdoc
index 8b506583..fe6a0d96 100644
--- a/examples/customproxy/doc/src/customproxy.qdoc
+++ b/examples/datavisualization/customproxy/doc/src/customproxy.qdoc
@@ -33,8 +33,8 @@
This example defines a simple flexible data set \c VariantDataSet where each data item is a
a variant list. Each item can have multiple different values, identified by their index in
the list. In this example, the data set is storing monthly rainfall data, where the value in
- index one is the year, index two contains the month, and the third value has the amount
- of rainfall in that month.
+ index zero is the year, the value in index one is the month, and the value in index two is
+ the amount of rainfall in that month.
The custom proxy we provide here is similar to item model based proxies provided by Qt
Data Visualization in that it requires a mapping to interpret the data.
@@ -45,10 +45,10 @@
\c VariantDataSet class provides a simple API:
- \snippet ../examples/customproxy/variantdataset.h 1
+ \snippet customproxy/variantdataset.h 1
\dots 0
\codeline
- \snippet ../examples/customproxy/variantdataset.h 0
+ \snippet customproxy/variantdataset.h 0
As you can see, the data items are simply QVariantList objects, and the data can be added either
singly or in lists. The only additional functionality provided is clearing the data set and querying
@@ -60,17 +60,17 @@
\c VariantBarDataProxy is a subclass of QBarDataProxy and provides a simple API of just getters
and setters for the data set and the mapping:
- \snippet ../examples/customproxy/variantbardataproxy.h 0
+ \snippet customproxy/variantbardataproxy.h 0
\dots 0
\codeline
- \snippet ../examples/customproxy/variantbardataproxy.h 1
+ \snippet customproxy/variantbardataproxy.h 1
On the implementation side, the proxy listens for the changes in the data set and the mapping,
and resolves the data set if any changes are detected. It is not particularly efficient
implementation in that any change will cause re-resolving of the entire data set, but that is not
an issue for this example. The interesting part is the \c resolveDataSet() method:
- \snippet ../examples/customproxy/variantbardataproxy.cpp 0
+ \snippet customproxy/variantbardataproxy.cpp 0
In \c resolveDataSet() method we sort the variant data values into rows and columns based on the
mapping. This is very similar to how QItemModelBarDataProxy handles mapping, except we use
@@ -83,16 +83,16 @@
and rows, columns, and values of \c QBarDataArray. It also contains the lists of rows and columns to
be included in the resolved data:
- \snippet ../examples/customproxy/variantbardatamapping.h 0
+ \snippet customproxy/variantbardatamapping.h 0
\dots 0
\codeline
- \snippet ../examples/customproxy/variantbardatamapping.h 1
+ \snippet customproxy/variantbardatamapping.h 1
\dots 0
\codeline
- \snippet ../examples/customproxy/variantbardatamapping.h 2
+ \snippet customproxy/variantbardatamapping.h 2
\dots 0
\codeline
- \snippet ../examples/customproxy/variantbardatamapping.h 3
+ \snippet customproxy/variantbardatamapping.h 3
The primary way to use a \c VariantBarDataMapping object is to give the mappings already at the
constructor, though they can be set later individually or all together with the \c remap() method.
@@ -104,10 +104,10 @@
\c RainfallGraph class handles the setup of the graph. The interesting part is the \c addDataSet()
method:
- \snippet ../examples/customproxy/rainfallgraph.cpp 0
+ \snippet customproxy/rainfallgraph.cpp 0
The bulk of that method is used for populating the variant data set. Once the set is populated,
visualizing the data is trivial with the help of our custom proxy:
- \snippet ../examples/customproxy/rainfallgraph.cpp 1
+ \snippet customproxy/rainfallgraph.cpp 1
*/
diff --git a/examples/customproxy/main.cpp b/examples/datavisualization/customproxy/main.cpp
index dd74721e..4ec67f4b 100644
--- a/examples/customproxy/main.cpp
+++ b/examples/datavisualization/customproxy/main.cpp
@@ -17,7 +17,7 @@
****************************************************************************/
#include "rainfallgraph.h"
-#include <QGuiApplication>
+#include <QtGui/QGuiApplication>
using namespace QtDataVisualization;
diff --git a/examples/customproxy/rainfallgraph.cpp b/examples/datavisualization/customproxy/rainfallgraph.cpp
index e2f04923..024fc2a1 100644
--- a/examples/customproxy/rainfallgraph.cpp
+++ b/examples/datavisualization/customproxy/rainfallgraph.cpp
@@ -23,11 +23,11 @@
#include <QtDataVisualization/q3dcamera.h>
#include <QtDataVisualization/qbar3dseries.h>
#include <QtDataVisualization/q3dtheme.h>
-#include <QGuiApplication>
-#include <QFont>
-#include <QDebug>
-#include <QTextStream>
-#include <QFile>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QFont>
+#include <QtCore/QDebug>
+#include <QtCore/QTextStream>
+#include <QtCore/QFile>
using namespace QtDataVisualization;
diff --git a/examples/customproxy/rainfallgraph.h b/examples/datavisualization/customproxy/rainfallgraph.h
index 6116eb9b..6116eb9b 100644
--- a/examples/customproxy/rainfallgraph.h
+++ b/examples/datavisualization/customproxy/rainfallgraph.h
diff --git a/examples/customproxy/variantbardatamapping.cpp b/examples/datavisualization/customproxy/variantbardatamapping.cpp
index c8369b6e..c8369b6e 100644
--- a/examples/customproxy/variantbardatamapping.cpp
+++ b/examples/datavisualization/customproxy/variantbardatamapping.cpp
diff --git a/examples/customproxy/variantbardatamapping.h b/examples/datavisualization/customproxy/variantbardatamapping.h
index 3a145d9a..2f6a0ca1 100644
--- a/examples/customproxy/variantbardatamapping.h
+++ b/examples/datavisualization/customproxy/variantbardatamapping.h
@@ -19,7 +19,7 @@
#ifndef VARIANTBARDATAMAPPING_H
#define VARIANTBARDATAMAPPING_H
-#include <QStringList>
+#include <QtCore/QStringList>
class VariantBarDataMapping : public QObject
{
diff --git a/examples/customproxy/variantbardataproxy.cpp b/examples/datavisualization/customproxy/variantbardataproxy.cpp
index cf1e1f90..cf1e1f90 100644
--- a/examples/customproxy/variantbardataproxy.cpp
+++ b/examples/datavisualization/customproxy/variantbardataproxy.cpp
diff --git a/examples/customproxy/variantbardataproxy.h b/examples/datavisualization/customproxy/variantbardataproxy.h
index b83f8a71..41aeaa3f 100644
--- a/examples/customproxy/variantbardataproxy.h
+++ b/examples/datavisualization/customproxy/variantbardataproxy.h
@@ -22,9 +22,9 @@
#include "qbardataproxy.h"
#include "variantdataset.h"
#include "variantbardatamapping.h"
-#include <QStringList>
-#include <QMap>
-#include <QPointer>
+#include <QtCore/QStringList>
+#include <QtCore/QMap>
+#include <QtCore/QPointer>
using namespace QtDataVisualization;
diff --git a/examples/customproxy/variantdataset.cpp b/examples/datavisualization/customproxy/variantdataset.cpp
index 3576aaab..3576aaab 100644
--- a/examples/customproxy/variantdataset.cpp
+++ b/examples/datavisualization/customproxy/variantdataset.cpp
diff --git a/examples/customproxy/variantdataset.h b/examples/datavisualization/customproxy/variantdataset.h
index f5eb5863..6a131d1a 100644
--- a/examples/customproxy/variantdataset.h
+++ b/examples/datavisualization/customproxy/variantdataset.h
@@ -19,8 +19,8 @@
#ifndef VARIANTDATASET_H
#define VARIANTDATASET_H
-#include <QScopedPointer>
-#include <QVariantList>
+#include <QtCore/QScopedPointer>
+#include <QtCore/QVariantList>
//! [1]
typedef QVariantList VariantDataItem;
diff --git a/examples/datavisualization/datavisualization.pro b/examples/datavisualization/datavisualization.pro
new file mode 100644
index 00000000..4330ef4c
--- /dev/null
+++ b/examples/datavisualization/datavisualization.pro
@@ -0,0 +1,21 @@
+TEMPLATE = subdirs
+SUBDIRS += qmlbars \
+ qmlscatter \
+ qmlsurface \
+ qmlcustominput \
+ qmllegend \
+ qmlmultigraph \
+ qmloscilloscope \
+ qmlsurfacelayers
+
+!android:!ios {
+ SUBDIRS += bars \
+ custominput \
+ customproxy \
+ itemmodel \
+ scatter \
+ surface \
+ rotations
+}
+
+qtHaveModule(multimedia):!android:!ios: SUBDIRS += audiolevels
diff --git a/examples/datavisualization/examples.pri b/examples/datavisualization/examples.pri
new file mode 100644
index 00000000..2acf1234
--- /dev/null
+++ b/examples/datavisualization/examples.pri
@@ -0,0 +1,14 @@
+INCLUDEPATH += ../../../include
+
+LIBS += -L$$OUT_PWD/../../../lib
+
+TEMPLATE = app
+
+QT += datavisualization
+
+contains(TARGET, qml.*) {
+ QT += qml quick
+}
+
+target.path = $$[QT_INSTALL_EXAMPLES]/datavisualization/$$TARGET
+INSTALLS += target
diff --git a/examples/itemmodel/doc/images/itemmodel-example-2.png b/examples/datavisualization/itemmodel/doc/images/itemmodel-example-2.png
index 677b7eec..677b7eec 100644
--- a/examples/itemmodel/doc/images/itemmodel-example-2.png
+++ b/examples/datavisualization/itemmodel/doc/images/itemmodel-example-2.png
Binary files differ
diff --git a/examples/itemmodel/doc/images/itemmodel-example.png b/examples/datavisualization/itemmodel/doc/images/itemmodel-example.png
index c042f84d..c042f84d 100644
--- a/examples/itemmodel/doc/images/itemmodel-example.png
+++ b/examples/datavisualization/itemmodel/doc/images/itemmodel-example.png
Binary files differ
diff --git a/examples/itemmodel/doc/src/itemmodel.qdoc b/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc
index 16cd1974..a3e7a5c5 100644
--- a/examples/itemmodel/doc/src/itemmodel.qdoc
+++ b/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc
@@ -39,7 +39,7 @@
First, in main.cpp, we create a QApplication, instantiate Q3DBars and a window container for it:
- \snippet ../examples/itemmodel/main.cpp 0
+ \snippet itemmodel/main.cpp 0
The call to QWidget::createWindowContainer is required, as all data visualization types
(Q3DBars, Q3DScatter, and Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
@@ -47,7 +47,7 @@
Then we'll create a layout and add the graph and the table widget into it:
- \snippet ../examples/itemmodel/main.cpp 1
+ \snippet itemmodel/main.cpp 1
The table widget is going to be used to display the numerical data being inserted into the
graph, and to modify it (See \l {Adding data to the graph} and \l {Interacting with the data}).
@@ -55,7 +55,7 @@
We need to instantiate QItemModelBarDataProxy and a QBar3DSeries for it, and give the series
to the graph:
- \snippet ../examples/itemmodel/main.cpp 2
+ \snippet itemmodel/main.cpp 2
Here we tell the proxy to directly map the model's rows and columns into the proxy's rows and
columns instead of defining row and column roles to map for them. Then we give the model from
@@ -68,19 +68,19 @@
\l {Adding data to the graph} for details) and connect some signals between QBar3DSeries,
\c GraphDataGenerator, and QTableWidget (See \l {Interacting with the data} for a closer look):
- \snippet ../examples/itemmodel/main.cpp 3
+ \snippet itemmodel/main.cpp 3
The application main is done and we can show the graph and start the event loop:
- \snippet ../examples/itemmodel/main.cpp 4
+ \snippet itemmodel/main.cpp 4
\section1 Setting up the graph
Let's set up the visual attributes for the graph in the constructor of \c GraphDataGenerator:
- \snippet ../examples/itemmodel/main.cpp 5
- \snippet ../examples/itemmodel/main.cpp 6
- \snippet ../examples/itemmodel/main.cpp 7
+ \snippet itemmodel/main.cpp 5
+ \snippet itemmodel/main.cpp 6
+ \snippet itemmodel/main.cpp 7
First we set bar thickness ratio to 1.0, which means bars will be as wide as they are deep. 1.0
is also the default value, so the line is basically unnecessary. It's left there so you could
@@ -116,7 +116,7 @@
Let's have a look at the contents of the \c start() method:
- \snippet ../examples/itemmodel/main.cpp 8
+ \snippet itemmodel/main.cpp 8
The main thing \c start() does is set up the data model. It also activates a timer for getting
the accurate dimensions of the table widget after it's been filled with data. The reason we
@@ -126,26 +126,26 @@
In \c setupModel() we first introduce the row and column labels, and the actual data:
- \snippet ../examples/itemmodel/main.cpp 9
+ \snippet itemmodel/main.cpp 9
Then we set up the axes:
- \snippet ../examples/itemmodel/main.cpp 10
+ \snippet itemmodel/main.cpp 10
Next we will set up the table widget:
- \snippet ../examples/itemmodel/main.cpp 11
+ \snippet itemmodel/main.cpp 11
After that all that's left is adding the data to the table widget:
- \snippet ../examples/itemmodel/main.cpp 12
+ \snippet itemmodel/main.cpp 12
Now we have a bar graph and a table widget, both displaying the same data.
You're probably wondering how the data can be displayed in the graph, as the only thing we did
was add it to the table widget? That's because of what we did earlier, in the application main:
- \snippet ../examples/itemmodel/main.cpp 2
+ \snippet itemmodel/main.cpp 2
We created QItemModelBarDataProxy instance, and gave the proxy the model of the table widget
we just created. The proxy maps the rows and the columns in the model of the table widget into
@@ -156,7 +156,7 @@
We made a couple of signal connections in the application main earlier:
- \snippet ../examples/itemmodel/main.cpp 3
+ \snippet itemmodel/main.cpp 3
Now we'll find out what these were for.
@@ -164,12 +164,12 @@
QBar3DSeries::selectedBarChanged() is emitted when a bar is selected from the series. We connect
that to a method in the data generator that selects the same data item in the table widget:
- \snippet ../examples/itemmodel/main.cpp 13
+ \snippet itemmodel/main.cpp 13
The second connection does the opposite; it connects a signal from the table widget to a
method in the data generator. The method then selects the corresponding bar in the series:
- \snippet ../examples/itemmodel/main.cpp 14
+ \snippet itemmodel/main.cpp 14
You can even select an item in the widget and change the value of it, and the new value is
updated to the graph. This is handled again by the proxy with mapping between the data
diff --git a/examples/itemmodel/itemmodel.pro b/examples/datavisualization/itemmodel/itemmodel.pro
index f319f690..c4caa3f2 100644
--- a/examples/itemmodel/itemmodel.pro
+++ b/examples/datavisualization/itemmodel/itemmodel.pro
@@ -4,8 +4,6 @@
SOURCES += main.cpp
-INSTALLS += target
-
QT += widgets
OTHER_FILES += doc/src/* \
diff --git a/examples/itemmodel/main.cpp b/examples/datavisualization/itemmodel/main.cpp
index b6b67f85..ad9f0112 100644
--- a/examples/itemmodel/main.cpp
+++ b/examples/datavisualization/itemmodel/main.cpp
@@ -25,14 +25,14 @@
#include <QtDataVisualization/qbar3dseries.h>
#include <QtDataVisualization/q3dtheme.h>
-#include <QApplication>
-#include <QVBoxLayout>
-#include <QTableWidget>
-#include <QScreen>
-#include <QTimer>
-#include <QFont>
-#include <QDebug>
-#include <QHeaderView>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QTableWidget>
+#include <QtGui/QScreen>
+#include <QtCore/QTimer>
+#include <QtGui/QFont>
+#include <QtCore/QDebug>
+#include <QtWidgets/QHeaderView>
#define USE_STATIC_DATA
@@ -80,8 +80,8 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid
// and add a small space between them
m_graph->setBarThickness(1.0f);
m_graph->setBarSpacing(QSizeF(0.2, 0.2));
- //! [5]
+ //! [5]
#ifndef USE_STATIC_DATA
// Set up sample space; make it as deep as it's wide
m_graph->rowAxis()->setRange(0, m_rowCount);
@@ -98,7 +98,6 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid
m_graph->seriesList().at(0)->setItemLabelFormat(QStringLiteral("@valueLabel"));
#else
//! [6]
-
// Set selection mode to slice row
m_graph->setSelectionMode(QAbstract3DGraph::SelectionItemAndRow | QAbstract3DGraph::SelectionSlice);
@@ -106,7 +105,6 @@ GraphDataGenerator::GraphDataGenerator(Q3DBars *bargraph, QTableWidget *tableWid
#endif
//! [7]
-
// Set theme
m_graph->activeTheme()->setType(Q3DTheme::ThemeDigia);
@@ -138,6 +136,7 @@ void GraphDataGenerator::start()
#else
//! [8]
setupModel();
+
// Table needs to be shown before the size of its headers can be accurately obtained,
// so we postpone it a bit
m_dataTimer = new QTimer();
diff --git a/examples/qmlbars/doc/images/qmlbars-example.png b/examples/datavisualization/qmlbars/doc/images/qmlbars-example.png
index 64ad6b0e..64ad6b0e 100644
--- a/examples/qmlbars/doc/images/qmlbars-example.png
+++ b/examples/datavisualization/qmlbars/doc/images/qmlbars-example.png
Binary files differ
diff --git a/examples/qmlbars/doc/src/qmlbars.qdoc b/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc
index ecd8055a..d3da5e6a 100644
--- a/examples/qmlbars/doc/src/qmlbars.qdoc
+++ b/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc
@@ -34,9 +34,9 @@
\section1 Data
The example data is monthly income and expenses of a fictional company over several years.
- The data is defined in a list model in \c data.qml like this:
+ The data is defined in a list model in \c Data.qml like this:
- \snippet ../examples/qmlbars/qml/qmlbars/data.qml 0
+ \snippet qmlbars/qml/qmlbars/Data.qml 0
\dots
Each data item has four roles: year, month, income, and expenses. Years and months are natural to
@@ -46,7 +46,7 @@
Now we need to add the data to the Bars3D graph. We will create two Bar3DSeries inside it,
starting with a series for the income:
- \snippet ../examples/qmlbars/qml/qmlbars/main.qml 3
+ \snippet qmlbars/qml/qmlbars/main.qml 3
\dots
The data is attached to the \c itemModel property of the ItemModelBarDataProxy inside the
@@ -54,7 +54,7 @@
Then we add another series for the expenses:
- \snippet ../examples/qmlbars/qml/qmlbars/main.qml 4
+ \snippet qmlbars/qml/qmlbars/main.qml 4
\dots
We use the \c visible property of the series to hide the second series for now.
@@ -62,10 +62,10 @@
\section1 Custom axis labels
One interesting tidbit about axes is that we redefine the category labels for column axis in
- \c axes.qml. This is done because the data contains abbreviated month names, which we don't want
+ \c Axes.qml. This is done because the data contains abbreviated month names, which we don't want
to use for our column labels:
- \snippet ../examples/qmlbars/qml/qmlbars/axes.qml 0
+ \snippet qmlbars/qml/qmlbars/Axes.qml 0
\section1 Switching series
@@ -74,14 +74,14 @@
visualized data between income, expenses, and both, by simply changing visibility of the two
series:
- \snippet ../examples/qmlbars/qml/qmlbars/main.qml 0
+ \snippet qmlbars/qml/qmlbars/main.qml 0
The axis change is done because income and expenses have a different label format. The same could have
been achieved using a single axis and just changing the label format.
The second interesting block is where we filter some of the rows away from the visualized data:
- \snippet ../examples/qmlbars/qml/qmlbars/main.qml 1
+ \snippet qmlbars/qml/qmlbars/main.qml 1
The filtering is done by setting \c autoRowCategories to false on the ItemModelBarDataProxy item and defining
the row categories explicitly. This way, only the items in specified rows are visualized.
@@ -89,5 +89,5 @@
The third interesting block shows how to get the row and column index of an item if you know the
row and column values by using ItemModelBarDataProxy methods \c rowCategoryIndex() and \c columnCategoryIndex():
- \snippet ../examples/qmlbars/qml/qmlbars/main.qml 2
+ \snippet qmlbars/qml/qmlbars/main.qml 2
*/
diff --git a/examples/qmlbars/main.cpp b/examples/datavisualization/qmlbars/main.cpp
index 001c5625..966d068a 100644
--- a/examples/qmlbars/main.cpp
+++ b/examples/datavisualization/qmlbars/main.cpp
@@ -16,32 +16,30 @@
**
****************************************************************************/
-#include <QtDataVisualization/qutils.h>
#include <QtGui/QGuiApplication>
-#include "qtquick2applicationviewer.h"
-#ifdef Q_OS_ANDROID
-#include <QDir>
-#include <QQmlEngine>
-#endif
-#include <QDebug>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
- QtQuick2ApplicationViewer viewer;
-
- // Enable antialiasing
- viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+ QQuickView viewer;
-#ifdef Q_OS_ANDROID
- viewer.addImportPath(QString::fromLatin1("assets:/qml"));
- viewer.engine()->addPluginPath(QString::fromLatin1("%1/../%2").arg(QDir::homePath(),
- QString::fromLatin1("lib")));
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+
viewer.setTitle(QStringLiteral("Monthly income/expenses"));
- viewer.setSource(QUrl("qrc:/qml/main.qml"));
+ viewer.setSource(QUrl("qrc:/qml/qmlbars/main.qml"));
viewer.setResizeMode(QQuickView::SizeRootObjectToView);
viewer.show();
diff --git a/examples/qmlbars/qml/qmlbars/axes.qml b/examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml
index 29979e1b..29979e1b 100644
--- a/examples/qmlbars/qml/qmlbars/axes.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml
diff --git a/examples/qmlbars/qml/qmlbars/data.qml b/examples/datavisualization/qmlbars/qml/qmlbars/Data.qml
index 7e0978c6..7e0978c6 100644
--- a/examples/qmlbars/qml/qmlbars/data.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/Data.qml
diff --git a/examples/qmlbars/qml/qmlbars/main.qml b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
index 0ff060ca..3711a504 100644
--- a/examples/qmlbars/qml/qmlbars/main.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
@@ -23,7 +23,7 @@ import QtDataVisualization 1.0
import QtQuick.Window 2.0
import "."
-Item {
+Rectangle {
id: mainview
width: 1280
height: 1024
diff --git a/examples/datavisualization/qmlbars/qmlbars.pro b/examples/datavisualization/qmlbars/qmlbars.pro
new file mode 100644
index 00000000..cfd449ed
--- /dev/null
+++ b/examples/datavisualization/qmlbars/qmlbars.pro
@@ -0,0 +1,12 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmlbars.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlbars/*
diff --git a/examples/datavisualization/qmlbars/qmlbars.qrc b/examples/datavisualization/qmlbars/qmlbars.qrc
new file mode 100644
index 00000000..2240fbef
--- /dev/null
+++ b/examples/datavisualization/qmlbars/qmlbars.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlbars/Axes.qml</file>
+ <file>qml/qmlbars/Data.qml</file>
+ <file>qml/qmlbars/main.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/qmlcustominput/doc/images/qmlcustominput-example.png b/examples/datavisualization/qmlcustominput/doc/images/qmlcustominput-example.png
new file mode 100644
index 00000000..33d00708
--- /dev/null
+++ b/examples/datavisualization/qmlcustominput/doc/images/qmlcustominput-example.png
Binary files differ
diff --git a/examples/qmlcustominput/doc/src/qmlcustominput.qdoc b/examples/datavisualization/qmlcustominput/doc/src/qmlcustominput.qdoc
index 7702dadf..ac511505 100644
--- a/examples/qmlcustominput/doc/src/qmlcustominput.qdoc
+++ b/examples/datavisualization/qmlcustominput/doc/src/qmlcustominput.qdoc
@@ -18,11 +18,11 @@
/*!
\example qmlcustominput
- \title Qt Quick Custom Input Example
+ \title Qt Quick 2 Custom Input Example
\ingroup qtdatavisualization_examples
- \brief Customizing input in a Qt Quick application.
+ \brief Customizing input in a QML application.
- The Qt Quick Custom Input example shows how to customize the 3D graph controls from Qt Quick using the MouseArea to capture and process mouse events in Qt Quick.
+ The Qt Quick 2 Custom Input example shows how to customize the 3D graph controls from Qt Quick 2 using the MouseArea to capture and process mouse events in QML.
Custom input handling code in this example shows how the camera is now controlled by using NumberAnimation to animate the camera and item selection
is done on mouseover rather than clicking any mouse buttons. Also the code shows how to implement similar zoom with mouse wheel functionality as the default
input handler implements.
@@ -33,9 +33,9 @@
The default input handling mechanism is disabled by setting the inputHandler property to null.
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 0
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 0
\dots 0
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 1
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 1
\dots 0
\section1 Implementing custom selection handling
@@ -44,16 +44,16 @@
The mouse area is configured to capture hover events and has two custom properties for \c mouseX and \c mouseY
to store the last known mouse coordinates.
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 2
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 2
Whenever a pointer movement related signal is received the code updates the \c mouseX and \c mouseY properties.
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 3
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 3
As the selection is one shot, and is cleared each time a 3D frame is rendered, a timer is setup to retrigger selection so that the selection moves to the item
currently under the mouse cursor as the camera animates around the graph even when the mouse cursor is not moving.
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 4
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 4
\section1 Implementing custom zoom handling
@@ -62,7 +62,7 @@
based on the current subrange.
\dots
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 5
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 5
\dots
\section1 Implementing custom camera handling
@@ -70,10 +70,10 @@
The camera is animated to constantly rotate around the graph with two animations. The rotation around the graph is done with
a simple NumberAnimation that just increments during 20 seconds from 0 degrees to 360 degrees and sets the \l Q3DCamera::xRotation property.
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 6
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 6
The camera movement up and down is implemented with a SequentialAnimation that varies the \l Q3DCamera::yRotation property of the camera
from 5 degrees to 45 degrees and back with in and out easing.
- \snippet ../examples/qmlcustominput/qml/qmlcustominput/main.qml 7
+ \snippet qmlcustominput/qml/qmlcustominput/main.qml 7
*/
diff --git a/examples/qmlcustominput/main.cpp b/examples/datavisualization/qmlcustominput/main.cpp
index fcdd0035..d4658d41 100644
--- a/examples/qmlcustominput/main.cpp
+++ b/examples/datavisualization/qmlcustominput/main.cpp
@@ -16,32 +16,31 @@
**
****************************************************************************/
-#include <QtDataVisualization/qutils.h>
#include <QtGui/QGuiApplication>
-#include "qtquick2applicationviewer.h"
-#ifdef Q_OS_ANDROID
-#include <QDir>
-#include <QQmlEngine>
-#endif
-#include <QDebug>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
- QtQuick2ApplicationViewer viewer;
-
- // Enable antialiasing
- viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+ QQuickView viewer;
-#ifdef Q_OS_ANDROID
- viewer.addImportPath(QString::fromLatin1("assets:/qml"));
- viewer.engine()->addPluginPath(QString::fromLatin1("%1/../%2").arg(QDir::homePath(),
- QString::fromLatin1("lib")));
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+ QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close);
+
viewer.setTitle(QStringLiteral("QML Custom Input"));
- viewer.setSource(QUrl("qrc:/qml/main.qml"));
+ viewer.setSource(QUrl("qrc:/qml/qmlcustominput/main.qml"));
viewer.setResizeMode(QQuickView::SizeRootObjectToView);
viewer.show();
diff --git a/examples/qmlcustominput/qml/qmlcustominput/data.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/Data.qml
index 201247f1..8aa26481 100644
--- a/examples/qmlcustominput/qml/qmlcustominput/data.qml
+++ b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/Data.qml
@@ -19,10 +19,12 @@
import QtQuick 2.1
Item {
- property alias model: dataModel
+ property alias modelOne: dataModelOne
+ property alias modelTwo: dataModelTwo
+ property alias modelThree: dataModelThree
ListModel {
- id: dataModel
+ id: dataModelOne
ListElement{ xPos: -10.0000; yPos: 5.00000; zPos: -5.00000 }
ListElement{ xPos: -9.06229; yPos: 3.07132; zPos: -4.54268 }
ListElement{ xPos: -8.55132; yPos: 4.19424; zPos: -4.03318 }
@@ -46,7 +48,10 @@ Item {
ListElement{ xPos: -7.91649; yPos: 3.46826; zPos: -2.78126 }
ListElement{ xPos: -7.49495; yPos: 3.12306; zPos: -3.14539 }
ListElement{ xPos: -7.5445; yPos: 2.85744; zPos: -3.68421 }
+ }
+ ListModel {
+ id: dataModelTwo
ListElement{ xPos: 2.25354; yPos: 1.36828; zPos: -1.32025 }
ListElement{ xPos: -2.35524; yPos: -0.081203; zPos: 1.23267 }
ListElement{ xPos: 2.6517; yPos: -1.20549; zPos: 2.73606 }
@@ -1047,7 +1052,10 @@ Item {
ListElement{ xPos: 0.855717; yPos: -2.92161; zPos: 3.4496 }
ListElement{ xPos: -0.717941; yPos: 2.52993; zPos: 1.25007 }
ListElement{ xPos: -3.42927; yPos: 0.673305; zPos: 0.995742 }
+ }
+ ListModel {
+ id: dataModelThree
ListElement{ xPos: 8.00000; yPos: -2.05136; zPos: 4.02113 }
ListElement{ xPos: 7.88929; yPos: -2.2029; zPos: 5.0000 }
ListElement{ xPos: 7.61596; yPos: -2.44569; zPos: 4.54892 }
diff --git a/examples/qmlcustominput/qml/qmlcustominput/newbutton.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/NewButton.qml
index e4fb99d2..e4fb99d2 100644
--- a/examples/qmlcustominput/qml/qmlcustominput/newbutton.qml
+++ b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/NewButton.qml
diff --git a/examples/qmlcustominput/qml/qmlcustominput/main.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
index cfac0f15..e81dd749 100644
--- a/examples/qmlcustominput/qml/qmlcustominput/main.qml
+++ b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
@@ -21,7 +21,7 @@ import QtQuick.Layouts 1.0
import QtDataVisualization 1.0
import "."
-Item {
+Rectangle {
id: mainView
width: 1280
height: 720
@@ -50,12 +50,38 @@ Item {
//! [1]
Scatter3DSeries {
- id: scatterSeries
- itemLabelFormat: "X:@xLabel Y:@yLabel Z:@zLabel"
+ id: scatterSeriesOne
+ itemLabelFormat: "One - X:@xLabel Y:@yLabel Z:@zLabel"
mesh: Abstract3DSeries.MeshCube
ItemModelScatterDataProxy {
- itemModel: graphData.model
+ itemModel: graphData.modelOne
+ xPosRole: "xPos"
+ yPosRole: "yPos"
+ zPosRole: "zPos"
+ }
+ }
+
+ Scatter3DSeries {
+ id: scatterSeriesTwo
+ itemLabelFormat: "Two - X:@xLabel Y:@yLabel Z:@zLabel"
+ mesh: Abstract3DSeries.MeshCube
+
+ ItemModelScatterDataProxy {
+ itemModel: graphData.modelTwo
+ xPosRole: "xPos"
+ yPosRole: "yPos"
+ zPosRole: "zPos"
+ }
+ }
+
+ Scatter3DSeries {
+ id: scatterSeriesThree
+ itemLabelFormat: "Three - X:@xLabel Y:@yLabel Z:@zLabel"
+ mesh: Abstract3DSeries.MeshCube
+
+ ItemModelScatterDataProxy {
+ itemModel: graphData.modelThree
xPosRole: "xPos"
yPosRole: "yPos"
zPosRole: "zPos"
@@ -168,7 +194,7 @@ Item {
onClicked: {
if (scatterGraph.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
- scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualitySoftMedium;
+ scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityMedium;
text = "Hide Shadows";
} else {
scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityNone;
diff --git a/examples/datavisualization/qmlcustominput/qmlcustominput.pro b/examples/datavisualization/qmlcustominput/qmlcustominput.pro
new file mode 100644
index 00000000..356bb26f
--- /dev/null
+++ b/examples/datavisualization/qmlcustominput/qmlcustominput.pro
@@ -0,0 +1,12 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmlcustominput.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlcustominput/*
diff --git a/examples/datavisualization/qmlcustominput/qmlcustominput.qrc b/examples/datavisualization/qmlcustominput/qmlcustominput.qrc
new file mode 100644
index 00000000..5800150a
--- /dev/null
+++ b/examples/datavisualization/qmlcustominput/qmlcustominput.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlcustominput/Data.qml</file>
+ <file>qml/qmlcustominput/main.qml</file>
+ <file>qml/qmlcustominput/NewButton.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/qmllegend/doc/images/qmllegend-example.png b/examples/datavisualization/qmllegend/doc/images/qmllegend-example.png
index ee546077..ee546077 100644
--- a/examples/qmllegend/doc/images/qmllegend-example.png
+++ b/examples/datavisualization/qmllegend/doc/images/qmllegend-example.png
Binary files differ
diff --git a/examples/qmllegend/doc/src/qmllegend.qdoc b/examples/datavisualization/qmllegend/doc/src/qmllegend.qdoc
index 14bacf06..b7351721 100644
--- a/examples/qmllegend/doc/src/qmllegend.qdoc
+++ b/examples/datavisualization/qmllegend/doc/src/qmllegend.qdoc
@@ -35,15 +35,15 @@
The legend is simply a column of custom \c LegendItem items inside a transparent rectangle.
Each item is supplied with a series and the graph theme:
- \snippet ../examples/qmllegend/qml/qmllegend/main.qml 0
+ \snippet qmllegend/qml/qmllegend/main.qml 0
The legend items consist of a marker rectangle, which indicates the color of the series,
and a text field, which shows the name of the series. The colors we get from the series and
the theme supplied at legend item initialization:
- \snippet ../examples/qmllegend/qml/qmllegend/legenditem.qml 0
+ \snippet qmllegend/qml/qmllegend/LegendItem.qml 0
\dots 4
- \snippet ../examples/qmllegend/qml/qmllegend/legenditem.qml 1
+ \snippet qmllegend/qml/qmllegend/LegendItem.qml 1
We want the legend to be interactive, so we add additional logic to enable selection of a
series by clicking on a legend item, as well as highlighting the legend item corresponding
@@ -52,16 +52,16 @@
The highlight depends on the selection state of the series, so we define two states, which
follow the Bar3DSeries::selectedBar property and adjust the \c legendItem color appropriately:
- \snippet ../examples/qmllegend/qml/qmllegend/legenditem.qml 3
+ \snippet qmllegend/qml/qmllegend/LegendItem.qml 3
To make the legend item interactive, we define a MouseArea to detect clicks on it and adjust
the series selection accordingly:
- \snippet ../examples/qmllegend/qml/qmllegend/legenditem.qml 2
+ \snippet qmllegend/qml/qmllegend/LegendItem.qml 2
The \c previousSelection used above is another custom property of \c LegendItem, which we update
whenever selection changes on the series. This way we remember the last selected bar of
each series:
- \snippet ../examples/qmllegend/qml/qmllegend/legenditem.qml 4
+ \snippet qmllegend/qml/qmllegend/LegendItem.qml 4
*/
diff --git a/examples/qmllegend/main.cpp b/examples/datavisualization/qmllegend/main.cpp
index 954affe4..62016770 100644
--- a/examples/qmllegend/main.cpp
+++ b/examples/datavisualization/qmllegend/main.cpp
@@ -16,32 +16,31 @@
**
****************************************************************************/
-#include <QtDataVisualization/qutils.h>
#include <QtGui/QGuiApplication>
-#include "qtquick2applicationviewer.h"
-#ifdef Q_OS_ANDROID
-#include <QDir>
-#include <QQmlEngine>
-#endif
-#include <QDebug>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
- QtQuick2ApplicationViewer viewer;
-
- // Enable antialiasing
- viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+ QQuickView viewer;
-#ifdef Q_OS_ANDROID
- viewer.addImportPath(QString::fromLatin1("assets:/qml"));
- viewer.engine()->addPluginPath(QString::fromLatin1("%1/../%2").arg(QDir::homePath(),
- QString::fromLatin1("lib")));
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+ QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close);
+
viewer.setTitle(QStringLiteral("Legend example"));
- viewer.setSource(QUrl("qrc:/qml/main.qml"));
+ viewer.setSource(QUrl("qrc:/qml/qmllegend/main.qml"));
viewer.setResizeMode(QQuickView::SizeRootObjectToView);
viewer.show();
diff --git a/examples/qmllegend/qml/qmllegend/data.qml b/examples/datavisualization/qmllegend/qml/qmllegend/Data.qml
index 4681c61c..4681c61c 100644
--- a/examples/qmllegend/qml/qmllegend/data.qml
+++ b/examples/datavisualization/qmllegend/qml/qmllegend/Data.qml
diff --git a/examples/qmllegend/qml/qmllegend/legenditem.qml b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml
index 50be7a8d..50be7a8d 100644
--- a/examples/qmllegend/qml/qmllegend/legenditem.qml
+++ b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml
diff --git a/examples/qmllegend/qml/qmllegend/newbutton.qml b/examples/datavisualization/qmllegend/qml/qmllegend/NewButton.qml
index e4fb99d2..e4fb99d2 100644
--- a/examples/qmllegend/qml/qmllegend/newbutton.qml
+++ b/examples/datavisualization/qmllegend/qml/qmllegend/NewButton.qml
diff --git a/examples/qmllegend/qml/qmllegend/main.qml b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
index 6c488d6a..6999a67b 100644
--- a/examples/qmllegend/qml/qmllegend/main.qml
+++ b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
@@ -22,7 +22,7 @@ import QtQuick.Layouts 1.0
import QtDataVisualization 1.0
import "."
-Item {
+Rectangle {
id: mainView
width: 800
height: 600
diff --git a/examples/datavisualization/qmllegend/qmllegend.pro b/examples/datavisualization/qmllegend/qmllegend.pro
new file mode 100644
index 00000000..af449d8d
--- /dev/null
+++ b/examples/datavisualization/qmllegend/qmllegend.pro
@@ -0,0 +1,13 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmllegend.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmllegend/*
+
diff --git a/examples/datavisualization/qmllegend/qmllegend.qrc b/examples/datavisualization/qmllegend/qmllegend.qrc
new file mode 100644
index 00000000..b9777b37
--- /dev/null
+++ b/examples/datavisualization/qmllegend/qmllegend.qrc
@@ -0,0 +1,8 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmllegend/Data.qml</file>
+ <file>qml/qmllegend/LegendItem.qml</file>
+ <file>qml/qmllegend/main.qml</file>
+ <file>qml/qmllegend/NewButton.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/qmlmultigraph/doc/images/qmlmultigraph-example.png b/examples/datavisualization/qmlmultigraph/doc/images/qmlmultigraph-example.png
new file mode 100644
index 00000000..79073f5f
--- /dev/null
+++ b/examples/datavisualization/qmlmultigraph/doc/images/qmlmultigraph-example.png
Binary files differ
diff --git a/examples/qmlmultigraph/doc/src/qmlmultigraph.qdoc b/examples/datavisualization/qmlmultigraph/doc/src/qmlmultigraph.qdoc
index f3ba172d..38c7b783 100644
--- a/examples/qmlmultigraph/doc/src/qmlmultigraph.qdoc
+++ b/examples/datavisualization/qmlmultigraph/doc/src/qmlmultigraph.qdoc
@@ -33,11 +33,12 @@
\section1 Multiple Graphs
Using multiple graphs in a single application doesn't require anything special, simply define
- and position the graphs as normal. In this example the graphs are shown side by side in a RowLayout:
+ and position the graphs as normal. In this example the graphs are shown in a 2 x 2 grid with
+ \c{GridLayout}:
- \snippet ../examples/qmlmultigraph/qml/qmlmultigraph/main.qml 0
+ \snippet qmlmultigraph/qml/qmlmultigraph/main.qml 0
- Each graph has a parent Rectangle item to provide it with a border. The color of the rectangle is set
- to fully transparent, because otherwise the rectangles would hide the graphs, which are always drawn behind
- all other QML elements.
+ Each graph has a parent \c Rectangle item to provide it with a border.
+
+ Note that one of the grid cells is used for buttons in an another \c{GridLayout}.
*/
diff --git a/examples/qmlmultigraph/main.cpp b/examples/datavisualization/qmlmultigraph/main.cpp
index 25cd5d9c..ef53d5ec 100644
--- a/examples/qmlmultigraph/main.cpp
+++ b/examples/datavisualization/qmlmultigraph/main.cpp
@@ -16,33 +16,32 @@
**
****************************************************************************/
-#include <QtDataVisualization/qutils.h>
#include <QtGui/QGuiApplication>
-#include "qtquick2applicationviewer.h"
-#ifdef Q_OS_ANDROID
-#include <QDir>
-#include <QQmlEngine>
-#endif
-#include <QDebug>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
- QtQuick2ApplicationViewer viewer;
-
- // Enable antialiasing
- viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+ QQuickView viewer;
-#ifdef Q_OS_ANDROID
- viewer.addImportPath(QString::fromLatin1("assets:/qml"));
- viewer.engine()->addPluginPath(QString::fromLatin1("%1/../%2").arg(QDir::homePath(),
- QString::fromLatin1("lib")));
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+ QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close);
+
viewer.setTitle(QStringLiteral("QML multigraph example"));
- viewer.setSource(QUrl("qrc:/qml/main.qml"));
+ viewer.setSource(QUrl("qrc:/qml/qmlmultigraph/main.qml"));
viewer.setResizeMode(QQuickView::SizeRootObjectToView);
- viewer.showExpanded();
+ viewer.show();
return app.exec();
}
diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml
new file mode 100644
index 00000000..43152e50
--- /dev/null
+++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/Data.qml
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+import QtQuick 2.1
+
+Item {
+ property alias data: dataModel
+
+ ListModel {
+ id: dataModel
+ ListElement{ row: "0"; col: "0"; longitude: "20.0"; latitude: "10.0"; pop_density: "4.75"; }
+ ListElement{ row: "1"; col: "0"; longitude: "21.1"; latitude: "10.3"; pop_density: "3.00"; }
+ ListElement{ row: "2"; col: "0"; longitude: "22.5"; latitude: "10.7"; pop_density: "1.24"; }
+ ListElement{ row: "3"; col: "0"; longitude: "24.0"; latitude: "10.5"; pop_density: "2.53"; }
+ ListElement{ row: "0"; col: "1"; longitude: "20.2"; latitude: "11.2"; pop_density: "3.55"; }
+ ListElement{ row: "1"; col: "1"; longitude: "21.3"; latitude: "11.5"; pop_density: "3.03"; }
+ ListElement{ row: "2"; col: "1"; longitude: "22.6"; latitude: "11.7"; pop_density: "3.46"; }
+ ListElement{ row: "3"; col: "1"; longitude: "23.4"; latitude: "11.5"; pop_density: "4.12"; }
+ ListElement{ row: "0"; col: "2"; longitude: "20.2"; latitude: "12.3"; pop_density: "3.37"; }
+ ListElement{ row: "1"; col: "2"; longitude: "21.1"; latitude: "12.4"; pop_density: "2.98"; }
+ ListElement{ row: "2"; col: "2"; longitude: "22.5"; latitude: "12.1"; pop_density: "3.33"; }
+ ListElement{ row: "3"; col: "2"; longitude: "23.3"; latitude: "12.7"; pop_density: "3.23"; }
+ ListElement{ row: "0"; col: "3"; longitude: "20.7"; latitude: "13.3"; pop_density: "5.34"; }
+ ListElement{ row: "1"; col: "3"; longitude: "21.5"; latitude: "13.2"; pop_density: "4.54"; }
+ ListElement{ row: "2"; col: "3"; longitude: "22.4"; latitude: "13.6"; pop_density: "4.65"; }
+ ListElement{ row: "3"; col: "3"; longitude: "23.2"; latitude: "13.4"; pop_density: "6.67"; }
+ ListElement{ row: "0"; col: "4"; longitude: "20.6"; latitude: "15.0"; pop_density: "6.01"; }
+ ListElement{ row: "1"; col: "4"; longitude: "21.3"; latitude: "14.6"; pop_density: "5.83"; }
+ ListElement{ row: "2"; col: "4"; longitude: "22.5"; latitude: "14.8"; pop_density: "7.32"; }
+ ListElement{ row: "3"; col: "4"; longitude: "23.7"; latitude: "14.3"; pop_density: "6.90"; }
+ }
+}
+
diff --git a/examples/qmlmultigraph/qml/qmlmultigraph/newbutton.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/NewButton.qml
index e4fb99d2..e4fb99d2 100644
--- a/examples/qmlmultigraph/qml/qmlmultigraph/newbutton.qml
+++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/NewButton.qml
diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
new file mode 100644
index 00000000..46ff2067
--- /dev/null
+++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Layouts 1.0
+import QtDataVisualization 1.0
+import "."
+
+Rectangle {
+ id: mainView
+ width: 800
+ height: 600
+
+ Data {
+ id: data
+ }
+
+ //! [0]
+ GridLayout {
+ id: gridLayout
+ columns: 2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ anchors.top: mainView.top
+ anchors.bottom: mainView.bottom
+ anchors.left: mainView.left
+ anchors.right: mainView.right
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.color: surfaceGraph.theme.gridLineColor
+ border.width: 2
+
+ Surface3D {
+ id: surfaceGraph
+ anchors.fill: parent
+ anchors.margins: parent.border.width
+ theme: Theme3D {
+ type: Theme3D.ThemePrimaryColors
+ font.pointSize: 60
+ }
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
+
+ Surface3DSeries {
+ itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel"
+ ItemModelSurfaceDataProxy {
+ itemModel: data.data
+ // The surface data points are not neatly lined up in rows and columns,
+ // so we define explicit row and column roles.
+ rowRole: "row"
+ columnRole: "col"
+ xPosRole: "latitude"
+ zPosRole: "longitude"
+ yPosRole: "pop_density"
+ }
+ }
+ }
+ }
+
+ // We'll use one grid cell for buttons
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ GridLayout {
+ anchors.right: parent.right
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ columns: 2
+
+ NewButton {
+ Layout.minimumWidth: parent.width / 2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Clear Selections"
+ onClicked: clearSelections() // call a helper function to keep button itself simpler
+ }
+
+ NewButton {
+ Layout.minimumWidth: parent.width / 2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Quit"
+ onClicked: Qt.quit(0);
+ }
+
+ NewButton {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Reset Cameras"
+ onClicked: resetCameras() // call a helper function to keep button itself simpler
+ }
+
+ NewButton {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Toggle Mesh Styles"
+ onClicked: toggleMeshStyle() // call a helper function to keep button itself simpler
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.color: scatterGraph.theme.gridLineColor
+ border.width: 2
+
+ Scatter3D {
+ id: scatterGraph
+ anchors.fill: parent
+ anchors.margins: parent.border.width
+ theme: Theme3D {
+ type: Theme3D.ThemeDigia
+ font.pointSize: 60
+ }
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
+
+ Scatter3DSeries {
+ itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel"
+ ItemModelScatterDataProxy {
+ itemModel: data.data
+ // Mapping model roles to scatter series item coordinates.
+ xPosRole: "latitude"
+ zPosRole: "longitude"
+ yPosRole: "pop_density"
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.color: barGraph.theme.gridLineColor
+ border.width: 2
+
+ Bars3D {
+ id: barGraph
+ anchors.fill: parent
+ anchors.margins: parent.border.width
+ theme: Theme3D {
+ type: Theme3D.ThemeQt
+ font.pointSize: 60
+ }
+ selectionMode: AbstractGraph3D.SelectionItemAndRow | AbstractGraph3D.SelectionSlice
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
+
+ Bar3DSeries {
+ itemLabelFormat: "@seriesName: @valueLabel"
+ name: "Population density"
+
+ ItemModelBarDataProxy {
+ itemModel: data.data
+ // Mapping model roles to bar series rows, columns, and values.
+ rowRole: "row"
+ columnRole: "col"
+ valueRole: "pop_density"
+ }
+ }
+ }
+ }
+ }
+ //! [0]
+
+ function clearSelections() {
+ barGraph.clearSelection()
+ scatterGraph.clearSelection()
+ surfaceGraph.clearSelection()
+ }
+
+ function resetCameras() {
+ surfaceGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
+ scatterGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
+ barGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
+ surfaceGraph.scene.activeCamera.zoomLevel = 100
+ scatterGraph.scene.activeCamera.zoomLevel = 100
+ barGraph.scene.activeCamera.zoomLevel = 100
+ }
+
+ function toggleMeshStyle() {
+ if (barGraph.seriesList[0].meshSmooth === true) {
+ barGraph.seriesList[0].meshSmooth = false
+ if (surfaceGraph.seriesList[0].flatShadingSupported)
+ surfaceGraph.seriesList[0].flatShadingEnabled = true
+ scatterGraph.seriesList[0].meshSmooth = false
+ } else {
+ barGraph.seriesList[0].meshSmooth = true
+ surfaceGraph.seriesList[0].flatShadingEnabled = false
+ scatterGraph.seriesList[0].meshSmooth = true
+ }
+ }
+}
diff --git a/examples/datavisualization/qmlmultigraph/qmlmultigraph.pro b/examples/datavisualization/qmlmultigraph/qmlmultigraph.pro
new file mode 100644
index 00000000..8cc4c60c
--- /dev/null
+++ b/examples/datavisualization/qmlmultigraph/qmlmultigraph.pro
@@ -0,0 +1,12 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmlmultigraph.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlmultigraph/*
diff --git a/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc b/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc
new file mode 100644
index 00000000..c5e63a1c
--- /dev/null
+++ b/examples/datavisualization/qmlmultigraph/qmlmultigraph.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlmultigraph/Data.qml</file>
+ <file>qml/qmlmultigraph/main.qml</file>
+ <file>qml/qmlmultigraph/NewButton.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/qmloscilloscope/datasource.cpp b/examples/datavisualization/qmloscilloscope/datasource.cpp
new file mode 100644
index 00000000..01d7e73d
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/datasource.cpp
@@ -0,0 +1,172 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+#include "datasource.h"
+#include <QtCore/qmath.h>
+
+using namespace QtDataVisualization;
+
+//! [3]
+Q_DECLARE_METATYPE(QSurface3DSeries *)
+Q_DECLARE_METATYPE(QValue3DAxis *)
+//! [3]
+
+DataSource::DataSource(QObject *parent) :
+ QObject(parent),
+ m_index(-1),
+ m_resetArray(0)
+{
+ //! [4]
+ qRegisterMetaType<QSurface3DSeries *>();
+ qRegisterMetaType<QValue3DAxis *>();
+ //! [4]
+}
+
+DataSource::~DataSource()
+{
+ clearData();
+}
+
+//! [0]
+void DataSource::generateData(int cacheCount, int rowCount, int columnCount,
+ float xMin, float xMax, float yMin, float yMax,
+ float zMin, float zMax)
+{
+ if (!cacheCount)
+ return;
+
+ clearData();
+ // Re-create the cache array
+ m_data.resize(cacheCount);
+ for (int i(0); i < cacheCount; i++) {
+ QSurfaceDataArray &array = m_data[i];
+ array.reserve(rowCount);
+ for (int j(0); j < rowCount; j++)
+ array.append(new QSurfaceDataRow(columnCount));
+ }
+
+ float xRange = xMax - xMin;
+ float yRange = yMax - yMin;
+ float zRange = zMax - zMin;
+ int cacheIndexStep = columnCount / cacheCount;
+ float cacheStep = float(cacheIndexStep) * xRange / float(columnCount);
+
+ // Populate caches
+ for (int i(0); i < cacheCount; i++) {
+ QSurfaceDataArray &cache = m_data[i];
+ float cacheXAdjustment = cacheStep * i;
+ float cacheIndexAdjustment = cacheIndexStep * i;
+ for (int j(0); j < rowCount; j++) {
+ QSurfaceDataRow &row = *(cache[j]);
+ float rowMod = (float(j)) / float(rowCount);
+ float yRangeMod = yRange * rowMod;
+ float zRangeMod = zRange * rowMod;
+ float z = zRangeMod + zMin;
+ qreal rowColWaveAngleMul = M_PI * M_PI * rowMod;
+ float rowColWaveMul = yRangeMod * 0.2f;
+ for (int k(0); k < columnCount; k++) {
+ float colMod = (float(k)) / float(columnCount);
+ float xRangeMod = xRange * colMod;
+ float x = xRangeMod + xMin + cacheXAdjustment;
+ float colWave = float(qSin((2.0 * M_PI * colMod) - (1.0 / 2.0 * M_PI)) + 1.0);
+ float y = (colWave * ((float(qSin(rowColWaveAngleMul * colMod) + 1.0))))
+ * rowColWaveMul
+ + (0.15f * float(rand()) / float(RAND_MAX)) * yRangeMod;
+
+ int index = k + cacheIndexAdjustment;
+ if (index >= columnCount) {
+ // Wrap over
+ index -= columnCount;
+ x -= xRange;
+ }
+ row[index] = QVector3D(x, y, z);
+ }
+ }
+ }
+}
+//! [0]
+
+//! [1]
+void DataSource::update(QSurface3DSeries *series)
+{
+ if (series && m_data.size()) {
+ // Each iteration uses data from a different cached array
+ m_index++;
+ if (m_index > m_data.count() - 1)
+ m_index = 0;
+
+ QSurfaceDataArray array = m_data.at(m_index);
+ int newRowCount = array.size();
+ int newColumnCount = array.at(0)->size();
+
+ // If the first time or the dimensions of the cache array have changed,
+ // reconstruct the reset array
+ if (m_resetArray || series->dataProxy()->rowCount() != newRowCount
+ || series->dataProxy()->columnCount() != newColumnCount) {
+ m_resetArray = new QSurfaceDataArray();
+ m_resetArray->reserve(newRowCount);
+ for (int i(0); i < newRowCount; i++)
+ m_resetArray->append(new QSurfaceDataRow(newColumnCount));
+ }
+
+ // Copy items from our cache to the reset array
+ for (int i(0); i < newRowCount; i++) {
+ const QSurfaceDataRow &sourceRow = *(array.at(i));
+ QSurfaceDataRow &row = *(*m_resetArray)[i];
+ for (int j(0); j < newColumnCount; j++)
+ row[j].setPosition(sourceRow.at(j).position());
+ }
+
+ // Notify the proxy that data has changed
+ series->dataProxy()->resetArray(m_resetArray);
+ }
+}
+//! [1]
+
+//! [2]
+QString DataSource::selectionLabel(QSurface3DSeries *series, QValue3DAxis *axisX,
+ QValue3DAxis *axisY, QValue3DAxis *axisZ)
+{
+ QString label;
+
+ if (series && series->selectedPoint() != QSurface3DSeries::invalidSelectionPosition()) {
+ const QSurfaceDataItem *item = series->dataProxy()->itemAt(series->selectedPoint());
+ QString x;
+ QString y;
+ QString z;
+ x.sprintf(axisX->labelFormat().toUtf8().constData(), int(item->x()));
+ y.sprintf(axisY->labelFormat().toUtf8().constData(), int(item->y()));
+ z.sprintf(axisZ->labelFormat().toUtf8().constData(), int(item->z()));
+ label = QStringLiteral("%1, %3: %2").arg(x).arg(y).arg(z);
+ } else {
+ label = QStringLiteral("No selection");
+ }
+
+ return label;
+}
+//! [2]
+
+void DataSource::clearData()
+{
+ for (int i(0); i < m_data.size(); i++) {
+ QSurfaceDataArray &array = m_data[i];
+ for (int j(0); j < array.size(); j++)
+ delete array[j];
+ array.clear();
+ }
+}
diff --git a/examples/datavisualization/qmloscilloscope/datasource.h b/examples/datavisualization/qmloscilloscope/datasource.h
new file mode 100644
index 00000000..ef2f7acb
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/datasource.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+#ifndef DATASOURCE_H
+#define DATASOURCE_H
+
+#include <QtDataVisualization/QSurface3DSeries>
+#include <QtDataVisualization/QValue3DAxis>
+
+class QQuickView;
+
+using namespace QtDataVisualization;
+
+class DataSource : public QObject
+{
+ Q_OBJECT
+public:
+ explicit DataSource(QObject *parent = 0);
+ virtual ~DataSource();
+
+ //! [0]
+public slots:
+ void generateData(int cacheCount, int rowCount, int columnCount,
+ float xMin, float xMax, float yMin, float yMax, float zMin, float zMax);
+
+ void update(QSurface3DSeries *series);
+
+ QString selectionLabel(QSurface3DSeries *series, QValue3DAxis *axisX,
+ QValue3DAxis *axisY, QValue3DAxis *axisZ);
+ //! [0]
+private:
+ void clearData();
+
+ QVector<QSurfaceDataArray> m_data;
+ int m_index;
+ QSurfaceDataArray *m_resetArray;
+};
+
+#endif
diff --git a/examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.png b/examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.png
new file mode 100644
index 00000000..a3e1baab
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.png
Binary files differ
diff --git a/examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc b/examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc
new file mode 100644
index 00000000..c574950b
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** 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 qmloscilloscope
+ \title Qt Quick 2 Oscilloscope Example
+ \ingroup qtdatavisualization_examples
+ \brief Example of a hybrid C++ and QML application.
+
+ The Qt Quick 2 oscilloscope example shows how to combine C++ and QML in an application,
+ as well as showing data that changes realtime.
+
+ \image qmloscilloscope-example.png
+
+ The interesting thing about this example is combining C++ and QML, so we'll concentrate on
+ that and skip explaining the basic functionality - for
+ more detailed QML example documentation, see \l{Qt Quick 2 Scatter Example}.
+
+ \section1 Data source in C++
+
+ The item model based proxies are good for simple and/or static graphs, but to achieve
+ best performance when displaying data changing in realtime, the basic proxies should be used.
+ Those are not supported in QML, as the data items they store are not \l{QObject}s and
+ cannot therefore be directly manipulated from QML code.
+ To overcome this limitation, we implement a simple \c DataSource class in C++ to populate the
+ data proxy of the series.
+
+ The \c DataSource class provides three methods that can be called from QML:
+
+ \snippet qmloscilloscope/datasource.h 0
+
+ The first method, \c generateData(), creates a cache of simulated oscilloscope data for us
+ to display. The data is cached in a format accepted by QSurfaceDataProxy:
+
+ \snippet qmloscilloscope/datasource.cpp 0
+
+ The secod method, \c update(), copies one set of the cached data into another array, which we
+ set to the data proxy of the series by calling QSurfaceDataProxy::resetArray().
+ We reuse the same array if the array dimensions have not changed to minimize overhead:
+
+ \snippet qmloscilloscope/datasource.cpp 1
+
+ \note Even though we are operating on the array pointer we have previously set to the proxy
+ we still need to call QSurfaceDataProxy::resetArray() after changing the data in it to prompt
+ the graph to render the data.
+
+ The final method, \c selectionLabel(), is used to generate a label string we can show on the
+ QML ui. This method utilizes the axis formats to format the label:
+
+ \snippet qmloscilloscope/datasource.cpp 2
+
+ To be able to access the \c DataSource methods from QML, we need to expose it. We do this by
+ defining a context property in application main:
+
+ \snippet qmloscilloscope/main.cpp 0
+
+ To make it possible to use Qt Data Visualization class pointers as parameters on the
+ \c DataSource class methods on all environments and builds, we need to make sure the meta
+ types are registered:
+
+ \snippet qmloscilloscope/datasource.cpp 3
+ \dots 0
+ \snippet qmloscilloscope/datasource.cpp 4
+
+ \section1 QML
+
+ In the QML codes, we define a Surface3D graph normally and give it a Surface3DSeries:
+
+ \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 0
+
+ One interesting detail is that we don't specify a proxy for the Surface3DSeries we attach
+ to the graph. This makes the series to utilize the default QSurfaceDataProxy.
+
+ We also specify an empty string for \l{Abstract3DSeries::itemLabelFormat}{itemLabelFormat}, since we want to display
+ the selected item information in a \c Text element instead of a label above the selection pointer.
+ This is done because the selection pointer moves around a lot as the data changes, which makes
+ the regular selection label difficult to read.
+ When selection point changes, we update the label text using a helper function
+ \c updateSelectionLabel(), which calls one of the methods we defined for our \c DataSource class
+ to obtain the label:
+
+ \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 1
+
+ We initialize the \c DataSource cache when the graph is complete by calling a helper function
+ \c generateData(), which calls the method with the same name on the \c DataSource:
+
+ \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 2
+ \dots 4
+ \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 4
+
+ To trigger the updates in data, we define a \c Timer item which calls the \c update() method on the \c
+ DataSource at requested intervals. The label update is also triggered on each cycle:
+
+ \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 3
+
+ \section1 Enabling direct rendering
+
+ Since this application potentially deals with a lot of rapidly changing data, we use direct
+ rendering mode for performance. To enable antialiasing in this mode the surface format of the application
+ window needs to be changed, as the default format used by QQuickView doesn't support antialiasing.
+ We use the utility function provided by Qt Data Visualization to change the surface format
+ in \c main.cpp:
+
+ \snippet qmloscilloscope/main.cpp 1
+ \dots 0
+ \snippet qmloscilloscope/main.cpp 2
+
+ On the QML side, direct rendering mode is enabled via \l{AbstractGraph3D::renderingMode}{renderingMode} property:
+
+ \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 5
+*/
diff --git a/examples/datavisualization/qmloscilloscope/main.cpp b/examples/datavisualization/qmloscilloscope/main.cpp
new file mode 100644
index 00000000..9ee46e21
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/main.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+#include "datasource.h"
+
+//! [2]
+#include <QtDataVisualization/qutils.h>
+//! [2]
+
+#include <QtGui/QGuiApplication>
+#include <QtCore/QDir>
+#include <QtQml/QQmlContext>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQuickView viewer;
+
+ // Enable antialiasing in direct rendering mode
+ //! [1]
+ viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+ //! [1]
+
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
+#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+ QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close);
+
+ viewer.setTitle(QStringLiteral("Oscilloscope example"));
+
+ //! [0]
+ DataSource dataSource;
+ viewer.rootContext()->setContextProperty("dataSource", &dataSource);
+ //! [0]
+
+ viewer.setSource(QUrl("qrc:/qml/qmloscilloscope/main.qml"));
+ viewer.setResizeMode(QQuickView::SizeRootObjectToView);
+ viewer.show();
+
+ return app.exec();
+}
diff --git a/examples/qmlscatter/qml/qmlscatter/newbutton.qml b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/NewButton.qml
index e4fb99d2..e4fb99d2 100644
--- a/examples/qmlscatter/qml/qmlscatter/newbutton.qml
+++ b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/NewButton.qml
diff --git a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
new file mode 100644
index 00000000..eeaeab40
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
@@ -0,0 +1,306 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 1.0
+import QtDataVisualization 1.0
+import "."
+
+Item {
+ id: mainView
+ width: 1280
+ height: 1024
+
+ property int sampleColumns: sampleSlider.value
+ property int sampleRows: sampleColumns / 2
+ property int sampleCache: 24
+
+ onSampleRowsChanged: {
+ surfaceSeries.selectedPoint = surfaceSeries.invalidSelectionPosition
+ generateData()
+ }
+
+ Item {
+ id: dataView
+ anchors.bottom: parent.bottom
+ width: parent.width
+ height: parent.height - buttonLayout.height
+
+ Surface3D {
+ id: surfaceGraph
+
+ width: dataView.width
+ height: dataView.height
+ shadowQuality: AbstractGraph3D.ShadowQualityNone
+ selectionMode: AbstractGraph3D.SelectionSlice | AbstractGraph3D.SelectionItemAndRow
+ //! [5]
+ renderingMode: AbstractGraph3D.RenderDirectToBackground
+ //! [5]
+
+ axisX.labelFormat: "%d ms"
+ axisY.labelFormat: "%d W"
+ axisZ.labelFormat: "%d mV"
+ axisX.min: 0
+ axisY.min: 0
+ axisZ.min: 0
+ axisX.max: 1000
+ axisY.max: 100
+ axisZ.max: 800
+ axisX.segmentCount: 4
+ axisY.segmentCount: 4
+ axisZ.segmentCount: 4
+
+ //! [0]
+ Surface3DSeries {
+ id: surfaceSeries
+ drawMode: Surface3DSeries.DrawSurface;
+ flatShadingEnabled: false;
+ meshSmooth: true
+ itemLabelFormat: ""
+
+ onSelectedPointChanged: mainView.updateSelectionLabel()
+ }
+ //! [0]
+
+ //! [2]
+ Component.onCompleted: mainView.generateData()
+ //! [2]
+ }
+ }
+
+ //! [3]
+ Timer {
+ id: refreshTimer
+ interval: 1000 / frequencySlider.value
+ running: true
+ repeat: true
+ onTriggered: {
+ dataSource.update(surfaceSeries)
+ mainView.updateSelectionLabel()
+ }
+ }
+ //! [3]
+
+ Rectangle {
+ width: parent.width
+ height: flatShadingToggle.height * 2
+ anchors.left: parent.left
+ anchors.top: parent.top
+ color: surfaceGraph.theme.backgroundColor
+
+ ColumnLayout {
+ anchors.fill: parent
+ RowLayout {
+ id: sliderLayout
+ anchors.top: parent.top
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.minimumHeight: flatShadingToggle.height
+ spacing: 0
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.minimumWidth: samplesText.implicitWidth + 120
+ Layout.maximumWidth: samplesText.implicitWidth + 120
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ RowLayout {
+ anchors.fill: parent
+ anchors.margins: parent.border.width + 1
+
+ Slider {
+ id: sampleSlider
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ Layout.minimumWidth: 80
+ minimumValue: mainView.sampleCache * 2
+ maximumValue: minimumValue * 10
+ stepSize: mainView.sampleCache
+ updateValueWhileDragging: false
+ value: minimumValue * 2
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.minimumWidth: samplesText.implicitWidth + 10
+ Layout.maximumWidth: samplesText.implicitWidth + 10
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ Text {
+ id: samplesText
+ text: "Samples: " + (mainView.sampleRows * mainView.sampleColumns)
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.minimumWidth: frequencyText.implicitWidth + 120
+ Layout.maximumWidth: frequencyText.implicitWidth + 120
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ RowLayout {
+ anchors.fill: parent
+ anchors.margins: parent.border.width + 1
+
+ Slider {
+ id: frequencySlider
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ Layout.minimumWidth: 80
+ minimumValue: 2
+ maximumValue: 60
+ stepSize: 2
+ updateValueWhileDragging: true
+ value: 30
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.minimumWidth: frequencyText.implicitWidth + 10
+ Layout.maximumWidth: frequencyText.implicitWidth + 10
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ Text {
+ id: frequencyText
+ text: "Freq: " + frequencySlider.value + " Hz"
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.minimumWidth: selectionText.implicitWidth + 10
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ Text {
+ id: selectionText
+ text: "No selection"
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
+ }
+
+ RowLayout {
+ id: buttonLayout
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.minimumHeight: flatShadingToggle.height
+ anchors.bottom: parent.bottom
+ spacing: 0
+
+ NewButton {
+ id: flatShadingToggle
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ text: "Show Flat"
+ enabled: surfaceSeries.flatShadingSupported
+
+ onClicked: {
+ if (surfaceSeries.flatShadingEnabled === true) {
+ surfaceSeries.flatShadingEnabled = false;
+ text = "Show Flat"
+ } else {
+ surfaceSeries.flatShadingEnabled = true;
+ text = "Show Smooth"
+ }
+ }
+ }
+
+ NewButton {
+ id: surfaceGridToggle
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ text: "Show Surface Grid"
+
+ onClicked: {
+ if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe) {
+ surfaceSeries.drawMode &= ~Surface3DSeries.DrawWireframe;
+ text = "Show Surface Grid"
+ } else {
+ surfaceSeries.drawMode |= Surface3DSeries.DrawWireframe;
+ text = "Hide Surface Grid"
+ }
+ }
+ }
+
+ NewButton {
+ id: exitButton
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ text: "Quit"
+
+ onClicked: Qt.quit(0);
+ }
+ }
+ }
+
+ }
+
+ //! [1]
+ function updateSelectionLabel() {
+ selectionText.text = dataSource.selectionLabel(surfaceSeries,
+ surfaceGraph.axisX,
+ surfaceGraph.axisY,
+ surfaceGraph.axisZ)
+ }
+ //! [1]
+
+ //! [4]
+ function generateData() {
+ dataSource.generateData(mainView.sampleCache, mainView.sampleRows,
+ mainView.sampleColumns, surfaceGraph.axisX.min,
+ surfaceGraph.axisX.max, surfaceGraph.axisY.min,
+ surfaceGraph.axisY.max, surfaceGraph.axisZ.min,
+ surfaceGraph.axisZ.max)
+ }
+ //! [4]
+}
diff --git a/examples/datavisualization/qmloscilloscope/qmloscilloscope.pro b/examples/datavisualization/qmloscilloscope/qmloscilloscope.pro
new file mode 100644
index 00000000..89023cc0
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/qmloscilloscope.pro
@@ -0,0 +1,16 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+QT += datavisualization
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp \
+ datasource.cpp
+HEADERS += datasource.h
+
+RESOURCES += qmloscilloscope.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmloscilloscope/*
diff --git a/examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc b/examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc
new file mode 100644
index 00000000..a2358789
--- /dev/null
+++ b/examples/datavisualization/qmloscilloscope/qmloscilloscope.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmloscilloscope/main.qml</file>
+ <file>qml/qmloscilloscope/NewButton.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/qmlscatter/doc/images/qmlscatter-example.png b/examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.png
index 65ec4816..65ec4816 100644
--- a/examples/qmlscatter/doc/images/qmlscatter-example.png
+++ b/examples/datavisualization/qmlscatter/doc/images/qmlscatter-example.png
Binary files differ
diff --git a/examples/qmlscatter/doc/src/qmlscatter.qdoc b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc
index 366b02ea..06dfa8cc 100644
--- a/examples/qmlscatter/doc/src/qmlscatter.qdoc
+++ b/examples/datavisualization/qmlscatter/doc/src/qmlscatter.qdoc
@@ -27,102 +27,76 @@
For instructions about how to interact with the graph, see \l{Qt Data Visualization Interacting with Data}{this page}.
- \image qmlscatter-example.png
-
- \section1 Creating the application
-
- The application main is created by creating a new Qt Quick Application project in QtCreator.
- The dialog shown here is from QtCreator 3.0.0, and it may look a bit different in other
- versions:
-
- \image qmlscatter-newproject.png
-
- We'll modify the generated \c main.cpp a bit, as we want to add our \c main.qml file as a
- resource. We do it by replacing
-
- \code viewer.setMainQmlFile(QStringLiteral("qml/qmlscatter/main.qml")); \endcode
-
- with
-
- \snippet ../examples/qmlscatter/main.cpp 0
-
- This will help us when deploying the application to Android.
+ For instructions how to create a new Qt Quick 2 application of your own, see Qt Creator help.
- We'll enable anti-aliasing for our application in environments that support it:
-
- \snippet ../examples/qmlscatter/main.cpp 2
-
- We'll also change the application to be shown maximized by replacing
+ \image qmlscatter-example.png
- \code viewer.showExpanded(); \endcode
+ \section1 Application basics
- with
+ Before diving into the QML code, let's take a look at the application \c main.cpp.
- \snippet ../examples/qmlscatter/main.cpp 1
+ This application implements a 'Quit' button in the UI, so we want to connect the QQmlEngine::quit()
+ signal to our application's QWindow::close() slot:
- We won't look into that any closer, as we'll change nothing in the generated
- \c qtquick2applicationviewer files.
+ \snippet qmlscatter/main.cpp 4
- Next we'll create new qml files for data (\c data.qml) and a QtQuick.Controls button
- we want to modify a bit (\c newbutton.qml), and add them to the resource file, in addition to
- main.qml:
+ To make deployment little simpler, we gather all of the application's \c .qml files to a resource
+ file (\c qmlscatter.qrc):
\code
<RCC>
- <qresource prefix="/qml">
- <file alias="main.qml">qml/qmlscatter/main.qml</file>
- <file alias="Data.qml">qml/qmlscatter/data.qml</file>
- <file alias="NewButton.qml">qml/qmlscatter/newbutton.qml</file>
+ <qresource prefix="/">
+ <file>qml/qmlscatter/Data.qml</file>
+ <file>qml/qmlscatter/main.qml</file>
+ <file>qml/qmlscatter/NewButton.qml</file>
</qresource>
</RCC>
\endcode
- Now the base for our application is done, and we can start setting up the graph.
+ This also requires us to set the \c main.qml to be read from the resource (\c{qrc:}):
- \section1 Setting up the graph
+ \snippet qmlscatter/main.cpp 3
- Let's start modifying the generated \c {main.qml}. We can remove all previous content from it,
- as it has nothing we need.
+ Lastly, we want the application to run in a maximized window:
+
+ \snippet qmlscatter/main.cpp 2
+
+ \section1 Setting up the graph
First we'll import all the QML modules we need:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 0
+ \snippet qmlscatter/qml/qmlscatter/main.qml 0
The last \c import just imports all the qml files in the same directory as our \c {main.qml},
- because that's where \c newbutton.qml and \c data.qml are.
-
- Then we create our main \c Item and call it \c mainView:
+ because that's where \c NewButton.qml and \c Data.qml are.
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 1
+ Then we create our main \c Rectangle and call it \c mainView:
- \note The Qt Creator application wizard will set a \c Rectangle item as the main item, which
- is opaque white by default. This doesn't work for us, because the graphs are rendered behind the other
- QML elements. We change the main item type to \c Item, which is invisible. This way the graph is
- not covered by the main item.
+ \snippet qmlscatter/qml/qmlscatter/main.qml 1
- Then we'll add another \c Item inside it, and call it \c dataView. This will be the item to hold
- the Scatter3D graph. We'll anchor it to the parent bottom:
+ Then we'll add another \c Item inside the main \c Rectangle, and call it \c dataView.
+ This will be the item to hold the Scatter3D graph. We'll anchor it to the parent bottom:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 9
+ \snippet qmlscatter/qml/qmlscatter/main.qml 9
Next we're ready to add the Scatter3D graph itself. We'll add it inside the \c dataView and
name it \c {scatterGraph}. Let's make it fill the \c {dataView}:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 2
+ \snippet qmlscatter/qml/qmlscatter/main.qml 2
Now the graph is ready for use, but has no data. It also has the default axes and visual
properties.
Let's modify some visual properties first by adding the following inside \c {scatterGraph}:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 3
+ \snippet qmlscatter/qml/qmlscatter/main.qml 3
We added a customized theme and changed the shadow quality.
We're happy with the other visual properties, so we won't change them.
The custom theme is based on a predefined theme, but we change the font in it:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 13
+ \snippet qmlscatter/qml/qmlscatter/main.qml 13
Then it's time to start feeding the graph some data.
@@ -130,17 +104,17 @@
Let's create a \c Data item inside the \c mainView and name it \c seriesData:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 4
+ \snippet qmlscatter/qml/qmlscatter/main.qml 4
The \c seriesData item contains the data models for all three series we use in this example.
- This is the component that holds our data in \c {data.qml}. It has an \c Item as the main
+ This is the component that holds our data in \c {Data.qml}. It has an \c Item as the main
component.
In the main component we'll add the data itself in a \c ListModel and name it
\c {dataModel}:
- \snippet ../examples/qmlscatter/qml/qmlscatter/data.qml 0
+ \snippet qmlscatter/qml/qmlscatter/Data.qml 0
\dots
We'll add two more of these for the other two series, and name them \c dataModelTwo and
@@ -149,39 +123,39 @@
Then we need to expose the data models to be usable from \c {main.qml}. We do this by defining
them as aliases in the main data component:
- \snippet ../examples/qmlscatter/qml/qmlscatter/data.qml 1
+ \snippet qmlscatter/qml/qmlscatter/Data.qml 1
- Now we can use the data from \c data.qml with \c scatterGraph in \c {main.qml}. First we'll add
+ Now we can use the data from \c Data.qml with \c scatterGraph in \c {main.qml}. First we'll add
a Scatter3DSeries and call it \c {scatterSeries}:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 5
+ \snippet qmlscatter/qml/qmlscatter/main.qml 5
Then we'll set up selection label format for the series:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 10
+ \snippet qmlscatter/qml/qmlscatter/main.qml 10
And finally the data for series one in a ItemModelScatterDataProxy. We set the data itself as
\c itemModel for the proxy:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 11
+ \snippet qmlscatter/qml/qmlscatter/main.qml 11
We'll add the other two series in the same way, but modify some series-specific details a bit:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 12
+ \snippet qmlscatter/qml/qmlscatter/main.qml 12
\dots
Then we'll modify the properties of the default axes in \c scatterGraph a bit:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 6
+ \snippet qmlscatter/qml/qmlscatter/main.qml 6
After that we'll just add a few buttons to the \c mainView to control the graph. We'll only
show one as an example:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 7
+ \snippet qmlscatter/qml/qmlscatter/main.qml 7
Then we'll modify \c dataView to make room for the buttons at the top:
- \snippet ../examples/qmlscatter/qml/qmlscatter/main.qml 8
+ \snippet qmlscatter/qml/qmlscatter/main.qml 8
\dots
And we're done!
diff --git a/examples/qmlscatter/main.cpp b/examples/datavisualization/qmlscatter/main.cpp
index 4ecefdc1..11684c84 100644
--- a/examples/qmlscatter/main.cpp
+++ b/examples/datavisualization/qmlscatter/main.cpp
@@ -16,39 +16,41 @@
**
****************************************************************************/
-#include <QtDataVisualization/qutils.h>
#include <QtGui/QGuiApplication>
-#include "qtquick2applicationviewer.h"
-#ifdef Q_OS_ANDROID
-#include <QDir>
-#include <QQmlEngine>
-#endif
-#include <QDebug>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
- QtQuick2ApplicationViewer viewer;
+ QQuickView viewer;
- // Enable antialiasing
- //! [2]
- viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
- //! [2]
-
-#ifdef Q_OS_ANDROID
- viewer.addImportPath(QString::fromLatin1("assets:/qml"));
- viewer.engine()->addPluginPath(QString::fromLatin1("%1/../%2").arg(QDir::homePath(),
- QString::fromLatin1("lib")));
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+ //! [4]
+ QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close);
+ //! [4]
+
viewer.setTitle(QStringLiteral("QML scatter example"));
- //! [0]
- viewer.setSource(QUrl("qrc:/qml/main.qml"));
- //! [0]
+
+ //! [3]
+ viewer.setSource(QUrl("qrc:/qml/qmlscatter/main.qml"));
+ //! [3]
+
viewer.setResizeMode(QQuickView::SizeRootObjectToView);
- //! [1]
+
+ //! [2]
viewer.showMaximized();
- //! [1]
+ //! [2]
return app.exec();
}
diff --git a/examples/qmlscatter/qml/qmlscatter/data.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/Data.qml
index 23c4e5d5..23c4e5d5 100644
--- a/examples/qmlscatter/qml/qmlscatter/data.qml
+++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/Data.qml
diff --git a/examples/qmlsurface/qml/qmlsurface/newbutton.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/NewButton.qml
index e4fb99d2..e4fb99d2 100644
--- a/examples/qmlsurface/qml/qmlsurface/newbutton.qml
+++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/NewButton.qml
diff --git a/examples/qmlscatter/qml/qmlscatter/main.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
index beb4ccaa..69cb2834 100644
--- a/examples/qmlscatter/qml/qmlscatter/main.qml
+++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
@@ -24,7 +24,7 @@ import "."
//! [0]
//! [1]
-Item {
+Rectangle {
id: mainView
//! [1]
diff --git a/examples/datavisualization/qmlscatter/qmlscatter.pro b/examples/datavisualization/qmlscatter/qmlscatter.pro
new file mode 100644
index 00000000..b97ca7be
--- /dev/null
+++ b/examples/datavisualization/qmlscatter/qmlscatter.pro
@@ -0,0 +1,12 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmlscatter.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlscatter/*
diff --git a/examples/datavisualization/qmlscatter/qmlscatter.qrc b/examples/datavisualization/qmlscatter/qmlscatter.qrc
new file mode 100644
index 00000000..225d78b0
--- /dev/null
+++ b/examples/datavisualization/qmlscatter/qmlscatter.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlscatter/Data.qml</file>
+ <file>qml/qmlscatter/main.qml</file>
+ <file>qml/qmlscatter/NewButton.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/qmlsurface/doc/images/qmlsurface-example.png b/examples/datavisualization/qmlsurface/doc/images/qmlsurface-example.png
new file mode 100644
index 00000000..5e37b42c
--- /dev/null
+++ b/examples/datavisualization/qmlsurface/doc/images/qmlsurface-example.png
Binary files differ
diff --git a/examples/qmlsurface/doc/src/qmlsurface.qdoc b/examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc
index 78f9c745..008fffa3 100644
--- a/examples/qmlsurface/doc/src/qmlsurface.qdoc
+++ b/examples/datavisualization/qmlsurface/doc/src/qmlsurface.qdoc
@@ -42,17 +42,17 @@
crater at imaginary position from 67 to 97 and from 30 to 60. Note that on the graph the scale
on the Y dimension exaggerates the height.
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 4
+ \snippet qmlsurface/qml/qmlsurface/main.qml 4
The other method to set surface data used in this example is with model mapping. We do that by
first defining a \c ListModel containing the data for the surface:
- \snippet ../examples/qmlsurface/qml/qmlsurface/data.qml 0
+ \snippet qmlsurface/qml/qmlsurface/Data.qml 0
\dots 4
Then we set up a Surface3DSeries with a ItemModelSurfaceDataProxy:
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 5
+ \snippet qmlsurface/qml/qmlsurface/main.qml 5
\dots
We add the actual data to the \c itemModel of the ItemModelSurfaceDataProxy. We also define the
@@ -60,7 +60,7 @@
for latitude and the value is for height.
\dots 0
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 6
+ \snippet qmlsurface/qml/qmlsurface/main.qml 6
\section1 Showing data
@@ -70,25 +70,25 @@
First is the gradient to be used for the surface, which can be defined as seen in the following
snippet. With the ColorGradient we set example colors from position 0.0 to 1.0.
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 0
+ \snippet qmlsurface/qml/qmlsurface/main.qml 0
This element is set into the \c baseGradients property in the \c theme used in Surface3D:
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 7
+ \snippet qmlsurface/qml/qmlsurface/main.qml 7
Other interesting features can be controlled with buttons.
The first button is to toggle on and off the surface grid, for which we use the following code:
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 1
+ \snippet qmlsurface/qml/qmlsurface/main.qml 1
Second button is for surface shading mode, which is controlled with this code:
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 2
+ \snippet qmlsurface/qml/qmlsurface/main.qml 2
Third button is for series visibility, which is controlled with this code:
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 8
+ \snippet qmlsurface/qml/qmlsurface/main.qml 8
Notice that the \c drawMode and \c flatShadingEnable properties are set for both series.
@@ -98,7 +98,7 @@
HeightMapSurfaceDataProxy and the other one ItemModelSurfaceDataProxy. For this we use the
following code:
- \snippet ../examples/qmlsurface/qml/qmlsurface/main.qml 3
+ \snippet qmlsurface/qml/qmlsurface/main.qml 3
We also set the maximum value to 500 in model proxy to make the surface flatter and
250 on height map proxy to show exaggerated height. At the same time the middle color position
diff --git a/examples/qmlsurface/heightmap.png b/examples/datavisualization/qmlsurface/heightmap.png
index 051a0125..051a0125 100644
--- a/examples/qmlsurface/heightmap.png
+++ b/examples/datavisualization/qmlsurface/heightmap.png
Binary files differ
diff --git a/examples/qmlsurface/main.cpp b/examples/datavisualization/qmlsurface/main.cpp
index 03518d00..71d79a2b 100644
--- a/examples/qmlsurface/main.cpp
+++ b/examples/datavisualization/qmlsurface/main.cpp
@@ -16,31 +16,28 @@
**
****************************************************************************/
-#include <QtDataVisualization/qutils.h>
#include <QtGui/QGuiApplication>
-#include "qtquick2applicationviewer.h"
-
-#ifdef Q_OS_ANDROID
-#include <QDir>
-#include <QQmlEngine>
-#endif
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
- QtQuick2ApplicationViewer viewer;
-
- // Enable antialiasing
- viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+ QQuickView viewer;
-#ifdef Q_OS_ANDROID
- viewer.addImportPath(QString::fromLatin1("assets:/qml"));
- viewer.engine()->addPluginPath(QString::fromLatin1("%1/../%2").arg(QDir::homePath(),
- QString::fromLatin1("lib")));
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
- viewer.setSource(QUrl("qrc:/qml/main.qml"));
+ viewer.setSource(QUrl("qrc:/qml/qml/qmlsurface/main.qml"));
viewer.setTitle(QStringLiteral("Tycho crater on the Moon (height exaggerated)"));
viewer.setResizeMode(QQuickView::SizeRootObjectToView);
diff --git a/examples/qmlsurface/qml/qmlsurface/data.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml
index 5fd4ece8..5fd4ece8 100644
--- a/examples/qmlsurface/qml/qmlsurface/data.qml
+++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml
diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/NewButton.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/NewButton.qml
new file mode 100644
index 00000000..e4fb99d2
--- /dev/null
+++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/NewButton.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Styles 1.0
+
+Item {
+ id: newbutton
+
+ property alias text: buttonText.text
+
+ signal clicked
+
+ implicitWidth: buttonText.implicitWidth + 5
+ implicitHeight: buttonText.implicitHeight + 10
+
+ Button {
+ id: buttonText
+ width: parent.width
+ height: parent.height
+
+ style: ButtonStyle {
+ label: Component {
+ Text {
+ text: buttonText.text
+ clip: true
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ anchors.fill: parent
+ }
+ }
+ }
+ onClicked: newbutton.clicked()
+ }
+}
diff --git a/examples/qmlsurface/qml/qmlsurface/main.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
index da608aa7..c38c3146 100644
--- a/examples/qmlsurface/qml/qmlsurface/main.qml
+++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
@@ -21,13 +21,11 @@ import QtQuick.Layouts 1.0
import QtDataVisualization 1.0
import "."
-Item {
+Rectangle {
id: mainview
- width: 1280
- height: 720
-
- property int buttonMaximumWidth: surfaceGridToggle.width
- property int buttonMinimumHeight: seriesToggle.height
+ width: 1024
+ height: 768
+ color: surfacePlot.theme.windowColor
Data {
id: surfaceData
@@ -35,9 +33,10 @@ Item {
Item {
id: surfaceView
- width: mainview.width - buttonLayout.width
+ width: mainview.width
height: mainview.height
- anchors.right: mainview.right;
+ anchors.top: mainview.top
+ anchors.left: mainview.left
//! [0]
ColorGradient {
@@ -49,7 +48,7 @@ Item {
//! [0]
Surface3D {
- id: surfaceplot
+ id: surfacePlot
width: surfaceView.width
height: surfaceView.height
//! [7]
@@ -75,6 +74,9 @@ Item {
axisY.segmentCount: 5
axisY.subSegmentCount: 2
axisY.labelFormat: "%i"
+ axisY.title: "Height"
+ axisX.title: "Latitude"
+ axisZ.title: "Longitude"
//! [5]
Surface3DSeries {
@@ -88,7 +90,7 @@ Item {
itemModel: surfaceData.model
rowRole: "longitude"
columnRole: "latitude"
- valueRole: "height"
+ yPosRole: "height"
}
//! [6]
@@ -96,37 +98,37 @@ Item {
flatShadingToggle.text = "Flat not supported"
}
}
+ //! [4]
+ Surface3DSeries {
+ id: heightSeries
+ flatShadingEnabled: false
+ drawMode: Surface3DSeries.DrawSurface
+ visible: false
+
+ HeightMapSurfaceDataProxy {
+ heightMapFile: ":/heightmaps/image"
+ // We don't want the default data values set by heightmap proxy.
+ minZValue: 30
+ maxZValue: 60
+ minXValue: 67
+ maxXValue: 97
+ }
+ }
+ //! [4]
}
}
- // TODO: Kept outside until surface supports multiple added series (QTRD-2579)
- //! [4]
- Surface3DSeries {
- id: heightSeries
- flatShadingEnabled: false
- drawMode: Surface3DSeries.DrawSurface
-
- HeightMapSurfaceDataProxy {
- heightMapFile: ":/heightmaps/image"
- // We don't want the default data values set by heightmap proxy.
- minZValue: 30
- maxZValue: 60
- minXValue: 67
- maxXValue: 97
- }
- }
- //! [4]
- ColumnLayout {
+ RowLayout {
id: buttonLayout
anchors.top: parent.top
anchors.left: parent.left
- spacing: 0
+ anchors.right: parent.right
+ opacity: 0.5
NewButton {
id: surfaceGridToggle
- Layout.maximumWidth: buttonMaximumWidth
Layout.fillWidth: true
- Layout.minimumHeight: buttonMinimumHeight
+ Layout.fillHeight: true
text: "Show Surface Grid"
//! [1]
onClicked: {
@@ -145,9 +147,8 @@ Item {
NewButton {
id: surfaceToggle
- Layout.maximumWidth: buttonMaximumWidth
Layout.fillWidth: true
- Layout.minimumHeight: buttonMinimumHeight
+ Layout.fillHeight: true
text: "Hide Surface"
//! [8]
onClicked: {
@@ -166,10 +167,8 @@ Item {
NewButton {
id: flatShadingToggle
- Layout.maximumWidth: buttonMaximumWidth
Layout.fillWidth: true
- Layout.minimumHeight: buttonMinimumHeight
-
+ Layout.fillHeight: true
text: "Show Flat"
enabled: surfaceSeries.flatShadingSupported
//! [2]
@@ -189,16 +188,15 @@ Item {
NewButton {
id: backgroundToggle
- Layout.maximumWidth: buttonMaximumWidth
Layout.fillWidth: true
- Layout.minimumHeight: buttonMinimumHeight
+ Layout.fillHeight: true
text: "Hide Background"
onClicked: {
- if (surfaceplot.theme.backgroundEnabled === true) {
- surfaceplot.theme.backgroundEnabled = false;
+ if (surfacePlot.theme.backgroundEnabled === true) {
+ surfacePlot.theme.backgroundEnabled = false;
text = "Show Background"
} else {
- surfaceplot.theme.backgroundEnabled = true;
+ surfacePlot.theme.backgroundEnabled = true;
text = "Hide Background"
}
}
@@ -206,16 +204,15 @@ Item {
NewButton {
id: gridToggle
- Layout.maximumWidth: buttonMaximumWidth
Layout.fillWidth: true
- Layout.minimumHeight: buttonMinimumHeight
+ Layout.fillHeight: true
text: "Hide Grid"
onClicked: {
- if (surfaceplot.theme.gridEnabled === true) {
- surfaceplot.theme.gridEnabled = false;
+ if (surfacePlot.theme.gridEnabled === true) {
+ surfacePlot.theme.gridEnabled = false;
text = "Show Grid"
} else {
- surfaceplot.theme.gridEnabled = true;
+ surfacePlot.theme.gridEnabled = true;
text = "Hide Grid"
}
}
@@ -223,20 +220,21 @@ Item {
NewButton {
id: seriesToggle
- Layout.maximumWidth: buttonMaximumWidth
Layout.fillWidth: true
- Layout.minimumHeight: buttonMinimumHeight
+ Layout.fillHeight: true
text: "Switch to Height Map Series"
//! [3]
onClicked: {
- if (surfaceplot.seriesList[0] === heightSeries) {
- surfaceplot.axisY.max = 500.0
- surfaceplot.seriesList = [surfaceSeries]
+ if (surfaceSeries.visible === false) {
+ surfacePlot.axisY.max = 500.0
+ surfaceSeries.visible = true
+ heightSeries.visible = false
middleGradient.position = 0.25
text = "Switch to Height Map Series"
} else {
- surfaceplot.axisY.max = 250.0
- surfaceplot.seriesList = [heightSeries]
+ surfacePlot.axisY.max = 250.0
+ surfaceSeries.visible = false
+ heightSeries.visible = true
middleGradient.position = 0.50
text = "Switch to Item Model Series"
}
diff --git a/examples/datavisualization/qmlsurface/qmlsurface.pro b/examples/datavisualization/qmlsurface/qmlsurface.pro
new file mode 100644
index 00000000..401d59a7
--- /dev/null
+++ b/examples/datavisualization/qmlsurface/qmlsurface.pro
@@ -0,0 +1,12 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmlsurface.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlsurface/*
diff --git a/examples/datavisualization/qmlsurface/qmlsurface.qrc b/examples/datavisualization/qmlsurface/qmlsurface.qrc
new file mode 100644
index 00000000..c27f2d56
--- /dev/null
+++ b/examples/datavisualization/qmlsurface/qmlsurface.qrc
@@ -0,0 +1,10 @@
+<RCC>
+ <qresource prefix="/qml">
+ <file>qml/qmlsurface/main.qml</file>
+ <file>qml/qmlsurface/Data.qml</file>
+ <file>qml/qmlsurface/NewButton.qml</file>
+ </qresource>
+ <qresource prefix="/heightmaps">
+ <file alias="image">heightmap.png</file>
+ </qresource>
+</RCC>
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..c5a48fcb
--- /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..d50ecac5
--- /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 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 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 qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 2
+ \dots
+
+ \section1 Controlling the graph
+
+ Let's add some checkboxes to control the visibility of layers:
+
+ \snippet 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 qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 4
+ \dots 0
+
+ Let's add some more checkboxes to control how the layers are displayed, when visible:
+
+ \snippet qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 5
+
+ In addition to these we have three 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 qmlsurfacelayers/qml/qmlsurfacelayers/main.qml 6
+
+ \section1 Example contents
+*/
diff --git a/examples/surface/mountain.png b/examples/datavisualization/qmlsurfacelayers/layer_1.png
index 9138c710..9138c710 100644
--- a/examples/surface/mountain.png
+++ b/examples/datavisualization/qmlsurfacelayers/layer_1.png
Binary files differ
diff --git a/examples/datavisualization/qmlsurfacelayers/layer_2.png b/examples/datavisualization/qmlsurfacelayers/layer_2.png
new file mode 100644
index 00000000..61631ae8
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/layer_2.png
Binary files differ
diff --git a/examples/datavisualization/qmlsurfacelayers/layer_3.png b/examples/datavisualization/qmlsurfacelayers/layer_3.png
new file mode 100644
index 00000000..796df64d
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/layer_3.png
Binary files differ
diff --git a/examples/datavisualization/qmlsurfacelayers/main.cpp b/examples/datavisualization/qmlsurfacelayers/main.cpp
new file mode 100644
index 00000000..eb895dd1
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+#include <QtDataVisualization/qutils.h>
+
+#include <QtGui/QGuiApplication>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQuickView viewer;
+
+ // Enable antialiasing in direct rendering mode
+ viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
+#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+
+ viewer.setSource(QUrl("qrc:/qml/qmlsurfacelayers/main.qml"));
+
+ viewer.setTitle(QStringLiteral("3-layered Terrain"));
+ viewer.setResizeMode(QQuickView::SizeRootObjectToView);
+ viewer.show();
+
+ return app.exec();
+}
diff --git a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/NewButton.qml b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/NewButton.qml
new file mode 100644
index 00000000..e4fb99d2
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/NewButton.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Styles 1.0
+
+Item {
+ id: newbutton
+
+ property alias text: buttonText.text
+
+ signal clicked
+
+ implicitWidth: buttonText.implicitWidth + 5
+ implicitHeight: buttonText.implicitHeight + 10
+
+ Button {
+ id: buttonText
+ width: parent.width
+ height: parent.height
+
+ style: ButtonStyle {
+ label: Component {
+ Text {
+ text: buttonText.text
+ clip: true
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ anchors.fill: parent
+ }
+ }
+ }
+ onClicked: newbutton.clicked()
+ }
+}
diff --git a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
new file mode 100644
index 00000000..0be991bc
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
@@ -0,0 +1,278 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 1.0
+import QtDataVisualization 1.0
+import "."
+
+Item {
+ id: mainview
+ width: 1280
+ height: 720
+
+ Item {
+ id: surfaceView
+ width: mainview.width - buttonLayout.width
+ height: mainview.height
+ anchors.right: mainview.right;
+
+ //! [0]
+ ColorGradient {
+ id: layerOneGradient
+ ColorGradientStop { position: 0.0; color: "black" }
+ ColorGradientStop { position: 0.31; color: "tan" }
+ ColorGradientStop { position: 0.32; color: "green" }
+ ColorGradientStop { position: 0.40; color: "darkslategray" }
+ ColorGradientStop { position: 1.0; color: "white" }
+ }
+
+ ColorGradient {
+ id: layerTwoGradient
+ ColorGradientStop { position: 0.315; color: "blue" }
+ ColorGradientStop { position: 0.33; color: "white" }
+ }
+
+ ColorGradient {
+ id: layerThreeGradient
+ ColorGradientStop { position: 0.0; color: "red" }
+ ColorGradientStop { position: 0.15; color: "black" }
+ }
+ //! [0]
+
+ Surface3D {
+ id: surfaceLayers
+ width: surfaceView.width
+ height: surfaceView.height
+ theme: Theme3D {
+ type: Theme3D.ThemeEbony
+ font.pointSize: 35
+ colorStyle: Theme3D.ColorStyleRangeGradient
+ }
+ shadowQuality: AbstractGraph3D.ShadowQualityNone
+ selectionMode: AbstractGraph3D.SelectionRow | AbstractGraph3D.SelectionSlice
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeft
+ axisY.min: 20
+ axisY.max: 200
+ axisX.segmentCount: 5
+ axisX.subSegmentCount: 2
+ axisX.labelFormat: "%i"
+ axisZ.segmentCount: 5
+ axisZ.subSegmentCount: 2
+ axisZ.labelFormat: "%i"
+ axisY.segmentCount: 5
+ axisY.subSegmentCount: 2
+ axisY.labelFormat: "%i"
+
+ //! [1]
+ //! [2]
+ Surface3DSeries {
+ id: layerOneSeries
+ baseGradient: layerOneGradient
+ //! [2]
+ HeightMapSurfaceDataProxy {
+ heightMapFile: ":/heightmaps/layer_1.png"
+ }
+ flatShadingEnabled: false
+ drawMode: Surface3DSeries.DrawSurface
+ //! [4]
+ visible: layerOneToggle.checked // bind to checkbox state
+ //! [4]
+ }
+
+ Surface3DSeries {
+ id: layerTwoSeries
+ baseGradient: layerTwoGradient
+ HeightMapSurfaceDataProxy {
+ heightMapFile: ":/heightmaps/layer_2.png"
+ }
+ flatShadingEnabled: false
+ drawMode: Surface3DSeries.DrawSurface
+ visible: layerTwoToggle.checked // bind to checkbox state
+ }
+
+ Surface3DSeries {
+ id: layerThreeSeries
+ baseGradient: layerThreeGradient
+ HeightMapSurfaceDataProxy {
+ heightMapFile: ":/heightmaps/layer_3.png"
+ }
+ flatShadingEnabled: false
+ drawMode: Surface3DSeries.DrawSurface
+ visible: layerThreeToggle.checked // bind to checkbox state
+ }
+ //! [1]
+ }
+ }
+
+ ColumnLayout {
+ id: buttonLayout
+ anchors.top: parent.top
+ anchors.left: parent.left
+ spacing: 0
+
+ //! [3]
+ GroupBox {
+ title: "Layer Selection"
+ Layout.fillWidth: true
+ Column {
+ CheckBox {
+ id: layerOneToggle
+ text: "Show Ground Layer"
+ checked: true
+ }
+
+ CheckBox {
+ id: layerTwoToggle
+ text: "Show Sea Layer"
+ checked: true
+ }
+
+ CheckBox {
+ id: layerThreeToggle
+ text: "Show Tectonic Layer"
+ checked: true
+ }
+ }
+ }
+ //! [3]
+
+ //! [5]
+ GroupBox {
+ title: "Layer Style"
+ Layout.fillWidth: true
+ Column {
+ CheckBox {
+ id: layerOneGrid
+ text: "Show Ground as Grid"
+ onCheckedChanged: {
+ if (checked)
+ layerOneSeries.drawMode = Surface3DSeries.DrawWireframe
+ else
+ layerOneSeries.drawMode = Surface3DSeries.DrawSurface
+ }
+ }
+
+ CheckBox {
+ id: layerTwoGrid
+ text: "Show Sea as Grid"
+ onCheckedChanged: {
+ if (checked)
+ layerTwoSeries.drawMode = Surface3DSeries.DrawWireframe
+ else
+ layerTwoSeries.drawMode = Surface3DSeries.DrawSurface
+ }
+ }
+
+ CheckBox {
+ id: layerThreeGrid
+ text: "Show Tectonic as Grid"
+ onCheckedChanged: {
+ if (checked)
+ layerThreeSeries.drawMode = Surface3DSeries.DrawWireframe
+ else
+ layerThreeSeries.drawMode = Surface3DSeries.DrawSurface
+ }
+ }
+ }
+ }
+ //! [5]
+
+ //! [6]
+ NewButton {
+ id: sliceButton
+ text: "Slice All Layers"
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ onClicked: {
+ if (surfaceLayers.selectionMode & AbstractGraph3D.SelectionMultiSeries) {
+ surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow
+ | AbstractGraph3D.SelectionSlice
+ text = "Slice All Layers"
+ } else {
+ surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow
+ | AbstractGraph3D.SelectionSlice
+ | AbstractGraph3D.SelectionMultiSeries
+ text = "Slice One Layer"
+ }
+ }
+ }
+ //! [6]
+
+ NewButton {
+ id: shadowButton
+ text: "Show Shadows"
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ onClicked: {
+ if (surfaceLayers.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
+ surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityLow
+ text = "Hide Shadows"
+ } else {
+ surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityNone
+ text = "Show Shadows"
+ }
+ }
+ }
+
+ NewButton {
+ id: renderModeButton
+ text: "Switch Render Mode"
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ onClicked: {
+ var modeText = "Indirect "
+ var aaText
+ if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
+ surfaceLayers.msaaSamples === 0) {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderDirectToBackground
+ modeText = "BackGround "
+ } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
+ surfaceLayers.msaaSamples === 4) {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
+ surfaceLayers.msaaSamples = 0
+ } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
+ surfaceLayers.msaaSamples === 8) {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
+ surfaceLayers.msaaSamples = 4
+ } else {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
+ surfaceLayers.msaaSamples = 8
+ }
+
+ if (surfaceLayers.msaaSamples <= 0) {
+ aaText = "No AA"
+ } else {
+ aaText = surfaceLayers.msaaSamples + "xMSAA"
+ }
+
+ renderLabel.text = modeText + aaText
+ }
+ }
+
+ TextField {
+ id: renderLabel
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ enabled: false
+ horizontalAlignment: TextInput.AlignHCenter
+ text: "Indirect, " + surfaceLayers.msaaSamples + "xMSAA"
+ }
+ }
+}
diff --git a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.pro b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.pro
new file mode 100644
index 00000000..2bfa904d
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.pro
@@ -0,0 +1,12 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmlsurfacelayers.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlsurfacelayers/*
diff --git a/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc
new file mode 100644
index 00000000..028a91db
--- /dev/null
+++ b/examples/datavisualization/qmlsurfacelayers/qmlsurfacelayers.qrc
@@ -0,0 +1,11 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlsurfacelayers/main.qml</file>
+ <file>qml/qmlsurfacelayers/NewButton.qml</file>
+ </qresource>
+ <qresource prefix="/heightmaps">
+ <file>layer_1.png</file>
+ <file>layer_2.png</file>
+ <file>layer_3.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/rotations/doc/images/rotations-example.png b/examples/datavisualization/rotations/doc/images/rotations-example.png
new file mode 100644
index 00000000..74bebbf7
--- /dev/null
+++ b/examples/datavisualization/rotations/doc/images/rotations-example.png
Binary files differ
diff --git a/examples/datavisualization/rotations/doc/src/rotations.qdoc b/examples/datavisualization/rotations/doc/src/rotations.qdoc
new file mode 100644
index 00000000..72facde0
--- /dev/null
+++ b/examples/datavisualization/rotations/doc/src/rotations.qdoc
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** 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 rotations
+ \title Rotations Example
+ \ingroup qtdatavisualization_examples
+ \brief Using rotated scatter items
+
+ This example shows how to do the following:
+
+ \list
+ \li Use item rotations
+ \li Use custom item meshes
+ \li Use range gradient to color the series
+ \endlist
+
+ For more basic example about using Qt Data Visualization graphs, see \l{Bars Example}.
+
+ \image rotations-example.png
+
+ \section1 Using rotations
+
+ In this example we want to orient the arrow items tangentially to the origin. This requires
+ rotating them, which can be achieved by specifying rotation quaternion to each item:
+
+ \snippet rotations/scatterdatamodifier.cpp 0
+ \snippet rotations/scatterdatamodifier.cpp 1
+ \snippet rotations/scatterdatamodifier.cpp 2
+
+ Since the items need to be rotated along two axes, we define two rotation quaternions, one
+ for Y-axis and one for Z-axis, and then multiply these together to get the total rotation,
+ which we set to the data item.
+
+ \section1 Using custom item meshes
+
+ The narrow arrow mesh we use for magnetic field arrow items is not a standard mesh. Instead
+ we supply our own \c{narrowarrow.obj} file which contains the object definition for the mesh
+ in \c Wavefront obj format:
+
+ \snippet rotations/scatterdatamodifier.cpp 3
+
+ \section1 Using range gradient
+
+ Setting the color style to range gradient in a series means that the item is colored according
+ to its relative Y-value on the visible Y-coordinate range. We want the arrows on the bottom
+ part of the graph to be darker and gradually get lighter higher they are, so we define a
+ range gradient with black color at the position 0.0 and white color at the position 1.0:
+
+ \snippet rotations/scatterdatamodifier.cpp 4
+
+ \section1 Example contents
+*/
diff --git a/examples/datavisualization/rotations/main.cpp b/examples/datavisualization/rotations/main.cpp
new file mode 100644
index 00000000..7f477c92
--- /dev/null
+++ b/examples/datavisualization/rotations/main.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+#include "scatterdatamodifier.h"
+
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QSlider>
+#include <QtWidgets/QLabel>
+#include <QtGui/QScreen>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ Q3DScatter *graph = new Q3DScatter();
+ QWidget *container = QWidget::createWindowContainer(graph);
+
+ QSize screenSize = graph->screen()->size();
+ container->setMinimumSize(QSize(screenSize.width() / 2, screenSize.height() / 1.5));
+ container->setMaximumSize(screenSize);
+ container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ container->setFocusPolicy(Qt::StrongFocus);
+
+ QWidget *widget = new QWidget;
+ QHBoxLayout *hLayout = new QHBoxLayout(widget);
+ QVBoxLayout *vLayout = new QVBoxLayout();
+ hLayout->addWidget(container, 1);
+ hLayout->addLayout(vLayout);
+
+ widget->setWindowTitle(QStringLiteral("Item rotations example - Magnetic field of the sun"));
+
+ QPushButton *toggleRotationButton = new QPushButton(widget);
+ toggleRotationButton->setText(QStringLiteral("Toggle animation"));
+ QPushButton *toggleSunButton = new QPushButton(widget);
+ toggleSunButton->setText(QStringLiteral("Toggle Sun"));
+
+ QSlider *fieldLinesSlider = new QSlider(Qt::Horizontal, widget);
+ fieldLinesSlider->setTickInterval(1);
+ fieldLinesSlider->setMinimum(1);
+ fieldLinesSlider->setValue(12);
+ fieldLinesSlider->setMaximum(128);
+
+ QSlider *arrowsSlider = new QSlider(Qt::Horizontal, widget);
+ arrowsSlider->setTickInterval(1);
+ arrowsSlider->setMinimum(8);
+ arrowsSlider->setValue(16);
+ arrowsSlider->setMaximum(32);
+
+ vLayout->addWidget(toggleRotationButton);
+ vLayout->addWidget(toggleSunButton);
+ vLayout->addWidget(new QLabel(QStringLiteral("Field Lines (1 - 128):")));
+ vLayout->addWidget(fieldLinesSlider);
+ vLayout->addWidget(new QLabel(QStringLiteral("Arrows per line (8 - 32):")));
+ vLayout->addWidget(arrowsSlider, 1, Qt::AlignTop);
+
+ ScatterDataModifier *modifier = new ScatterDataModifier(graph);
+
+ QObject::connect(toggleRotationButton, &QPushButton::clicked, modifier,
+ &ScatterDataModifier::toggleRotation);
+ QObject::connect(toggleSunButton, &QPushButton::clicked, modifier,
+ &ScatterDataModifier::toggleSun);
+ QObject::connect(fieldLinesSlider, &QSlider::valueChanged, modifier,
+ &ScatterDataModifier::setFieldLines);
+ QObject::connect(arrowsSlider, &QSlider::valueChanged, modifier,
+ &ScatterDataModifier::setArrowsPerLine);
+
+ widget->show();
+ return app.exec();
+}
diff --git a/examples/datavisualization/rotations/mesh/largesphere.obj b/examples/datavisualization/rotations/mesh/largesphere.obj
new file mode 100644
index 00000000..63101413
--- /dev/null
+++ b/examples/datavisualization/rotations/mesh/largesphere.obj
@@ -0,0 +1,1938 @@
+# Blender v2.66 (sub 0) OBJ File: ''
+# www.blender.org
+o Sphere_Sphere.001
+v -1.251476 7.901507 0.000000
+v -2.472136 7.608452 0.000000
+v -3.631924 7.128052 0.000000
+v -4.702282 6.472136 0.000000
+v -5.656854 5.656854 0.000000
+v -6.472136 4.702282 0.000000
+v -7.128052 3.631924 0.000000
+v -7.608452 2.472136 0.000000
+v -7.901507 1.251475 0.000000
+v -8.000000 -0.000001 0.000000
+v -7.901506 -1.251477 0.000000
+v -7.608451 -2.472138 0.000000
+v -7.128051 -3.631927 0.000000
+v -6.472134 -4.702285 0.000000
+v -5.656851 -5.656857 0.000000
+v -4.702279 -6.472138 0.000000
+v -3.631920 -7.128055 0.000000
+v -2.472131 -7.608454 0.000000
+v -1.251470 -7.901508 0.000000
+v -1.190224 7.901506 -0.386729
+v -2.351141 7.608452 -0.763934
+v -3.454165 7.128052 -1.122328
+v -4.472136 6.472136 -1.453087
+v -5.379988 5.656855 -1.748066
+v -6.155366 4.702282 -2.000002
+v -6.779180 3.631924 -2.202692
+v -7.236068 2.472136 -2.351143
+v -7.514779 1.251475 -2.441702
+v -7.608452 -0.000001 -2.472138
+v -7.514779 -1.251477 -2.441702
+v -7.236067 -2.472138 -2.351143
+v -6.779179 -3.631927 -2.202691
+v -6.155365 -4.702285 -2.000002
+v -5.379985 -5.656857 -1.748065
+v -4.472132 -6.472138 -1.453086
+v -3.454160 -7.128055 -1.122327
+v -2.351136 -7.608454 -0.763933
+v -1.190218 -7.901508 -0.386727
+v 0.000006 -8.000000 0.000000
+v -1.012464 7.901506 -0.735603
+v -1.999999 7.608452 -1.453089
+v -2.938287 7.128052 -2.134795
+v -3.804224 6.472136 -2.763936
+v -4.576490 5.656855 -3.325019
+v -5.236066 4.702282 -3.804230
+v -5.766714 3.631924 -4.189768
+v -6.155365 2.472136 -4.472140
+v -6.392451 1.251475 -4.644393
+v -6.472135 -0.000001 -4.702287
+v -6.392451 -1.251477 -4.644393
+v -6.155365 -2.472138 -4.472139
+v -5.766713 -3.631927 -4.189767
+v -5.236064 -4.702285 -3.804229
+v -4.576487 -5.656857 -3.325018
+v -3.804221 -6.472138 -2.763934
+v -2.938283 -7.128055 -2.134793
+v -1.999994 -7.608454 -1.453086
+v -1.012459 -7.901508 -0.735599
+v -0.735596 7.901506 -1.012470
+v -1.453082 7.608452 -2.000005
+v -2.134788 7.128052 -2.938294
+v -2.763928 6.472136 -3.804231
+v -3.325012 5.656855 -4.576497
+v -3.804222 4.702282 -5.236073
+v -4.189760 3.631924 -5.766721
+v -4.472132 2.472136 -6.155373
+v -4.644385 1.251475 -6.392459
+v -4.702279 -0.000001 -6.472142
+v -4.644385 -1.251477 -6.392458
+v -4.472132 -2.472138 -6.155372
+v -4.189760 -3.631927 -5.766720
+v -3.804221 -4.702285 -5.236072
+v -3.325010 -5.656857 -4.576494
+v -2.763927 -6.472138 -3.804229
+v -2.134786 -7.128055 -2.938290
+v -1.453079 -7.608454 -2.000001
+v -0.735593 -7.901508 -1.012466
+v -0.386723 7.901506 -1.190230
+v -0.763927 7.608452 -2.351147
+v -1.122321 7.128052 -3.454171
+v -1.453079 6.472136 -4.472141
+v -1.748058 5.656855 -5.379994
+v -1.999994 4.702282 -6.155373
+v -2.202683 3.631924 -6.779186
+v -2.351135 2.472136 -7.236074
+v -2.441693 1.251475 -7.514785
+v -2.472130 -0.000001 -7.608459
+v -2.441693 -1.251477 -7.514784
+v -2.351135 -2.472138 -7.236073
+v -2.202683 -3.631927 -6.779185
+v -1.999993 -4.702285 -6.155371
+v -1.748057 -5.656857 -5.379991
+v -1.453079 -6.472138 -4.472138
+v -1.122320 -7.128055 -3.454167
+v -0.763926 -7.608454 -2.351142
+v -0.386721 -7.901508 -1.190225
+v 0.000007 7.901506 -1.251482
+v 0.000007 7.608452 -2.472142
+v 0.000007 7.128052 -3.631930
+v 0.000008 6.472136 -4.702287
+v 0.000008 5.656855 -5.656860
+v 0.000008 4.702282 -6.472141
+v 0.000008 3.631924 -7.128057
+v 0.000008 2.472136 -7.608458
+v 0.000009 1.251475 -7.901512
+v 0.000009 -0.000001 -8.000006
+v 0.000009 -1.251477 -7.901511
+v 0.000008 -2.472138 -7.608456
+v 0.000008 -3.631927 -7.128057
+v 0.000008 -4.702285 -6.472139
+v 0.000008 -5.656857 -5.656857
+v 0.000007 -6.472138 -4.702284
+v 0.000007 -7.128055 -3.631926
+v 0.000007 -7.608454 -2.472137
+v 0.000007 -7.901508 -1.251476
+v 0.386736 7.901506 -1.190230
+v 0.763941 7.608452 -2.351147
+v 1.122336 7.128052 -3.454170
+v 1.453094 6.472136 -4.472140
+v 1.748074 5.656855 -5.379993
+v 2.000010 4.702282 -6.155371
+v 2.202699 3.631924 -6.779185
+v 2.351151 2.472136 -7.236073
+v 2.441710 1.251475 -7.514783
+v 2.472147 -0.000001 -7.608457
+v 2.441710 -1.251477 -7.514783
+v 2.351151 -2.472138 -7.236071
+v 2.202699 -3.631927 -6.779184
+v 2.000009 -4.702285 -6.155369
+v 1.748073 -5.656857 -5.379990
+v 1.453093 -6.472138 -4.472137
+v 1.122334 -7.128055 -3.454166
+v 0.763939 -7.608454 -2.351141
+v 0.386734 -7.901508 -1.190225
+v 0.735610 7.901506 -1.012470
+v 1.453096 7.608452 -2.000005
+v 2.134803 7.128052 -2.938292
+v 2.763942 6.472136 -3.804229
+v 3.325027 5.656855 -4.576495
+v 3.804237 4.702282 -5.236070
+v 4.189775 3.631924 -5.766718
+v 4.472148 2.472136 -6.155370
+v 4.644401 1.251475 -6.392455
+v 4.702294 -0.000001 -6.472139
+v 4.644400 -1.251477 -6.392455
+v 4.472147 -2.472138 -6.155369
+v 4.189774 -3.631927 -5.766717
+v 3.804236 -4.702285 -5.236069
+v 3.325025 -5.656857 -4.576492
+v 2.763941 -6.472138 -3.804227
+v 2.134800 -7.128055 -2.938289
+v 1.453092 -7.608454 -2.000000
+v 0.735606 -7.901508 -1.012465
+v 1.012477 7.901506 -0.735602
+v 2.000012 7.608452 -1.453088
+v 2.938301 7.128052 -2.134794
+v 3.804237 6.472136 -2.763933
+v 4.576503 5.656855 -3.325017
+v 5.236080 4.702282 -3.804226
+v 5.766727 3.631924 -4.189765
+v 6.155380 2.472136 -4.472136
+v 6.392465 1.251475 -4.644389
+v 6.472148 -0.000001 -4.702283
+v 6.392465 -1.251477 -4.644389
+v 6.155378 -2.472138 -4.472136
+v 5.766726 -3.631927 -4.189764
+v 5.236078 -4.702285 -3.804225
+v 4.576500 -5.656857 -3.325016
+v 3.804235 -6.472138 -2.763932
+v 2.938297 -7.128055 -2.134791
+v 2.000007 -7.608454 -1.453085
+v 1.012472 -7.901508 -0.735599
+v 1.190237 7.901506 -0.386729
+v 2.351154 7.608452 -0.763933
+v 3.454178 7.128052 -1.122326
+v 4.472147 6.472136 -1.453085
+v 5.380000 5.656855 -1.748063
+v 6.155379 4.702282 -1.999998
+v 6.779192 3.631924 -2.202688
+v 7.236081 2.472136 -2.351139
+v 7.514791 1.251475 -2.441698
+v 7.608464 -0.000001 -2.472134
+v 7.514791 -1.251477 -2.441698
+v 7.236079 -2.472138 -2.351139
+v 6.779191 -3.631927 -2.202688
+v 6.155377 -4.702285 -1.999998
+v 5.379997 -5.656857 -1.748063
+v 4.472144 -6.472138 -1.453084
+v 3.454173 -7.128055 -1.122325
+v 2.351148 -7.608454 -0.763931
+v 1.190231 -7.901508 -0.386727
+v 1.251488 7.901506 0.000001
+v 2.472148 7.608452 0.000001
+v 3.631936 7.128052 0.000002
+v 4.702293 6.472136 0.000002
+v 5.656866 5.656855 0.000003
+v 6.472147 4.702282 0.000004
+v 7.128063 3.631924 0.000003
+v 7.608464 2.472136 0.000004
+v 7.901517 1.251475 0.000004
+v 8.000011 -0.000001 0.000004
+v 7.901517 -1.251477 0.000004
+v 7.608462 -2.472138 0.000004
+v 7.128062 -3.631927 0.000003
+v 6.472145 -4.702285 0.000004
+v 5.656862 -5.656857 0.000002
+v 4.702290 -6.472138 0.000002
+v 3.631932 -7.128055 0.000002
+v 2.472143 -7.608454 0.000001
+v 1.251483 -7.901508 0.000001
+v 1.190236 7.901506 0.386730
+v 2.351153 7.608452 0.763935
+v 3.454176 7.128052 1.122330
+v 4.472146 6.472136 1.453089
+v 5.379998 5.656855 1.748069
+v 6.155376 4.702282 2.000005
+v 6.779190 3.631924 2.202694
+v 7.236078 2.472136 2.351147
+v 7.514788 1.251475 2.441705
+v 7.608462 -0.000001 2.472141
+v 7.514788 -1.251477 2.441705
+v 7.236076 -2.472138 2.351146
+v 6.779189 -3.631927 2.202693
+v 6.155375 -4.702285 2.000004
+v 5.379995 -5.656857 1.748067
+v 4.472143 -6.472138 1.453088
+v 3.454172 -7.128055 1.122328
+v 2.351147 -7.608454 0.763933
+v 1.190231 -7.901508 0.386728
+v 1.012476 7.901506 0.735603
+v 2.000010 7.608452 1.453090
+v 2.938298 7.128052 2.134796
+v 3.804235 6.472136 2.763937
+v 4.576499 5.656855 3.325021
+v 5.236075 4.702282 3.804232
+v 5.766723 3.631924 4.189770
+v 6.155375 2.472136 4.472143
+v 6.392460 1.251475 4.644395
+v 6.472144 -0.000001 4.702289
+v 6.392460 -1.251477 4.644395
+v 6.155374 -2.472138 4.472141
+v 5.766722 -3.631927 4.189769
+v 5.236074 -4.702285 3.804231
+v 4.576497 -5.656857 3.325018
+v 3.804232 -6.472138 2.763935
+v 2.938295 -7.128055 2.134794
+v 2.000006 -7.608454 1.453086
+v 1.012471 -7.901508 0.735600
+v 0.735608 7.901506 1.012471
+v 1.453094 7.608452 2.000006
+v 2.134799 7.128052 2.938294
+v 2.763939 6.472136 3.804232
+v 3.325022 5.656855 4.576497
+v 3.804231 4.702282 5.236074
+v 4.189770 3.631924 5.766721
+v 4.472141 2.472136 6.155374
+v 4.644393 1.251475 6.392459
+v 4.702287 -0.000001 6.472143
+v 4.644393 -1.251477 6.392459
+v 4.472141 -2.472138 6.155372
+v 4.189768 -3.631927 5.766720
+v 3.804231 -4.702285 5.236073
+v 3.325021 -5.656857 4.576494
+v 2.763937 -6.472138 3.804228
+v 2.134797 -7.128055 2.938291
+v 1.453090 -7.608454 2.000001
+v 0.735605 -7.901508 1.012466
+v 0.386735 7.901506 1.190230
+v 0.763939 7.608452 2.351147
+v 1.122332 7.128052 3.454171
+v 1.453090 6.472136 4.472141
+v 1.748069 5.656855 5.379993
+v 2.000002 4.702282 6.155373
+v 2.202693 3.631924 6.779186
+v 2.351144 2.472136 7.236073
+v 2.441703 1.251475 7.514784
+v 2.472139 -0.000001 7.608459
+v 2.441703 -1.251477 7.514784
+v 2.351144 -2.472138 7.236072
+v 2.202692 -3.631927 6.779184
+v 2.000003 -4.702285 6.155371
+v 1.748068 -5.656857 5.379990
+v 1.453089 -6.472138 4.472137
+v 1.122331 -7.128055 3.454167
+v 0.763937 -7.608454 2.351141
+v 0.386733 -7.901508 1.190225
+v 0.000005 7.901506 1.251482
+v 0.000005 7.608452 2.472142
+v 0.000004 7.128052 3.631929
+v 0.000003 6.472136 4.702286
+v 0.000003 5.656855 5.656859
+v 0.000001 4.702282 6.472140
+v 0.000002 3.631924 7.128057
+v 0.000001 2.472136 7.608456
+v 0.000001 1.251475 7.901510
+v 0.000000 -0.000001 8.000005
+v 0.000001 -1.251477 7.901510
+v 0.000002 -2.472138 7.608455
+v 0.000001 -3.631927 7.128055
+v 0.000002 -4.702285 6.472138
+v 0.000003 -5.656857 5.656855
+v 0.000004 -6.472138 4.702283
+v 0.000004 -7.128055 3.631925
+v 0.000005 -7.608454 2.472136
+v 0.000006 -7.901508 1.251476
+v -0.386724 7.901506 1.190230
+v -0.763929 7.608452 2.351146
+v -1.122324 7.128052 3.454169
+v -1.453083 6.472136 4.472139
+v -1.748063 5.656855 5.379992
+v -2.000000 4.702282 6.155369
+v -2.202688 3.631924 6.779183
+v -2.351142 2.472136 7.236070
+v -2.441700 1.251475 7.514781
+v -2.472137 -0.000001 7.608455
+v -2.441700 -1.251477 7.514781
+v -2.351140 -2.472138 7.236069
+v -2.202689 -3.631927 6.779181
+v -1.999999 -4.702285 6.155367
+v -1.748061 -5.656857 5.379988
+v -1.453082 -6.472138 4.472136
+v -1.122323 -7.128055 3.454165
+v -0.763927 -7.608454 2.351140
+v -0.386722 -7.901508 1.190224
+v -0.735597 7.901506 1.012470
+v -1.453084 7.608452 2.000003
+v -2.134790 7.128052 2.938291
+v -2.763931 6.472136 3.804227
+v -3.325015 5.656855 4.576493
+v -3.804227 4.702282 5.236067
+v -4.189764 3.631924 5.766716
+v -4.472137 2.472136 6.155366
+v -4.644390 1.251475 6.392452
+v -4.702284 -0.000001 6.472136
+v -4.644390 -1.251477 6.392452
+v -4.472136 -2.472138 6.155365
+v -4.189764 -3.631927 5.766714
+v -3.804225 -4.702285 5.236066
+v -3.325012 -5.656857 4.576489
+v -2.763929 -6.472138 3.804224
+v -2.134788 -7.128055 2.938287
+v -1.453080 -7.608454 1.999999
+v -0.735594 -7.901508 1.012465
+v 0.000001 8.000000 0.000004
+v -1.012464 7.901506 0.735602
+v -1.999999 7.608452 1.453087
+v -2.938287 7.128052 2.134792
+v -3.804225 6.472136 2.763931
+v -4.576491 5.656855 3.325015
+v -5.236069 4.702282 3.804223
+v -5.766715 3.631924 4.189762
+v -6.155367 2.472136 4.472132
+v -6.392453 1.251475 4.644385
+v -6.472137 -0.000001 4.702279
+v -6.392453 -1.251477 4.644385
+v -6.155365 -2.472138 4.472132
+v -5.766714 -3.631927 4.189760
+v -5.236066 -4.702285 3.804223
+v -4.576488 -5.656857 3.325012
+v -3.804222 -6.472138 2.763929
+v -2.938284 -7.128055 2.134789
+v -1.999995 -7.608454 1.453083
+v -1.012460 -7.901508 0.735598
+v -1.190224 7.901506 0.386728
+v -2.351140 7.608452 0.763932
+v -3.454164 7.128052 1.122325
+v -4.472135 6.472136 1.453082
+v -5.379988 5.656855 1.748062
+v -6.155366 4.702282 1.999995
+v -6.779179 3.631924 2.202685
+v -7.236067 2.472136 2.351135
+v -7.514778 1.251475 2.441694
+v -7.608452 -0.000001 2.472130
+v -7.514778 -1.251477 2.441694
+v -7.236065 -2.472138 2.351135
+v -6.779178 -3.631927 2.202684
+v -6.155364 -4.702285 1.999995
+v -5.379983 -5.656857 1.748060
+v -4.472131 -6.472138 1.453082
+v -3.454160 -7.128055 1.122324
+v -2.351135 -7.608454 0.763930
+v -1.190218 -7.901508 0.386726
+vt 0.035483 0.289114
+vt 0.042491 0.337738
+vt 0.007397 0.296413
+vt 0.063422 0.533643
+vt 0.068439 0.582662
+vt 0.015908 0.545902
+vt 0.097669 0.776914
+vt 0.111929 0.824070
+vt 0.027296 0.795217
+vt 0.391159 0.929226
+vt 0.461397 0.895775
+vt 0.452242 0.950225
+vt 0.026572 0.240871
+vt 0.004734 0.246573
+vt 0.058567 0.484592
+vt 0.014398 0.495993
+vt 0.087726 0.728878
+vt 0.023823 0.745426
+vt 0.270350 0.936037
+vt 0.231553 0.980467
+vt 0.014254 0.193317
+vt 0.001048 0.196795
+vt 0.053639 0.435556
+vt 0.012882 0.446084
+vt 0.080129 0.680372
+vt 0.021272 0.695580
+vt 0.178869 0.909944
+vt 0.068145 0.942733
+vt 0.048386 0.386583
+vt 0.011281 0.396180
+vt 0.073887 0.631595
+vt 0.019234 0.645702
+vt 0.135028 0.869370
+vt 0.042415 0.894305
+vt 0.009500 0.346287
+vt 0.017489 0.595807
+vt 0.032618 0.844897
+vt 0.484179 0.902186
+vt 0.550590 0.948315
+vt 1.004734 0.246573
+vt 1.007397 0.296413
+vt 0.982704 0.246140
+vt 1.014398 0.495993
+vt 1.015908 0.545902
+vt 0.969883 0.495119
+vt 1.023823 0.745426
+vt 1.027296 0.795217
+vt 0.957447 0.744128
+vt 1.231553 0.980467
+vt 0.750122 0.974207
+vt 1.001048 0.196795
+vt 0.987598 0.196530
+vt 1.012882 0.446084
+vt 0.971892 0.445278
+vt 1.021272 0.695580
+vt 0.960802 0.694395
+vt 1.068145 0.942733
+vt 0.901563 0.939596
+vt 1.011281 0.396180
+vt 0.974014 0.395447
+vt 1.019234 0.645702
+vt 0.963490 0.644610
+vt 1.042415 0.894305
+vt 0.933349 0.892198
+vt 1.009500 0.346287
+vt 0.976377 0.345635
+vt 1.017489 0.595807
+vt 0.965794 0.594793
+vt 1.032618 0.844897
+vt 0.945957 0.843211
+vt 0.979169 0.295858
+vt 0.967884 0.544959
+vt 0.952893 0.793765
+vt 0.960930 0.239587
+vt 0.925822 0.482052
+vt 0.894284 0.725297
+vt 0.716363 0.929856
+vt 0.974473 0.192535
+vt 0.931207 0.433203
+vt 0.902436 0.677050
+vt 0.801451 0.904132
+vt 0.936960 0.384433
+vt 0.909171 0.628493
+vt 0.844888 0.864413
+vt 0.943427 0.335818
+vt 0.915075 0.579756
+vt 0.868695 0.819731
+vt 0.951128 0.287472
+vt 0.920529 0.530922
+vt 0.883697 0.773009
+vt 0.509882 0.901680
+vt 0.603672 0.925341
+vt 0.939868 0.227168
+vt 0.882765 0.457977
+vt 0.837646 0.692981
+vt 0.690972 0.886830
+vt 0.962264 0.185007
+vt 0.891191 0.410771
+vt 0.848554 0.646630
+vt 0.746350 0.860374
+vt 0.900372 0.363822
+vt 0.857974 0.599764
+vt 0.782623 0.823943
+vt 0.910879 0.317332
+vt 0.866529 0.552601
+vt 0.806908 0.782514
+vt 0.923572 0.271605
+vt 0.874667 0.505296
+vt 0.824298 0.738476
+vt 0.531785 0.894399
+vt 0.616896 0.895419
+vt 0.840708 0.424882
+vt 0.787319 0.652419
+vt 0.666434 0.846117
+vt 0.951650 0.174333
+vt 0.851788 0.379552
+vt 0.799275 0.607479
+vt 0.706276 0.816232
+vt 0.864196 0.334814
+vt 0.810089 0.562030
+vt 0.735147 0.779653
+vt 0.878757 0.291055
+vt 0.820304 0.516318
+vt 0.756661 0.739218
+vt 0.896714 0.248885
+vt 0.830369 0.470540
+vt 0.773481 0.696510
+vt 0.545835 0.882162
+vt 0.613251 0.864748
+vt 0.920019 0.209353
+vt 0.601814 0.835743
+vt 0.902011 0.186799
+vt 0.798974 0.385208
+vt 0.741339 0.608286
+vt 0.641659 0.808678
+vt 0.812374 0.341530
+vt 0.753261 0.563866
+vt 0.671741 0.774500
+vt 0.827915 0.298950
+vt 0.764518 0.519117
+vt 0.694750 0.736000
+vt 0.846764 0.258126
+vt 0.775586 0.474273
+vt 0.713019 0.694862
+vt 0.551827 0.867272
+vt 0.551336 0.851697
+vt 0.870653 0.220135
+vt 0.786910 0.429557
+vt 0.728181 0.652086
+vt 0.943465 0.161100
+vt 0.886800 0.160336
+vt 0.756203 0.341667
+vt 0.697515 0.564418
+vt 0.616262 0.775491
+vt 0.771631 0.298973
+vt 0.708699 0.519594
+vt 0.639253 0.736889
+vt 0.790354 0.258010
+vt 0.719689 0.474675
+vt 0.657473 0.695657
+vt 0.814109 0.219846
+vt 0.730930 0.429879
+vt 0.672573 0.652794
+vt 0.546100 0.836912
+vt 0.845356 0.186292
+vt 0.742904 0.385443
+vt 0.685664 0.608914
+vt 0.586129 0.809772
+vt 0.938802 0.146131
+vt 0.876174 0.131001
+vt 0.710309 0.297343
+vt 0.654008 0.524127
+vt 0.590087 0.747535
+vt 0.727302 0.254538
+vt 0.663845 0.478153
+vt 0.607276 0.704820
+vt 0.749262 0.214082
+vt 0.673880 0.432264
+vt 0.621259 0.660654
+vt 0.779077 0.177660
+vt 0.684564 0.386653
+vt 0.643951 0.570007
+vt 0.537514 0.823995
+vt 0.820645 0.148333
+vt 0.696450 0.341564
+vt 0.567816 0.787838
+vt 0.658464 0.256085
+vt 0.609517 0.490486
+vt 0.563122 0.725732
+vt 0.700288 0.169995
+vt 0.617324 0.442954
+vt 0.575103 0.679574
+vt 0.625569 0.395564
+vt 0.633223 0.615598
+vt 0.585045 0.632740
+vt 0.737701 0.133357
+vt 0.634697 0.348462
+vt 0.601779 0.538040
+vt 0.526630 0.813733
+vt 0.796084 0.107238
+vt 0.645335 0.301858
+vt 0.547763 0.770746
+vt 0.939113 0.130553
+vt 0.874144 0.100247
+vt 0.563421 0.466357
+vt 0.535483 0.710885
+vt 0.675759 0.211740
+vt 0.635028 0.130630
+vt 0.568439 0.417338
+vt 0.542491 0.662261
+vt 0.573887 0.368405
+vt 0.593757 0.585502
+vt 0.548386 0.613416
+vt 0.678869 0.090056
+vt 0.580129 0.319628
+vt 0.558567 0.515408
+vt 0.514254 0.806683
+vt 0.770350 0.063964
+vt 0.587726 0.271122
+vt 0.526572 0.759129
+vt 0.946160 0.115905
+vt 0.891158 0.070774
+vt 0.597669 0.223086
+vt 0.611929 0.175930
+vt 0.542415 0.105695
+vt 0.517489 0.404193
+vt 0.509500 0.653713
+vt 0.519234 0.354298
+vt 0.553639 0.564444
+vt 0.511281 0.603820
+vt 0.568145 0.057267
+vt 0.521272 0.304420
+vt 0.514398 0.504007
+vt 0.501048 0.803204
+vt 0.731552 0.019533
+vt 0.523822 0.254574
+vt 0.504734 0.753426
+vt 0.961397 0.104224
+vt 0.952242 0.049775
+vt 0.527296 0.204783
+vt 0.515908 0.454098
+vt 0.507397 0.703586
+vt 0.532618 0.155103
+vt 0.433350 0.107802
+vt 0.465794 0.405207
+vt 0.476377 0.654364
+vt 0.463490 0.355390
+vt 0.512882 0.553916
+vt 0.474014 0.604552
+vt 0.401564 0.060404
+vt 0.460802 0.305605
+vt 0.469884 0.504881
+vt 0.487599 0.803469
+vt 1.250123 0.025793
+vt 0.457447 0.255872
+vt 0.482704 0.753860
+vt 0.984179 0.097813
+vt 1.050589 0.051685
+vt 0.452893 0.206235
+vt 0.467885 0.455040
+vt 0.479169 0.704142
+vt 0.445957 0.156790
+vt 0.344888 0.135587
+vt 0.415075 0.420244
+vt 0.443428 0.664182
+vt 0.409171 0.371507
+vt 0.471892 0.554721
+vt 0.436960 0.615567
+vt 0.250123 0.025793
+vt 0.301452 0.095868
+vt 0.402437 0.322950
+vt 0.425822 0.517948
+vt 0.474473 0.807464
+vt 0.050589 0.051685
+vt 0.216363 0.070144
+vt 0.394284 0.274702
+vt 0.460930 0.760413
+vt 0.009882 0.098319
+vt 0.103671 0.074658
+vt 0.383698 0.226991
+vt 0.420529 0.469078
+vt 0.451128 0.712528
+vt 0.366529 0.447399
+vt 0.410880 0.682668
+vt 0.282623 0.176056
+vt 0.357975 0.400236
+vt 0.431207 0.566797
+vt 0.400372 0.636177
+vt 0.246351 0.139626
+vt 0.348554 0.353370
+vt 0.382765 0.542022
+vt 0.462264 0.814992
+vt 0.190972 0.113170
+vt 0.337646 0.307019
+vt 0.439868 0.772831
+vt 0.031785 0.105600
+vt 0.116896 0.104580
+vt 0.368695 0.180269
+vt 0.324298 0.261524
+vt 0.374667 0.494704
+vt 0.423573 0.728394
+vt 0.306908 0.217486
+vt 0.378757 0.708945
+vt 0.235147 0.220346
+vt 0.310089 0.437969
+vt 0.391191 0.589229
+vt 0.364196 0.665186
+vt 0.206276 0.183767
+vt 0.299275 0.392521
+vt 0.340709 0.575117
+vt 0.451650 0.825666
+vt 0.166434 0.153882
+vt 0.287319 0.347580
+vt 0.420019 0.790647
+vt 0.045835 0.117837
+vt 0.113250 0.135252
+vt 0.273481 0.303490
+vt 0.330370 0.529459
+vt 0.396715 0.751114
+vt 0.256661 0.260781
+vt 0.320304 0.483681
+vt 0.171741 0.225499
+vt 0.253261 0.436134
+vt 0.351788 0.620448
+vt 0.312374 0.658470
+vt 0.141659 0.191322
+vt 0.241339 0.391714
+vt 0.402011 0.813201
+vt 0.101814 0.164257
+vt 0.228181 0.347914
+vt 0.286910 0.570443
+vt 0.370653 0.779864
+vt 0.051826 0.132727
+vt 0.051336 0.148303
+vt 0.213019 0.305137
+vt 0.275586 0.525726
+vt 0.346765 0.741874
+vt 0.194750 0.264000
+vt 0.264518 0.480883
+vt 0.327915 0.701050
+vt 0.139253 0.263111
+vt 0.208699 0.480406
+vt 0.271631 0.701027
+vt 0.116262 0.224508
+vt 0.197515 0.435582
+vt 0.298975 0.614792
+vt 0.443465 0.838899
+vt 0.386800 0.839664
+vt 0.086129 0.190228
+vt 0.185664 0.391086
+vt 0.242904 0.614557
+vt 0.345357 0.813708
+vt 0.046099 0.163088
+vt 0.172573 0.347205
+vt 0.230930 0.570121
+vt 0.314109 0.780154
+vt 0.157473 0.304343
+vt 0.219689 0.525325
+vt 0.290354 0.741990
+vt 0.107276 0.295180
+vt 0.163845 0.521847
+vt 0.227302 0.745462
+vt 0.090087 0.252465
+vt 0.154008 0.475873
+vt 0.256203 0.658333
+vt 0.438803 0.853868
+vt 0.376175 0.868999
+vt 0.067816 0.212161
+vt 0.143951 0.429993
+vt 0.196450 0.658436
+vt 0.320646 0.851667
+vt 0.037514 0.176004
+vt 0.133223 0.384401
+vt 0.184564 0.613347
+vt 0.279077 0.822340
+vt 0.121259 0.339345
+vt 0.173881 0.567736
+vt 0.249262 0.785918
+vt 0.175759 0.788260
+vt 0.063122 0.274267
+vt 0.109517 0.509514
+vt 0.210309 0.702657
+vt 0.439113 0.869447
+vt 0.374144 0.899752
+vt 0.047763 0.229253
+vt 0.101779 0.461959
+vt 0.145335 0.698142
+vt 0.296085 0.892762
+vt 0.026630 0.186267
+vt 0.093757 0.414497
+vt 0.134697 0.651538
+vt 0.237701 0.866643
+vt 0.085045 0.367260
+vt 0.125569 0.604436
+vt 0.200288 0.830006
+vt 0.075103 0.320425
+vt 0.117324 0.557046
+vt 0.995265 0.147143
+vt 1.014254 0.193317
+vt 0.495265 0.852856
+vt 1.009882 0.098319
+vt 1.031785 0.105600
+vt 1.045835 0.117837
+vt 1.051826 0.132727
+vt 1.051336 0.148303
+vt 1.046099 0.163088
+vt 1.037514 0.176004
+vt 0.446160 0.884095
+vt 1.026630 0.186267
+vt 0.158464 0.743915
+vn -0.460158 -0.887814 0.000000
+vn -0.592853 -0.805292 0.000000
+vn -0.437635 -0.887814 -0.142186
+vn -0.951781 -0.306742 0.000000
+vn -0.987854 -0.155217 0.000000
+vn -0.905179 -0.306742 -0.294107
+vn -0.892575 0.450850 0.000000
+vn -0.811670 0.584063 0.000000
+vn -0.848903 0.450850 -0.275826
+vn -0.316050 0.948729 0.000000
+vn -0.164068 0.986419 0.000000
+vn -0.300577 0.948729 -0.097659
+vn -0.316050 -0.948729 0.000000
+vn -0.300577 -0.948729 -0.097659
+vn -0.892575 -0.450850 0.000000
+vn -0.848903 -0.450850 -0.275826
+vn -0.951781 0.306742 0.000000
+vn -0.905179 0.306742 -0.294107
+vn -0.460158 0.887814 0.000000
+vn -0.437635 0.887814 -0.142186
+vn -0.164068 -0.986419 0.000000
+vn -0.156011 -0.986419 -0.050691
+vn -0.811670 -0.584063 0.000000
+vn -0.771935 -0.584063 -0.250801
+vn -0.987854 0.155217 0.000000
+vn -0.939512 0.155217 -0.305246
+vn -0.592853 0.805292 0.000000
+vn -0.563829 0.805292 -0.183203
+vn -0.710959 -0.703207 0.000000
+vn -0.676168 -0.703207 -0.219703
+vn -1.000000 0.000000 0.000000
+vn -0.951048 0.000000 -0.309000
+vn -0.710959 0.703207 0.000000
+vn -0.676168 0.703207 -0.219703
+vn -0.563829 -0.805292 -0.183203
+vn -0.939512 -0.155217 -0.305246
+vn -0.771935 0.584063 -0.250801
+vn -0.156011 0.986419 -0.050691
+vn -0.255684 0.948729 -0.185766
+vn -0.255684 -0.948729 -0.185766
+vn -0.722098 -0.450850 -0.524644
+vn -0.770012 0.306742 -0.559435
+vn -0.372265 0.887814 -0.270455
+vn -0.132725 -0.986419 -0.096408
+vn -0.656667 -0.584063 -0.477096
+vn -0.799188 0.155217 -0.580645
+vn -0.479629 0.805292 -0.348460
+vn -0.575182 -0.703207 -0.417890
+vn -0.809015 0.000000 -0.587756
+vn -0.575182 0.703207 -0.417890
+vn -0.479629 -0.805292 -0.348460
+vn -0.799188 -0.155217 -0.580645
+vn -0.656667 0.584063 -0.477096
+vn -0.372265 -0.887814 -0.270455
+vn -0.770012 -0.306742 -0.559435
+vn -0.722098 0.450850 -0.524644
+vn -0.185766 -0.948729 -0.255684
+vn -0.524644 -0.450850 -0.722098
+vn -0.559435 0.306742 -0.770012
+vn -0.270455 0.887814 -0.372265
+vn -0.096408 -0.986419 -0.132725
+vn -0.477096 -0.584063 -0.656667
+vn -0.580645 0.155217 -0.799188
+vn -0.348460 0.805292 -0.479629
+vn -0.417890 -0.703207 -0.575182
+vn -0.587756 0.000000 -0.809015
+vn -0.417890 0.703207 -0.575182
+vn -0.348460 -0.805292 -0.479629
+vn -0.580645 -0.155217 -0.799188
+vn -0.477096 0.584063 -0.656667
+vn -0.270455 -0.887814 -0.372265
+vn -0.559435 -0.306742 -0.770012
+vn -0.524644 0.450850 -0.722098
+vn -0.132725 0.986419 -0.096408
+vn -0.185766 0.948729 -0.255684
+vn -0.097659 -0.948729 -0.300577
+vn -0.275826 -0.450850 -0.848903
+vn -0.294107 0.306742 -0.905179
+vn -0.142186 0.887814 -0.437635
+vn -0.050691 -0.986419 -0.156011
+vn -0.250801 -0.584063 -0.771935
+vn -0.305246 0.155217 -0.939512
+vn -0.183203 0.805292 -0.563829
+vn -0.219703 -0.703207 -0.676168
+vn -0.309000 0.000000 -0.951048
+vn -0.219703 0.703207 -0.676168
+vn -0.183203 -0.805292 -0.563829
+vn -0.305246 -0.155217 -0.939512
+vn -0.250801 0.584063 -0.771935
+vn -0.142186 -0.887814 -0.437635
+vn -0.294107 -0.306742 -0.905179
+vn -0.275826 0.450850 -0.848903
+vn -0.096408 0.986419 -0.132725
+vn -0.097659 0.948729 -0.300577
+vn 0.000000 -0.450850 -0.892575
+vn 0.000000 0.306742 -0.951781
+vn 0.000000 0.887814 -0.460158
+vn 0.000000 -0.986419 -0.164068
+vn 0.000000 -0.584063 -0.811670
+vn 0.000000 0.155217 -0.987854
+vn 0.000000 0.805292 -0.592853
+vn 0.000000 -0.703207 -0.710959
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.703207 -0.710959
+vn 0.000000 -0.805292 -0.592853
+vn 0.000000 -0.155217 -0.987854
+vn 0.000000 0.584063 -0.811670
+vn 0.000000 -0.887814 -0.460158
+vn 0.000000 -0.306742 -0.951781
+vn 0.000000 0.450850 -0.892575
+vn -0.050691 0.986419 -0.156011
+vn 0.000000 0.948729 -0.316050
+vn 0.000000 -0.948729 -0.316050
+vn 0.097659 0.948729 -0.300577
+vn 0.097659 -0.948729 -0.300577
+vn 0.275826 -0.450850 -0.848903
+vn 0.294107 0.306742 -0.905179
+vn 0.142186 0.887814 -0.437635
+vn 0.250801 -0.584063 -0.771935
+vn 0.305246 0.155217 -0.939512
+vn 0.183203 0.805292 -0.563829
+vn 0.219703 -0.703207 -0.676168
+vn 0.309000 0.000000 -0.951048
+vn 0.219703 0.703207 -0.676168
+vn 0.183203 -0.805292 -0.563829
+vn 0.305246 -0.155217 -0.939512
+vn 0.250801 0.584063 -0.771935
+vn 0.000000 0.986419 -0.164068
+vn 0.050691 0.986419 -0.156011
+vn 0.142186 -0.887814 -0.437635
+vn 0.294107 -0.306742 -0.905179
+vn 0.275826 0.450850 -0.848903
+vn 0.050691 -0.986419 -0.156011
+vn 0.185766 -0.948729 -0.255684
+vn 0.524644 -0.450850 -0.722098
+vn 0.559435 0.306742 -0.770012
+vn 0.270455 0.887814 -0.372265
+vn 0.477096 -0.584063 -0.656667
+vn 0.580645 0.155217 -0.799188
+vn 0.348460 0.805292 -0.479629
+vn 0.417890 -0.703207 -0.575182
+vn 0.587756 0.000000 -0.809015
+vn 0.417890 0.703207 -0.575182
+vn 0.348460 -0.805292 -0.479629
+vn 0.580645 -0.155217 -0.799188
+vn 0.477096 0.584063 -0.656667
+vn 0.096408 0.986419 -0.132725
+vn 0.270455 -0.887814 -0.372265
+vn 0.559435 -0.306742 -0.770012
+vn 0.524644 0.450850 -0.722098
+vn 0.185766 0.948729 -0.255684
+vn 0.096408 -0.986419 -0.132725
+vn 0.255684 -0.948729 -0.185766
+vn 0.722098 -0.450850 -0.524644
+vn 0.770012 0.306742 -0.559435
+vn 0.372265 0.887814 -0.270455
+vn 0.656667 -0.584063 -0.477096
+vn 0.799188 0.155217 -0.580645
+vn 0.479629 0.805292 -0.348460
+vn 0.575182 -0.703207 -0.417890
+vn 0.809015 0.000000 -0.587756
+vn 0.575182 0.703207 -0.417890
+vn 0.479629 -0.805292 -0.348460
+vn 0.799188 -0.155217 -0.580645
+vn 0.722098 0.450850 -0.524644
+vn 0.132725 0.986419 -0.096408
+vn 0.372265 -0.887814 -0.270455
+vn 0.770012 -0.306742 -0.559435
+vn 0.255684 0.948729 -0.185766
+vn 0.848903 -0.450850 -0.275826
+vn 0.905179 0.306742 -0.294107
+vn 0.437635 0.887814 -0.142186
+vn 0.676168 -0.703207 -0.219703
+vn 0.939512 0.155217 -0.305246
+vn 0.563829 0.805292 -0.183203
+vn 0.951048 0.000000 -0.309000
+vn 0.656667 0.584063 -0.477096
+vn 0.676168 0.703207 -0.219703
+vn 0.563829 -0.805292 -0.183203
+vn 0.939512 -0.155217 -0.305246
+vn 0.848903 0.450850 -0.275826
+vn 0.156011 0.986419 -0.050691
+vn 0.437635 -0.887814 -0.142186
+vn 0.905179 -0.306742 -0.294107
+vn 0.300577 0.948729 -0.097659
+vn 0.132725 -0.986419 -0.096408
+vn 0.300577 -0.948729 -0.097659
+vn 0.951781 0.306742 0.000000
+vn 0.460158 0.887814 0.000000
+vn 0.771935 -0.584063 -0.250801
+vn 0.710959 -0.703207 0.000000
+vn 0.987854 0.155217 0.000000
+vn 0.592853 0.805292 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.771935 0.584063 -0.250801
+vn 0.710959 0.703207 0.000000
+vn 0.592853 -0.805292 0.000000
+vn 0.987854 -0.155217 0.000000
+vn 0.892575 0.450850 0.000000
+vn 0.164068 0.986419 0.000000
+vn 0.460158 -0.887814 0.000000
+vn 0.951781 -0.306742 0.000000
+vn 0.316050 0.948729 0.000000
+vn 0.156011 -0.986419 -0.050691
+vn 0.316050 -0.948729 0.000000
+vn 0.892575 -0.450850 0.000000
+vn 0.811670 -0.584063 0.000000
+vn 0.676168 -0.703207 0.219703
+vn 0.939512 0.155217 0.305246
+vn 0.563829 0.805292 0.183203
+vn 0.951048 0.000000 0.309000
+vn 0.811670 0.584063 0.000000
+vn 0.676168 0.703207 0.219703
+vn 0.563829 -0.805292 0.183203
+vn 0.939512 -0.155217 0.305246
+vn 0.848903 0.450850 0.275826
+vn 0.156011 0.986419 0.050691
+vn 0.437635 -0.887814 0.142186
+vn 0.905179 -0.306742 0.294107
+vn 0.300577 0.948729 0.097659
+vn 0.164068 -0.986419 0.000000
+vn 0.300577 -0.948729 0.097659
+vn 0.848903 -0.450850 0.275826
+vn 0.905179 0.306742 0.294107
+vn 0.437635 0.887814 0.142186
+vn 0.771935 -0.584063 0.250801
+vn 0.575182 -0.703207 0.417890
+vn 0.799188 0.155217 0.580645
+vn 0.479629 0.805292 0.348460
+vn 0.809015 0.000000 0.587756
+vn 0.771935 0.584063 0.250801
+vn 0.575182 0.703207 0.417890
+vn 0.479629 -0.805292 0.348460
+vn 0.799188 -0.155217 0.580645
+vn 0.722098 0.450850 0.524644
+vn 0.132725 0.986419 0.096408
+vn 0.372265 -0.887814 0.270455
+vn 0.770012 -0.306742 0.559435
+vn 0.255684 0.948729 0.185766
+vn 0.156011 -0.986419 0.050691
+vn 0.255684 -0.948729 0.185766
+vn 0.722098 -0.450850 0.524644
+vn 0.770012 0.306742 0.559435
+vn 0.372265 0.887814 0.270455
+vn 0.656667 -0.584063 0.477096
+vn 0.417890 -0.703207 0.575182
+vn 0.580645 0.155217 0.799188
+vn 0.348460 0.805292 0.479629
+vn 0.587756 0.000000 0.809015
+vn 0.656667 0.584063 0.477096
+vn 0.417890 0.703207 0.575182
+vn 0.348460 -0.805292 0.479629
+vn 0.580645 -0.155217 0.799188
+vn 0.524644 0.450850 0.722098
+vn 0.096408 0.986419 0.132725
+vn 0.270455 -0.887814 0.372265
+vn 0.559435 -0.306742 0.770012
+vn 0.185766 0.948729 0.255684
+vn 0.132725 -0.986419 0.096408
+vn 0.185766 -0.948729 0.255684
+vn 0.524644 -0.450850 0.722098
+vn 0.559435 0.306742 0.770012
+vn 0.270455 0.887814 0.372265
+vn 0.305246 0.155217 0.939512
+vn 0.183203 0.805292 0.563829
+vn 0.219703 -0.703207 0.676168
+vn 0.309000 0.000000 0.951048
+vn 0.477096 0.584063 0.656667
+vn 0.219703 0.703207 0.676168
+vn 0.183203 -0.805292 0.563829
+vn 0.305246 -0.155217 0.939512
+vn 0.275826 0.450850 0.848903
+vn 0.050691 0.986419 0.156011
+vn 0.142186 -0.887814 0.437635
+vn 0.294107 -0.306742 0.905179
+vn 0.097659 0.948729 0.300577
+vn 0.096408 -0.986419 0.132725
+vn 0.097659 -0.948729 0.300577
+vn 0.477096 -0.584063 0.656667
+vn 0.275826 -0.450850 0.848903
+vn 0.294107 0.306742 0.905179
+vn 0.142186 0.887814 0.437635
+vn 0.250801 -0.584063 0.771935
+vn 0.000000 0.805292 0.592853
+vn 0.000000 -0.703207 0.710959
+vn 0.000000 0.000000 1.000000
+vn 0.250801 0.584063 0.771935
+vn 0.000000 0.703207 0.710959
+vn 0.000000 -0.805292 0.592853
+vn 0.000000 -0.155217 0.987854
+vn 0.000000 0.450850 0.892575
+vn 0.000000 0.986419 0.164068
+vn 0.000000 -0.887814 0.460158
+vn 0.000000 -0.306742 0.951781
+vn 0.000000 0.948729 0.316050
+vn 0.050691 -0.986419 0.156011
+vn 0.000000 -0.948729 0.316050
+vn 0.000000 -0.450850 0.892575
+vn 0.000000 0.306742 0.951781
+vn 0.000000 0.887814 0.460158
+vn 0.000000 -0.584063 0.811670
+vn 0.000000 0.155217 0.987854
+vn -0.183203 -0.805292 0.563829
+vn -0.305246 -0.155217 0.939512
+vn 0.000000 0.584063 0.811670
+vn -0.250801 0.584063 0.771935
+vn -0.142186 -0.887814 0.437635
+vn -0.294107 -0.306742 0.905179
+vn -0.097659 0.948729 0.300577
+vn -0.097659 -0.948729 0.300577
+vn -0.275826 -0.450850 0.848903
+vn -0.294107 0.306742 0.905179
+vn -0.142186 0.887814 0.437635
+vn 0.000000 -0.986419 0.164068
+vn -0.050691 -0.986419 0.156011
+vn -0.250801 -0.584063 0.771935
+vn -0.305246 0.155217 0.939512
+vn -0.183203 0.805292 0.563829
+vn -0.219703 -0.703207 0.676168
+vn -0.309000 0.000000 0.951048
+vn -0.219703 0.703207 0.676168
+vn -0.348460 -0.805292 0.479629
+vn -0.580645 -0.155217 0.799188
+vn -0.477096 0.584063 0.656667
+vn -0.270455 -0.887814 0.372265
+vn -0.559435 -0.306742 0.770012
+vn -0.275826 0.450850 0.848903
+vn -0.050691 0.986419 0.156011
+vn -0.185766 0.948729 0.255684
+vn -0.185766 -0.948729 0.255684
+vn -0.524644 -0.450850 0.722098
+vn -0.559435 0.306742 0.770012
+vn -0.270455 0.887814 0.372265
+vn -0.096408 -0.986419 0.132725
+vn -0.477096 -0.584063 0.656667
+vn -0.580645 0.155217 0.799188
+vn -0.348460 0.805292 0.479629
+vn -0.417890 -0.703207 0.575182
+vn -0.587756 0.000000 0.809015
+vn -0.417890 0.703207 0.575182
+vn -0.479629 -0.805292 0.348460
+vn -0.799188 -0.155217 0.580645
+vn -0.656667 0.584063 0.477096
+vn -0.372265 -0.887814 0.270455
+vn -0.770012 -0.306742 0.559435
+vn -0.524644 0.450850 0.722098
+vn -0.096408 0.986419 0.132725
+vn -0.255684 0.948729 0.185766
+vn -0.255684 -0.948729 0.185766
+vn -0.722098 -0.450850 0.524644
+vn -0.770012 0.306742 0.559435
+vn -0.372265 0.887814 0.270455
+vn -0.132725 -0.986419 0.096408
+vn -0.656667 -0.584063 0.477096
+vn -0.799188 0.155217 0.580645
+vn -0.479629 0.805292 0.348460
+vn -0.575182 -0.703207 0.417890
+vn -0.809015 0.000000 0.587756
+vn -0.575182 0.703207 0.417890
+vn -0.771935 0.584063 0.250801
+vn -0.437635 -0.887814 0.142186
+vn -0.905179 -0.306742 0.294107
+vn -0.722098 0.450850 0.524644
+vn -0.132725 0.986419 0.096408
+vn -0.300577 0.948729 0.097659
+vn -0.300577 -0.948729 0.097659
+vn -0.848903 -0.450850 0.275826
+vn -0.905179 0.306742 0.294107
+vn -0.437635 0.887814 0.142186
+vn -0.156011 -0.986419 0.050691
+vn -0.771935 -0.584063 0.250801
+vn -0.939512 0.155217 0.305246
+vn -0.563829 0.805292 0.183203
+vn -0.676168 -0.703207 0.219703
+vn -0.951048 0.000000 0.309000
+vn -0.676168 0.703207 0.219703
+vn -0.563829 -0.805292 0.183203
+vn -0.939512 -0.155217 0.305246
+vn 0.000000 -0.999969 0.000000
+vn 0.000000 1.000000 0.000000
+vn -0.156011 0.986419 0.050691
+vn -0.848903 0.450850 0.275826
+s 1
+f 17/1/1 16/2/2 36/3/3
+f 12/4/4 11/5/5 31/6/6
+f 7/7/7 6/8/8 26/9/9
+f 2/10/10 1/11/11 21/12/12
+f 18/13/13 17/1/1 37/14/14
+f 13/15/15 12/4/4 32/16/16
+f 8/17/17 7/7/7 27/18/18
+f 3/19/19 2/10/10 22/20/20
+f 19/21/21 18/13/13 38/22/22
+f 14/23/23 13/15/15 33/24/24
+f 9/25/25 8/17/17 28/26/26
+f 4/27/27 3/19/19 23/28/28
+f 15/29/29 14/23/23 34/30/30
+f 10/31/31 9/25/25 29/32/32
+f 5/33/33 4/27/27 24/34/34
+f 16/2/2 15/29/29 35/35/35
+f 11/5/5 10/31/31 30/36/36
+f 6/8/8 5/33/33 25/37/37
+f 21/12/12 20/38/38 41/39/39
+f 37/40/14 36/41/3 57/42/40
+f 32/43/16 31/44/6 52/45/41
+f 27/46/18 26/47/9 47/48/42
+f 22/49/20 21/12/12 42/50/43
+f 38/51/22 37/40/14 58/52/44
+f 33/53/24 32/43/16 53/54/45
+f 28/55/26 27/46/18 48/56/46
+f 23/57/28 22/49/20 43/58/47
+f 34/59/30 33/53/24 54/60/48
+f 29/61/32 28/55/26 49/62/49
+f 24/63/34 23/57/28 44/64/50
+f 35/65/35 34/59/30 55/66/51
+f 30/67/36 29/61/32 50/68/52
+f 25/69/37 24/63/34 45/70/53
+f 36/41/3 35/65/35 56/71/54
+f 31/44/6 30/67/36 51/72/55
+f 26/47/9 25/69/37 46/73/56
+f 57/42/40 56/71/54 76/74/57
+f 52/45/41 51/72/55 71/75/58
+f 47/48/42 46/73/56 66/76/59
+f 42/50/43 41/39/39 61/77/60
+f 58/52/44 57/42/40 77/78/61
+f 53/54/45 52/45/41 72/79/62
+f 48/56/46 47/48/42 67/80/63
+f 43/58/47 42/50/43 62/81/64
+f 54/60/48 53/54/45 73/82/65
+f 49/62/49 48/56/46 68/83/66
+f 44/64/50 43/58/47 63/84/67
+f 55/66/51 54/60/48 74/85/68
+f 50/68/52 49/62/49 69/86/69
+f 45/70/53 44/64/50 64/87/70
+f 56/71/54 55/66/51 75/88/71
+f 51/72/55 50/68/52 70/89/72
+f 46/73/56 45/70/53 65/90/73
+f 41/39/39 40/91/74 60/92/75
+f 76/74/57 75/88/71 95/93/76
+f 71/75/58 70/89/72 90/94/77
+f 66/76/59 65/90/73 85/95/78
+f 61/77/60 60/92/75 80/96/79
+f 77/78/61 76/74/57 96/97/80
+f 72/79/62 71/75/58 91/98/81
+f 67/80/63 66/76/59 86/99/82
+f 62/81/64 61/77/60 81/100/83
+f 73/82/65 72/79/62 92/101/84
+f 68/83/66 67/80/63 87/102/85
+f 63/84/67 62/81/64 82/103/86
+f 74/85/68 73/82/65 93/104/87
+f 69/86/69 68/83/66 88/105/88
+f 64/87/70 63/84/67 83/106/89
+f 75/88/71 74/85/68 94/107/90
+f 70/89/72 69/86/69 89/108/91
+f 65/90/73 64/87/70 84/109/92
+f 60/92/75 59/110/93 79/111/94
+f 90/94/77 89/108/91 109/112/95
+f 85/95/78 84/109/92 104/113/96
+f 80/96/79 79/111/94 99/114/97
+f 96/97/80 95/93/76 115/115/98
+f 91/98/81 90/94/77 110/116/99
+f 86/99/82 85/95/78 105/117/100
+f 81/100/83 80/96/79 100/118/101
+f 92/101/84 91/98/81 111/119/102
+f 87/102/85 86/99/82 106/120/103
+f 82/103/86 81/100/83 101/121/104
+f 93/104/87 92/101/84 112/122/105
+f 88/105/88 87/102/85 107/123/106
+f 83/106/89 82/103/86 102/124/107
+f 94/107/90 93/104/87 113/125/108
+f 89/108/91 88/105/88 108/126/109
+f 84/109/92 83/106/89 103/127/110
+f 79/111/94 78/128/111 98/129/112
+f 95/93/76 94/107/90 114/130/113
+f 99/114/97 98/129/112 117/131/114
+f 115/115/98 114/130/113 133/132/115
+f 110/116/99 109/112/95 128/133/116
+f 105/117/100 104/113/96 123/134/117
+f 100/118/101 99/114/97 118/135/118
+f 111/119/102 110/116/99 129/136/119
+f 106/120/103 105/117/100 124/137/120
+f 101/121/104 100/118/101 119/138/121
+f 112/122/105 111/119/102 130/139/122
+f 107/123/106 106/120/103 125/140/123
+f 102/124/107 101/121/104 120/141/124
+f 113/125/108 112/122/105 131/142/125
+f 108/126/109 107/123/106 126/143/126
+f 103/127/110 102/124/107 121/144/127
+f 98/129/112 97/145/128 116/146/129
+f 114/130/113 113/125/108 132/147/130
+f 109/112/95 108/126/109 127/148/131
+f 104/113/96 103/127/110 122/149/132
+f 134/150/133 133/132/115 152/151/134
+f 129/136/119 128/133/116 147/152/135
+f 124/137/120 123/134/117 142/153/136
+f 119/138/121 118/135/118 137/154/137
+f 130/139/122 129/136/119 148/155/138
+f 125/140/123 124/137/120 143/156/139
+f 120/141/124 119/138/121 138/157/140
+f 131/142/125 130/139/122 149/158/141
+f 126/143/126 125/140/123 144/159/142
+f 121/144/127 120/141/124 139/160/143
+f 132/147/130 131/142/125 150/161/144
+f 127/148/131 126/143/126 145/162/145
+f 122/149/132 121/144/127 140/163/146
+f 117/131/114 116/146/129 135/164/147
+f 133/132/115 132/147/130 151/165/148
+f 128/133/116 127/148/131 146/166/149
+f 123/134/117 122/149/132 141/167/150
+f 118/135/118 117/131/114 136/168/151
+f 153/169/152 152/151/134 171/170/153
+f 148/155/138 147/152/135 166/171/154
+f 143/156/139 142/153/136 161/172/155
+f 138/157/140 137/154/137 156/173/156
+f 149/158/141 148/155/138 167/174/157
+f 144/159/142 143/156/139 162/175/158
+f 139/160/143 138/157/140 157/176/159
+f 150/161/144 149/158/141 168/177/160
+f 145/162/145 144/159/142 163/178/161
+f 140/163/146 139/160/143 158/179/162
+f 151/165/148 150/161/144 169/180/163
+f 146/166/149 145/162/145 164/181/164
+f 141/167/150 140/163/146 160/182/165
+f 136/168/151 135/164/147 154/183/166
+f 152/151/134 151/165/148 170/184/167
+f 147/152/135 146/166/149 165/185/168
+f 142/153/136 141/167/150 160/182/165
+f 137/154/137 136/168/151 155/186/169
+f 167/174/157 166/171/154 185/187/170
+f 162/175/158 161/172/155 180/188/171
+f 157/176/159 156/173/156 175/189/172
+f 168/177/160 167/174/157 187/190/173
+f 163/178/161 162/175/158 181/191/174
+f 158/179/162 157/176/159 176/192/175
+f 169/180/163 168/177/160 187/190/173
+f 164/181/164 163/178/161 182/193/176
+f 159/194/177 158/179/162 177/195/178
+f 170/184/167 169/180/163 188/196/179
+f 165/185/168 164/181/164 183/197/180
+f 160/182/165 159/194/177 179/198/181
+f 155/186/169 154/183/166 173/199/182
+f 171/170/153 170/184/167 189/200/183
+f 166/171/154 165/185/168 184/201/184
+f 161/172/155 160/182/165 179/198/181
+f 156/173/156 155/186/169 174/202/185
+f 172/203/186 171/170/153 190/204/187
+f 181/191/174 180/188/171 199/205/188
+f 176/192/175 175/189/172 194/206/189
+f 187/190/173 186/207/190 206/208/191
+f 182/193/176 181/191/174 200/209/192
+f 177/195/178 176/192/175 195/210/193
+f 188/196/179 187/190/173 206/208/191
+f 183/197/180 182/193/176 201/211/194
+f 178/212/195 177/195/178 196/213/196
+f 189/200/183 188/196/179 207/214/197
+f 184/201/184 183/197/180 202/215/198
+f 179/198/181 178/212/195 198/216/199
+f 174/202/185 173/199/182 192/217/200
+f 190/204/187 189/200/183 208/218/201
+f 185/187/170 184/201/184 203/219/202
+f 180/188/171 179/198/181 198/216/199
+f 175/189/172 174/202/185 193/220/203
+f 191/221/204 190/204/187 209/222/205
+f 186/207/190 185/187/170 204/223/206
+f 206/208/191 205/224/207 225/225/208
+f 201/211/194 200/209/192 219/226/209
+f 196/213/196 195/210/193 214/227/210
+f 207/214/197 206/208/191 225/225/208
+f 202/215/198 201/211/194 220/228/211
+f 197/229/212 196/213/196 215/230/213
+f 208/218/201 207/214/197 226/231/214
+f 203/219/202 202/215/198 221/232/215
+f 198/216/199 197/229/212 217/233/216
+f 193/220/203 192/217/200 211/234/217
+f 209/222/205 208/218/201 227/235/218
+f 204/223/206 203/219/202 222/236/219
+f 199/205/188 198/216/199 217/233/216
+f 194/206/189 193/220/203 212/237/220
+f 210/238/221 209/222/205 228/239/222
+f 205/224/207 204/223/206 223/240/223
+f 200/209/192 199/205/188 218/241/224
+f 195/210/193 194/206/189 213/242/225
+f 225/225/208 224/243/226 244/244/227
+f 220/228/211 219/226/209 238/245/228
+f 215/230/213 214/227/210 233/246/229
+f 226/231/214 225/225/208 244/244/227
+f 221/232/215 220/228/211 239/247/230
+f 216/248/231 215/230/213 234/249/232
+f 227/235/218 226/231/214 245/250/233
+f 222/236/219 221/232/215 240/251/234
+f 217/233/216 216/248/231 236/252/235
+f 212/237/220 211/234/217 230/253/236
+f 228/239/222 227/235/218 246/254/237
+f 223/240/223 222/236/219 241/255/238
+f 218/241/224 217/233/216 236/252/235
+f 213/242/225 212/237/220 231/256/239
+f 229/257/240 228/239/222 247/258/241
+f 224/243/226 223/240/223 242/259/242
+f 219/226/209 218/241/224 237/260/243
+f 214/227/210 213/242/225 232/261/244
+f 244/244/227 243/262/245 263/263/246
+f 239/247/230 238/245/228 257/264/247
+f 234/249/232 233/246/229 252/265/248
+f 245/250/233 244/244/227 263/263/246
+f 240/251/234 239/247/230 258/266/249
+f 235/267/250 234/249/232 253/268/251
+f 246/269/237 245/250/233 264/270/252
+f 241/255/238 240/251/234 259/271/253
+f 236/252/235 235/267/250 255/272/254
+f 231/256/239 230/253/236 249/273/255
+f 247/274/241 246/269/237 265/275/256
+f 242/259/242 241/255/238 260/276/257
+f 237/260/243 236/252/235 255/272/254
+f 232/261/244 231/256/239 250/277/258
+f 248/278/259 247/274/241 266/279/260
+f 243/262/245 242/259/242 261/280/261
+f 238/245/228 237/260/243 256/281/262
+f 233/246/229 232/261/244 251/282/263
+f 258/266/249 257/264/247 276/283/264
+f 253/268/251 252/265/248 271/284/265
+f 264/270/252 263/263/246 282/285/266
+f 259/271/253 258/266/249 277/286/267
+f 254/287/268 253/268/251 272/288/269
+f 265/275/256 264/270/252 283/289/270
+f 260/276/257 259/271/253 278/290/271
+f 255/272/254 254/287/268 274/291/272
+f 250/277/258 249/273/255 268/292/273
+f 266/279/260 265/275/256 284/293/274
+f 261/280/261 260/276/257 279/294/275
+f 256/281/262 255/272/254 274/291/272
+f 251/282/263 250/277/258 269/295/276
+f 267/296/277 266/279/260 285/297/278
+f 262/298/279 261/280/261 280/299/280
+f 257/264/247 256/281/262 275/300/281
+f 252/265/248 251/282/263 270/301/282
+f 263/263/246 262/298/279 281/302/283
+f 272/288/269 271/284/265 290/303/284
+f 283/289/270 282/285/266 301/304/285
+f 278/290/271 277/286/267 296/305/286
+f 273/306/287 272/288/269 291/307/288
+f 284/293/274 283/289/270 302/308/289
+f 279/294/275 278/290/271 297/309/290
+f 274/291/272 273/306/287 293/310/291
+f 269/295/276 268/292/273 287/311/292
+f 285/297/278 284/293/274 303/312/293
+f 280/299/280 279/294/275 298/313/294
+f 275/300/281 274/291/272 293/310/291
+f 270/301/282 269/295/276 288/314/295
+f 286/315/296 285/297/278 304/316/297
+f 281/302/283 280/299/280 299/317/298
+f 276/283/264 275/300/281 294/318/299
+f 271/284/265 270/301/282 289/319/300
+f 282/285/266 281/302/283 300/320/301
+f 277/286/267 276/283/264 295/321/302
+f 302/308/289 301/304/285 321/322/303
+f 297/309/290 296/305/286 316/323/304
+f 292/324/305 291/307/288 311/325/306
+f 303/312/293 302/308/289 322/326/307
+f 298/313/294 297/309/290 317/327/308
+f 293/310/291 292/324/305 311/325/306
+f 288/314/295 287/311/292 307/328/309
+f 304/316/297 303/312/293 323/329/310
+f 299/317/298 298/313/294 318/330/311
+f 294/318/299 293/310/291 313/331/312
+f 289/319/300 288/314/295 308/332/313
+f 305/333/314 304/316/297 324/334/315
+f 300/320/301 299/317/298 319/335/316
+f 295/321/302 294/318/299 314/336/317
+f 290/303/284 289/319/300 309/337/318
+f 301/304/285 300/320/301 320/338/319
+f 296/305/286 295/321/302 315/339/320
+f 291/307/288 290/303/284 310/340/321
+f 321/322/303 320/338/319 340/341/322
+f 316/323/304 315/339/320 335/342/323
+f 311/325/306 310/340/321 330/343/324
+f 322/326/307 321/322/303 341/344/325
+f 317/327/308 316/323/304 336/345/326
+f 312/346/327 311/325/306 330/343/324
+f 307/328/309 306/347/328 326/348/329
+f 323/329/310 322/326/307 342/349/330
+f 318/330/311 317/327/308 337/350/331
+f 313/331/312 312/346/327 332/351/332
+f 308/332/313 307/328/309 327/352/333
+f 324/334/315 323/329/310 343/353/334
+f 319/335/316 318/330/311 338/354/335
+f 314/336/317 313/331/312 333/355/336
+f 309/337/318 308/332/313 328/356/337
+f 320/338/319 319/335/316 339/357/338
+f 315/339/320 314/336/317 334/358/339
+f 310/340/321 309/337/318 329/359/340
+f 340/341/322 339/357/338 360/360/341
+f 335/342/323 334/358/339 355/361/342
+f 330/343/324 329/359/340 350/362/343
+f 341/344/325 340/341/322 361/363/344
+f 336/345/326 335/342/323 356/364/345
+f 331/365/346 330/343/324 350/362/343
+f 326/348/329 325/366/347 346/367/348
+f 342/349/330 341/344/325 362/368/349
+f 337/350/331 336/345/326 357/369/350
+f 332/351/332 331/365/346 352/370/351
+f 327/352/333 326/348/329 347/371/352
+f 343/353/334 342/349/330 363/372/353
+f 338/354/335 337/350/331 358/373/354
+f 333/355/336 332/351/332 353/374/355
+f 328/356/337 327/352/333 348/375/356
+f 339/357/338 338/354/335 359/376/357
+f 334/358/339 333/355/336 354/377/358
+f 329/359/340 328/356/337 349/378/359
+f 350/362/343 349/378/359 369/379/360
+f 361/363/344 360/360/341 380/380/361
+f 356/364/345 355/361/342 375/381/362
+f 351/382/363 350/362/343 369/379/360
+f 346/367/348 345/383/364 365/384/365
+f 362/368/349 361/363/344 381/385/366
+f 357/369/350 356/364/345 376/386/367
+f 352/370/351 351/382/363 371/387/368
+f 347/371/352 346/367/348 366/388/369
+f 363/372/353 362/368/349 382/389/370
+f 358/373/354 357/369/350 377/390/371
+f 353/374/355 352/370/351 372/391/372
+f 348/375/356 347/371/352 367/392/373
+f 359/376/357 358/373/354 378/393/374
+f 354/377/358 353/374/355 373/394/375
+f 349/378/359 348/375/356 368/395/376
+f 360/360/341 359/376/357 379/396/377
+f 355/361/342 354/377/358 374/397/378
+f 39/398/379 19/399/21 38/51/22
+f 1/11/11 344/400/380 20/38/38
+f 39/398/379 38/51/22 58/52/44
+f 20/38/38 344/400/380 40/91/74
+f 39/398/379 58/52/44 77/78/61
+f 40/91/74 344/400/380 59/110/93
+f 39/398/379 77/78/61 96/97/80
+f 59/110/93 344/400/380 78/128/111
+f 39/398/379 96/97/80 115/115/98
+f 78/128/111 344/400/380 97/145/128
+f 39/398/379 115/115/98 134/150/133
+f 97/145/128 344/400/380 116/146/129
+f 39/398/379 134/150/133 153/169/152
+f 116/146/129 344/400/380 135/164/147
+f 39/398/379 153/169/152 172/203/186
+f 135/164/147 344/400/380 154/183/166
+f 39/398/379 172/203/186 191/221/204
+f 154/183/166 344/400/380 173/199/182
+f 39/398/379 191/221/204 210/238/221
+f 173/199/182 344/400/380 192/217/200
+f 39/398/379 210/238/221 229/257/240
+f 192/217/200 344/400/380 211/234/217
+f 39/398/379 229/257/240 248/401/259
+f 211/234/217 344/400/380 230/253/236
+f 39/398/379 248/401/259 267/402/277
+f 230/253/236 344/400/380 249/273/255
+f 249/273/255 344/400/380 268/292/273
+f 39/398/379 267/402/277 286/403/296
+f 268/292/273 344/400/380 287/311/292
+f 39/398/379 286/403/296 305/404/314
+f 287/311/292 344/400/380 306/347/328
+f 39/398/379 305/404/314 324/405/315
+f 306/347/328 344/400/380 325/366/347
+f 39/398/379 324/405/315 343/406/334
+f 325/366/347 344/400/380 345/383/364
+f 39/398/379 343/406/334 363/407/353
+f 345/383/364 344/400/380 364/408/381
+f 39/398/379 363/407/353 382/409/370
+f 364/408/381 344/400/380 1/11/11
+f 380/380/361 379/396/377 16/2/2
+f 375/381/362 374/397/378 12/4/4
+f 370/410/382 369/379/360 7/7/7
+f 365/384/365 364/408/381 2/10/10
+f 381/385/366 380/380/361 17/1/1
+f 376/386/367 375/381/362 13/15/15
+f 371/387/368 370/410/382 8/17/17
+f 366/388/369 365/384/365 3/19/19
+f 382/389/370 381/385/366 18/13/13
+f 377/390/371 376/386/367 13/15/15
+f 372/391/372 371/387/368 9/25/25
+f 367/392/373 366/388/369 4/27/27
+f 39/398/379 382/409/370 19/399/21
+f 378/393/374 377/390/371 14/23/23
+f 373/394/375 372/391/372 10/31/31
+f 368/395/376 367/392/373 5/33/33
+f 379/396/377 378/393/374 15/29/29
+f 374/397/378 373/394/375 11/5/5
+f 369/379/360 368/395/376 6/8/8
+f 16/2/2 35/35/35 36/3/3
+f 11/5/5 30/36/36 31/6/6
+f 6/8/8 25/37/37 26/9/9
+f 1/11/11 20/38/38 21/12/12
+f 17/1/1 36/3/3 37/14/14
+f 12/4/4 31/6/6 32/16/16
+f 7/7/7 26/9/9 27/18/18
+f 2/10/10 21/12/12 22/20/20
+f 18/13/13 37/14/14 38/22/22
+f 13/15/15 32/16/16 33/24/24
+f 8/17/17 27/18/18 28/26/26
+f 3/19/19 22/20/20 23/28/28
+f 14/23/23 33/24/24 34/30/30
+f 9/25/25 28/26/26 29/32/32
+f 4/27/27 23/28/28 24/34/34
+f 15/29/29 34/30/30 35/35/35
+f 10/31/31 29/32/32 30/36/36
+f 5/33/33 24/34/34 25/37/37
+f 20/38/38 40/91/74 41/39/39
+f 36/41/3 56/71/54 57/42/40
+f 31/44/6 51/72/55 52/45/41
+f 26/47/9 46/73/56 47/48/42
+f 21/12/12 41/39/39 42/50/43
+f 37/40/14 57/42/40 58/52/44
+f 32/43/16 52/45/41 53/54/45
+f 27/46/18 47/48/42 48/56/46
+f 22/49/20 42/50/43 43/58/47
+f 33/53/24 53/54/45 54/60/48
+f 28/55/26 48/56/46 49/62/49
+f 23/57/28 43/58/47 44/64/50
+f 34/59/30 54/60/48 55/66/51
+f 29/61/32 49/62/49 50/68/52
+f 24/63/34 44/64/50 45/70/53
+f 35/65/35 55/66/51 56/71/54
+f 30/67/36 50/68/52 51/72/55
+f 25/69/37 45/70/53 46/73/56
+f 56/71/54 75/88/71 76/74/57
+f 51/72/55 70/89/72 71/75/58
+f 46/73/56 65/90/73 66/76/59
+f 41/39/39 60/92/75 61/77/60
+f 57/42/40 76/74/57 77/78/61
+f 52/45/41 71/75/58 72/79/62
+f 47/48/42 66/76/59 67/80/63
+f 42/50/43 61/77/60 62/81/64
+f 53/54/45 72/79/62 73/82/65
+f 48/56/46 67/80/63 68/83/66
+f 43/58/47 62/81/64 63/84/67
+f 54/60/48 73/82/65 74/85/68
+f 49/62/49 68/83/66 69/86/69
+f 44/64/50 63/84/67 64/87/70
+f 55/66/51 74/85/68 75/88/71
+f 50/68/52 69/86/69 70/89/72
+f 45/70/53 64/87/70 65/90/73
+f 40/91/74 59/110/93 60/92/75
+f 75/88/71 94/107/90 95/93/76
+f 70/89/72 89/108/91 90/94/77
+f 65/90/73 84/109/92 85/95/78
+f 60/92/75 79/111/94 80/96/79
+f 76/74/57 95/93/76 96/97/80
+f 71/75/58 90/94/77 91/98/81
+f 66/76/59 85/95/78 86/99/82
+f 61/77/60 80/96/79 81/100/83
+f 72/79/62 91/98/81 92/101/84
+f 67/80/63 86/99/82 87/102/85
+f 62/81/64 81/100/83 82/103/86
+f 73/82/65 92/101/84 93/104/87
+f 68/83/66 87/102/85 88/105/88
+f 63/84/67 82/103/86 83/106/89
+f 74/85/68 93/104/87 94/107/90
+f 69/86/69 88/105/88 89/108/91
+f 64/87/70 83/106/89 84/109/92
+f 59/110/93 78/128/111 79/111/94
+f 89/108/91 108/126/109 109/112/95
+f 84/109/92 103/127/110 104/113/96
+f 79/111/94 98/129/112 99/114/97
+f 95/93/76 114/130/113 115/115/98
+f 90/94/77 109/112/95 110/116/99
+f 85/95/78 104/113/96 105/117/100
+f 80/96/79 99/114/97 100/118/101
+f 91/98/81 110/116/99 111/119/102
+f 86/99/82 105/117/100 106/120/103
+f 81/100/83 100/118/101 101/121/104
+f 92/101/84 111/119/102 112/122/105
+f 87/102/85 106/120/103 107/123/106
+f 82/103/86 101/121/104 102/124/107
+f 93/104/87 112/122/105 113/125/108
+f 88/105/88 107/123/106 108/126/109
+f 83/106/89 102/124/107 103/127/110
+f 78/128/111 97/145/128 98/129/112
+f 94/107/90 113/125/108 114/130/113
+f 118/135/118 99/114/97 117/131/114
+f 134/150/133 115/115/98 133/132/115
+f 129/136/119 110/116/99 128/133/116
+f 124/137/120 105/117/100 123/134/117
+f 119/138/121 100/118/101 118/135/118
+f 130/139/122 111/119/102 129/136/119
+f 125/140/123 106/120/103 124/137/120
+f 120/141/124 101/121/104 119/138/121
+f 131/142/125 112/122/105 130/139/122
+f 126/143/126 107/123/106 125/140/123
+f 121/144/127 102/124/107 120/141/124
+f 132/147/130 113/125/108 131/142/125
+f 127/148/131 108/126/109 126/143/126
+f 122/149/132 103/127/110 121/144/127
+f 117/131/114 98/129/112 116/146/129
+f 133/132/115 114/130/113 132/147/130
+f 128/133/116 109/112/95 127/148/131
+f 123/134/117 104/113/96 122/149/132
+f 153/169/152 134/150/133 152/151/134
+f 148/155/138 129/136/119 147/152/135
+f 143/156/139 124/137/120 142/153/136
+f 138/157/140 119/138/121 137/154/137
+f 149/158/141 130/139/122 148/155/138
+f 144/159/142 125/140/123 143/156/139
+f 139/160/143 120/141/124 138/157/140
+f 150/161/144 131/142/125 149/158/141
+f 145/162/145 126/143/126 144/159/142
+f 140/163/146 121/144/127 139/160/143
+f 151/165/148 132/147/130 150/161/144
+f 146/166/149 127/148/131 145/162/145
+f 141/167/150 122/149/132 140/163/146
+f 136/168/151 117/131/114 135/164/147
+f 152/151/134 133/132/115 151/165/148
+f 147/152/135 128/133/116 146/166/149
+f 142/153/136 123/134/117 141/167/150
+f 137/154/137 118/135/118 136/168/151
+f 172/203/186 153/169/152 171/170/153
+f 167/174/157 148/155/138 166/171/154
+f 162/175/158 143/156/139 161/172/155
+f 157/176/159 138/157/140 156/173/156
+f 168/177/160 149/158/141 167/174/157
+f 163/178/161 144/159/142 162/175/158
+f 158/179/162 139/160/143 157/176/159
+f 169/180/163 150/161/144 168/177/160
+f 164/181/164 145/162/145 163/178/161
+f 159/194/177 140/163/146 158/179/162
+f 170/184/167 151/165/148 169/180/163
+f 165/185/168 146/166/149 164/181/164
+f 140/163/146 159/194/177 160/182/165
+f 155/186/169 136/168/151 154/183/166
+f 171/170/153 152/151/134 170/184/167
+f 166/171/154 147/152/135 165/185/168
+f 161/172/155 142/153/136 160/182/165
+f 156/173/156 137/154/137 155/186/169
+f 186/207/190 167/174/157 185/187/170
+f 181/191/174 162/175/158 180/188/171
+f 176/192/175 157/176/159 175/189/172
+f 167/174/157 186/207/190 187/190/173
+f 182/193/176 163/178/161 181/191/174
+f 177/195/178 158/179/162 176/192/175
+f 188/196/179 169/180/163 187/190/173
+f 183/197/180 164/181/164 182/193/176
+f 178/212/195 159/194/177 177/195/178
+f 189/200/183 170/184/167 188/196/179
+f 184/201/184 165/185/168 183/197/180
+f 159/194/177 178/212/195 179/198/181
+f 174/202/185 155/186/169 173/199/182
+f 190/204/187 171/170/153 189/200/183
+f 185/187/170 166/171/154 184/201/184
+f 180/188/171 161/172/155 179/198/181
+f 175/189/172 156/173/156 174/202/185
+f 191/221/204 172/203/186 190/204/187
+f 200/209/192 181/191/174 199/205/188
+f 195/210/193 176/192/175 194/206/189
+f 186/207/190 205/224/207 206/208/191
+f 201/211/194 182/193/176 200/209/192
+f 196/213/196 177/195/178 195/210/193
+f 207/214/197 188/196/179 206/208/191
+f 202/215/198 183/197/180 201/211/194
+f 197/229/212 178/212/195 196/213/196
+f 208/218/201 189/200/183 207/214/197
+f 203/219/202 184/201/184 202/215/198
+f 178/212/195 197/229/212 198/216/199
+f 193/220/203 174/202/185 192/217/200
+f 209/222/205 190/204/187 208/218/201
+f 204/223/206 185/187/170 203/219/202
+f 199/205/188 180/188/171 198/216/199
+f 194/206/189 175/189/172 193/220/203
+f 210/238/221 191/221/204 209/222/205
+f 205/224/207 186/207/190 204/223/206
+f 205/224/207 224/243/226 225/225/208
+f 220/228/211 201/211/194 219/226/209
+f 215/230/213 196/213/196 214/227/210
+f 226/231/214 207/214/197 225/225/208
+f 221/232/215 202/215/198 220/228/211
+f 216/248/231 197/229/212 215/230/213
+f 227/235/218 208/218/201 226/231/214
+f 222/236/219 203/219/202 221/232/215
+f 197/229/212 216/248/231 217/233/216
+f 212/237/220 193/220/203 211/234/217
+f 228/239/222 209/222/205 227/235/218
+f 223/240/223 204/223/206 222/236/219
+f 218/241/224 199/205/188 217/233/216
+f 213/242/225 194/206/189 212/237/220
+f 229/257/240 210/238/221 228/239/222
+f 224/243/226 205/224/207 223/240/223
+f 219/226/209 200/209/192 218/241/224
+f 214/227/210 195/210/193 213/242/225
+f 224/243/226 243/262/245 244/244/227
+f 239/247/230 220/228/211 238/245/228
+f 234/249/232 215/230/213 233/246/229
+f 245/250/233 226/231/214 244/244/227
+f 240/251/234 221/232/215 239/247/230
+f 235/267/250 216/248/231 234/249/232
+f 246/269/237 227/235/218 245/250/233
+f 241/255/238 222/236/219 240/251/234
+f 216/248/231 235/267/250 236/252/235
+f 231/256/239 212/237/220 230/253/236
+f 247/258/241 228/239/222 246/254/237
+f 242/259/242 223/240/223 241/255/238
+f 237/260/243 218/241/224 236/252/235
+f 232/261/244 213/242/225 231/256/239
+f 248/401/259 229/257/240 247/258/241
+f 243/262/245 224/243/226 242/259/242
+f 238/245/228 219/226/209 237/260/243
+f 233/246/229 214/227/210 232/261/244
+f 243/262/245 262/298/279 263/263/246
+f 258/266/249 239/247/230 257/264/247
+f 253/268/251 234/249/232 252/265/248
+f 264/270/252 245/250/233 263/263/246
+f 259/271/253 240/251/234 258/266/249
+f 254/287/268 235/267/250 253/268/251
+f 265/275/256 246/269/237 264/270/252
+f 260/276/257 241/255/238 259/271/253
+f 235/267/250 254/287/268 255/272/254
+f 250/277/258 231/256/239 249/273/255
+f 266/279/260 247/274/241 265/275/256
+f 261/280/261 242/259/242 260/276/257
+f 256/281/262 237/260/243 255/272/254
+f 251/282/263 232/261/244 250/277/258
+f 267/296/277 248/278/259 266/279/260
+f 262/298/279 243/262/245 261/280/261
+f 257/264/247 238/245/228 256/281/262
+f 252/265/248 233/246/229 251/282/263
+f 277/286/267 258/266/249 276/283/264
+f 272/288/269 253/268/251 271/284/265
+f 283/289/270 264/270/252 282/285/266
+f 278/290/271 259/271/253 277/286/267
+f 273/306/287 254/287/268 272/288/269
+f 284/293/274 265/275/256 283/289/270
+f 279/294/275 260/276/257 278/290/271
+f 254/287/268 273/306/287 274/291/272
+f 269/295/276 250/277/258 268/292/273
+f 285/297/278 266/279/260 284/293/274
+f 280/299/280 261/280/261 279/294/275
+f 275/300/281 256/281/262 274/291/272
+f 270/301/282 251/282/263 269/295/276
+f 286/315/296 267/296/277 285/297/278
+f 281/302/283 262/298/279 280/299/280
+f 276/283/264 257/264/247 275/300/281
+f 271/284/265 252/265/248 270/301/282
+f 282/285/266 263/263/246 281/302/283
+f 291/307/288 272/288/269 290/303/284
+f 302/308/289 283/289/270 301/304/285
+f 297/309/290 278/290/271 296/305/286
+f 292/324/305 273/306/287 291/307/288
+f 303/312/293 284/293/274 302/308/289
+f 298/313/294 279/294/275 297/309/290
+f 273/306/287 292/324/305 293/310/291
+f 288/314/295 269/295/276 287/311/292
+f 304/316/297 285/297/278 303/312/293
+f 299/317/298 280/299/280 298/313/294
+f 294/318/299 275/300/281 293/310/291
+f 289/319/300 270/301/282 288/314/295
+f 305/333/314 286/315/296 304/316/297
+f 300/320/301 281/302/283 299/317/298
+f 295/321/302 276/283/264 294/318/299
+f 290/303/284 271/284/265 289/319/300
+f 301/304/285 282/285/266 300/320/301
+f 296/305/286 277/286/267 295/321/302
+f 301/304/285 320/338/319 321/322/303
+f 296/305/286 315/339/320 316/323/304
+f 291/307/288 310/340/321 311/325/306
+f 302/308/289 321/322/303 322/326/307
+f 297/309/290 316/323/304 317/327/308
+f 312/346/327 293/310/291 311/325/306
+f 287/311/292 306/347/328 307/328/309
+f 303/312/293 322/326/307 323/329/310
+f 298/313/294 317/327/308 318/330/311
+f 293/310/291 312/346/327 313/331/312
+f 288/314/295 307/328/309 308/332/313
+f 304/316/297 323/329/310 324/334/315
+f 299/317/298 318/330/311 319/335/316
+f 294/318/299 313/331/312 314/336/317
+f 289/319/300 308/332/313 309/337/318
+f 300/320/301 319/335/316 320/338/319
+f 295/321/302 314/336/317 315/339/320
+f 290/303/284 309/337/318 310/340/321
+f 320/338/319 339/357/338 340/341/322
+f 315/339/320 334/358/339 335/342/323
+f 310/340/321 329/359/340 330/343/324
+f 321/322/303 340/341/322 341/344/325
+f 316/323/304 335/342/323 336/345/326
+f 331/365/346 312/346/327 330/343/324
+f 306/347/328 325/366/347 326/348/329
+f 322/326/307 341/344/325 342/349/330
+f 317/327/308 336/345/326 337/350/331
+f 312/346/327 331/365/346 332/351/332
+f 307/328/309 326/348/329 327/352/333
+f 323/329/310 342/349/330 343/353/334
+f 318/330/311 337/350/331 338/354/335
+f 313/331/312 332/351/332 333/355/336
+f 308/332/313 327/352/333 328/356/337
+f 319/335/316 338/354/335 339/357/338
+f 314/336/317 333/355/336 334/358/339
+f 309/337/318 328/356/337 329/359/340
+f 339/357/338 359/376/357 360/360/341
+f 334/358/339 354/377/358 355/361/342
+f 329/359/340 349/378/359 350/362/343
+f 340/341/322 360/360/341 361/363/344
+f 335/342/323 355/361/342 356/364/345
+f 351/382/363 331/365/346 350/362/343
+f 325/366/347 345/383/364 346/367/348
+f 341/344/325 361/363/344 362/368/349
+f 336/345/326 356/364/345 357/369/350
+f 331/365/346 351/382/363 352/370/351
+f 326/348/329 346/367/348 347/371/352
+f 342/349/330 362/368/349 363/372/353
+f 337/350/331 357/369/350 358/373/354
+f 332/351/332 352/370/351 353/374/355
+f 327/352/333 347/371/352 348/375/356
+f 338/354/335 358/373/354 359/376/357
+f 333/355/336 353/374/355 354/377/358
+f 328/356/337 348/375/356 349/378/359
+f 349/378/359 368/395/376 369/379/360
+f 360/360/341 379/396/377 380/380/361
+f 355/361/342 374/397/378 375/381/362
+f 370/410/382 351/382/363 369/379/360
+f 345/383/364 364/408/381 365/384/365
+f 361/363/344 380/380/361 381/385/366
+f 356/364/345 375/381/362 376/386/367
+f 351/382/363 370/410/382 371/387/368
+f 346/367/348 365/384/365 366/388/369
+f 362/368/349 381/385/366 382/389/370
+f 357/369/350 376/386/367 377/390/371
+f 352/370/351 371/387/368 372/391/372
+f 347/371/352 366/388/369 367/392/373
+f 358/373/354 377/390/371 378/393/374
+f 353/374/355 372/391/372 373/394/375
+f 348/375/356 367/392/373 368/395/376
+f 359/376/357 378/393/374 379/396/377
+f 354/377/358 373/394/375 374/397/378
+f 17/1/1 380/380/361 16/2/2
+f 374/397/378 11/5/5 12/4/4
+f 369/379/360 6/8/8 7/7/7
+f 364/408/381 1/11/11 2/10/10
+f 18/13/13 381/385/366 17/1/1
+f 375/381/362 12/4/4 13/15/15
+f 370/410/382 7/7/7 8/17/17
+f 365/384/365 2/10/10 3/19/19
+f 19/21/21 382/389/370 18/13/13
+f 14/23/23 377/390/371 13/15/15
+f 371/387/368 8/17/17 9/25/25
+f 366/388/369 3/19/19 4/27/27
+f 15/29/29 378/393/374 14/23/23
+f 372/391/372 9/25/25 10/31/31
+f 367/392/373 4/27/27 5/33/33
+f 16/2/2 379/396/377 15/29/29
+f 373/394/375 10/31/31 11/5/5
+f 368/395/376 5/33/33 6/8/8
diff --git a/examples/datavisualization/rotations/mesh/narrowarrow.obj b/examples/datavisualization/rotations/mesh/narrowarrow.obj
new file mode 100644
index 00000000..481fc1d1
--- /dev/null
+++ b/examples/datavisualization/rotations/mesh/narrowarrow.obj
@@ -0,0 +1,413 @@
+# Blender v2.69 (sub 0) OBJ File: ''
+# www.blender.org
+v 0.000000 0.986570 0.000000
+v 0.000000 0.500000 -0.218399
+v -0.042608 0.500000 -0.214202
+v -0.083578 0.500000 -0.201774
+v -0.121336 0.500000 -0.181592
+v -0.154431 0.500000 -0.154431
+v -0.181592 0.500000 -0.121336
+v -0.201774 0.500000 -0.083578
+v -0.214202 0.500000 -0.042608
+v -0.218399 0.500000 -0.000000
+v -0.214202 0.500000 0.042607
+v -0.201774 0.500000 0.083578
+v -0.181592 0.500000 0.121336
+v -0.154431 0.500000 0.154431
+v -0.121336 0.500000 0.181592
+v -0.083578 0.500000 0.201774
+v -0.042607 0.500000 0.214202
+v 0.000000 0.500000 0.218399
+v 0.042608 0.500000 0.214202
+v 0.083578 0.500000 0.201774
+v 0.121336 0.500000 0.181592
+v 0.154431 0.500000 0.154431
+v 0.181592 0.500000 0.121336
+v 0.201774 0.500000 0.083577
+v 0.214202 0.500000 0.042607
+v 0.218399 0.500000 -0.000000
+v 0.214202 0.500000 -0.042608
+v 0.201774 0.500000 -0.083578
+v 0.181592 0.500000 -0.121336
+v 0.154431 0.500000 -0.154432
+v 0.121336 0.500000 -0.181592
+v 0.083577 0.500000 -0.201774
+v 0.042607 0.500000 -0.214202
+v 0.000000 0.000000 0.000000
+v 0.000000 0.000000 0.000000
+v -0.000000 0.500000 -0.126422
+v -0.024664 0.500000 -0.123993
+v -0.048380 0.500000 -0.116799
+v -0.070236 0.500000 -0.105116
+v -0.089394 0.500000 -0.089394
+v -0.105116 0.500000 -0.070236
+v -0.116799 0.500000 -0.048380
+v -0.123993 0.500000 -0.024664
+v -0.126422 0.500000 -0.000000
+v -0.123993 0.500000 0.024664
+v -0.116799 0.500000 0.048380
+v -0.105116 0.500000 0.070236
+v -0.089394 0.500000 0.089394
+v -0.070236 0.500000 0.105116
+v -0.048380 0.500000 0.116799
+v -0.024664 0.500000 0.123993
+v 0.000000 0.500000 0.126422
+v 0.024664 0.500000 0.123993
+v 0.048380 0.500000 0.116799
+v 0.070236 0.500000 0.105116
+v 0.089394 0.500000 0.089394
+v 0.105116 0.500000 0.070236
+v 0.116799 0.500000 0.048380
+v 0.123993 0.500000 0.024664
+v 0.126422 0.500000 -0.000000
+v 0.123993 0.500000 -0.024664
+v 0.116799 0.500000 -0.048380
+v 0.105116 0.500000 -0.070237
+v 0.089394 0.500000 -0.089394
+v 0.070236 0.500000 -0.105116
+v 0.048380 0.500000 -0.116799
+v 0.024664 0.500000 -0.123993
+v 0.126422 -0.983070 -0.000000
+v 0.123993 -0.983070 0.024664
+v -0.048380 -0.983070 -0.116799
+v -0.024664 -0.983070 -0.123993
+v -0.070236 -0.983070 0.105116
+v -0.089394 -0.983070 0.089394
+v 0.116799 -0.983070 0.048380
+v 0.105116 -0.983070 0.070236
+v -0.105116 -0.983070 0.070236
+v -0.116799 -0.983070 0.048380
+v 0.024664 -0.983070 -0.123993
+v 0.048380 -0.983070 -0.116799
+v 0.089394 -0.983070 0.089394
+v 0.070236 -0.983070 0.105116
+v -0.123993 -0.983070 0.024664
+v -0.126422 -0.983070 -0.000000
+v 0.070236 -0.983070 -0.105116
+v 0.089394 -0.983070 -0.089394
+v 0.048380 -0.983070 0.116799
+v 0.024664 -0.983070 0.123993
+v -0.123993 -0.983070 -0.024664
+v -0.116799 -0.983070 -0.048380
+v 0.105116 -0.983070 -0.070237
+v 0.116799 -0.983070 -0.048380
+v -0.105116 -0.983070 -0.070236
+v -0.089394 -0.983070 -0.089394
+v 0.000000 -0.983070 0.126422
+v -0.024664 -0.983070 0.123993
+v 0.123993 -0.983070 -0.024664
+v -0.070236 -0.983070 -0.105116
+v -0.048380 -0.983070 0.116799
+v -0.000000 -0.983070 -0.126422
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.500000 1.000000
+vt 0.597545 0.990393
+vt 0.402456 0.990393
+vt 0.691342 0.961940
+vt 0.777785 0.915735
+vt 0.853553 0.853553
+vt 0.915735 0.777785
+vt 0.961940 0.691342
+vt 0.990393 0.597545
+vt 1.000000 0.500000
+vt 0.990393 0.402455
+vt 0.961940 0.308658
+vt 0.915735 0.222215
+vt 0.853553 0.146447
+vt 0.777785 0.084265
+vt 0.691342 0.038060
+vt 0.597545 0.009607
+vt 0.308659 0.961940
+vt 0.222215 0.915735
+vt 0.146447 0.853554
+vt 0.308658 0.038060
+vt 0.500000 0.000000
+vt 0.402455 0.009607
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.009607 0.402455
+vt 0.038060 0.308659
+vt 0.009607 0.597546
+vt 0.000000 0.500000
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vn -0.089495 0.407852 -0.908651
+vn -0.265044 0.407852 -0.873733
+vn -0.430408 0.407852 -0.805236
+vn -0.579231 0.407852 -0.705796
+vn -0.705796 0.407852 -0.579232
+vn -0.805237 0.407852 -0.430408
+vn -0.873733 0.407852 -0.265043
+vn -0.908651 0.407852 -0.089495
+vn -0.908652 0.407852 0.089494
+vn -0.873732 0.407852 0.265044
+vn -0.805237 0.407852 0.430407
+vn -0.705796 0.407852 0.579232
+vn -0.579231 0.407852 0.705796
+vn -0.430408 0.407852 0.805237
+vn -0.265044 0.407852 0.873733
+vn -0.089494 0.407852 0.908652
+vn 0.089495 0.407852 0.908651
+vn 0.265044 0.407852 0.873732
+vn 0.430408 0.407852 0.805237
+vn 0.579232 0.407852 0.705796
+vn 0.705796 0.407852 0.579231
+vn 0.805237 0.407852 0.430406
+vn 0.873733 0.407852 0.265044
+vn 0.908652 0.407852 0.089493
+vn 0.908651 0.407852 -0.089496
+vn 0.873732 0.407852 -0.265045
+vn 0.805236 0.407852 -0.430409
+vn 0.705795 0.407852 -0.579232
+vn 0.579231 0.407852 -0.705796
+vn 0.430407 0.407852 -0.805237
+vn 0.265042 0.407852 -0.873733
+vn 0.089494 0.407852 -0.908652
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000062
+vn -0.290284 0.000000 0.956940
+vn -0.098017 0.000000 0.995185
+vn -0.634393 0.000000 -0.773010
+vn -0.773010 0.000000 -0.634393
+vn 0.956940 0.000000 -0.290286
+vn 0.881921 0.000000 -0.471398
+vn -0.881922 0.000000 -0.471396
+vn -0.956940 0.000000 -0.290285
+vn 0.098017 0.000000 0.995185
+vn 0.290285 0.000000 0.956940
+vn 0.773010 0.000000 -0.634394
+vn 0.634392 0.000000 -0.773011
+vn -0.995185 0.000000 -0.098017
+vn -0.995185 0.000000 0.098017
+vn 0.471397 0.000000 0.881921
+vn 0.634394 0.000000 0.773010
+vn 0.471395 0.000000 -0.881922
+vn 0.290283 0.000000 -0.956941
+vn 0.098016 0.000000 -0.995185
+vn -0.956940 0.000000 0.290285
+vn -0.881922 0.000000 0.471396
+vn 0.773011 0.000000 0.634393
+vn 0.881922 0.000000 0.471396
+vn -0.773010 0.000000 0.634393
+vn -0.634394 0.000000 0.773010
+vn -0.471397 0.000000 0.881921
+vn -0.098016 0.000000 -0.995185
+vn -0.290284 0.000000 -0.956940
+vn -0.471397 0.000000 -0.881921
+vn 0.956941 0.000000 0.290284
+vn 0.995185 0.000000 0.098016
+vn 0.995185 0.000000 -0.098018
+vn 0.000000 -1.000000 0.000001
+vn 0.000000 -1.000000 0.000018
+vn 0.000000 -1.000000 -0.000013
+vn 0.000000 -1.000000 0.000011
+vn 0.000000 -1.000000 0.000002
+vn 0.000000 -1.000000 -0.000031
+vn 0.000000 -1.000000 0.000031
+vn 0.000000 -1.000000 -0.000021
+vn 0.000000 -1.000000 -0.000016
+vn 0.000000 -1.000000 -0.000005
+vn 0.000000 -1.000000 0.000003
+vn -0.098015 0.000000 0.995185
+vn -0.773011 0.000000 -0.634393
+vn -0.881921 0.000000 -0.471396
+vn 0.773009 0.000000 -0.634394
+vn 0.098017 0.000000 -0.995185
+vn -0.634393 0.000000 0.773011
+vn -0.098018 0.000000 -0.995185
+vn -0.290285 0.000000 -0.956940
+s off
+f 1/1/1 2/2/1 3/3/1
+f 1/1/2 3/2/2 4/3/2
+f 1/1/3 4/2/3 5/3/3
+f 1/1/4 5/2/4 6/3/4
+f 1/1/5 6/2/5 7/3/5
+f 1/1/6 7/2/6 8/3/6
+f 1/1/7 8/2/7 9/3/7
+f 1/1/8 9/2/8 10/3/8
+f 1/1/9 10/2/9 11/3/9
+f 1/1/10 11/2/10 12/3/10
+f 1/1/11 12/2/11 13/3/11
+f 1/1/12 13/2/12 14/3/12
+f 1/1/13 14/2/13 15/3/13
+f 1/1/14 15/2/14 16/3/14
+f 1/1/15 16/2/15 17/3/15
+f 1/1/16 17/2/16 18/3/16
+f 1/1/17 18/2/17 19/3/17
+f 1/1/18 19/2/18 20/3/18
+f 1/1/19 20/2/19 21/3/19
+f 1/1/20 21/2/20 22/3/20
+f 1/1/21 22/2/21 23/3/21
+f 1/1/22 23/2/22 24/3/22
+f 1/1/23 24/2/23 25/3/23
+f 1/1/24 25/2/24 26/3/24
+f 1/1/25 26/2/25 27/3/25
+f 1/1/26 27/2/26 28/3/26
+f 1/1/27 28/2/27 29/3/27
+f 1/1/28 29/2/28 30/3/28
+f 1/1/29 30/2/29 31/3/29
+f 1/1/30 31/2/30 32/3/30
+f 1/1/31 32/2/31 33/3/31
+f 1/1/32 33/2/32 2/3/32
+f 24/1/33 23/2/33 58/4/33
+f 13/1/33 12/2/33 47/4/33
+f 2/1/33 33/2/33 36/4/33
+f 23/1/33 22/2/33 57/4/33
+f 12/1/33 11/2/33 46/4/33
+f 33/1/33 32/2/33 67/4/33
+f 22/1/33 21/2/33 56/4/33
+f 11/1/33 10/2/33 45/4/33
+f 32/1/33 31/2/33 66/4/33
+f 21/1/33 20/2/33 55/4/33
+f 10/1/33 9/2/33 44/4/33
+f 31/1/33 30/2/33 65/4/33
+f 20/1/33 19/2/33 54/4/33
+f 9/1/33 8/2/33 43/4/33
+f 30/1/33 29/2/33 64/4/33
+f 19/1/33 18/2/33 53/4/33
+f 3/1/33 2/2/33 37/4/33
+f 8/1/33 7/2/33 42/4/33
+f 29/1/33 28/2/33 63/4/33
+f 7/1/33 6/2/33 41/4/33
+f 18/1/33 17/2/33 52/4/33
+f 28/1/33 27/2/33 62/4/33
+f 6/1/33 5/2/33 40/4/33
+f 17/1/33 16/2/33 51/4/33
+f 27/1/33 26/2/33 61/4/33
+f 5/1/33 4/2/33 39/4/33
+f 16/1/33 15/2/33 50/4/33
+f 26/1/33 25/2/33 60/4/33
+f 4/1/33 3/2/33 38/4/33
+f 15/1/33 14/2/33 49/4/33
+f 25/1/33 24/2/33 59/4/33
+f 14/1/33 13/2/33 48/4/33
+f 81/5/34 86/6/34 80/7/34
+f 51/1/35 50/2/35 95/4/35
+f 52/1/36 51/2/36 94/4/36
+f 40/1/37 39/2/37 93/4/37
+f 41/1/38 40/2/38 92/4/38
+f 62/1/39 61/2/39 91/4/39
+f 63/1/40 62/2/40 90/4/40
+f 42/1/41 41/2/41 89/4/41
+f 43/1/42 42/2/42 88/4/42
+f 53/1/43 52/2/43 87/4/43
+f 54/1/44 53/2/44 86/4/44
+f 64/1/45 63/2/45 85/4/45
+f 65/1/46 64/2/46 84/4/46
+f 44/1/47 43/2/47 83/4/47
+f 45/1/48 44/2/48 82/4/48
+f 55/1/49 54/2/49 81/4/49
+f 56/1/50 55/2/50 80/4/50
+f 66/1/51 65/2/51 79/4/51
+f 67/1/52 66/2/52 78/4/52
+f 36/1/53 67/2/53 99/4/53
+f 46/1/54 45/2/54 77/4/54
+f 47/1/55 46/2/55 76/4/55
+f 57/1/56 56/2/56 75/4/56
+f 58/1/57 57/2/57 74/4/57
+f 48/1/58 47/2/58 73/4/58
+f 49/1/59 48/2/59 72/4/59
+f 50/1/60 49/2/60 98/4/60
+f 37/1/61 36/2/61 71/4/61
+f 38/1/62 37/2/62 70/4/62
+f 39/1/63 38/2/63 97/4/63
+f 59/1/64 58/2/64 69/4/64
+f 60/1/65 59/2/65 68/4/65
+f 61/1/66 60/2/66 96/4/66
+f 23/2/33 57/3/33 58/4/33
+f 12/2/33 46/3/33 47/4/33
+f 33/2/33 67/3/33 36/4/33
+f 22/2/33 56/3/33 57/4/33
+f 11/2/33 45/3/33 46/4/33
+f 32/2/67 66/3/67 67/4/67
+f 21/2/33 55/3/33 56/4/33
+f 10/2/33 44/3/33 45/4/33
+f 31/2/33 65/3/33 66/4/33
+f 20/2/33 54/3/33 55/4/33
+f 9/2/33 43/3/33 44/4/33
+f 30/2/33 64/3/33 65/4/33
+f 19/2/33 53/3/33 54/4/33
+f 8/2/33 42/3/33 43/4/33
+f 29/2/33 63/3/33 64/4/33
+f 18/2/33 52/3/33 53/4/33
+f 2/2/33 36/3/33 37/4/33
+f 7/2/33 41/3/33 42/4/33
+f 28/2/33 62/3/33 63/4/33
+f 6/2/33 40/3/33 41/4/33
+f 17/2/33 51/3/33 52/4/33
+f 27/2/33 61/3/33 62/4/33
+f 5/2/33 39/3/33 40/4/33
+f 16/2/67 50/3/67 51/4/67
+f 26/2/33 60/3/33 61/4/33
+f 4/2/33 38/3/33 39/4/33
+f 15/2/33 49/3/33 50/4/33
+f 25/2/33 59/3/33 60/4/33
+f 3/2/33 37/3/33 38/4/33
+f 14/2/33 48/3/33 49/4/33
+f 24/2/33 58/3/33 59/4/33
+f 13/2/33 47/3/33 48/4/33
+f 86/6/33 87/8/33 80/7/33
+f 87/8/33 94/9/33 80/7/33
+f 94/9/33 95/10/33 80/7/33
+f 95/10/68 98/11/68 80/7/68
+f 98/11/69 72/12/69 80/7/69
+f 72/12/70 73/13/70 80/7/70
+f 73/13/33 76/14/33 80/7/33
+f 76/14/33 77/15/33 80/7/33
+f 77/15/33 82/16/33 80/7/33
+f 82/16/33 83/17/33 80/7/33
+f 83/17/33 88/18/33 80/7/33
+f 88/18/33 89/19/33 80/7/33
+f 89/19/33 92/20/33 93/21/33
+f 80/7/71 89/19/71 93/21/71
+f 75/22/33 80/7/33 93/21/33
+f 74/23/33 75/22/33 93/21/33
+f 69/24/33 74/23/33 93/21/33
+f 71/25/72 97/26/72 70/27/72
+f 71/25/73 93/21/73 97/26/73
+f 99/28/74 93/21/74 71/25/74
+f 78/29/33 93/21/33 99/28/33
+f 79/30/33 93/21/33 78/29/33
+f 85/31/73 79/30/73 84/32/73
+f 85/31/33 93/21/33 79/30/33
+f 91/33/75 85/31/75 90/34/75
+f 91/33/33 93/21/33 85/31/33
+f 96/35/33 68/36/33 91/33/33
+f 68/36/76 69/24/76 93/21/76
+f 91/33/77 68/36/77 93/21/77
+f 50/2/35 98/3/35 95/4/35
+f 51/2/78 95/3/78 94/4/78
+f 39/2/37 97/3/37 93/4/37
+f 40/2/79 93/3/79 92/4/79
+f 61/2/39 96/3/39 91/4/39
+f 62/2/40 91/3/40 90/4/40
+f 41/2/80 92/3/80 89/4/80
+f 42/2/42 89/3/42 88/4/42
+f 52/2/43 94/3/43 87/4/43
+f 53/2/44 87/3/44 86/4/44
+f 63/2/81 90/3/81 85/4/81
+f 64/2/46 85/3/46 84/4/46
+f 43/2/47 88/3/47 83/4/47
+f 44/2/48 83/3/48 82/4/48
+f 54/2/49 86/3/49 81/4/49
+f 55/2/50 81/3/50 80/4/50
+f 65/2/51 84/3/51 79/4/51
+f 66/2/52 79/3/52 78/4/52
+f 67/2/82 78/3/82 99/4/82
+f 45/2/54 82/3/54 77/4/54
+f 46/2/55 77/3/55 76/4/55
+f 56/2/56 80/3/56 75/4/56
+f 57/2/57 75/3/57 74/4/57
+f 47/2/58 76/3/58 73/4/58
+f 48/2/83 73/3/83 72/4/83
+f 49/2/60 72/3/60 98/4/60
+f 36/2/84 99/3/84 71/4/84
+f 37/2/85 71/3/85 70/4/85
+f 38/2/63 70/3/63 97/4/63
+f 58/2/64 74/3/64 69/4/64
+f 59/2/65 69/3/65 68/4/65
+f 60/2/66 68/3/66 96/4/66
diff --git a/examples/datavisualization/rotations/rotations.pro b/examples/datavisualization/rotations/rotations.pro
new file mode 100644
index 00000000..fbad4271
--- /dev/null
+++ b/examples/datavisualization/rotations/rotations.pro
@@ -0,0 +1,13 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+SOURCES += main.cpp scatterdatamodifier.cpp
+HEADERS += scatterdatamodifier.h
+
+QT += widgets
+
+RESOURCES += rotations.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/*
diff --git a/examples/datavisualization/rotations/rotations.qrc b/examples/datavisualization/rotations/rotations.qrc
new file mode 100644
index 00000000..bf66ebeb
--- /dev/null
+++ b/examples/datavisualization/rotations/rotations.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>mesh/narrowarrow.obj</file>
+ <file>mesh/largesphere.obj</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/rotations/scatterdatamodifier.cpp b/examples/datavisualization/rotations/scatterdatamodifier.cpp
new file mode 100644
index 00000000..90af63ab
--- /dev/null
+++ b/examples/datavisualization/rotations/scatterdatamodifier.cpp
@@ -0,0 +1,183 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+#include "scatterdatamodifier.h"
+#include <QtDataVisualization/qscatterdataproxy.h>
+#include <QtDataVisualization/qvalue3daxis.h>
+#include <QtDataVisualization/q3dscene.h>
+#include <QtDataVisualization/q3dcamera.h>
+#include <QtDataVisualization/qscatter3dseries.h>
+#include <QtDataVisualization/q3dtheme.h>
+#include <QtCore/qmath.h>
+
+using namespace QtDataVisualization;
+
+static const float verticalRange = 8.0f;
+static const float horizontalRange = verticalRange;
+static const float ellipse_a = horizontalRange / 3.0f;
+static const float ellipse_b = verticalRange;
+static const float doublePi = float(M_PI) * 2.0f;
+static const float radiansToDegrees = 360.0f / doublePi;
+static const float animationFrames = 30.0f;
+
+ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter)
+ : m_graph(scatter),
+ m_fieldLines(12),
+ m_arrowsPerLine(16),
+ m_magneticField(new QScatter3DSeries),
+ m_sun(new QScatter3DSeries),
+ m_magneticFieldArray(0),
+ m_angleOffset(0.0f),
+ m_angleStep(doublePi / m_arrowsPerLine / animationFrames)
+{
+ m_graph->setShadowQuality(QAbstract3DGraph::ShadowQualityNone);
+ m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
+
+ // Magnetic field lines use custom narrow arrow
+ m_magneticField->setItemSize(0.2f);
+ //! [3]
+ m_magneticField->setMesh(QAbstract3DSeries::MeshUserDefined);
+ m_magneticField->setUserDefinedMesh(QStringLiteral(":/mesh/narrowarrow.obj"));
+ //! [3]
+ //! [4]
+ QLinearGradient fieldGradient(0, 0, 16, 1024);
+ fieldGradient.setColorAt(0.0, Qt::black);
+ fieldGradient.setColorAt(1.0, Qt::white);
+ m_magneticField->setBaseGradient(fieldGradient);
+ m_magneticField->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
+ //! [4]
+
+ // For 'sun' we use a custom large sphere.
+ m_sun->setItemSize(0.2f);
+ m_sun->setName(QStringLiteral("Sun"));
+ m_sun->setItemLabelFormat(QStringLiteral("@seriesName"));
+ m_sun->setMesh(QAbstract3DSeries::MeshUserDefined);
+ m_sun->setUserDefinedMesh(QStringLiteral(":/mesh/largesphere.obj"));
+ m_sun->setBaseColor(QColor(0xff, 0xBB, 0x00));
+ m_sun->dataProxy()->addItem(QScatterDataItem(QVector3D()));
+
+ m_graph->addSeries(m_magneticField);
+ m_graph->addSeries(m_sun);
+
+ // Configure the axes according to the data
+ m_graph->axisX()->setRange(-horizontalRange, horizontalRange);
+ m_graph->axisY()->setRange(-verticalRange, verticalRange);
+ m_graph->axisZ()->setRange(-horizontalRange, horizontalRange);
+ m_graph->axisX()->setSegmentCount(int(horizontalRange));
+ m_graph->axisZ()->setSegmentCount(int(horizontalRange));
+
+ QObject::connect(&m_rotationTimer, &QTimer::timeout, this,
+ &ScatterDataModifier::triggerRotation);
+
+ toggleRotation();
+ generateData();
+}
+
+ScatterDataModifier::~ScatterDataModifier()
+{
+ delete m_graph;
+}
+
+void ScatterDataModifier::generateData()
+{
+ // Reusing existing array is computationally cheaper than always generating new array, even if
+ // all data items change in the array, if the array size doesn't change.
+ if (!m_magneticFieldArray)
+ m_magneticFieldArray = new QScatterDataArray;
+
+ int arraySize = m_fieldLines * m_arrowsPerLine;
+ if (arraySize != m_magneticFieldArray->size())
+ m_magneticFieldArray->resize(arraySize);
+
+ QScatterDataItem *ptrToDataArray = &m_magneticFieldArray->first();
+
+ for (float i = 0; i < m_fieldLines; i++) {
+ float horizontalAngle = (doublePi * i) / m_fieldLines;
+ float xCenter = ellipse_a * qCos(horizontalAngle);
+ float zCenter = ellipse_a * qSin(horizontalAngle);
+
+ // Rotate - arrow always tangential to origo
+ //! [0]
+ QQuaternion yRotation = QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, horizontalAngle * radiansToDegrees);
+ //! [0]
+
+ for (float j = 0; j < m_arrowsPerLine; j++) {
+ // Calculate point on ellipse centered on origo and parallel to x-axis
+ float verticalAngle = ((doublePi * j) / m_arrowsPerLine) + m_angleOffset;
+ float xUnrotated = ellipse_a * qCos(verticalAngle);
+ float y = ellipse_b * qSin(verticalAngle);
+
+ // Rotate the ellipse around y-axis
+ float xRotated = xUnrotated * qCos(horizontalAngle);
+ float zRotated = xUnrotated * qSin(horizontalAngle);
+
+ // Add offset
+ float x = xCenter + xRotated;
+ float z = zCenter + zRotated;
+
+ //! [1]
+ QQuaternion zRotation = QQuaternion::fromAxisAndAngle(0.0f, 0.0f, 1.0f, verticalAngle * radiansToDegrees);
+ QQuaternion totalRotation = yRotation * zRotation;
+ //! [1]
+
+ ptrToDataArray->setPosition(QVector3D(x, y, z));
+ //! [2]
+ ptrToDataArray->setRotation(totalRotation);
+ //! [2]
+ ptrToDataArray++;
+ }
+ }
+
+ if (m_graph->selectedSeries() == m_magneticField)
+ m_graph->clearSelection();
+
+ m_magneticField->dataProxy()->resetArray(m_magneticFieldArray);
+}
+
+void ScatterDataModifier::setFieldLines(int lines)
+{
+ m_fieldLines = lines;
+ generateData();
+}
+
+void ScatterDataModifier::setArrowsPerLine(int arrows)
+{
+ m_angleOffset = 0.0f;
+ m_angleStep = doublePi / m_arrowsPerLine / animationFrames;
+ m_arrowsPerLine = arrows;
+ generateData();
+}
+
+void ScatterDataModifier::triggerRotation()
+{
+ m_angleOffset += m_angleStep;
+ generateData();
+}
+
+void ScatterDataModifier::toggleSun()
+{
+ m_sun->setVisible(!m_graph->seriesList().at(1)->isVisible());
+}
+
+void ScatterDataModifier::toggleRotation()
+{
+ if (m_rotationTimer.isActive())
+ m_rotationTimer.stop();
+ else
+ m_rotationTimer.start(15);
+}
diff --git a/examples/datavisualization/rotations/scatterdatamodifier.h b/examples/datavisualization/rotations/scatterdatamodifier.h
new file mode 100644
index 00000000..9df1f26a
--- /dev/null
+++ b/examples/datavisualization/rotations/scatterdatamodifier.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+#ifndef SCATTERDATAMODIFIER_H
+#define SCATTERDATAMODIFIER_H
+
+#include <QtDataVisualization/q3dscatter.h>
+#include <QtDataVisualization/qscatterdataproxy.h>
+#include <QtCore/QTimer>
+
+using namespace QtDataVisualization;
+
+class ScatterDataModifier : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ScatterDataModifier(Q3DScatter *scatter);
+ ~ScatterDataModifier();
+
+ void generateData();
+
+public slots:
+ void setFieldLines(int lines);
+ void setArrowsPerLine(int arrows);
+ void toggleRotation();
+ void triggerRotation();
+ void toggleSun();
+
+private:
+ Q3DScatter *m_graph;
+ QTimer m_rotationTimer;
+ int m_fieldLines;
+ int m_arrowsPerLine;
+ QScatter3DSeries *m_magneticField;
+ QScatter3DSeries *m_sun;
+ QScatterDataArray *m_magneticFieldArray;
+ float m_angleOffset;
+ float m_angleStep;
+};
+
+#endif
diff --git a/examples/datavisualization/scatter/doc/images/scatter-example.png b/examples/datavisualization/scatter/doc/images/scatter-example.png
new file mode 100644
index 00000000..82c13855
--- /dev/null
+++ b/examples/datavisualization/scatter/doc/images/scatter-example.png
Binary files differ
diff --git a/examples/scatter/doc/src/scatter.qdoc b/examples/datavisualization/scatter/doc/src/scatter.qdoc
index 31cfeb09..3c9d72bc 100644
--- a/examples/scatter/doc/src/scatter.qdoc
+++ b/examples/datavisualization/scatter/doc/src/scatter.qdoc
@@ -41,7 +41,7 @@
First, in main.cpp, we create a QApplication, instantiate Q3DScatter, and a window container
for it:
- \snippet ../examples/scatter/main.cpp 0
+ \snippet scatter/main.cpp 0
The call to QWidget::createWindowContainer is required, as all data visualization types
(Q3DBars, Q3DScatter, and Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
@@ -50,7 +50,7 @@
Then we'll create horizontal and vertical layouts. We'll add the graph and the vertical
layout into the horizontal one:
- \snippet ../examples/scatter/main.cpp 1
+ \snippet scatter/main.cpp 1
We're not using the vertical layout for anything yet, but we'll get back to it in
\l {Using widgets to control the graph}
@@ -59,30 +59,26 @@
graph. Let's call it \c ScatterDataModifier (See \l {Setting up the graph} and
\l {Adding data to the graph} for details):
- \snippet ../examples/scatter/main.cpp 2
+ \snippet scatter/main.cpp 2
The application main is done. We can show the graph and start the event loop:
- \snippet ../examples/scatter/main.cpp 3
+ \snippet scatter/main.cpp 3
\section1 Setting up the graph
Let's set up some visual qualities for the graph in the constructor of the \c ScatterDataModifier
class we instantiated in the application main:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 0
+ \snippet scatter/scatterdatamodifier.cpp 0
None of these are required, but are used to override graph defaults. You can try how it looks
with the preset defaults by commenting the block above out.
- Then we'll set axes for the graph:
-
- \snippet ../examples/scatter/scatterdatamodifier.cpp 1
-
- And finally we create a QScatterDataProxy and the associated QScatter3DSeries. We set custom label format
+ Finally we create a QScatterDataProxy and the associated QScatter3DSeries. We set custom label format
and mesh smoothing for the series and add it to the graph:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 2
+ \snippet scatter/scatterdatamodifier.cpp 2
That concludes setting up the graph.
@@ -90,27 +86,26 @@
The last thing we do in the \c ScatterDataModifier constructor is to add data to the graph:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 3
+ \snippet scatter/scatterdatamodifier.cpp 3
- The actual data addition is done in \c addData() method. First we configure the axes we created
- in constructor:
+ The actual data addition is done in \c addData() method. First we configure the axes:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 4
+ \snippet scatter/scatterdatamodifier.cpp 4
This could have been done in the constructor of \c {ScatterDataModifier}, but we added it here
to keep the constructor simpler and the axes configuration near the data.
Next we create a data array:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 5
+ \snippet scatter/scatterdatamodifier.cpp 5
and populate it:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 6
+ \snippet scatter/scatterdatamodifier.cpp 6
Finally we tell the proxy to start using the data we gave it:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 7
+ \snippet scatter/scatterdatamodifier.cpp 7
Now our graph has the data and is ready to be used. There isn't much interaction yet, though,
so let's continue by adding some widgets to play with.
@@ -119,19 +114,19 @@
First, back in the application main, we'll create some widgets:
- \snippet ../examples/scatter/main.cpp 4
+ \snippet scatter/main.cpp 4
And add them to the vertical layout we created earlier:
- \snippet ../examples/scatter/main.cpp 5
+ \snippet scatter/main.cpp 5
Now, let's connect them to methods in ScatterDataModifier:
- \snippet ../examples/scatter/main.cpp 6
+ \snippet scatter/main.cpp 6
Here are the methods in ScatterDataModifier the signals were connected to:
- \snippet ../examples/scatter/scatterdatamodifier.cpp 8
+ \snippet scatter/scatterdatamodifier.cpp 8
And so we have an application in which we can control:
diff --git a/examples/scatter/main.cpp b/examples/datavisualization/scatter/main.cpp
index dc71667f..21530b82 100644
--- a/examples/scatter/main.cpp
+++ b/examples/datavisualization/scatter/main.cpp
@@ -18,17 +18,17 @@
#include "scatterdatamodifier.h"
-#include <QApplication>
-#include <QWidget>
-#include <QHBoxLayout>
-#include <QVBoxLayout>
-#include <QPushButton>
-#include <QCheckBox>
-#include <QComboBox>
-#include <QFontComboBox>
-#include <QLabel>
-#include <QScreen>
-#include <QFontDatabase>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QPushButton>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QComboBox>
+#include <QtWidgets/QFontComboBox>
+#include <QtWidgets/QLabel>
+#include <QtGui/QScreen>
+#include <QtGui/QFontDatabase>
int main(int argc, char **argv)
{
@@ -83,6 +83,9 @@ int main(int argc, char **argv)
QPushButton *cameraButton = new QPushButton(widget);
cameraButton->setText(QStringLiteral("Change camera preset"));
+ QPushButton *itemCountButton = new QPushButton(widget);
+ itemCountButton->setText(QStringLiteral("Toggle item count"));
+
QCheckBox *backgroundCheckBox = new QCheckBox(widget);
backgroundCheckBox->setText(QStringLiteral("Show background"));
backgroundCheckBox->setChecked(true);
@@ -108,6 +111,7 @@ int main(int argc, char **argv)
//! [5]
vLayout->addWidget(labelButton, 0, Qt::AlignTop);
vLayout->addWidget(cameraButton, 0, Qt::AlignTop);
+ vLayout->addWidget(itemCountButton, 0, Qt::AlignTop);
vLayout->addWidget(backgroundCheckBox);
vLayout->addWidget(gridCheckBox);
vLayout->addWidget(smoothCheckBox, 0, Qt::AlignTop);
@@ -130,6 +134,8 @@ int main(int argc, char **argv)
&ScatterDataModifier::changePresetCamera);
QObject::connect(labelButton, &QPushButton::clicked, modifier,
&ScatterDataModifier::changeLabelStyle);
+ QObject::connect(itemCountButton, &QPushButton::clicked, modifier,
+ &ScatterDataModifier::toggleItemCount);
QObject::connect(backgroundCheckBox, &QCheckBox::stateChanged, modifier,
&ScatterDataModifier::setBackgroundEnabled);
diff --git a/examples/scatter/scatter.pro b/examples/datavisualization/scatter/scatter.pro
index beff2164..7f676caa 100644
--- a/examples/scatter/scatter.pro
+++ b/examples/datavisualization/scatter/scatter.pro
@@ -7,7 +7,5 @@ HEADERS += scatterdatamodifier.h
QT += widgets
-INSTALLS += target
-
OTHER_FILES += doc/src/* \
doc/images/*
diff --git a/examples/scatter/scatterdatamodifier.cpp b/examples/datavisualization/scatter/scatterdatamodifier.cpp
index db2426ce..b38c043e 100644
--- a/examples/scatter/scatterdatamodifier.cpp
+++ b/examples/datavisualization/scatter/scatterdatamodifier.cpp
@@ -23,20 +23,25 @@
#include <QtDataVisualization/q3dcamera.h>
#include <QtDataVisualization/qscatter3dseries.h>
#include <QtDataVisualization/q3dtheme.h>
-#include <qmath.h>
-#include <QComboBox>
+#include <QtCore/qmath.h>
+#include <QtWidgets/QComboBox>
using namespace QtDataVisualization;
//#define RANDOM_SCATTER // Uncomment this to switch to random scatter
const int numberOfItems = 3600;
+const float curveDivider = 3.0f;
+const int lowerNumberOfItems = 900;
+const float lowerCurveDivider = 0.75f;
ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter)
: m_graph(scatter),
m_fontSize(40.0f),
m_style(QAbstract3DSeries::MeshSphere),
- m_smooth(true)
+ m_smooth(true),
+ m_itemCount(lowerNumberOfItems),
+ m_curveDivider(lowerCurveDivider)
{
//! [0]
m_graph->activeTheme()->setType(Q3DTheme::ThemeEbony);
@@ -47,12 +52,6 @@ ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter)
m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
//! [0]
- //! [1]
- m_graph->setAxisX(new QValue3DAxis);
- m_graph->setAxisY(new QValue3DAxis);
- m_graph->setAxisZ(new QValue3DAxis);
- //! [1]
-
//! [2]
QScatterDataProxy *proxy = new QScatterDataProxy;
QScatter3DSeries *series = new QScatter3DSeries(proxy);
@@ -78,28 +77,27 @@ void ScatterDataModifier::addData()
m_graph->axisX()->setTitle("X");
m_graph->axisY()->setTitle("Y");
m_graph->axisZ()->setTitle("Z");
- m_graph->axisX()->setRange(-30.0f, 30.0f);
- m_graph->axisY()->setRange(-1.0f, 1.0f);
- m_graph->axisZ()->setRange(-30.0f, 30.0f);
//! [4]
//! [5]
QScatterDataArray *dataArray = new QScatterDataArray;
- dataArray->resize(numberOfItems);
+ dataArray->resize(m_itemCount);
QScatterDataItem *ptrToDataArray = &dataArray->first();
//! [5]
#ifdef RANDOM_SCATTER
- for (int i = 0; i < numberOfItems; i++) {
+ for (int i = 0; i < m_itemCount; i++) {
ptrToDataArray->setPosition(randVector());
ptrToDataArray++;
}
#else
//! [6]
- float limit = qSqrt(numberOfItems) / 2.0f;
+ float limit = qSqrt(m_itemCount) / 2.0f;
for (float i = -limit; i < limit; i++) {
for (float j = -limit; j < limit; j++) {
- ptrToDataArray->setPosition(QVector3D(i, qCos(qDegreesToRadians((i * j) / 3.0f)), j));
+ ptrToDataArray->setPosition(QVector3D(i + 0.5f,
+ qCos(qDegreesToRadians((i * j) / m_curveDivider)),
+ j + 0.5f));
ptrToDataArray++;
}
}
@@ -183,6 +181,19 @@ void ScatterDataModifier::setGridEnabled(int enabled)
}
//! [8]
+void ScatterDataModifier::toggleItemCount()
+{
+ if (m_itemCount == numberOfItems) {
+ m_itemCount = lowerNumberOfItems;
+ m_curveDivider = lowerCurveDivider;
+ } else {
+ m_itemCount = numberOfItems;
+ m_curveDivider = curveDivider;
+ }
+ m_graph->seriesList().at(0)->dataProxy()->resetArray(0);
+ addData();
+}
+
QVector3D ScatterDataModifier::randVector()
{
return QVector3D(
diff --git a/examples/scatter/scatterdatamodifier.h b/examples/datavisualization/scatter/scatterdatamodifier.h
index e22f24c7..7cfe7ff8 100644
--- a/examples/scatter/scatterdatamodifier.h
+++ b/examples/datavisualization/scatter/scatterdatamodifier.h
@@ -41,6 +41,7 @@ public:
void setBackgroundEnabled(int enabled);
void setGridEnabled(int enabled);
void setSmoothDots(int smooth);
+ void toggleItemCount();
void start();
public slots:
@@ -61,6 +62,8 @@ private:
int m_fontSize;
QAbstract3DSeries::Mesh m_style;
bool m_smooth;
+ int m_itemCount;
+ float m_curveDivider;
};
#endif
diff --git a/examples/surface/doc/images/surface-example.png b/examples/datavisualization/surface/doc/images/surface-example.png
index c323df78..c323df78 100644
--- a/examples/surface/doc/images/surface-example.png
+++ b/examples/datavisualization/surface/doc/images/surface-example.png
Binary files differ
diff --git a/examples/surface/doc/src/surface.qdoc b/examples/datavisualization/surface/doc/src/surface.qdoc
index 4b0ec63d..14a04668 100644
--- a/examples/surface/doc/src/surface.qdoc
+++ b/examples/datavisualization/surface/doc/src/surface.qdoc
@@ -44,7 +44,7 @@
First, in \c main.cpp, we create a QApplication, instantiate Q3DSurface, and a window container
for it:
- \snippet ../examples/surface/main.cpp 0
+ \snippet surface/main.cpp 0
The call to QWidget::createWindowContainer is required, as all data visualization types
(Q3DBars, Q3DScatter, and Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
@@ -53,7 +53,7 @@
Then we'll create horizontal and vertical layouts. We'll add the graph with the container and
the vertical layout into the horizontal one:
- \snippet ../examples/surface/main.cpp 1
+ \snippet surface/main.cpp 1
The rest of the code in \c main.cpp is creating control widgets for features in Q3DSurface. We
have separated code for changing these features into \c surfacegraph.cpp and only connect
@@ -64,13 +64,13 @@
First we instantiate a new QSurfaceDataProxy and attach it to a new QSurface3DSeries:
- \snippet ../examples/surface/surfacegraph.cpp 0
+ \snippet surface/surfacegraph.cpp 0
- Then we fill the proxy with a simple square root and sin wave data. This is done by
+ Then we fill the proxy with a simple square root and sine wave data. This is done by
creating a new \c QSurfaceDataArray instance and adding \c QSurfaceDataRow elements to it.
- The created \c QSurfaceDataArray is set to be a the data array for the QSurfaceDataProxy.
+ The created \c QSurfaceDataArray is set to be the data array for the QSurfaceDataProxy.
- \snippet ../examples/surface/surfacegraph.cpp 1
+ \snippet surface/surfacegraph.cpp 1
The height map is created by instantiating a QHeightMapSurfaceDataProxy with
a QImage containing the height data. The method QHeightMapSurfaceDataProxy::setValueRanges() is
@@ -78,27 +78,23 @@
34.0\unicode 0x00B0 N - 40.0\unicode 0x00B0 N and 18.0\unicode 0x00B0 E - 24.0\unicode 0x00B0 E.
These values are used to show and position the map to the axis.
- \snippet ../examples/surface/surfacegraph.cpp 2
+ \snippet surface/surfacegraph.cpp 2
For demonstrating different proxies this example has two radio buttons which
the user can use to switch between the series. When the user selects the
\c {Sqrt & Sin} radio button, the selected series is activated with the following
code. First we set the decorative issues like enable the grid for the surface and
select the flat shading mode. Next lines define the axis label format and value
- ranges. The Y-value value of the function we use to generate the points varies between
- 0.0 and 2.0, but no individual point actually hits exactly those, so we set the Y-axis range
- explicitly. The other axes we are happy to leave to automatically adjust their range to the
- data, which is the default behavior. Finally we make sure the correct series is added to the
- graph. We need to first remove the other series, since surface graphs only support a single
- series at a time:
+ ranges. Finally we make sure the correct series is added to the
+ graph:
- \snippet ../examples/surface/surfacegraph.cpp 3
+ \snippet surface/surfacegraph.cpp 3
When the \c{Height Map} radio button is activated, the following code sets the correct series active.
The axis label format is set to show N and E letters and ranges are set to the imaginary coordinates.
Auto adjusting Y-axis range is fine for our height map surface, so we ensure it is set.
- \snippet ../examples/surface/surfacegraph.cpp 4
+ \snippet surface/surfacegraph.cpp 4
\section1 Selection modes
@@ -106,7 +102,7 @@
example with radio buttons, which the user can use to activate a suitable selection mode.
The following inline methods are connected to radio buttons to activate the selected mode.
- \snippet ../examples/surface/surfacegraph.h 0
+ \snippet surface/surfacegraph.h 0
\section1 Axis ranges for studying the graph
@@ -114,11 +110,11 @@
axis. When selecting the proxy these sliders are adjusted so that one step on the slider
moves the range by one segment step:
- \snippet ../examples/surface/surfacegraph.cpp 8
+ \snippet surface/surfacegraph.cpp 8
The ranges are set for the axes like this:
- \snippet ../examples/surface/surfacegraph.cpp 5
+ \snippet surface/surfacegraph.cpp 5
\section1 Themes
@@ -127,7 +123,7 @@
menu to activate the selected theme. The theme type is changed to another predefined theme,
which overwrites all theme properties to predefined values:
- \snippet ../examples/surface/surfacegraph.cpp 6
+ \snippet surface/surfacegraph.cpp 6
\section1 Custom surface gradients
@@ -136,5 +132,5 @@
code shows how to create an example gradient and set it to the series. Note that you also need
to change the color style to Q3DTheme::ColorStyleRangeGradient to actually use the gradient.
- \snippet ../examples/surface/surfacegraph.cpp 7
+ \snippet surface/surfacegraph.cpp 7
*/
diff --git a/examples/surface/main.cpp b/examples/datavisualization/surface/main.cpp
index 4e82eca8..4db614e6 100644
--- a/examples/surface/main.cpp
+++ b/examples/datavisualization/surface/main.cpp
@@ -29,6 +29,7 @@
#include <QtWidgets/QComboBox>
#include <QtWidgets/QLabel>
#include <QtGui/QPainter>
+#include <QtGui/QScreen>
int main(int argc, char **argv)
{
diff --git a/examples/datavisualization/surface/mountain.png b/examples/datavisualization/surface/mountain.png
new file mode 100644
index 00000000..9138c710
--- /dev/null
+++ b/examples/datavisualization/surface/mountain.png
Binary files differ
diff --git a/examples/surface/surface.pro b/examples/datavisualization/surface/surface.pro
index 20c8a1a8..2858f875 100644
--- a/examples/surface/surface.pro
+++ b/examples/datavisualization/surface/surface.pro
@@ -9,8 +9,6 @@ HEADERS += surfacegraph.h
QT += widgets
-INSTALLS += target
-
RESOURCES += surface.qrc
OTHER_FILES += doc/src/* \
diff --git a/examples/surface/surface.qrc b/examples/datavisualization/surface/surface.qrc
index e4a7c38b..e4a7c38b 100644
--- a/examples/surface/surface.qrc
+++ b/examples/datavisualization/surface/surface.qrc
diff --git a/examples/surface/surfacegraph.cpp b/examples/datavisualization/surface/surfacegraph.cpp
index 5dd64c1f..d7524fbc 100644
--- a/examples/surface/surfacegraph.cpp
+++ b/examples/datavisualization/surface/surfacegraph.cpp
@@ -136,6 +136,10 @@ void SurfaceGraph::enableHeightMapModel(bool enable)
m_graph->axisY()->setAutoAdjustRange(true);
m_graph->axisZ()->setRange(18.0f, 24.0f);
+ m_graph->axisX()->setTitle(QStringLiteral("Latitude"));
+ m_graph->axisY()->setTitle(QStringLiteral("Height"));
+ m_graph->axisZ()->setTitle(QStringLiteral("Longitude"));
+
m_graph->removeSeries(m_sqrtSinSeries);
m_graph->addSeries(m_heightMapSeries);
//! [4]
diff --git a/examples/surface/surfacegraph.h b/examples/datavisualization/surface/surfacegraph.h
index 8047be11..8047be11 100644
--- a/examples/surface/surfacegraph.h
+++ b/examples/datavisualization/surface/surfacegraph.h
diff --git a/examples/examples.pri b/examples/examples.pri
deleted file mode 100644
index 046d6cd1..00000000
--- a/examples/examples.pri
+++ /dev/null
@@ -1,111 +0,0 @@
-android {
- target.path = /libs/$$ANDROID_TARGET_ARCH
-} else {
- target.path = $$[QT_INSTALL_EXAMPLES]/datavisualization/$$TARGET
-}
-
-win32 {
- CONFIG(debug, release|debug):DESTDIR = $$OUT_PWD/debug
- CONFIG(release, release|debug):DESTDIR = $$OUT_PWD/release
-} else {
- DESTDIR = $$OUT_PWD
-}
-
-INCLUDEPATH += ../../include
-
-LIBS += -L$$OUT_PWD/../../lib
-
-TEMPLATE = app
-
-QT += datavisualization
-
-!static:android {
- # Add Qt library to be loaded in shared android build
- vis_lib_name = DataVisualization
- vis_src_lib = lib$${vis_lib_name}.so
- vis_lib_dir = $$OUT_PWD/../../lib/$$vis_src_lib
- ANDROID_EXTRA_LIBS = $$vis_lib_dir
-}
-
-contains(TARGET, qml.*) {
- uri = QtDataVisualization
- lib_name = datavisualizationqml2
-
- uri_replaced = $$replace(uri, \\., $$QMAKE_DIR_SEP)
- make_qmldir_path = $$DESTDIR/$$uri_replaced
- !exists($$make_qmldir_path) {
- make_qmldir_target = \"$$replace(make_qmldir_path, /, $$QMAKE_DIR_SEP)\"
- system($$QMAKE_MKDIR $$make_qmldir_target)
- }
- copy_qmldir.target = $$make_qmldir_path/qmldir
- copy_qmldir.depends = $$_PRO_FILE_PWD_/../../src/$$lib_name/qmldir
- copy_qmldir_formatted = \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
- copy_qmldir.commands = $(COPY_FILE) $$copy_qmldir_formatted
- QMAKE_EXTRA_TARGETS += copy_qmldir
- PRE_TARGETDEPS += $$copy_qmldir.target
-
- static:contains(QT_CONFIG, static) {
- # Make import scan find our copied qmldir & statically built qml lib
- !win32 {
- LIB_EXTENSION = a
- } else {
- LIB_EXTENSION = lib
- }
- QMLPATHS += $$DESTDIR
- # We need to copy the qmldir & lib already at qmake run stage as import scan is done then
- exists($$copy_qmldir.depends): system($$QMAKE_COPY $$copy_qmldir_formatted)
- } else {
- win32 {
- LIB_EXTENSION = dll
- } else {
- mac|ios {
- LIB_EXTENSION = dylib
- } else {
- LIB_EXTENSION = so
- }
- }
- }
-
- win32 {
- CONFIG(debug, release|debug) {
- src_dir = /debug
- src_lib = $${lib_name}d.$$LIB_EXTENSION
- }
- CONFIG(release, release|debug){
- src_dir = /release
- src_lib = $${lib_name}.$$LIB_EXTENSION
- }
- } else {
- src_dir =
- mac|ios {
- CONFIG(debug, release|debug) {
- src_lib = lib$${lib_name}_debug.$$LIB_EXTENSION
- }
- CONFIG(release, release|debug){
- src_lib = lib$${lib_name}.$$LIB_EXTENSION
- }
- } else {
- # linux, android
- src_lib = lib$${lib_name}.$$LIB_EXTENSION
- }
- }
- copy_lib.target = $$make_qmldir_path/$$src_lib
- copy_lib.depends = $$OUT_PWD/../../src/$$lib_name$$src_dir/$$src_lib
- copy_lib_formatted = \"$$replace(copy_lib.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_lib.target, /, $$QMAKE_DIR_SEP)\"
- copy_lib.commands = $(COPY_FILE) $$copy_lib_formatted
- QMAKE_EXTRA_TARGETS += copy_lib
- PRE_TARGETDEPS += $$copy_lib.target
-
- android {
- system($$QMAKE_COPY $$copy_qmldir_formatted)
- android_qmldir.files = $$copy_qmldir.target
- android_qmldir.path = /assets/qml/$$uri_replaced
- INSTALLS += android_qmldir
- }
- android|ios {
- system($$QMAKE_COPY $$copy_lib_formatted)
- android_qmlplugin.files = $$copy_lib.target
- android_qmlplugin.path = $$target.path
- INSTALLS += android_qmlplugin
- }
-}
diff --git a/examples/examples.pro b/examples/examples.pro
index 4dd3edef..6d79e543 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -1,18 +1,2 @@
TEMPLATE = subdirs
-SUBDIRS += qmlbars \
- qmlscatter \
- qmlsurface \
- qmlcustominput \
- qmllegend \
- qmlmultigraph
-
-!android:!ios {
- SUBDIRS += bars \
- custominput \
- customproxy \
- itemmodel \
- scatter \
- surface
-}
-
-qtHaveModule(multimedia):!android: SUBDIRS += audiolevels
+SUBDIRS += datavisualization
diff --git a/examples/qmlbars/qmlbars.desktop b/examples/qmlbars/qmlbars.desktop
deleted file mode 100644
index cf59c6b8..00000000
--- a/examples/qmlbars/qmlbars.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=qmlbars
-Exec=/opt/qmlbars/bin/qmlbars
-Icon=qmlbars64
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/qmlbars/qmlbars.pro b/examples/qmlbars/qmlbars.pro
deleted file mode 100644
index 758e7b76..00000000
--- a/examples/qmlbars/qmlbars.pro
+++ /dev/null
@@ -1,25 +0,0 @@
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-QT += widgets
-
-# Add more folders to ship with the application, here
-folder_01.source = qml/qmlbars
-folder_01.target = qml
-DEPLOYMENTFOLDERS = folder_01
-
-# Additional import path used to resolve QML modules in Creator's code model
-QML_IMPORT_PATH =
-
-# The .cpp file which was generated for your project. Feel free to hack it.
-SOURCES += main.cpp
-
-# Please do not modify the following two lines. Required for deployment.
-include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
-qtcAddDeployment()
-
-RESOURCES += qmlbars.qrc
-
-OTHER_FILES += doc/src/* \
- doc/images/*
diff --git a/examples/qmlbars/qmlbars.qrc b/examples/qmlbars/qmlbars.qrc
deleted file mode 100644
index 7c291fd3..00000000
--- a/examples/qmlbars/qmlbars.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/qml">
- <file alias="Axes.qml">qml/qmlbars/axes.qml</file>
- <file alias="Data.qml">qml/qmlbars/data.qml</file>
- <file alias="main.qml">qml/qmlbars/main.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/qmlbars/qmlbars64.png b/examples/qmlbars/qmlbars64.png
deleted file mode 100644
index 707d5c4e..00000000
--- a/examples/qmlbars/qmlbars64.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.cpp
deleted file mode 100644
index 10709d7a..00000000
--- a/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// checksum 0x4f6f version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qtquick2applicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtQml/QQmlEngine>
-
-class QtQuick2ApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QtQuick2ApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#if defined(Q_OS_MAC)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("%1/../Resources/%2")
- .arg(QCoreApplication::applicationDirPath(), path);
-#elif defined(Q_OS_BLACKBERRY)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("app/native/%1").arg(path);
-#elif !defined(Q_OS_ANDROID)
- QString pathInInstallDir =
- QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
- pathInInstallDir =
- QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
-#endif
- return path;
-}
-
-QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
- : QQuickView(parent)
- , d(new QtQuick2ApplicationViewerPrivate())
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
-{
- delete d;
-}
-
-void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
-{
- d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
-#ifdef Q_OS_ANDROID
- setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
-#else
- setSource(QUrl::fromLocalFile(d->mainQmlFile));
-#endif
-}
-
-void QtQuick2ApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
-}
-
-void QtQuick2ApplicationViewer::showExpanded()
-{
-#if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
- showFullScreen();
-#else
- show();
-#endif
-}
diff --git a/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.h b/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.h
deleted file mode 100644
index cf66f140..00000000
--- a/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// checksum 0xfde6 version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QTQUICK2APPLICATIONVIEWER_H
-#define QTQUICK2APPLICATIONVIEWER_H
-
-#include <QtQuick/QQuickView>
-
-class QtQuick2ApplicationViewer : public QQuickView
-{
- Q_OBJECT
-
-public:
- explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
- virtual ~QtQuick2ApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
-
- void showExpanded();
-
-private:
- class QtQuick2ApplicationViewerPrivate *d;
-};
-
-#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.pri b/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.pri
deleted file mode 100644
index e5f7990f..00000000
--- a/examples/qmlbars/qtquick2applicationviewer/qtquick2applicationviewer.pri
+++ /dev/null
@@ -1,180 +0,0 @@
-# checksum 0x7b0d version 0x90005
-# This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
-# The code below adds the QtQuick2ApplicationViewer to the project and handles
-# the activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += qml quick
-
-SOURCES += $$PWD/qtquick2applicationviewer.cpp
-HEADERS += $$PWD/qtquick2applicationviewer.h
-INCLUDEPATH += $$PWD
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Android and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- greaterThan(QT_MAJOR_VERSION, 4) {
- itemsources = $${item}.files
- } else {
- itemsources = $${item}.sources
- }
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-android-no-sdk {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- target.path = /data/user/qt
-
- export(target.path)
- INSTALLS += target
-} else:android {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /assets/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
-
- export(target.path)
- INSTALLS += target
-} else:win32 {
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, /, \\)
- sourcePathSegments = $$split(source, \\)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
- target = $$replace(target, /, \\)
- target ~= s,\\\\\\.?\\\\,\\,
- !isEqual(source,$$target) {
- !isEmpty(copyCommand):copyCommand += &&
- isEqual(QMAKE_DIR_SEP, \\) {
- copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
- } else {
- source = $$replace(source, \\\\, /)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- target = $$replace(target, \\\\, /)
- copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
- }
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- desktopfile.files = $${TARGET}.desktop
- desktopfile.path = /usr/share/applications/hildon
- icon.files = $${TARGET}64.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- } else:!isEmpty(MEEGO_VERSION_MAJOR) {
- desktopfile.files = $${TARGET}_harmattan.desktop
- desktopfile.path = /usr/share/applications
- icon.files = $${TARGET}80.png
- icon.path = /usr/share/icons/hicolor/80x80/apps
- } else { # Assumed to be a Desktop Unix
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, \\\\, /)
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- target = $$replace(target, \\\\, /)
- sourcePathSegments = $$split(source, /)
- targetFullPath = $$target/$$last(sourcePathSegments)
- targetFullPath ~= s,/\\.?/,/,
- !isEqual(source,$$targetFullPath) {
- !isEmpty(copyCommand):copyCommand += &&
- copyCommand += $(MKDIR) \"$$target\"
- copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- !isEmpty(target.path) {
- installPrefix = $${target.path}
- } else {
- installPrefix = /opt/$${TARGET}
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- !isEmpty(desktopfile.path) {
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- INSTALLS += icon desktopfile
- }
-
- isEmpty(target.path) {
- target.path = $${installPrefix}/bin
- export(target.path)
- }
- INSTALLS += target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/qmlcustominput/doc/images/qmlcustominput-example.png b/examples/qmlcustominput/doc/images/qmlcustominput-example.png
deleted file mode 100644
index 1de740ea..00000000
--- a/examples/qmlcustominput/doc/images/qmlcustominput-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlcustominput/qmlcustominput.desktop b/examples/qmlcustominput/qmlcustominput.desktop
deleted file mode 100644
index 536f87a9..00000000
--- a/examples/qmlcustominput/qmlcustominput.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=qmlcustominput
-Exec=/opt/qmlcustominput/bin/qmlcustominput
-Icon=qmlcustominput64
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/qmlcustominput/qmlcustominput.pro b/examples/qmlcustominput/qmlcustominput.pro
deleted file mode 100644
index c58eff49..00000000
--- a/examples/qmlcustominput/qmlcustominput.pro
+++ /dev/null
@@ -1,26 +0,0 @@
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-QT += widgets
-
-# Add more folders to ship with the application, here
-folder_01.source = qml/qmlcustominput
-folder_01.target = qml
-DEPLOYMENTFOLDERS = folder_01
-
-# Additional import path used to resolve QML modules in Creator's code model
-QML_IMPORT_PATH =
-
-# The .cpp file which was generated for your project. Feel free to hack it.
-SOURCES += main.cpp
-
-# Please do not modify the following two lines. Required for deployment.
-include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
-qtcAddDeployment()
-
-RESOURCES += \
- qmlcustominput.qrc
-
-OTHER_FILES += doc/src/* \
- doc/images/*
diff --git a/examples/qmlcustominput/qmlcustominput.qrc b/examples/qmlcustominput/qmlcustominput.qrc
deleted file mode 100644
index 5e1ff40c..00000000
--- a/examples/qmlcustominput/qmlcustominput.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/qml">
- <file alias="main.qml">qml/qmlcustominput/main.qml</file>
- <file alias="Data.qml">qml/qmlcustominput/data.qml</file>
- <file alias="NewButton.qml">qml/qmlcustominput/newbutton.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/qmlcustominput/qmlcustominput64.png b/examples/qmlcustominput/qmlcustominput64.png
deleted file mode 100644
index 707d5c4e..00000000
--- a/examples/qmlcustominput/qmlcustominput64.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlcustominput/qmlcustominput80.png b/examples/qmlcustominput/qmlcustominput80.png
deleted file mode 100644
index 6ad8096c..00000000
--- a/examples/qmlcustominput/qmlcustominput80.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.cpp
deleted file mode 100644
index 10709d7a..00000000
--- a/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// checksum 0x4f6f version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qtquick2applicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtQml/QQmlEngine>
-
-class QtQuick2ApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QtQuick2ApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#if defined(Q_OS_MAC)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("%1/../Resources/%2")
- .arg(QCoreApplication::applicationDirPath(), path);
-#elif defined(Q_OS_BLACKBERRY)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("app/native/%1").arg(path);
-#elif !defined(Q_OS_ANDROID)
- QString pathInInstallDir =
- QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
- pathInInstallDir =
- QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
-#endif
- return path;
-}
-
-QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
- : QQuickView(parent)
- , d(new QtQuick2ApplicationViewerPrivate())
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
-{
- delete d;
-}
-
-void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
-{
- d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
-#ifdef Q_OS_ANDROID
- setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
-#else
- setSource(QUrl::fromLocalFile(d->mainQmlFile));
-#endif
-}
-
-void QtQuick2ApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
-}
-
-void QtQuick2ApplicationViewer::showExpanded()
-{
-#if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
- showFullScreen();
-#else
- show();
-#endif
-}
diff --git a/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.h b/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.h
deleted file mode 100644
index cf66f140..00000000
--- a/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// checksum 0xfde6 version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QTQUICK2APPLICATIONVIEWER_H
-#define QTQUICK2APPLICATIONVIEWER_H
-
-#include <QtQuick/QQuickView>
-
-class QtQuick2ApplicationViewer : public QQuickView
-{
- Q_OBJECT
-
-public:
- explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
- virtual ~QtQuick2ApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
-
- void showExpanded();
-
-private:
- class QtQuick2ApplicationViewerPrivate *d;
-};
-
-#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.pri b/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.pri
deleted file mode 100644
index e5f7990f..00000000
--- a/examples/qmlcustominput/qtquick2applicationviewer/qtquick2applicationviewer.pri
+++ /dev/null
@@ -1,180 +0,0 @@
-# checksum 0x7b0d version 0x90005
-# This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
-# The code below adds the QtQuick2ApplicationViewer to the project and handles
-# the activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += qml quick
-
-SOURCES += $$PWD/qtquick2applicationviewer.cpp
-HEADERS += $$PWD/qtquick2applicationviewer.h
-INCLUDEPATH += $$PWD
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Android and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- greaterThan(QT_MAJOR_VERSION, 4) {
- itemsources = $${item}.files
- } else {
- itemsources = $${item}.sources
- }
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-android-no-sdk {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- target.path = /data/user/qt
-
- export(target.path)
- INSTALLS += target
-} else:android {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /assets/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
-
- export(target.path)
- INSTALLS += target
-} else:win32 {
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, /, \\)
- sourcePathSegments = $$split(source, \\)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
- target = $$replace(target, /, \\)
- target ~= s,\\\\\\.?\\\\,\\,
- !isEqual(source,$$target) {
- !isEmpty(copyCommand):copyCommand += &&
- isEqual(QMAKE_DIR_SEP, \\) {
- copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
- } else {
- source = $$replace(source, \\\\, /)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- target = $$replace(target, \\\\, /)
- copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
- }
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- desktopfile.files = $${TARGET}.desktop
- desktopfile.path = /usr/share/applications/hildon
- icon.files = $${TARGET}64.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- } else:!isEmpty(MEEGO_VERSION_MAJOR) {
- desktopfile.files = $${TARGET}_harmattan.desktop
- desktopfile.path = /usr/share/applications
- icon.files = $${TARGET}80.png
- icon.path = /usr/share/icons/hicolor/80x80/apps
- } else { # Assumed to be a Desktop Unix
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, \\\\, /)
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- target = $$replace(target, \\\\, /)
- sourcePathSegments = $$split(source, /)
- targetFullPath = $$target/$$last(sourcePathSegments)
- targetFullPath ~= s,/\\.?/,/,
- !isEqual(source,$$targetFullPath) {
- !isEmpty(copyCommand):copyCommand += &&
- copyCommand += $(MKDIR) \"$$target\"
- copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- !isEmpty(target.path) {
- installPrefix = $${target.path}
- } else {
- installPrefix = /opt/$${TARGET}
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- !isEmpty(desktopfile.path) {
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- INSTALLS += icon desktopfile
- }
-
- isEmpty(target.path) {
- target.path = $${installPrefix}/bin
- export(target.path)
- }
- INSTALLS += target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/qmllegend/qmllegend.desktop b/examples/qmllegend/qmllegend.desktop
deleted file mode 100644
index 6ad68edd..00000000
--- a/examples/qmllegend/qmllegend.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=qmllegend
-Exec=/opt/qmllegend/bin/qmllegend
-Icon=qmllegend64
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/qmllegend/qmllegend.pro b/examples/qmllegend/qmllegend.pro
deleted file mode 100644
index d896e7ac..00000000
--- a/examples/qmllegend/qmllegend.pro
+++ /dev/null
@@ -1,25 +0,0 @@
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-QT += widgets
-
-# Add more folders to ship with the application, here
-folder_01.source = qml/qmllegend
-folder_01.target = qml
-DEPLOYMENTFOLDERS = folder_01
-
-# Additional import path used to resolve QML modules in Creator's code model
-QML_IMPORT_PATH =
-
-# The .cpp file which was generated for your project. Feel free to hack it.
-SOURCES += main.cpp
-
-# Please do not modify the following two lines. Required for deployment.
-include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
-qtcAddDeployment()
-
-RESOURCES += qmllegend.qrc
-
-OTHER_FILES += doc/src/* \
- doc/images/*
diff --git a/examples/qmllegend/qmllegend.qrc b/examples/qmllegend/qmllegend.qrc
deleted file mode 100644
index 6496cfdb..00000000
--- a/examples/qmllegend/qmllegend.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/qml">
- <file alias="Data.qml">qml/qmllegend/data.qml</file>
- <file alias="main.qml">qml/qmllegend/main.qml</file>
- <file alias="LegendItem.qml">qml/qmllegend/legenditem.qml</file>
- <file alias="NewButton.qml">qml/qmllegend/newbutton.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/qmllegend/qmllegend64.png b/examples/qmllegend/qmllegend64.png
deleted file mode 100644
index 707d5c4e..00000000
--- a/examples/qmllegend/qmllegend64.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.cpp
deleted file mode 100644
index 10709d7a..00000000
--- a/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// checksum 0x4f6f version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qtquick2applicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtQml/QQmlEngine>
-
-class QtQuick2ApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QtQuick2ApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#if defined(Q_OS_MAC)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("%1/../Resources/%2")
- .arg(QCoreApplication::applicationDirPath(), path);
-#elif defined(Q_OS_BLACKBERRY)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("app/native/%1").arg(path);
-#elif !defined(Q_OS_ANDROID)
- QString pathInInstallDir =
- QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
- pathInInstallDir =
- QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
-#endif
- return path;
-}
-
-QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
- : QQuickView(parent)
- , d(new QtQuick2ApplicationViewerPrivate())
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
-{
- delete d;
-}
-
-void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
-{
- d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
-#ifdef Q_OS_ANDROID
- setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
-#else
- setSource(QUrl::fromLocalFile(d->mainQmlFile));
-#endif
-}
-
-void QtQuick2ApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
-}
-
-void QtQuick2ApplicationViewer::showExpanded()
-{
-#if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
- showFullScreen();
-#else
- show();
-#endif
-}
diff --git a/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.h b/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.h
deleted file mode 100644
index cf66f140..00000000
--- a/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// checksum 0xfde6 version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QTQUICK2APPLICATIONVIEWER_H
-#define QTQUICK2APPLICATIONVIEWER_H
-
-#include <QtQuick/QQuickView>
-
-class QtQuick2ApplicationViewer : public QQuickView
-{
- Q_OBJECT
-
-public:
- explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
- virtual ~QtQuick2ApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
-
- void showExpanded();
-
-private:
- class QtQuick2ApplicationViewerPrivate *d;
-};
-
-#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.pri b/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.pri
deleted file mode 100644
index e5f7990f..00000000
--- a/examples/qmllegend/qtquick2applicationviewer/qtquick2applicationviewer.pri
+++ /dev/null
@@ -1,180 +0,0 @@
-# checksum 0x7b0d version 0x90005
-# This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
-# The code below adds the QtQuick2ApplicationViewer to the project and handles
-# the activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += qml quick
-
-SOURCES += $$PWD/qtquick2applicationviewer.cpp
-HEADERS += $$PWD/qtquick2applicationviewer.h
-INCLUDEPATH += $$PWD
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Android and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- greaterThan(QT_MAJOR_VERSION, 4) {
- itemsources = $${item}.files
- } else {
- itemsources = $${item}.sources
- }
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-android-no-sdk {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- target.path = /data/user/qt
-
- export(target.path)
- INSTALLS += target
-} else:android {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /assets/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
-
- export(target.path)
- INSTALLS += target
-} else:win32 {
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, /, \\)
- sourcePathSegments = $$split(source, \\)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
- target = $$replace(target, /, \\)
- target ~= s,\\\\\\.?\\\\,\\,
- !isEqual(source,$$target) {
- !isEmpty(copyCommand):copyCommand += &&
- isEqual(QMAKE_DIR_SEP, \\) {
- copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
- } else {
- source = $$replace(source, \\\\, /)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- target = $$replace(target, \\\\, /)
- copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
- }
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- desktopfile.files = $${TARGET}.desktop
- desktopfile.path = /usr/share/applications/hildon
- icon.files = $${TARGET}64.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- } else:!isEmpty(MEEGO_VERSION_MAJOR) {
- desktopfile.files = $${TARGET}_harmattan.desktop
- desktopfile.path = /usr/share/applications
- icon.files = $${TARGET}80.png
- icon.path = /usr/share/icons/hicolor/80x80/apps
- } else { # Assumed to be a Desktop Unix
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, \\\\, /)
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- target = $$replace(target, \\\\, /)
- sourcePathSegments = $$split(source, /)
- targetFullPath = $$target/$$last(sourcePathSegments)
- targetFullPath ~= s,/\\.?/,/,
- !isEqual(source,$$targetFullPath) {
- !isEmpty(copyCommand):copyCommand += &&
- copyCommand += $(MKDIR) \"$$target\"
- copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- !isEmpty(target.path) {
- installPrefix = $${target.path}
- } else {
- installPrefix = /opt/$${TARGET}
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- !isEmpty(desktopfile.path) {
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- INSTALLS += icon desktopfile
- }
-
- isEmpty(target.path) {
- target.path = $${installPrefix}/bin
- export(target.path)
- }
- INSTALLS += target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/qmlmultigraph/doc/images/qmlmultigraph-example.png b/examples/qmlmultigraph/doc/images/qmlmultigraph-example.png
deleted file mode 100644
index d4e524e2..00000000
--- a/examples/qmlmultigraph/doc/images/qmlmultigraph-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlmultigraph/qml/qmlmultigraph/data.qml b/examples/qmlmultigraph/qml/qmlmultigraph/data.qml
deleted file mode 100644
index 679cb067..00000000
--- a/examples/qmlmultigraph/qml/qmlmultigraph/data.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** 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
-**
-****************************************************************************/
-
-import QtQuick 2.1
-
-Item {
- property alias barData: barDataModel
- property alias scatterData: scatterDataModel
- property alias surfaceData: surfaceDataModel
-
- ListModel {
- id: barDataModel
- ListElement{ year: "2012"; city: "Oulu"; expenses: "4200"; income: "8300"; }
- ListElement{ year: "2012"; city: "Kemi"; expenses: "2100"; income: "6500"; }
- ListElement{ year: "2012"; city: "Helsinki"; expenses: "7040"; income: "7500"; }
- ListElement{ year: "2012"; city: "Tampere"; expenses: "4330"; income: "5800"; }
- ListElement{ year: "2013"; city: "Oulu"; expenses: "3960"; income: "9000"; }
- ListElement{ year: "2013"; city: "Kemi"; expenses: "1990"; income: "3000"; }
- ListElement{ year: "2013"; city: "Helsinki"; expenses: "7230"; income: "9900"; }
- ListElement{ year: "2013"; city: "Tampere"; expenses: "4650"; income: "7600"; }
- }
-
- ListModel {
- id: scatterDataModel
- ListElement{ xPos: "2.754"; yPos: "1.000"; zPos: "3.362"; }
- ListElement{ xPos: "3.164"; yPos: "2.022"; zPos: "4.348"; }
- ListElement{ xPos: "4.564"; yPos: "1.865"; zPos: "1.000"; }
- ListElement{ xPos: "1.000"; yPos: "1.224"; zPos: "2.983"; }
- ListElement{ xPos: "2.323"; yPos: "2.502"; zPos: "3.133"; }
- ListElement{ xPos: "3.663"; yPos: "3.186"; zPos: "2.843"; }
- ListElement{ xPos: "4.190"; yPos: "4.875"; zPos: "3.942"; }
- ListElement{ xPos: "3.569"; yPos: "3.685"; zPos: "1.456"; }
- ListElement{ xPos: "5.000"; yPos: "5.000"; zPos: "4.678"; }
- ListElement{ xPos: "4.349"; yPos: "3.850"; zPos: "5.000"; }
- }
-
- ListModel {
- id: surfaceDataModel
- ListElement{ longitude: "20"; latitude: "10"; pop_density: "4.75"; }
- ListElement{ longitude: "21"; latitude: "10"; pop_density: "3.00"; }
- ListElement{ longitude: "22"; latitude: "10"; pop_density: "1.24"; }
- ListElement{ longitude: "23"; latitude: "10"; pop_density: "2.53"; }
- ListElement{ longitude: "20"; latitude: "11"; pop_density: "3.55"; }
- ListElement{ longitude: "21"; latitude: "11"; pop_density: "3.03"; }
- ListElement{ longitude: "22"; latitude: "11"; pop_density: "3.46"; }
- ListElement{ longitude: "23"; latitude: "11"; pop_density: "4.12"; }
- ListElement{ longitude: "20"; latitude: "12"; pop_density: "3.37"; }
- ListElement{ longitude: "21"; latitude: "12"; pop_density: "2.98"; }
- ListElement{ longitude: "22"; latitude: "12"; pop_density: "3.33"; }
- ListElement{ longitude: "23"; latitude: "12"; pop_density: "3.23"; }
- ListElement{ longitude: "20"; latitude: "13"; pop_density: "5.34"; }
- ListElement{ longitude: "21"; latitude: "13"; pop_density: "4.54"; }
- ListElement{ longitude: "22"; latitude: "13"; pop_density: "4.65"; }
- ListElement{ longitude: "23"; latitude: "13"; pop_density: "6.67"; }
- ListElement{ longitude: "20"; latitude: "14"; pop_density: "6.01"; }
- ListElement{ longitude: "21"; latitude: "14"; pop_density: "5.83"; }
- ListElement{ longitude: "22"; latitude: "14"; pop_density: "5.90"; }
- ListElement{ longitude: "23"; latitude: "14"; pop_density: "7.32"; }
- }
-}
-
diff --git a/examples/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/qmlmultigraph/qml/qmlmultigraph/main.qml
deleted file mode 100644
index bc2f7fe3..00000000
--- a/examples/qmlmultigraph/qml/qmlmultigraph/main.qml
+++ /dev/null
@@ -1,169 +0,0 @@
-/****************************************************************************
-**
-** 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
-**
-****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.Layouts 1.0
-import QtDataVisualization 1.0
-import "."
-
-Item {
- id: mainView
- width: 1280
- height: 400
-
- Data {
- id: data
- }
-
- //! [0]
- RowLayout {
- id: graphLayout
- spacing: 1
- anchors.top: buttonLayout.bottom
- anchors.bottom: mainView.bottom
- anchors.left: mainView.left
- anchors.right: mainView.right
-
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- border.color: surfaceGraph.theme.gridLineColor
- border.width: 2
- color: "#00000000" // Transparent
-
- Surface3D {
- id: surfaceGraph
- anchors.fill: parent
- anchors.margins: parent.border.width
- theme: Theme3D { type: Theme3D.ThemePrimaryColors }
- scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
-
- Surface3DSeries {
- itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel"
- ItemModelSurfaceDataProxy {
- itemModel: data.surfaceData
- // Mapping model roles to surface series rows, columns, and values.
- rowRole: "longitude"
- columnRole: "latitude"
- valueRole: "pop_density"
- }
- }
- }
- }
-
-
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- border.color: scatterGraph.theme.gridLineColor
- border.width: 2
- color: "#00000000" // Transparent
-
- Scatter3D {
- id: scatterGraph
- anchors.fill: parent
- anchors.margins: parent.border.width
- theme: Theme3D { type: Theme3D.ThemeDigia }
- scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
-
- Scatter3DSeries {
- ItemModelScatterDataProxy {
- itemModel: data.scatterData
- // Mapping model roles to scatter series item coordinates.
- xPosRole: "xPos"
- yPosRole: "yPos"
- zPosRole: "zPos"
- }
- }
- }
- }
-
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- border.color: barGraph.theme.gridLineColor
- border.width: 2
- color: "#00000000" // Transparent
-
- Bars3D {
- id: barGraph
- anchors.fill: parent
- anchors.margins: parent.border.width
- theme: Theme3D { type: Theme3D.ThemeQt }
- selectionMode: AbstractGraph3D.SelectionItemAndRow | AbstractGraph3D.SelectionSlice
- scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
-
- Bar3DSeries {
- itemLabelFormat: "@seriesName for @colLabel, @rowLabel: @valueLabel"
- name: "Yearly expenses"
-
- ItemModelBarDataProxy {
- itemModel: data.barData
- // Mapping model roles to bar series rows, columns, and values.
- rowRole: "year"
- columnRole: "city"
- valueRole: "expenses"
- }
- }
-
- Bar3DSeries {
- itemLabelFormat: "@seriesName for @colLabel, @rowLabel: @valueLabel"
- name: "Yearly income"
-
- ItemModelBarDataProxy {
- itemModel: data.barData
- // Mapping model roles to bar series rows, columns, and values.
- rowRole: "year"
- columnRole: "city"
- valueRole: "income"
- }
- }
- }
- }
- }
- //! [0]
-
- RowLayout {
- id: buttonLayout
- Layout.minimumHeight: exitButton.height
- width: parent.width
- anchors.left: parent.left
- anchors.top: parent.top
- spacing: 0
-
- NewButton {
- id: clearSelectionsButton
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: "Clear Selections"
- onClicked: {
- barGraph.clearSelection()
- scatterGraph.clearSelection()
- surfaceGraph.clearSelection()
- }
- }
-
- NewButton {
- id: exitButton
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: "Quit"
- onClicked: Qt.quit(0);
- }
- }
-}
diff --git a/examples/qmlmultigraph/qmlmultigraph.desktop b/examples/qmlmultigraph/qmlmultigraph.desktop
deleted file mode 100644
index 90b16a4e..00000000
--- a/examples/qmlmultigraph/qmlmultigraph.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=qmlmultigraph
-Exec=/opt/qmlmultigraph/bin/qmlmultigraph
-Icon=qmlmultigraph64
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/qmlmultigraph/qmlmultigraph.pro b/examples/qmlmultigraph/qmlmultigraph.pro
deleted file mode 100644
index af4e0d90..00000000
--- a/examples/qmlmultigraph/qmlmultigraph.pro
+++ /dev/null
@@ -1,25 +0,0 @@
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-QT += widgets
-
-# Add more folders to ship with the application, here
-folder_01.source = qml/qmlmultigraph
-folder_01.target = qml
-DEPLOYMENTFOLDERS = folder_01
-
-# Additional import path used to resolve QML modules in Creator's code model
-QML_IMPORT_PATH =
-
-# The .cpp file which was generated for your project. Feel free to hack it.
-SOURCES += main.cpp
-
-# Please do not modify the following two lines. Required for deployment.
-include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
-qtcAddDeployment()
-
-RESOURCES += qmlmultigraph.qrc
-
-OTHER_FILES += doc/src/* \
- doc/images/*
diff --git a/examples/qmlmultigraph/qmlmultigraph.qrc b/examples/qmlmultigraph/qmlmultigraph.qrc
deleted file mode 100644
index 02e0c682..00000000
--- a/examples/qmlmultigraph/qmlmultigraph.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/qml">
- <file alias="main.qml">qml/qmlmultigraph/main.qml</file>
- <file alias="NewButton.qml">qml/qmlmultigraph/newbutton.qml</file>
- <file alias="Data.qml">qml/qmlmultigraph/data.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/qmlmultigraph/qmlmultigraph64.png b/examples/qmlmultigraph/qmlmultigraph64.png
deleted file mode 100644
index 707d5c4e..00000000
--- a/examples/qmlmultigraph/qmlmultigraph64.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.cpp
deleted file mode 100644
index 10709d7a..00000000
--- a/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// checksum 0x4f6f version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qtquick2applicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtQml/QQmlEngine>
-
-class QtQuick2ApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QtQuick2ApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#if defined(Q_OS_MAC)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("%1/../Resources/%2")
- .arg(QCoreApplication::applicationDirPath(), path);
-#elif defined(Q_OS_BLACKBERRY)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("app/native/%1").arg(path);
-#elif !defined(Q_OS_ANDROID)
- QString pathInInstallDir =
- QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
- pathInInstallDir =
- QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
-#endif
- return path;
-}
-
-QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
- : QQuickView(parent)
- , d(new QtQuick2ApplicationViewerPrivate())
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
-{
- delete d;
-}
-
-void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
-{
- d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
-#ifdef Q_OS_ANDROID
- setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
-#else
- setSource(QUrl::fromLocalFile(d->mainQmlFile));
-#endif
-}
-
-void QtQuick2ApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
-}
-
-void QtQuick2ApplicationViewer::showExpanded()
-{
-#if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
- showFullScreen();
-#else
- show();
-#endif
-}
diff --git a/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.h b/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.h
deleted file mode 100644
index cf66f140..00000000
--- a/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// checksum 0xfde6 version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QTQUICK2APPLICATIONVIEWER_H
-#define QTQUICK2APPLICATIONVIEWER_H
-
-#include <QtQuick/QQuickView>
-
-class QtQuick2ApplicationViewer : public QQuickView
-{
- Q_OBJECT
-
-public:
- explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
- virtual ~QtQuick2ApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
-
- void showExpanded();
-
-private:
- class QtQuick2ApplicationViewerPrivate *d;
-};
-
-#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.pri b/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.pri
deleted file mode 100644
index e5f7990f..00000000
--- a/examples/qmlmultigraph/qtquick2applicationviewer/qtquick2applicationviewer.pri
+++ /dev/null
@@ -1,180 +0,0 @@
-# checksum 0x7b0d version 0x90005
-# This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
-# The code below adds the QtQuick2ApplicationViewer to the project and handles
-# the activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += qml quick
-
-SOURCES += $$PWD/qtquick2applicationviewer.cpp
-HEADERS += $$PWD/qtquick2applicationviewer.h
-INCLUDEPATH += $$PWD
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Android and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- greaterThan(QT_MAJOR_VERSION, 4) {
- itemsources = $${item}.files
- } else {
- itemsources = $${item}.sources
- }
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-android-no-sdk {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- target.path = /data/user/qt
-
- export(target.path)
- INSTALLS += target
-} else:android {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /assets/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
-
- export(target.path)
- INSTALLS += target
-} else:win32 {
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, /, \\)
- sourcePathSegments = $$split(source, \\)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
- target = $$replace(target, /, \\)
- target ~= s,\\\\\\.?\\\\,\\,
- !isEqual(source,$$target) {
- !isEmpty(copyCommand):copyCommand += &&
- isEqual(QMAKE_DIR_SEP, \\) {
- copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
- } else {
- source = $$replace(source, \\\\, /)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- target = $$replace(target, \\\\, /)
- copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
- }
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- desktopfile.files = $${TARGET}.desktop
- desktopfile.path = /usr/share/applications/hildon
- icon.files = $${TARGET}64.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- } else:!isEmpty(MEEGO_VERSION_MAJOR) {
- desktopfile.files = $${TARGET}_harmattan.desktop
- desktopfile.path = /usr/share/applications
- icon.files = $${TARGET}80.png
- icon.path = /usr/share/icons/hicolor/80x80/apps
- } else { # Assumed to be a Desktop Unix
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, \\\\, /)
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- target = $$replace(target, \\\\, /)
- sourcePathSegments = $$split(source, /)
- targetFullPath = $$target/$$last(sourcePathSegments)
- targetFullPath ~= s,/\\.?/,/,
- !isEqual(source,$$targetFullPath) {
- !isEmpty(copyCommand):copyCommand += &&
- copyCommand += $(MKDIR) \"$$target\"
- copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- !isEmpty(target.path) {
- installPrefix = $${target.path}
- } else {
- installPrefix = /opt/$${TARGET}
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- !isEmpty(desktopfile.path) {
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- INSTALLS += icon desktopfile
- }
-
- isEmpty(target.path) {
- target.path = $${installPrefix}/bin
- export(target.path)
- }
- INSTALLS += target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/qmlscatter/doc/images/qmlscatter-newproject.png b/examples/qmlscatter/doc/images/qmlscatter-newproject.png
deleted file mode 100644
index 7c81cae8..00000000
--- a/examples/qmlscatter/doc/images/qmlscatter-newproject.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlscatter/qmlscatter.desktop b/examples/qmlscatter/qmlscatter.desktop
deleted file mode 100644
index 0f9e5498..00000000
--- a/examples/qmlscatter/qmlscatter.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=qmlscatter
-Exec=/opt/qmlscatter/bin/qmlscatter
-Icon=qmlscatter64
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/qmlscatter/qmlscatter.pro b/examples/qmlscatter/qmlscatter.pro
deleted file mode 100644
index 0c66c5ae..00000000
--- a/examples/qmlscatter/qmlscatter.pro
+++ /dev/null
@@ -1,25 +0,0 @@
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-QT += widgets
-
-# Add more folders to ship with the application, here
-folder_01.source = qml/qmlscatter
-folder_01.target = qml
-DEPLOYMENTFOLDERS = folder_01
-
-# Additional import path used to resolve QML modules in Creator's code model
-QML_IMPORT_PATH =
-
-# The .cpp file which was generated for your project. Feel free to hack it.
-SOURCES += main.cpp
-
-# Please do not modify the following two lines. Required for deployment.
-include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
-qtcAddDeployment()
-
-RESOURCES += qmlscatter.qrc
-
-OTHER_FILES += doc/src/* \
- doc/images/*
diff --git a/examples/qmlscatter/qmlscatter.qrc b/examples/qmlscatter/qmlscatter.qrc
deleted file mode 100644
index 6b77a4bc..00000000
--- a/examples/qmlscatter/qmlscatter.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/qml">
- <file alias="main.qml">qml/qmlscatter/main.qml</file>
- <file alias="Data.qml">qml/qmlscatter/data.qml</file>
- <file alias="NewButton.qml">qml/qmlscatter/newbutton.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/qmlscatter/qmlscatter64.png b/examples/qmlscatter/qmlscatter64.png
deleted file mode 100644
index 707d5c4e..00000000
--- a/examples/qmlscatter/qmlscatter64.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.cpp
deleted file mode 100644
index 10709d7a..00000000
--- a/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// checksum 0x4f6f version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qtquick2applicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtQml/QQmlEngine>
-
-class QtQuick2ApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QtQuick2ApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#if defined(Q_OS_MAC)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("%1/../Resources/%2")
- .arg(QCoreApplication::applicationDirPath(), path);
-#elif defined(Q_OS_BLACKBERRY)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("app/native/%1").arg(path);
-#elif !defined(Q_OS_ANDROID)
- QString pathInInstallDir =
- QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
- pathInInstallDir =
- QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
-#endif
- return path;
-}
-
-QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
- : QQuickView(parent)
- , d(new QtQuick2ApplicationViewerPrivate())
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
-{
- delete d;
-}
-
-void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
-{
- d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
-#ifdef Q_OS_ANDROID
- setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
-#else
- setSource(QUrl::fromLocalFile(d->mainQmlFile));
-#endif
-}
-
-void QtQuick2ApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
-}
-
-void QtQuick2ApplicationViewer::showExpanded()
-{
-#if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
- showFullScreen();
-#else
- show();
-#endif
-}
diff --git a/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.h b/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.h
deleted file mode 100644
index cf66f140..00000000
--- a/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// checksum 0xfde6 version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QTQUICK2APPLICATIONVIEWER_H
-#define QTQUICK2APPLICATIONVIEWER_H
-
-#include <QtQuick/QQuickView>
-
-class QtQuick2ApplicationViewer : public QQuickView
-{
- Q_OBJECT
-
-public:
- explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
- virtual ~QtQuick2ApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
-
- void showExpanded();
-
-private:
- class QtQuick2ApplicationViewerPrivate *d;
-};
-
-#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.pri b/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.pri
deleted file mode 100644
index e5f7990f..00000000
--- a/examples/qmlscatter/qtquick2applicationviewer/qtquick2applicationviewer.pri
+++ /dev/null
@@ -1,180 +0,0 @@
-# checksum 0x7b0d version 0x90005
-# This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
-# The code below adds the QtQuick2ApplicationViewer to the project and handles
-# the activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += qml quick
-
-SOURCES += $$PWD/qtquick2applicationviewer.cpp
-HEADERS += $$PWD/qtquick2applicationviewer.h
-INCLUDEPATH += $$PWD
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Android and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- greaterThan(QT_MAJOR_VERSION, 4) {
- itemsources = $${item}.files
- } else {
- itemsources = $${item}.sources
- }
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-android-no-sdk {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- target.path = /data/user/qt
-
- export(target.path)
- INSTALLS += target
-} else:android {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /assets/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
-
- export(target.path)
- INSTALLS += target
-} else:win32 {
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, /, \\)
- sourcePathSegments = $$split(source, \\)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
- target = $$replace(target, /, \\)
- target ~= s,\\\\\\.?\\\\,\\,
- !isEqual(source,$$target) {
- !isEmpty(copyCommand):copyCommand += &&
- isEqual(QMAKE_DIR_SEP, \\) {
- copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
- } else {
- source = $$replace(source, \\\\, /)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- target = $$replace(target, \\\\, /)
- copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
- }
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- desktopfile.files = $${TARGET}.desktop
- desktopfile.path = /usr/share/applications/hildon
- icon.files = $${TARGET}64.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- } else:!isEmpty(MEEGO_VERSION_MAJOR) {
- desktopfile.files = $${TARGET}_harmattan.desktop
- desktopfile.path = /usr/share/applications
- icon.files = $${TARGET}80.png
- icon.path = /usr/share/icons/hicolor/80x80/apps
- } else { # Assumed to be a Desktop Unix
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, \\\\, /)
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- target = $$replace(target, \\\\, /)
- sourcePathSegments = $$split(source, /)
- targetFullPath = $$target/$$last(sourcePathSegments)
- targetFullPath ~= s,/\\.?/,/,
- !isEqual(source,$$targetFullPath) {
- !isEmpty(copyCommand):copyCommand += &&
- copyCommand += $(MKDIR) \"$$target\"
- copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- !isEmpty(target.path) {
- installPrefix = $${target.path}
- } else {
- installPrefix = /opt/$${TARGET}
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- !isEmpty(desktopfile.path) {
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- INSTALLS += icon desktopfile
- }
-
- isEmpty(target.path) {
- target.path = $${installPrefix}/bin
- export(target.path)
- }
- INSTALLS += target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/qmlsurface/doc/images/qmlsurface-example.png b/examples/qmlsurface/doc/images/qmlsurface-example.png
deleted file mode 100644
index d8d394fa..00000000
--- a/examples/qmlsurface/doc/images/qmlsurface-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlsurface/qmlsurface.desktop b/examples/qmlsurface/qmlsurface.desktop
deleted file mode 100644
index 66dd0a72..00000000
--- a/examples/qmlsurface/qmlsurface.desktop
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Version=1.0
-Type=Application
-Terminal=false
-Name=qmlsurface
-Exec=/opt/qmlsurface/bin/qmlsurface
-Icon=qmlsurface64
-X-Window-Icon=
-X-HildonDesk-ShowInToolbar=true
-X-Osso-Type=application/x-executable
diff --git a/examples/qmlsurface/qmlsurface.pro b/examples/qmlsurface/qmlsurface.pro
deleted file mode 100644
index 64c72cf7..00000000
--- a/examples/qmlsurface/qmlsurface.pro
+++ /dev/null
@@ -1,25 +0,0 @@
-!include( ../examples.pri ) {
- error( "Couldn't find the examples.pri file!" )
-}
-
-QT += widgets
-
-# Add more folders to ship with the application, here
-folder_01.source = qml/qmlsurface
-folder_01.target = qml
-DEPLOYMENTFOLDERS = folder_01
-
-# Additional import path used to resolve QML modules in Creator's code model
-QML_IMPORT_PATH =
-
-# The .cpp file which was generated for your project. Feel free to hack it.
-SOURCES += main.cpp
-
-# Please do not modify the following two lines. Required for deployment.
-include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
-qtcAddDeployment()
-
-RESOURCES += qmlsurface.qrc
-
-OTHER_FILES += doc/src/* \
- doc/images/*
diff --git a/examples/qmlsurface/qmlsurface.qrc b/examples/qmlsurface/qmlsurface.qrc
deleted file mode 100644
index d0745b94..00000000
--- a/examples/qmlsurface/qmlsurface.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/qml">
- <file alias="main.qml">qml/qmlsurface/main.qml</file>
- <file alias="Data.qml">qml/qmlsurface/data.qml</file>
- <file alias="NewButton.qml">qml/qmlsurface/newbutton.qml</file>
- </qresource>
- <qresource prefix="/heightmaps">
- <file alias="image">heightmap.png</file>
- </qresource>
-</RCC>
diff --git a/examples/qmlsurface/qmlsurface64.png b/examples/qmlsurface/qmlsurface64.png
deleted file mode 100644
index 707d5c4e..00000000
--- a/examples/qmlsurface/qmlsurface64.png
+++ /dev/null
Binary files differ
diff --git a/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.cpp
deleted file mode 100644
index 10709d7a..00000000
--- a/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// checksum 0x4f6f version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#include "qtquick2applicationviewer.h"
-
-#include <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtQml/QQmlEngine>
-
-class QtQuick2ApplicationViewerPrivate
-{
- QString mainQmlFile;
- friend class QtQuick2ApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#if defined(Q_OS_MAC)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("%1/../Resources/%2")
- .arg(QCoreApplication::applicationDirPath(), path);
-#elif defined(Q_OS_BLACKBERRY)
- if (!QDir::isAbsolutePath(path))
- return QString::fromLatin1("app/native/%1").arg(path);
-#elif !defined(Q_OS_ANDROID)
- QString pathInInstallDir =
- QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
- pathInInstallDir =
- QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
-#endif
- return path;
-}
-
-QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
- : QQuickView(parent)
- , d(new QtQuick2ApplicationViewerPrivate())
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
-{
- delete d;
-}
-
-void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
-{
- d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
-#ifdef Q_OS_ANDROID
- setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
-#else
- setSource(QUrl::fromLocalFile(d->mainQmlFile));
-#endif
-}
-
-void QtQuick2ApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
-}
-
-void QtQuick2ApplicationViewer::showExpanded()
-{
-#if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
- showFullScreen();
-#else
- show();
-#endif
-}
diff --git a/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.h b/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.h
deleted file mode 100644
index cf66f140..00000000
--- a/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// checksum 0xfde6 version 0x90005
-/*
- This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
- QtQuick2ApplicationViewer is a convenience class containing mobile device specific
- code such as screen orientation handling. Also QML paths and debugging are
- handled here.
- It is recommended not to modify this file, since newer versions of Qt Creator
- may offer an updated version of it.
-*/
-
-#ifndef QTQUICK2APPLICATIONVIEWER_H
-#define QTQUICK2APPLICATIONVIEWER_H
-
-#include <QtQuick/QQuickView>
-
-class QtQuick2ApplicationViewer : public QQuickView
-{
- Q_OBJECT
-
-public:
- explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
- virtual ~QtQuick2ApplicationViewer();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
-
- void showExpanded();
-
-private:
- class QtQuick2ApplicationViewerPrivate *d;
-};
-
-#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.pri b/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.pri
deleted file mode 100644
index e5f7990f..00000000
--- a/examples/qmlsurface/qtquick2applicationviewer/qtquick2applicationviewer.pri
+++ /dev/null
@@ -1,180 +0,0 @@
-# checksum 0x7b0d version 0x90005
-# This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
-# The code below adds the QtQuick2ApplicationViewer to the project and handles
-# the activation of QML debugging.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-QT += qml quick
-
-SOURCES += $$PWD/qtquick2applicationviewer.cpp
-HEADERS += $$PWD/qtquick2applicationviewer.h
-INCLUDEPATH += $$PWD
-# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Android and Maemo, aswell as copying
-# of the application data to shadow build directories on desktop.
-# It is recommended not to modify this file, since newer versions of Qt Creator
-# may offer an updated version of it.
-
-defineTest(qtcAddDeployment) {
-for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- greaterThan(QT_MAJOR_VERSION, 4) {
- itemsources = $${item}.files
- } else {
- itemsources = $${item}.sources
- }
- $$itemsources = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath= $$eval($${deploymentfolder}.target)
- export($$itemsources)
- export($$itempath)
- DEPLOYMENT += $$item
-}
-
-MAINPROFILEPWD = $$PWD
-
-android-no-sdk {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- target.path = /data/user/qt
-
- export(target.path)
- INSTALLS += target
-} else:android {
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = /assets/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- x86 {
- target.path = /libs/x86
- } else: armeabi-v7a {
- target.path = /libs/armeabi-v7a
- } else {
- target.path = /libs/armeabi
- }
-
- export(target.path)
- INSTALLS += target
-} else:win32 {
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, /, \\)
- sourcePathSegments = $$split(source, \\)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
- target = $$replace(target, /, \\)
- target ~= s,\\\\\\.?\\\\,\\,
- !isEqual(source,$$target) {
- !isEmpty(copyCommand):copyCommand += &&
- isEqual(QMAKE_DIR_SEP, \\) {
- copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
- } else {
- source = $$replace(source, \\\\, /)
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- target = $$replace(target, \\\\, /)
- copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
- }
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
-} else:unix {
- maemo5 {
- desktopfile.files = $${TARGET}.desktop
- desktopfile.path = /usr/share/applications/hildon
- icon.files = $${TARGET}64.png
- icon.path = /usr/share/icons/hicolor/64x64/apps
- } else:!isEmpty(MEEGO_VERSION_MAJOR) {
- desktopfile.files = $${TARGET}_harmattan.desktop
- desktopfile.path = /usr/share/applications
- icon.files = $${TARGET}80.png
- icon.path = /usr/share/icons/hicolor/80x80/apps
- } else { # Assumed to be a Desktop Unix
- copyCommand =
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
- source = $$replace(source, \\\\, /)
- macx {
- target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
- } else {
- target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
- }
- target = $$replace(target, \\\\, /)
- sourcePathSegments = $$split(source, /)
- targetFullPath = $$target/$$last(sourcePathSegments)
- targetFullPath ~= s,/\\.?/,/,
- !isEqual(source,$$targetFullPath) {
- !isEmpty(copyCommand):copyCommand += &&
- copyCommand += $(MKDIR) \"$$target\"
- copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
- }
- }
- !isEmpty(copyCommand) {
- copyCommand = @echo Copying application data... && $$copyCommand
- copydeploymentfolders.commands = $$copyCommand
- first.depends = $(first) copydeploymentfolders
- export(first.depends)
- export(copydeploymentfolders.commands)
- QMAKE_EXTRA_TARGETS += first copydeploymentfolders
- }
- }
- !isEmpty(target.path) {
- installPrefix = $${target.path}
- } else {
- installPrefix = /opt/$${TARGET}
- }
- for(deploymentfolder, DEPLOYMENTFOLDERS) {
- item = item$${deploymentfolder}
- itemfiles = $${item}.files
- $$itemfiles = $$eval($${deploymentfolder}.source)
- itempath = $${item}.path
- $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
- export($$itemfiles)
- export($$itempath)
- INSTALLS += $$item
- }
-
- !isEmpty(desktopfile.path) {
- export(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
- INSTALLS += icon desktopfile
- }
-
- isEmpty(target.path) {
- target.path = $${installPrefix}/bin
- export(target.path)
- }
- INSTALLS += target
-}
-
-export (ICON)
-export (INSTALLS)
-export (DEPLOYMENT)
-export (LIBS)
-export (QMAKE_EXTRA_TARGETS)
-}
diff --git a/examples/scatter/doc/images/scatter-example.png b/examples/scatter/doc/images/scatter-example.png
deleted file mode 100644
index 97a9ba78..00000000
--- a/examples/scatter/doc/images/scatter-example.png
+++ /dev/null
Binary files differ