summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-06-05 12:00:24 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-06-05 12:03:16 +0300
commitcfbfbea7d932f98c3f541bb4fc3e975ffb7a5658 (patch)
treebed376368e9611c751cf1dd75b85de2827d67325
parent8435c15d224a4e9db0920ecd33c4bea3e70d83bf (diff)
parentc51e0f83ef6dd9e85db6953995585ba0cafb35d7 (diff)
Merge branch 'develop'
-rw-r--r--.qmake.conf2
-rw-r--r--README7
-rw-r--r--dist/changes-1.1.077
-rw-r--r--examples/datavisualization/bars/doc/images/bars-example.pngbin151337 -> 188289 bytes
-rw-r--r--examples/datavisualization/bars/doc/src/bars.qdoc15
-rw-r--r--examples/datavisualization/bars/graphmodifier.cpp32
-rw-r--r--examples/datavisualization/bars/graphmodifier.h4
-rw-r--r--examples/datavisualization/bars/main.cpp34
-rw-r--r--examples/datavisualization/custominput/doc/src/custominput.qdoc40
-rw-r--r--examples/datavisualization/customitems/customitemgraph.cpp317
-rw-r--r--examples/datavisualization/customitems/customitemgraph.h58
-rw-r--r--examples/datavisualization/customitems/customitems.pro19
-rw-r--r--examples/datavisualization/customitems/customitems.qrc12
-rw-r--r--examples/datavisualization/customitems/doc/images/customitems-example.pngbin0 -> 109729 bytes
-rw-r--r--examples/datavisualization/customitems/doc/src/customitems.qdoc72
-rw-r--r--examples/datavisualization/customitems/layer_1.pngbin0 -> 34540 bytes
-rw-r--r--examples/datavisualization/customitems/layer_2.pngbin0 -> 10553 bytes
-rw-r--r--examples/datavisualization/customitems/layer_3.pngbin0 -> 7119 bytes
-rw-r--r--examples/datavisualization/customitems/main.cpp118
-rw-r--r--examples/datavisualization/customitems/oilrig.obj2322
-rw-r--r--examples/datavisualization/customitems/pipe.obj330
-rw-r--r--examples/datavisualization/customitems/refinery.obj2330
-rw-r--r--examples/datavisualization/datavisualization.pro8
-rw-r--r--examples/datavisualization/draggableaxes/axesinputhandler.cpp137
-rw-r--r--examples/datavisualization/draggableaxes/axesinputhandler.h71
-rw-r--r--examples/datavisualization/draggableaxes/data.cpp160
-rw-r--r--examples/datavisualization/draggableaxes/data.h48
-rw-r--r--examples/datavisualization/draggableaxes/doc/images/draggableaxes-example.pngbin0 -> 90050 bytes
-rw-r--r--examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc122
-rw-r--r--examples/datavisualization/draggableaxes/draggableaxes.pro18
-rw-r--r--examples/datavisualization/draggableaxes/main.cpp58
-rw-r--r--examples/datavisualization/itemmodel/main.cpp3
-rw-r--r--examples/datavisualization/qmlaxisdrag/doc/images/qmlaxisdrag-example.pngbin0 -> 89048 bytes
-rw-r--r--examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc110
-rw-r--r--examples/datavisualization/qmlaxisdrag/main.cpp48
-rw-r--r--examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/NewButton.qml44
-rw-r--r--examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cube.obj415
-rw-r--r--examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cubetexture.pngbin0 -> 10429 bytes
-rw-r--r--examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml317
-rw-r--r--examples/datavisualization/qmlaxisdrag/qmlaxisdrag.pro11
-rw-r--r--examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc12
-rw-r--r--examples/datavisualization/qmlaxisformatter/customformatter.cpp158
-rw-r--r--examples/datavisualization/qmlaxisformatter/customformatter.h71
-rw-r--r--examples/datavisualization/qmlaxisformatter/doc/images/qmlaxisformatter-example.pngbin0 -> 132952 bytes
-rw-r--r--examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc115
-rw-r--r--examples/datavisualization/qmlaxisformatter/main.cpp57
-rw-r--r--examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml50
-rw-r--r--examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/NewButton.qml52
-rw-r--r--examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/main.qml183
-rw-r--r--examples/datavisualization/qmlaxisformatter/qmlaxisformatter.pro16
-rw-r--r--examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc7
-rw-r--r--examples/datavisualization/qmlbars/doc/images/qmlbars-example.pngbin149167 -> 146667 bytes
-rw-r--r--examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc52
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml32
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/Data.qml168
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/main.qml166
-rw-r--r--examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml6
-rw-r--r--examples/datavisualization/qmllegend/qml/qmllegend/main.qml12
-rw-r--r--examples/datavisualization/qmloscilloscope/datasource.cpp25
-rw-r--r--examples/datavisualization/qmloscilloscope/datasource.h6
-rw-r--r--examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.pngbin134021 -> 129028 bytes
-rw-r--r--examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc19
-rw-r--r--examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml57
-rw-r--r--examples/datavisualization/rotations/scatterdatamodifier.cpp21
-rw-r--r--examples/datavisualization/rotations/scatterdatamodifier.h2
-rw-r--r--examples/datavisualization/surface/doc/src/surface.qdoc4
-rw-r--r--examples/datavisualization/surface/surfacegraph.cpp3
-rw-r--r--src/datavisualization/axis/axis.pri10
-rw-r--r--src/datavisualization/axis/qabstract3daxis.cpp201
-rw-r--r--src/datavisualization/axis/qabstract3daxis.h15
-rw-r--r--src/datavisualization/axis/qabstract3daxis_p.h17
-rw-r--r--src/datavisualization/axis/qcategory3daxis.cpp21
-rw-r--r--src/datavisualization/axis/qcategory3daxis_p.h12
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter.cpp432
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter.h72
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter_p.h71
-rw-r--r--src/datavisualization/axis/qvalue3daxis.cpp112
-rw-r--r--src/datavisualization/axis/qvalue3daxis.h13
-rw-r--r--src/datavisualization/axis/qvalue3daxis_p.h21
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter.cpp419
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter.h86
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter_p.h91
-rw-r--r--src/datavisualization/common.pri3
-rw-r--r--src/datavisualization/data/abstractitemmodelhandler.cpp4
-rw-r--r--src/datavisualization/data/abstractitemmodelhandler_p.h6
-rw-r--r--src/datavisualization/data/abstractrenderitem_p.h2
-rw-r--r--src/datavisualization/data/baritemmodelhandler.cpp162
-rw-r--r--src/datavisualization/data/baritemmodelhandler_p.h12
-rw-r--r--src/datavisualization/data/barrenderitem.cpp7
-rw-r--r--src/datavisualization/data/barrenderitem_p.h8
-rw-r--r--src/datavisualization/data/customrenderitem.cpp42
-rw-r--r--src/datavisualization/data/customrenderitem_p.h93
-rw-r--r--src/datavisualization/data/data.pri12
-rw-r--r--src/datavisualization/data/labelitem_p.h1
-rw-r--r--src/datavisualization/data/qabstract3dseries.cpp140
-rw-r--r--src/datavisualization/data/qabstract3dseries.h8
-rw-r--r--src/datavisualization/data/qabstract3dseries_p.h26
-rw-r--r--src/datavisualization/data/qabstractdataproxy.cpp5
-rw-r--r--src/datavisualization/data/qabstractdataproxy_p.h6
-rw-r--r--src/datavisualization/data/qbar3dseries.cpp53
-rw-r--r--src/datavisualization/data/qbar3dseries_p.h1
-rw-r--r--src/datavisualization/data/qbardataitem.cpp2
-rw-r--r--src/datavisualization/data/qbardataitem_p.h3
-rw-r--r--src/datavisualization/data/qbardataproxy.cpp12
-rw-r--r--src/datavisualization/data/qbardataproxy_p.h1
-rw-r--r--src/datavisualization/data/qcustom3ditem.cpp422
-rw-r--r--src/datavisualization/data/qcustom3ditem.h102
-rw-r--r--src/datavisualization/data/qcustom3ditem_p.h99
-rw-r--r--src/datavisualization/data/qcustom3dlabel.cpp358
-rw-r--r--src/datavisualization/data/qcustom3dlabel.h93
-rw-r--r--src/datavisualization/data/qcustom3dlabel_p.h73
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy.cpp2
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy.cpp403
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy.h66
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy_p.h12
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy.cpp326
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy.h47
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy_p.h10
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy.cpp503
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy.h80
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy_p.h14
-rw-r--r--src/datavisualization/data/qscatter3dseries.cpp47
-rw-r--r--src/datavisualization/data/qscatter3dseries_p.h1
-rw-r--r--src/datavisualization/data/qscatterdataitem.cpp2
-rw-r--r--src/datavisualization/data/qscatterdataitem_p.h3
-rw-r--r--src/datavisualization/data/qscatterdataproxy.cpp3
-rw-r--r--src/datavisualization/data/qsurface3dseries.cpp49
-rw-r--r--src/datavisualization/data/qsurface3dseries_p.h1
-rw-r--r--src/datavisualization/data/qsurfacedataitem.cpp2
-rw-r--r--src/datavisualization/data/qsurfacedataitem_p.h3
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.cpp36
-rw-r--r--src/datavisualization/data/scatteritemmodelhandler.cpp76
-rw-r--r--src/datavisualization/data/scatteritemmodelhandler_p.h12
-rw-r--r--src/datavisualization/data/scatterrenderitem.cpp6
-rw-r--r--src/datavisualization/data/scatterrenderitem_p.h4
-rw-r--r--src/datavisualization/data/surfaceitemmodelhandler.cpp199
-rw-r--r--src/datavisualization/data/surfaceitemmodelhandler_p.h16
-rw-r--r--src/datavisualization/doc/qtdatavisualization.qdocconf10
-rw-r--r--src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp8
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc180
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-color.qdoc35
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization.qdoc59
-rw-r--r--src/datavisualization/engine/abstract3dcontroller.cpp563
-rw-r--r--src/datavisualization/engine/abstract3dcontroller_p.h141
-rw-r--r--src/datavisualization/engine/abstract3drenderer.cpp797
-rw-r--r--src/datavisualization/engine/abstract3drenderer_p.h123
-rw-r--r--src/datavisualization/engine/axisrendercache.cpp89
-rw-r--r--src/datavisualization/engine/axisrendercache_p.h81
-rw-r--r--src/datavisualization/engine/bars3dcontroller.cpp133
-rw-r--r--src/datavisualization/engine/bars3dcontroller_p.h23
-rw-r--r--src/datavisualization/engine/bars3drenderer.cpp2245
-rw-r--r--src/datavisualization/engine/bars3drenderer_p.h51
-rw-r--r--src/datavisualization/engine/barseriesrendercache.cpp42
-rw-r--r--src/datavisualization/engine/barseriesrendercache_p.h61
-rw-r--r--src/datavisualization/engine/drawer.cpp174
-rw-r--r--src/datavisualization/engine/drawer_p.h12
-rw-r--r--src/datavisualization/engine/engine.pri8
-rw-r--r--src/datavisualization/engine/engine.qrc5
-rw-r--r--src/datavisualization/engine/meshes/backgroundNoFloor.obj (renamed from src/datavisualization/engine/meshes/backgroundNegatives.obj)20
-rw-r--r--src/datavisualization/engine/q3dbars.cpp8
-rw-r--r--src/datavisualization/engine/q3dcamera.cpp23
-rw-r--r--src/datavisualization/engine/q3dlight.cpp4
-rw-r--r--src/datavisualization/engine/q3dobject.cpp3
-rw-r--r--src/datavisualization/engine/q3dscatter.cpp6
-rw-r--r--src/datavisualization/engine/q3dscene.cpp17
-rw-r--r--src/datavisualization/engine/q3dscene.h2
-rw-r--r--src/datavisualization/engine/q3dscene_p.h1
-rw-r--r--src/datavisualization/engine/q3dsurface.cpp6
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.cpp355
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.h65
-rw-r--r--src/datavisualization/engine/qabstract3dgraph_p.h5
-rw-r--r--src/datavisualization/engine/scatter3dcontroller.cpp85
-rw-r--r--src/datavisualization/engine/scatter3dcontroller_p.h13
-rw-r--r--src/datavisualization/engine/scatter3drenderer.cpp1924
-rw-r--r--src/datavisualization/engine/scatter3drenderer_p.h53
-rw-r--r--src/datavisualization/engine/scatterseriesrendercache.cpp50
-rw-r--r--src/datavisualization/engine/scatterseriesrendercache_p.h77
-rw-r--r--src/datavisualization/engine/selectionpointer.cpp37
-rw-r--r--src/datavisualization/engine/selectionpointer_p.h12
-rw-r--r--src/datavisualization/engine/seriesrendercache.cpp112
-rw-r--r--src/datavisualization/engine/seriesrendercache_p.h33
-rw-r--r--src/datavisualization/engine/shaders/colorOnY.frag6
-rw-r--r--src/datavisualization/engine/shaders/colorOnY_ES2.frag10
-rw-r--r--src/datavisualization/engine/shaders/default.frag8
-rw-r--r--src/datavisualization/engine/shaders/default.vert10
-rw-r--r--src/datavisualization/engine/shaders/default_ES2.frag12
-rw-r--r--src/datavisualization/engine/shaders/plainColor.frag5
-rw-r--r--src/datavisualization/engine/shaders/shadow.frag6
-rw-r--r--src/datavisualization/engine/shaders/shadow.vert8
-rw-r--r--src/datavisualization/engine/shaders/shadowNoTex.frag8
-rw-r--r--src/datavisualization/engine/shaders/shadowNoTexColorOnY.frag6
-rw-r--r--src/datavisualization/engine/shaders/surface.frag6
-rw-r--r--src/datavisualization/engine/shaders/surfaceFlat.frag6
-rw-r--r--src/datavisualization/engine/shaders/surfaceFlat.vert8
-rw-r--r--src/datavisualization/engine/shaders/surfaceShadowFlat.frag6
-rw-r--r--src/datavisualization/engine/shaders/surfaceShadowFlat.vert8
-rw-r--r--src/datavisualization/engine/shaders/surfaceShadowNoTex.frag6
-rw-r--r--src/datavisualization/engine/shaders/surface_ES2.frag10
-rw-r--r--src/datavisualization/engine/shaders/texture.frag37
-rw-r--r--src/datavisualization/engine/shaders/texture.vert28
-rw-r--r--src/datavisualization/engine/shaders/texture_ES2.frag40
-rw-r--r--src/datavisualization/engine/surface3dcontroller.cpp100
-rw-r--r--src/datavisualization/engine/surface3dcontroller_p.h8
-rw-r--r--src/datavisualization/engine/surface3drenderer.cpp1543
-rw-r--r--src/datavisualization/engine/surface3drenderer_p.h44
-rw-r--r--src/datavisualization/engine/surfaceseriesrendercache.cpp39
-rw-r--r--src/datavisualization/engine/surfaceseriesrendercache_p.h28
-rw-r--r--src/datavisualization/global/datavisualizationglobal_p.h14
-rw-r--r--src/datavisualization/global/qdatavisualizationglobal.h4
-rw-r--r--src/datavisualization/input/q3dinputhandler.cpp16
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler.cpp8
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler_p.h3
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler.cpp3
-rw-r--r--src/datavisualization/theme/q3dtheme.cpp4
-rw-r--r--src/datavisualization/utils/abstractobjecthelper_p.h1
-rw-r--r--src/datavisualization/utils/camerahelper_p.h2
-rw-r--r--src/datavisualization/utils/objecthelper.cpp107
-rw-r--r--src/datavisualization/utils/objecthelper_p.h24
-rw-r--r--src/datavisualization/utils/scatterobjectbufferhelper.cpp226
-rw-r--r--src/datavisualization/utils/scatterobjectbufferhelper_p.h50
-rw-r--r--src/datavisualization/utils/scatterpointbufferhelper.cpp113
-rw-r--r--src/datavisualization/utils/scatterpointbufferhelper_p.h61
-rw-r--r--src/datavisualization/utils/shaderhelper_p.h1
-rw-r--r--src/datavisualization/utils/surfaceobject.cpp211
-rw-r--r--src/datavisualization/utils/surfaceobject_p.h32
-rw-r--r--src/datavisualization/utils/texturehelper.cpp18
-rw-r--r--src/datavisualization/utils/texturehelper_p.h3
-rw-r--r--src/datavisualization/utils/utils.cpp46
-rw-r--r--src/datavisualization/utils/utils.pri8
-rw-r--r--src/datavisualization/utils/utils_p.h18
-rw-r--r--src/datavisualizationqml2/abstractdeclarative.cpp158
-rw-r--r--src/datavisualizationqml2/abstractdeclarative_p.h70
-rw-r--r--src/datavisualizationqml2/datavisualizationqml2_plugin.cpp32
-rw-r--r--src/datavisualizationqml2/datavisualizationqml2_plugin.h11
-rw-r--r--src/datavisualizationqml2/declarativebars.cpp6
-rw-r--r--src/datavisualizationqml2/declarativebars_p.h6
-rw-r--r--src/datavisualizationqml2/declarativerendernode.cpp26
-rw-r--r--src/datavisualizationqml2/declarativerendernode_p.h4
-rw-r--r--src/datavisualizationqml2/declarativescatter.cpp13
-rw-r--r--src/datavisualizationqml2/declarativescatter_p.h3
-rw-r--r--src/datavisualizationqml2/declarativeseries.cpp12
-rw-r--r--src/datavisualizationqml2/declarativesurface.cpp3
-rw-r--r--src/datavisualizationqml2/declarativesurface_p.h3
-rw-r--r--src/datavisualizationqml2/declarativetheme.cpp16
-rw-r--r--src/datavisualizationqml2/declarativetheme_p.h8
-rw-r--r--src/datavisualizationqml2/designer/Bars3DSpecifics.qml23
-rw-r--r--src/datavisualizationqml2/designer/Scatter3DSpecifics.qml37
-rw-r--r--src/datavisualizationqml2/designer/Surface3DSpecifics.qml38
-rw-r--r--src/datavisualizationqml2/enumtostringmap.cpp15
-rw-r--r--src/datavisualizationqml2/glstatestore.cpp47
-rw-r--r--src/datavisualizationqml2/glstatestore_p.h17
-rw-r--r--src/datavisualizationqml2/plugins.qmltypes450
-rw-r--r--tests/barstest/chart.cpp465
-rw-r--r--tests/barstest/chart.h19
-rw-r--r--tests/barstest/main.cpp68
-rw-r--r--tests/itemmodeltest/itemmodeltest.pro7
-rw-r--r--tests/itemmodeltest/main.cpp315
-rw-r--r--tests/multigraphs/data.cpp2
-rw-r--r--tests/qmlcamera/qml/qmlcamera/Axes.qml4
-rw-r--r--tests/qmlcamera/qml/qmlcamera/Data.qml174
-rw-r--r--tests/qmlcamera/qml/qmlcamera/main.qml45
-rw-r--r--tests/qmlcamera/qmlcamera.qrc4
-rw-r--r--tests/qmlcamera/shuttle.obj6349
-rw-r--r--tests/qmlcamera/shuttle.pngbin0 -> 1361 bytes
-rw-r--r--tests/qmlmultitest/main.cpp47
-rw-r--r--tests/qmlmultitest/qml/qmlmultitest/Data.qml69
-rw-r--r--tests/qmlmultitest/qml/qmlmultitest/NewButton.qml52
-rw-r--r--tests/qmlmultitest/qml/qmlmultitest/main.qml248
-rw-r--r--tests/qmlmultitest/qmlmultitest.pro12
-rw-r--r--tests/qmlmultitest/qmlmultitest.qrc7
-rw-r--r--tests/scattertest/main.cpp178
-rw-r--r--tests/scattertest/scatterchart.cpp561
-rw-r--r--tests/scattertest/scatterchart.h28
-rw-r--r--tests/surfacetest/graphmodifier.cpp458
-rw-r--r--tests/surfacetest/graphmodifier.h22
-rw-r--r--tests/surfacetest/main.cpp111
-rw-r--r--tests/tests.pro4
-rw-r--r--tools/blender/oilrefinery.blendbin0 -> 567896 bytes
-rw-r--r--tools/blender/oilrig.blendbin0 -> 553204 bytes
279 files changed, 30597 insertions, 4295 deletions
diff --git a/.qmake.conf b/.qmake.conf
index c44318c8..9c6617fa 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,4 +1,4 @@
load(qt_build_config)
CONFIG += qt_example_installs
-MODULE_VERSION=1.0.0
+MODULE_VERSION=1.1.0
diff --git a/README b/README
index 7a4b9edb..da0715d0 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
---------------------------
-Qt Data Visualization 1.0.0
+Qt Data Visualization 1.1.0
---------------------------
Qt Data Visualization module provides multiple graph types to visualize data in 3D space
@@ -82,6 +82,9 @@ Known Issues
- Q3DLight class (and Light3D QML item) are currently not usable for anything.
- Changing any of Q3DScene properties affecting subviewports currently has no effect.
- The color style Q3DTheme::ColorStyleObjectGradient doesn't work for surface graphs.
-- Scatter "point" meshes do not support gradients, they always use the base color.
- Widget based examples layout incorrectly in iOS.
- Reparenting a graph to an item in another QQuickWindow is not supported.
+- There is a low-impact binary break between 1.0 and 1.1. The break is due to a QML type
+ registration conflict with QAbstractItemModel between QtDataVisualization and
+ QtCommercial.Charts. Introducing the binary break makes it possible to use both
+ Charts and Data Visualization in the same QML application.
diff --git a/dist/changes-1.1.0 b/dist/changes-1.1.0
new file mode 100644
index 00000000..8a470ccb
--- /dev/null
+++ b/dist/changes-1.1.0
@@ -0,0 +1,77 @@
+Qt Data Visualization 1.1
+
+New features
+------------
+
+- Support for rendering the graph into an image.
+- QValue3DAxisFormatter class for creating custom value axis formatters.
+ With a custom formatter, you can control axis grid line and label positions,
+ as well as fully customize the label strings.
+- Logarithmic value axes are now supported via a QLogValue3DAxisFormatter.
+- Support for adding custom items and labels inside the graph with
+ QCustom3DItem and QCustom3DLabel classes.
+- Q3DScene::selectionQueryPosition now can select axis labels and custom items
+ as well as data items. Selection is detected via QAbstract3DGraph::selectedElement
+ property.
+- The current frames per second (FPS) measurement can be enabled and queried via
+ QAbstract3DGraph::measureFps and QAbstract3DGraph::currentFps properties.
+- QValue3DAxis::reversed property allows drawing the axis in reverse direction.
+- A single item model role can be mapped to multiple properties of the data items
+ when using item model proxies. Regular expression search and replace can be used
+ to make the data unique for each property. Useful for parsing e.g. timestamp field
+ to get values for both rows and columns of a bar chart.
+- Support for aggregating multiple mapping matches in bar and surface item model
+ proxies into single bar or surface point.
+- Support for orthographic projection in graphs via QAbstract3DGraph::orthoProjection.
+- Axis labels can now be set to automatically orient towards the camera with
+ QAbstract3DAxis::labelAutoRotation property to increase label readability
+ at all angles.
+- Bars3D: Clicking row/column labels can now be used to highlight rows/columns if
+ the selection mode allows it.
+- Surface3D: X values in items of a row and Z values of items of a column can now be
+ either ascending or descending for the surface to be valid.
+- Aspect ratio, i.e. the ratio between horizontal and vertical axes can be changed
+ for scatter and surface graphs.
+- Axis titles can now be optionally displayed beside the axes in the primary graph view.
+- Added support for optional optimizations via QAbstract3DGraph::optimizationHints.
+ Note: This feature is currently in beta. The only optimization hint currently supported
+ is OptimizationStatic for scatter graphs, which vastly improves the render speed for
+ large static data sets, allowing millions of points to be displayed on desktop platforms.
+
+Fixed issues
+------------
+
+General:
+- Optimized series caching in renderer.
+- Optimized object mesh caching in renderer.
+- Optimized visible are calculation for surface graphs.
+- Fixed crash when setting null color/gradient to theme in QML.
+- Fixed overriding theme color with explicit series color in QML.
+- Optimized changing only single item/row in data proxies.
+- Fixed a crash when using both Qt Charts and Qt Data Visualization in the same application.
+ Note: This causes a binary break for the item model proxies.
+- Bars3D: Fixed incorrect label positioning in slice mode when grid off.
+- Bars3D: User defined meshes that have flat base no longer glimmer through graph floor
+ when viewed from below.
+- Scatter3D: Range gradient now works for MeshPoints.
+- Surface3D: Fixed a crash when shadows were supported by OpenGL but flat shading was not.
+- Surface3D: Selection texture no longer gets corrupted in case there are multiple surfaces
+ visible and the axis ranges are adjusted.
+- Surface3D: Fixed shadow culling, improving the shadow cast on the surface itself.
+
+New examples
+------------
+
+- customitems: Example about showing custom items and labels in the graph.
+- draggableaxes: Shows how to implement an input handler to enable scrolling
+ the graph via dragging the axes.
+- qmlaxisdrag: Shows how to implement an input handler to enable scrolling
+ the graph via dragging the axes in QML.
+- qmlaxisformatter: Shows how to use customize axes using axis formatters.
+
+Platform specific changes
+-------------------------
+
+- Fixed issue with graph not always updating before rotating the graph in iOS.
+- Fixed shader linking error on some Android versions.
+- Fixed memory leaks in Mac and Android builds.
diff --git a/examples/datavisualization/bars/doc/images/bars-example.png b/examples/datavisualization/bars/doc/images/bars-example.png
index 5bd2c7d9..fb79668d 100644
--- a/examples/datavisualization/bars/doc/images/bars-example.png
+++ b/examples/datavisualization/bars/doc/images/bars-example.png
Binary files differ
diff --git a/examples/datavisualization/bars/doc/src/bars.qdoc b/examples/datavisualization/bars/doc/src/bars.qdoc
index 361078bb..1fa3f934 100644
--- a/examples/datavisualization/bars/doc/src/bars.qdoc
+++ b/examples/datavisualization/bars/doc/src/bars.qdoc
@@ -29,6 +29,7 @@
\li Create an application with Q3DBars and some widgets
\li Use QBar3DSeries and QBarDataProxy to set data to the graph
\li Adjust some graph and series properties using widget controls
+ \li Select a row or a column by clicking an axis label
\endlist
It also demonstrates how having negative bar values affects the graph.
@@ -167,6 +168,20 @@
\li Font size
\endlist
+ \section1 Selecting a row/column by clicking an axis label
+
+ Selection by axis label is default functionality for bar graphs. As an example, you can select
+ rows by clicking an axis label in the following way:
+
+ \list
+ \li Change selection mode to \c SelectionRow
+ \li Click a year label
+ \li The row with the clicked year is selected
+ \endlist
+
+ You can use the same method with \c SelectionSlice and \c SelectionItem flags, as long as
+ you have either \c SelectionRow or \c SelectionColumn set as well.
+
\section1 Example contents
*/
diff --git a/examples/datavisualization/bars/graphmodifier.cpp b/examples/datavisualization/bars/graphmodifier.cpp
index 5df4066c..9c280bfb 100644
--- a/examples/datavisualization/bars/graphmodifier.cpp
+++ b/examples/datavisualization/bars/graphmodifier.cpp
@@ -68,9 +68,15 @@ GraphModifier::GraphModifier(Q3DBars *bargraph)
m_temperatureAxis->setSubSegmentCount(m_subSegments);
m_temperatureAxis->setRange(m_minval, m_maxval);
m_temperatureAxis->setLabelFormat(QString(QStringLiteral("%.1f ") + celsiusString));
+ m_temperatureAxis->setLabelAutoRotation(30.0f);
+ m_temperatureAxis->setTitleVisible(true);
m_yearAxis->setTitle("Year");
+ m_yearAxis->setLabelAutoRotation(30.0f);
+ m_yearAxis->setTitleVisible(true);
m_monthAxis->setTitle("Month");
+ m_monthAxis->setLabelAutoRotation(30.0f);
+ m_monthAxis->setTitleVisible(true);
m_graph->setValueAxis(m_temperatureAxis);
m_graph->setRowAxis(m_yearAxis);
@@ -236,6 +242,27 @@ void GraphModifier::shadowQualityUpdatedByVisual(QAbstract3DGraph::ShadowQuality
emit shadowQualityChanged(quality);
}
+void GraphModifier::changeLabelRotation(int rotation)
+{
+ m_temperatureAxis->setLabelAutoRotation(float(rotation));
+ m_monthAxis->setLabelAutoRotation(float(rotation));
+ m_yearAxis->setLabelAutoRotation(float(rotation));
+}
+
+void GraphModifier::setAxisTitleVisibility(bool enabled)
+{
+ m_temperatureAxis->setTitleVisible(enabled);
+ m_monthAxis->setTitleVisible(enabled);
+ m_yearAxis->setTitleVisible(enabled);
+}
+
+void GraphModifier::setAxisTitleFixed(bool enabled)
+{
+ m_temperatureAxis->setTitleFixed(enabled);
+ m_monthAxis->setTitleFixed(enabled);
+ m_yearAxis->setTitleFixed(enabled);
+}
+
void GraphModifier::changeShadowQuality(int quality)
{
QAbstract3DGraph::ShadowQuality sq = QAbstract3DGraph::ShadowQuality(quality);
@@ -278,3 +305,8 @@ void GraphModifier::setSeriesVisibility(int enabled)
{
m_secondarySeries->setVisible(bool(enabled));
}
+
+void GraphModifier::setReverseValueAxis(int enabled)
+{
+ m_graph->valueAxis()->setReversed(enabled);
+}
diff --git a/examples/datavisualization/bars/graphmodifier.h b/examples/datavisualization/bars/graphmodifier.h
index cac002a1..107ffbab 100644
--- a/examples/datavisualization/bars/graphmodifier.h
+++ b/examples/datavisualization/bars/graphmodifier.h
@@ -48,6 +48,7 @@ public:
void setGridEnabled(int enabled);
void setSmoothBars(int smooth);
void setSeriesVisibility(int enabled);
+ void setReverseValueAxis(int enabled);
public slots:
void changeRange(int range);
@@ -56,6 +57,9 @@ public slots:
void changeTheme(int theme);
void changeShadowQuality(int quality);
void shadowQualityUpdatedByVisual(QAbstract3DGraph::ShadowQuality shadowQuality);
+ void changeLabelRotation(int rotation);
+ void setAxisTitleVisibility(bool enabled);
+ void setAxisTitleFixed(bool enabled);
signals:
void shadowQualityChanged(int quality);
diff --git a/examples/datavisualization/bars/main.cpp b/examples/datavisualization/bars/main.cpp
index e6461202..96abdc51 100644
--- a/examples/datavisualization/bars/main.cpp
+++ b/examples/datavisualization/bars/main.cpp
@@ -132,6 +132,10 @@ int main(int argc, char **argv)
seriesCheckBox->setText(QStringLiteral("Show second series"));
seriesCheckBox->setChecked(false);
+ QCheckBox *reverseValueAxisCheckBox = new QCheckBox(widget);
+ reverseValueAxisCheckBox->setText(QStringLiteral("Reverse value axis"));
+ reverseValueAxisCheckBox->setChecked(false);
+
//! [4]
QSlider *rotationSliderX = new QSlider(Qt::Horizontal, widget);
rotationSliderX->setTickInterval(30);
@@ -179,6 +183,21 @@ int main(int argc, char **argv)
rangeList->addItem(QStringLiteral("All"));
rangeList->setCurrentIndex(8);
+ QCheckBox *axisTitlesVisibleCB = new QCheckBox(widget);
+ axisTitlesVisibleCB->setText(QStringLiteral("Axis titles visible"));
+ axisTitlesVisibleCB->setChecked(true);
+
+ QCheckBox *axisTitlesFixedCB = new QCheckBox(widget);
+ axisTitlesFixedCB->setText(QStringLiteral("Axis titles fixed"));
+ axisTitlesFixedCB->setChecked(true);
+
+ QSlider *axisLabelRotationSlider = new QSlider(Qt::Horizontal, widget);
+ axisLabelRotationSlider->setTickInterval(10);
+ axisLabelRotationSlider->setTickPosition(QSlider::TicksBelow);
+ axisLabelRotationSlider->setMinimum(0);
+ axisLabelRotationSlider->setValue(30);
+ axisLabelRotationSlider->setMaximum(90);
+
//! [5]
vLayout->addWidget(new QLabel(QStringLiteral("Rotate horizontally")));
vLayout->addWidget(rotationSliderX, 0, Qt::AlignTop);
@@ -191,6 +210,9 @@ int main(int argc, char **argv)
vLayout->addWidget(gridCheckBox);
vLayout->addWidget(smoothCheckBox);
vLayout->addWidget(seriesCheckBox);
+ vLayout->addWidget(reverseValueAxisCheckBox);
+ vLayout->addWidget(axisTitlesVisibleCB);
+ vLayout->addWidget(axisTitlesFixedCB);
vLayout->addWidget(new QLabel(QStringLiteral("Show year")));
vLayout->addWidget(rangeList);
vLayout->addWidget(new QLabel(QStringLiteral("Change bar style")));
@@ -204,7 +226,9 @@ int main(int argc, char **argv)
vLayout->addWidget(new QLabel(QStringLiteral("Change font")));
vLayout->addWidget(fontList);
vLayout->addWidget(new QLabel(QStringLiteral("Adjust font size")));
- vLayout->addWidget(fontSizeSlider, 1, Qt::AlignTop);
+ vLayout->addWidget(fontSizeSlider);
+ vLayout->addWidget(new QLabel(QStringLiteral("Axis label rotation")));
+ vLayout->addWidget(axisLabelRotationSlider, 1, Qt::AlignTop);
//! [2]
GraphModifier *modifier = new GraphModifier(widgetgraph);
@@ -228,6 +252,8 @@ int main(int argc, char **argv)
&GraphModifier::setSmoothBars);
QObject::connect(seriesCheckBox, &QCheckBox::stateChanged, modifier,
&GraphModifier::setSeriesVisibility);
+ QObject::connect(reverseValueAxisCheckBox, &QCheckBox::stateChanged, modifier,
+ &GraphModifier::setReverseValueAxis);
QObject::connect(modifier, &GraphModifier::backgroundEnabledChanged,
backgroundCheckBox, &QCheckBox::setChecked);
@@ -264,6 +290,12 @@ int main(int argc, char **argv)
QObject::connect(modifier, &GraphModifier::fontChanged, fontList,
&QFontComboBox::setCurrentFont);
+ QObject::connect(axisTitlesVisibleCB, &QCheckBox::stateChanged, modifier,
+ &GraphModifier::setAxisTitleVisibility);
+ QObject::connect(axisTitlesFixedCB, &QCheckBox::stateChanged, modifier,
+ &GraphModifier::setAxisTitleFixed);
+ QObject::connect(axisLabelRotationSlider, &QSlider::valueChanged, modifier,
+ &GraphModifier::changeLabelRotation);
//! [3]
widget->show();
return app.exec();
diff --git a/examples/datavisualization/custominput/doc/src/custominput.qdoc b/examples/datavisualization/custominput/doc/src/custominput.qdoc
index 59d3c090..46bcdb8d 100644
--- a/examples/datavisualization/custominput/doc/src/custominput.qdoc
+++ b/examples/datavisualization/custominput/doc/src/custominput.qdoc
@@ -22,49 +22,55 @@
\ingroup qtdatavisualization_examples
\brief Implementing custom input handler in a widget application.
- The Custom Input example shows how to customize the 3D graph controls in a widget application using a custom graph input handler to capture and process mouse events.
- The code in this example shows also how the camera is controlled by using QPropertyAnimation 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.
+ The Custom Input example shows how to customize the 3D graph controls in a widget application
+ using a custom graph input handler to capture and process mouse events.
+ The code in this example shows also how the camera is controlled by using QPropertyAnimation
+ 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.
\image custominput-example.png
\section1 Replacing default input handling
- The default input handling mechanism is replaced by setting the active input handler of \l Q3DScatter
- to \c CustomInputHandler that implements the custom behavior.
+ The default input handling mechanism is replaced by setting the active input handler of
+ Q3DScatter to \c CustomInputHandler that implements the custom behavior.
\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.
+ 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
+ QAbstract3DInputHandler::inputPosition property.
\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.
+ 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 custominput/scatterdatamodifier.cpp 1
\section1 Implementing custom zoom handling
- The camera has a zoom factor that represents amount of zoom in percentages. In this example the zoom range is limited
- 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.
+ The camera has a zoom factor that represents amount of zoom in percentages. In this example the
+ zoom range is limited 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 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.
+ 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 Q3DCamera::xRotation property.
\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.
+ The camera movement up and down is implemented with a QSequentialAnimationGroup that varies
+ the Q3DCamera::yRotation property of the camera from 5 degrees to 45 degrees and back with in
+ and out easing.
\snippet custominput/scatterdatamodifier.cpp 3
*/
diff --git a/examples/datavisualization/customitems/customitemgraph.cpp b/examples/datavisualization/customitems/customitemgraph.cpp
new file mode 100644
index 00000000..96ce5e46
--- /dev/null
+++ b/examples/datavisualization/customitems/customitemgraph.cpp
@@ -0,0 +1,317 @@
+/****************************************************************************
+**
+** 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 "customitemgraph.h"
+
+#include <QtDataVisualization/Q3DTheme>
+#include <QtDataVisualization/QCustom3DItem>
+#include <QtDataVisualization/QCustom3DLabel>
+#include <QtGui/QImage>
+
+using namespace QtDataVisualization;
+
+CustomItemGraph::CustomItemGraph(Q3DSurface *surface, QLabel *label)
+ : m_graph(surface),
+ m_textField(label),
+ m_previouslyAnimatedItem(0)
+{
+ QImage layerOneHMap(":/maps/layer_1.png");
+ QHeightMapSurfaceDataProxy *layerOneProxy = new QHeightMapSurfaceDataProxy(layerOneHMap);
+ QSurface3DSeries *layerOneSeries = new QSurface3DSeries(layerOneProxy);
+ layerOneSeries->setItemLabelFormat(QStringLiteral("(@xLabel, @zLabel): @yLabel"));
+ layerOneProxy->setValueRanges(34.0f, 40.0f, 18.0f, 24.0f);
+ layerOneSeries->setDrawMode(QSurface3DSeries::DrawSurface);
+ layerOneSeries->setFlatShadingEnabled(false);
+
+ QImage layerTwoHMap(":/maps/layer_2.png");
+ QHeightMapSurfaceDataProxy *layerTwoProxy = new QHeightMapSurfaceDataProxy(layerTwoHMap);
+ QSurface3DSeries *layerTwoSeries = new QSurface3DSeries(layerTwoProxy);
+ layerTwoSeries->setItemLabelFormat(QStringLiteral("(@xLabel, @zLabel): @yLabel"));
+ layerTwoProxy->setValueRanges(34.0f, 40.0f, 18.0f, 24.0f);
+ layerTwoSeries->setDrawMode(QSurface3DSeries::DrawSurface);
+ layerTwoSeries->setFlatShadingEnabled(false);
+
+ QImage layerThreeHMap(":/maps/layer_3.png");
+ QHeightMapSurfaceDataProxy *layerThreeProxy = new QHeightMapSurfaceDataProxy(layerThreeHMap);
+ QSurface3DSeries *layerThreeSeries = new QSurface3DSeries(layerThreeProxy);
+ layerThreeSeries->setItemLabelFormat(QStringLiteral("(@xLabel, @zLabel): @yLabel"));
+ layerThreeProxy->setValueRanges(34.0f, 40.0f, 18.0f, 24.0f);
+ layerThreeSeries->setDrawMode(QSurface3DSeries::DrawSurface);
+ layerThreeSeries->setFlatShadingEnabled(false);
+
+ m_graph->axisX()->setLabelFormat("%.1f N");
+ m_graph->axisZ()->setLabelFormat("%.1f E");
+ m_graph->axisX()->setRange(34.0f, 40.0f);
+ m_graph->axisY()->setRange(0.0f, 200.0f);
+ 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->addSeries(layerOneSeries);
+ m_graph->addSeries(layerTwoSeries);
+ m_graph->addSeries(layerThreeSeries);
+
+ QLinearGradient grOne;
+ grOne.setColorAt(0.0, Qt::black);
+ grOne.setColorAt(0.38, Qt::darkYellow);
+ grOne.setColorAt(0.39, Qt::darkGreen);
+ grOne.setColorAt(0.5, Qt::darkGray);
+ grOne.setColorAt(1.0, Qt::gray);
+ m_graph->seriesList().at(0)->setBaseGradient(grOne);
+ m_graph->seriesList().at(0)->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
+
+ QLinearGradient grTwo;
+ grTwo.setColorAt(0.385, Qt::blue);
+ grTwo.setColorAt(0.395, Qt::white);
+ m_graph->seriesList().at(1)->setBaseGradient(grTwo);
+ m_graph->seriesList().at(1)->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
+
+ QLinearGradient grThree;
+ grThree.setColorAt(0.0, Qt::white);
+ grThree.setColorAt(0.05, Qt::black);
+ m_graph->seriesList().at(2)->setBaseGradient(grThree);
+ m_graph->seriesList().at(2)->setColorStyle(Q3DTheme::ColorStyleRangeGradient);
+
+ m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetFront);
+
+ connect(m_graph, &QAbstract3DGraph::selectedElementChanged,
+ this, &CustomItemGraph::handleElementSelected);
+
+ m_selectionAnimation = new QPropertyAnimation(this);
+ m_selectionAnimation->setPropertyName("scaling");
+ m_selectionAnimation->setDuration(500);
+ m_selectionAnimation->setLoopCount(-1);
+
+ QFont titleFont = QFont("Century Gothic", 30);
+ titleFont.setBold(true);
+ QCustom3DLabel *titleLabel = new QCustom3DLabel("Oil Rigs on Imaginary Sea", titleFont,
+ QVector3D(0.0f, 1.2f, 0.0f),
+ QVector3D(1.0f, 1.0f, 0.0f),
+ QQuaternion());
+ titleLabel->setPositionAbsolute(true);
+ titleLabel->setFacingCamera(true);
+ titleLabel->setBackgroundColor(QColor(0x66cdaa));
+ m_graph->addCustomItem(titleLabel);
+}
+
+CustomItemGraph::~CustomItemGraph()
+{
+ delete m_graph;
+}
+
+void CustomItemGraph::toggleItemOne(bool show)
+{
+ //! [1]
+ QVector3D positionOne = QVector3D(39.0f, 77.0f, 19.2f);
+ //! [1]
+ QVector3D positionOnePipe = QVector3D(39.0f, 45.0f, 19.2f);
+ QVector3D positionOneLabel = QVector3D(39.0f, 107.0f, 19.2f);
+ if (show) {
+ //! [0]
+ QImage color = QImage(2, 2, QImage::Format_RGB32);
+ color.fill(Qt::red);
+ //! [0]
+ //! [2]
+ QCustom3DItem *item = new QCustom3DItem(":/items/oilrig.obj", positionOne,
+ QVector3D(0.025f, 0.025f, 0.025f),
+ QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, 45.0f),
+ color);
+ //! [2]
+ //! [3]
+ m_graph->addCustomItem(item);
+ //! [3]
+ item = new QCustom3DItem(":/items/pipe.obj", positionOnePipe,
+ QVector3D(0.005f, 0.5f, 0.005f),
+ QQuaternion(),
+ color);
+ item->setShadowCasting(false);
+ m_graph->addCustomItem(item);
+
+ QCustom3DLabel *label = new QCustom3DLabel();
+ label->setText("Oil Rig One");
+ label->setPosition(positionOneLabel);
+ label->setScaling(QVector3D(1.0f, 1.0f, 1.0f));
+ m_graph->addCustomItem(label);
+ } else {
+ resetSelection();
+ //! [4]
+ m_graph->removeCustomItemAt(positionOne);
+ //! [4]
+ m_graph->removeCustomItemAt(positionOnePipe);
+ m_graph->removeCustomItemAt(positionOneLabel);
+ }
+}
+
+void CustomItemGraph::toggleItemTwo(bool show)
+{
+ QVector3D positionTwo = QVector3D(34.5f, 77.0f, 23.4f);
+ QVector3D positionTwoPipe = QVector3D(34.5f, 45.0f, 23.4f);
+ QVector3D positionTwoLabel = QVector3D(34.5f, 107.0f, 23.4f);
+ if (show) {
+ QImage color = QImage(2, 2, QImage::Format_RGB32);
+ color.fill(Qt::red);
+ QCustom3DItem *item = new QCustom3DItem();
+ item->setMeshFile(":/items/oilrig.obj");
+ item->setPosition(positionTwo);
+ item->setScaling(QVector3D(0.025f, 0.025f, 0.025f));
+ item->setRotation(QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, 25.0f));
+ item->setTextureImage(color);
+ m_graph->addCustomItem(item);
+ item = new QCustom3DItem(":/items/pipe.obj", positionTwoPipe,
+ QVector3D(0.005f, 0.5f, 0.005f),
+ QQuaternion(),
+ color);
+ item->setShadowCasting(false);
+ m_graph->addCustomItem(item);
+
+ QCustom3DLabel *label = new QCustom3DLabel();
+ label->setText("Oil Rig Two");
+ label->setPosition(positionTwoLabel);
+ label->setScaling(QVector3D(1.0f, 1.0f, 1.0f));
+ m_graph->addCustomItem(label);
+ } else {
+ resetSelection();
+ m_graph->removeCustomItemAt(positionTwo);
+ m_graph->removeCustomItemAt(positionTwoPipe);
+ m_graph->removeCustomItemAt(positionTwoLabel);
+ }
+}
+
+void CustomItemGraph::toggleItemThree(bool show)
+{
+ QVector3D positionThree = QVector3D(34.5f, 86.0f, 19.1f);
+ QVector3D positionThreeLabel = QVector3D(34.5f, 116.0f, 19.1f);
+ if (show) {
+ QImage color = QImage(2, 2, QImage::Format_RGB32);
+ color.fill(Qt::darkMagenta);
+ QCustom3DItem *item = new QCustom3DItem();
+ item->setMeshFile(":/items/refinery.obj");
+ item->setPosition(positionThree);
+ item->setScaling(QVector3D(0.04f, 0.04f, 0.04f));
+ item->setRotation(QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, 75.0f));
+ item->setTextureImage(color);
+ m_graph->addCustomItem(item);
+
+ QCustom3DLabel *label = new QCustom3DLabel();
+ label->setText("Refinery");
+ label->setPosition(positionThreeLabel);
+ label->setScaling(QVector3D(1.0f, 1.0f, 1.0f));
+ m_graph->addCustomItem(label);
+ } else {
+ resetSelection();
+ m_graph->removeCustomItemAt(positionThree);
+ m_graph->removeCustomItemAt(positionThreeLabel);
+ }
+}
+
+void CustomItemGraph::toggleSeeThrough(bool seethrough)
+{
+ if (seethrough) {
+ m_graph->seriesList().at(0)->setDrawMode(QSurface3DSeries::DrawWireframe);
+ m_graph->seriesList().at(1)->setDrawMode(QSurface3DSeries::DrawWireframe);
+ } else {
+ m_graph->seriesList().at(0)->setDrawMode(QSurface3DSeries::DrawSurface);
+ m_graph->seriesList().at(1)->setDrawMode(QSurface3DSeries::DrawSurface);
+ }
+}
+
+void CustomItemGraph::toggleOilHighlight(bool highlight)
+{
+ if (highlight) {
+ QLinearGradient grThree;
+ grThree.setColorAt(0.0, Qt::black);
+ grThree.setColorAt(0.05, Qt::red);
+ m_graph->seriesList().at(2)->setBaseGradient(grThree);
+ } else {
+ QLinearGradient grThree;
+ grThree.setColorAt(0.0, Qt::white);
+ grThree.setColorAt(0.05, Qt::black);
+ m_graph->seriesList().at(2)->setBaseGradient(grThree);
+ }
+}
+
+void CustomItemGraph::toggleShadows(bool shadows)
+{
+ if (shadows)
+ m_graph->setShadowQuality(QAbstract3DGraph::ShadowQualityMedium);
+ else
+ m_graph->setShadowQuality(QAbstract3DGraph::ShadowQualityNone);
+}
+
+void CustomItemGraph::handleElementSelected(QAbstract3DGraph::ElementType type)
+{
+ resetSelection();
+ if (type == QAbstract3DGraph::ElementCustomItem) {
+ QCustom3DItem *item = m_graph->selectedCustomItem();
+ QString text;
+ if (qobject_cast<QCustom3DLabel *>(item) != 0) {
+ text.append("Custom label: ");
+ } else {
+ QStringList split = item->meshFile().split("/");
+ text.append(split.last());
+ text.append(": ");
+ }
+ int index = m_graph->selectedCustomItemIndex();
+ text.append(QString::number(index));
+ m_textField->setText(text);
+ m_previouslyAnimatedItem = item;
+ m_previousScaling = item->scaling();
+ m_selectionAnimation->setTargetObject(item);
+ m_selectionAnimation->setStartValue(item->scaling());
+ m_selectionAnimation->setEndValue(item->scaling() * 1.5f);
+ m_selectionAnimation->start();
+ } else if (type == QAbstract3DGraph::ElementSeries) {
+ QString text = "Surface (";
+ QSurface3DSeries *series = m_graph->selectedSeries();
+ if (series) {
+ QPoint point = series->selectedPoint();
+ QString posStr;
+ posStr.setNum(point.x());
+ text.append(posStr);
+ text.append(", ");
+ posStr.setNum(point.y());
+ text.append(posStr);
+ }
+ text.append(")");
+ m_textField->setText(text);
+ } else if (type > QAbstract3DGraph::ElementSeries
+ && type < QAbstract3DGraph::ElementCustomItem) {
+ int index = m_graph->selectedLabelIndex();
+ QString text;
+ if (type == QAbstract3DGraph::ElementAxisXLabel)
+ text.append("Axis X label: ");
+ else if (type == QAbstract3DGraph::ElementAxisYLabel)
+ text.append("Axis Y label: ");
+ else
+ text.append("Axis Z label: ");
+ text.append(QString::number(index));
+ m_textField->setText(text);
+ } else {
+ m_textField->setText("Nothing");
+ }
+}
+
+void CustomItemGraph::resetSelection()
+{
+ m_selectionAnimation->stop();
+ if (m_previouslyAnimatedItem)
+ m_previouslyAnimatedItem->setScaling(m_previousScaling);
+ m_previouslyAnimatedItem = 0;
+}
diff --git a/examples/datavisualization/customitems/customitemgraph.h b/examples/datavisualization/customitems/customitemgraph.h
new file mode 100644
index 00000000..e86d3910
--- /dev/null
+++ b/examples/datavisualization/customitems/customitemgraph.h
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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 CUSTOMITEMGRAPH_H
+#define CUSTOMITEMGRAPH_H
+
+#include <QtDataVisualization/Q3DSurface>
+#include <QtDataVisualization/QSurfaceDataProxy>
+#include <QtDataVisualization/QHeightMapSurfaceDataProxy>
+#include <QtDataVisualization/QSurface3DSeries>
+#include <QtWidgets/QSlider>
+#include <QtWidgets/QLabel>
+#include <QtCore/QPropertyAnimation>
+
+using namespace QtDataVisualization;
+
+class CustomItemGraph : public QObject
+{
+ Q_OBJECT
+public:
+ explicit CustomItemGraph(Q3DSurface *surface, QLabel *label);
+ ~CustomItemGraph();
+
+ void toggleItemOne(bool show);
+ void toggleItemTwo(bool show);
+ void toggleItemThree(bool show);
+ void toggleSeeThrough(bool seethrough);
+ void toggleOilHighlight(bool highlight);
+ void toggleShadows(bool shadows);
+
+private:
+ void handleElementSelected(QAbstract3DGraph::ElementType type);
+ void resetSelection();
+
+private:
+ Q3DSurface *m_graph;
+ QLabel *m_textField;
+ QPropertyAnimation *m_selectionAnimation;
+ QCustom3DItem *m_previouslyAnimatedItem;
+ QVector3D m_previousScaling;
+};
+
+#endif
diff --git a/examples/datavisualization/customitems/customitems.pro b/examples/datavisualization/customitems/customitems.pro
new file mode 100644
index 00000000..99582ea6
--- /dev/null
+++ b/examples/datavisualization/customitems/customitems.pro
@@ -0,0 +1,19 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+SOURCES += main.cpp \
+ customitemgraph.cpp
+
+HEADERS += customitemgraph.h
+
+QT += widgets
+
+RESOURCES += customitems.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/*
diff --git a/examples/datavisualization/customitems/customitems.qrc b/examples/datavisualization/customitems/customitems.qrc
new file mode 100644
index 00000000..1337c9fc
--- /dev/null
+++ b/examples/datavisualization/customitems/customitems.qrc
@@ -0,0 +1,12 @@
+<RCC>
+ <qresource prefix="/maps">
+ <file>layer_1.png</file>
+ <file>layer_2.png</file>
+ <file>layer_3.png</file>
+ </qresource>
+ <qresource prefix="/items">
+ <file>refinery.obj</file>
+ <file>oilrig.obj</file>
+ <file>pipe.obj</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/customitems/doc/images/customitems-example.png b/examples/datavisualization/customitems/doc/images/customitems-example.png
new file mode 100644
index 00000000..2732638e
--- /dev/null
+++ b/examples/datavisualization/customitems/doc/images/customitems-example.png
Binary files differ
diff --git a/examples/datavisualization/customitems/doc/src/customitems.qdoc b/examples/datavisualization/customitems/doc/src/customitems.qdoc
new file mode 100644
index 00000000..f2699998
--- /dev/null
+++ b/examples/datavisualization/customitems/doc/src/customitems.qdoc
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** 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 customitems
+ \title Custom Items Example
+ \ingroup qtdatavisualization_examples
+ \brief Adding custom items to a surface graph.
+ \since QtDataVisualization 1.1
+
+ The custom items example shows how to add your own custom meshes as items to a graph, and how
+ to remove them.
+
+ \image customitems-example.png
+
+ \section1 Adding custom meshes to the application
+
+ We'll add the meshes in a resource file:
+
+ \code
+ <RCC>
+ ...
+ <qresource prefix="/items">
+ <file>refinery.obj</file>
+ <file>oilrig.obj</file>
+ </qresource>
+ </RCC>
+ \endcode
+
+ \section1 Adding custom item to a graph
+
+ In this example we do not have specific textures for our meshes, so we'll just create a small
+ QImage and fill it with a single color:
+
+ \snippet customitems/customitemgraph.cpp 0
+
+ Then we'll specify the position for the item in a variable. This way we'll be able to use it
+ later for removing the correct item:
+
+ \snippet customitems/customitemgraph.cpp 1
+
+ Then we'll create a new QCustom3DItem with all the parameters:
+
+ \snippet customitems/customitemgraph.cpp 2
+
+ And finally we'll just add the item:
+
+ \snippet customitems/customitemgraph.cpp 3
+
+ \section1 Removing custom item from a graph
+
+ We'll just call \c removeCustomItemAt() with the position of the item:
+
+ \snippet customitems/customitemgraph.cpp 4
+
+ \section1 Example Contents
+*/
diff --git a/examples/datavisualization/customitems/layer_1.png b/examples/datavisualization/customitems/layer_1.png
new file mode 100644
index 00000000..9138c710
--- /dev/null
+++ b/examples/datavisualization/customitems/layer_1.png
Binary files differ
diff --git a/examples/datavisualization/customitems/layer_2.png b/examples/datavisualization/customitems/layer_2.png
new file mode 100644
index 00000000..61631ae8
--- /dev/null
+++ b/examples/datavisualization/customitems/layer_2.png
Binary files differ
diff --git a/examples/datavisualization/customitems/layer_3.png b/examples/datavisualization/customitems/layer_3.png
new file mode 100644
index 00000000..066ffbe7
--- /dev/null
+++ b/examples/datavisualization/customitems/layer_3.png
Binary files differ
diff --git a/examples/datavisualization/customitems/main.cpp b/examples/datavisualization/customitems/main.cpp
new file mode 100644
index 00000000..7f5dd01e
--- /dev/null
+++ b/examples/datavisualization/customitems/main.cpp
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** 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 "customitemgraph.h"
+
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QLabel>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ Q3DSurface *graph = new Q3DSurface();
+ QWidget *container = QWidget::createWindowContainer(graph);
+
+ container->setMinimumSize(QSize(800, 600));
+ container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ container->setFocusPolicy(Qt::StrongFocus);
+
+ QWidget *widget = new QWidget;
+ QHBoxLayout *hLayout = new QHBoxLayout(widget);
+ QVBoxLayout *vLayoutLeft = new QVBoxLayout();
+ vLayoutLeft->setAlignment(Qt::AlignTop);
+ QVBoxLayout *vLayoutRight = new QVBoxLayout();
+ vLayoutRight->setAlignment(Qt::AlignTop);
+ hLayout->addLayout(vLayoutLeft);
+ hLayout->addWidget(container, 1);
+ hLayout->addLayout(vLayoutRight);
+
+ QFont font = QFont("Century Gothic", 14);
+ QLabel *label = new QLabel("Show:");
+ font.setBold(true);
+ label->setFont(font);
+ vLayoutLeft->addWidget(label);
+
+ font.setBold(false);
+ QCheckBox *checkboxOne = new QCheckBox("Oil Rig 1");
+ checkboxOne->setFont(font);
+ vLayoutLeft->addWidget(checkboxOne);
+
+ QCheckBox *checkboxTwo = new QCheckBox("Oil Rig 2");
+ checkboxTwo->setFont(font);
+ vLayoutLeft->addWidget(checkboxTwo);
+
+ QCheckBox *checkboxThree = new QCheckBox("Refinery");
+ checkboxThree->setFont(font);
+ vLayoutLeft->addWidget(checkboxThree);
+
+ QLabel *label2 = new QLabel("Visuals:");
+ font.setBold(true);
+ label2->setFont(font);
+ vLayoutRight->addWidget(label2);
+
+ QCheckBox *checkboxOneRight = new QCheckBox("See-Through");
+ font.setBold(false);
+ checkboxOneRight->setFont(font);
+ vLayoutRight->addWidget(checkboxOneRight);
+
+ QCheckBox *checkboxTwoRight = new QCheckBox("Highlight Oil");
+ checkboxTwoRight->setFont(font);
+ vLayoutRight->addWidget(checkboxTwoRight);
+
+ QCheckBox *checkboxThreeRight = new QCheckBox("Shadows");
+ checkboxThreeRight->setFont(font);
+ checkboxThreeRight->setChecked(true);
+ vLayoutRight->addWidget(checkboxThreeRight);
+
+ QLabel *label3 = new QLabel("Selection:");
+ font.setBold(true);
+ label3->setFont(font);
+ vLayoutRight->addWidget(label3);
+
+ QLabel *label4 = new QLabel("Nothing");
+ font.setBold(false);
+ font.setPointSize(12);
+ label4->setFont(font);
+ vLayoutRight->addWidget(label4);
+
+ widget->setWindowTitle(QStringLiteral("Custom Items Example"));
+
+ widget->show();
+
+ CustomItemGraph *modifier = new CustomItemGraph(graph, label4);
+
+ QObject::connect(checkboxOne, &QCheckBox::stateChanged,
+ modifier, &CustomItemGraph::toggleItemOne);
+ QObject::connect(checkboxTwo, &QCheckBox::stateChanged,
+ modifier, &CustomItemGraph::toggleItemTwo);
+ QObject::connect(checkboxThree, &QCheckBox::stateChanged,
+ modifier, &CustomItemGraph::toggleItemThree);
+
+ QObject::connect(checkboxOneRight, &QCheckBox::stateChanged,
+ modifier, &CustomItemGraph::toggleSeeThrough);
+ QObject::connect(checkboxTwoRight, &QCheckBox::stateChanged,
+ modifier, &CustomItemGraph::toggleOilHighlight);
+ QObject::connect(checkboxThreeRight, &QCheckBox::stateChanged,
+ modifier, &CustomItemGraph::toggleShadows);
+
+ return app.exec();
+}
diff --git a/examples/datavisualization/customitems/oilrig.obj b/examples/datavisualization/customitems/oilrig.obj
new file mode 100644
index 00000000..c3b6ea57
--- /dev/null
+++ b/examples/datavisualization/customitems/oilrig.obj
@@ -0,0 +1,2322 @@
+# Blender v2.66 (sub 0) OBJ File: 'oilrig.blend'
+# www.blender.org
+v 0.057462 2.272318 -1.170324
+v 0.057461 8.181165 -0.128434
+v 0.055540 2.268930 -1.151111
+v 0.055539 8.177776 -0.109221
+v 0.049849 2.265673 -1.132637
+v 0.049849 8.174520 -0.090747
+v 0.040608 2.262671 -1.115611
+v 0.040608 8.171517 -0.073721
+v 0.028172 2.260039 -1.100687
+v 0.028172 8.168886 -0.058798
+v 0.013019 2.257880 -1.088440
+v 0.013018 8.166726 -0.046550
+v -0.004270 2.256275 -1.079339
+v -0.004271 8.165121 -0.037450
+v -0.023029 2.255287 -1.073735
+v -0.023030 8.164133 -0.031846
+v -0.042539 2.254953 -1.071843
+v -0.042539 8.163799 -0.029953
+v -0.062048 2.255287 -1.073735
+v -0.062048 8.164133 -0.031846
+v -0.080807 2.256275 -1.079339
+v -0.080808 8.165121 -0.037450
+v -0.098096 2.257880 -1.088440
+v -0.098096 8.166726 -0.046550
+v -0.113249 2.260039 -1.100687
+v -0.113250 8.168886 -0.058798
+v -0.125685 2.262671 -1.115611
+v -0.125686 8.171517 -0.073721
+v -0.134926 2.265673 -1.132637
+v -0.134927 8.174520 -0.090747
+v -0.140617 2.268930 -1.151111
+v -0.140618 8.177776 -0.109222
+v -0.142538 2.272318 -1.170324
+v -0.142539 8.181165 -0.128434
+v -0.140617 2.275706 -1.189536
+v -0.140618 8.184552 -0.147647
+v -0.134926 2.278963 -1.208011
+v -0.134927 8.187810 -0.166121
+v -0.125685 2.281965 -1.225037
+v -0.125686 8.190812 -0.183147
+v -0.113249 2.284597 -1.239960
+v -0.113250 8.193443 -0.198071
+v -0.098095 2.286757 -1.252208
+v -0.098096 8.195602 -0.210318
+v -0.080807 2.288361 -1.261308
+v -0.080807 8.197207 -0.219419
+v -0.062047 2.289349 -1.266912
+v -0.062048 8.198195 -0.225023
+v -0.042538 2.289683 -1.268804
+v -0.042539 8.198529 -0.226915
+v -0.023029 2.289349 -1.266912
+v -0.023030 8.198195 -0.225023
+v -0.004270 2.288361 -1.261308
+v -0.004271 8.197207 -0.219418
+v 0.013019 2.286757 -1.252207
+v 0.013018 8.195602 -0.210318
+v 0.028172 2.284597 -1.239960
+v 0.028172 8.193443 -0.198070
+v 0.040609 2.281965 -1.225036
+v 0.040608 8.190812 -0.183147
+v 0.049850 2.278963 -1.208010
+v 0.049849 8.187810 -0.166121
+v 0.055540 2.275706 -1.189536
+v 0.055539 8.184552 -0.147646
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.961940 0.308658
+vt 1.000000 0.500000
+vt 0.990393 0.402455
+vt 0.500000 1.000000
+vt 0.597545 0.990393
+vt 0.402456 0.990393
+vt 0.990393 0.597545
+vt 0.915735 0.222215
+vt 0.961940 0.691342
+vt 0.853553 0.146447
+vt 0.915735 0.777785
+vt 0.777785 0.084265
+vt 0.853553 0.853553
+vt 0.691342 0.038060
+vt 0.777785 0.915735
+vt 0.597545 0.009607
+vt 0.691342 0.961940
+vt 0.000000 0.500000
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.038060 0.691342
+vt 0.009607 0.597546
+vt 0.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.308659 0.961940
+vt 0.222215 0.915735
+vt 0.084265 0.222215
+vt 0.146447 0.853554
+vt 0.084266 0.777786
+vn 0.995185 -0.017020 0.096528
+vn 0.956940 -0.050408 0.285877
+vn 0.881921 -0.081857 0.464235
+vn 0.773009 -0.110162 0.624758
+vn 0.634397 -0.134231 0.761264
+vn 0.471397 -0.153144 0.868523
+vn 0.290285 -0.166171 0.942402
+vn 0.098018 -0.172812 0.980066
+vn -0.098022 -0.172812 0.980065
+vn -0.290285 -0.166171 0.942402
+vn -0.471392 -0.153145 0.868526
+vn -0.634399 -0.134231 0.761262
+vn -0.773009 -0.110162 0.624757
+vn -0.881923 -0.081857 0.464231
+vn -0.956941 -0.050407 0.285873
+vn -0.995185 -0.017021 0.096528
+vn -0.995185 0.017021 -0.096529
+vn -0.956940 0.050407 -0.285875
+vn -0.881920 0.081858 -0.464238
+vn -0.773015 0.110160 -0.624751
+vn -0.634391 0.134232 -0.761268
+vn -0.471394 0.153144 -0.868524
+vn -0.290288 0.166171 -0.942401
+vn -0.098006 0.172812 -0.980067
+vn 0.098019 0.172812 -0.980065
+vn 0.290285 0.166171 -0.942402
+vn 0.471401 0.153144 -0.868521
+vn 0.634393 0.134232 -0.761267
+vn 0.773011 0.110161 -0.624755
+vn 0.881922 0.081857 -0.464233
+vn -0.000000 0.984796 0.173713
+vn 0.995185 0.017020 -0.096527
+vn 0.956941 0.050407 -0.285872
+vn -0.000011 -0.984808 -0.173648
+vn 0.995185 -0.017020 0.096529
+vn 0.956940 -0.050407 0.285875
+vn 0.881920 -0.081858 0.464237
+vn 0.773011 -0.110161 0.624755
+vn 0.634396 -0.134231 0.761265
+vn 0.471389 -0.153145 0.868527
+vn 0.290287 -0.166171 0.942402
+vn 0.098019 -0.172812 0.980065
+vn -0.098021 -0.172812 0.980065
+vn -0.290282 -0.166171 0.942403
+vn -0.471402 -0.153144 0.868520
+vn -0.634395 -0.134232 0.761265
+vn -0.773010 -0.110161 0.624756
+vn -0.881922 -0.081857 0.464234
+vn -0.956940 -0.050408 0.285875
+vn -0.995185 -0.017020 0.096527
+vn -0.956940 0.050408 -0.285876
+vn -0.881921 0.081857 -0.464236
+vn -0.773009 0.110162 -0.624757
+vn -0.634391 0.134232 -0.761269
+vn -0.471398 0.153144 -0.868522
+vn -0.290282 0.166171 -0.942403
+vn -0.098016 0.172812 -0.980066
+vn 0.098018 0.172812 -0.980065
+vn 0.290287 0.166171 -0.942402
+vn 0.471399 0.153144 -0.868522
+vn 0.773014 0.110161 -0.624751
+vn 0.881921 0.081857 -0.464236
+vn -0.000000 0.984812 0.173622
+vn -0.000000 0.984812 0.173623
+vn -0.000000 0.984801 0.173685
+vn -0.000000 0.984814 0.173615
+vn -0.000000 0.984810 0.173634
+vn -0.000000 0.984808 0.173649
+vn -0.000000 0.984806 0.173660
+vn -0.000043 0.984788 0.173763
+vn -0.000000 0.984797 0.173710
+vn -0.000000 0.984805 0.173661
+vn -0.000000 0.984810 0.173635
+vn -0.000000 0.984810 0.173637
+vn -0.000000 0.984802 0.173683
+vn -0.000000 0.984814 0.173611
+vn -0.000000 0.984800 0.173689
+vn -0.000000 0.984800 0.173690
+vn -0.000000 0.984801 0.173686
+vn 0.000005 0.984810 0.173637
+vn 0.956941 0.050407 -0.285873
+vn -0.000000 -0.984818 -0.173587
+vn -0.000007 -0.984807 -0.173654
+vn -0.000000 -0.984808 -0.173648
+vn -0.000027 -0.984801 -0.173685
+vn -0.000004 -0.984807 -0.173652
+vn -0.000010 -0.984800 -0.173693
+vn -0.000020 -0.984817 -0.173596
+vn -0.000013 -0.984810 -0.173638
+vn -0.000001 -0.984807 -0.173650
+vn -0.000005 -0.984808 -0.173646
+vn -0.000002 -0.984808 -0.173648
+vn 0.000002 -0.984808 -0.173649
+vn 0.000001 -0.984808 -0.173649
+vn -0.000011 -0.984809 -0.173642
+vn -0.000004 -0.984808 -0.173646
+vn -0.000001 -0.984808 -0.173648
+vn -0.000002 -0.984808 -0.173649
+vn -0.000006 -0.984808 -0.173649
+vn 0.000004 -0.984808 -0.173648
+vn 0.000000 -0.984808 -0.173649
+vn -0.000004 -0.984807 -0.173650
+vn 0.000005 -0.984808 -0.173646
+vn 0.000003 -0.984808 -0.173647
+vn 0.000008 -0.984805 -0.173663
+s off
+f 1/1/1 2/2/1 4/3/1
+f 3/1/2 4/2/2 6/3/2
+f 5/1/3 6/2/3 8/3/3
+f 7/1/4 8/2/4 10/3/4
+f 9/1/5 10/2/5 12/3/5
+f 11/1/6 12/2/6 14/3/6
+f 13/1/7 14/2/7 16/3/7
+f 15/1/8 16/2/8 18/3/8
+f 17/1/9 18/2/9 19/4/9
+f 19/1/10 20/2/10 21/4/10
+f 21/1/11 22/2/11 23/4/11
+f 23/1/12 24/2/12 25/4/12
+f 25/1/13 26/2/13 27/4/13
+f 27/1/14 28/2/14 29/4/14
+f 29/1/15 30/2/15 31/4/15
+f 31/1/16 32/2/16 33/4/16
+f 33/1/17 34/2/17 35/4/17
+f 35/1/18 36/2/18 37/4/18
+f 37/1/19 38/2/19 39/4/19
+f 39/1/20 40/2/20 41/4/20
+f 41/1/21 42/2/21 43/4/21
+f 43/1/22 44/2/22 45/4/22
+f 45/1/23 46/2/23 47/4/23
+f 47/1/24 48/2/24 49/4/24
+f 49/1/25 50/2/25 52/3/25
+f 51/1/26 52/2/26 54/3/26
+f 53/1/27 54/2/27 56/3/27
+f 55/1/28 56/2/28 58/3/28
+f 57/1/29 58/2/29 60/3/29
+f 59/1/30 60/2/30 62/3/30
+f 48/5/31 52/6/31 50/7/31
+f 63/1/32 64/2/32 2/3/32
+f 61/1/33 62/2/33 64/3/33
+f 1/8/34 3/9/34 63/10/34
+f 3/4/35 1/1/35 4/3/35
+f 5/4/36 3/1/36 6/3/36
+f 7/4/37 5/1/37 8/3/37
+f 9/4/38 7/1/38 10/3/38
+f 11/4/39 9/1/39 12/3/39
+f 13/4/40 11/1/40 14/3/40
+f 15/4/41 13/1/41 16/3/41
+f 17/4/42 15/1/42 18/3/42
+f 18/2/43 20/3/43 19/4/43
+f 20/2/44 22/3/44 21/4/44
+f 22/2/45 24/3/45 23/4/45
+f 24/2/46 26/3/46 25/4/46
+f 26/2/47 28/3/47 27/4/47
+f 28/2/48 30/3/48 29/4/48
+f 30/2/49 32/3/49 31/4/49
+f 32/2/50 34/3/50 33/4/50
+f 34/2/17 36/3/17 35/4/17
+f 36/2/51 38/3/51 37/4/51
+f 38/2/52 40/3/52 39/4/52
+f 40/2/53 42/3/53 41/4/53
+f 42/2/54 44/3/54 43/4/54
+f 44/2/55 46/3/55 45/4/55
+f 46/2/56 48/3/56 47/4/56
+f 48/2/57 50/3/57 49/4/57
+f 51/4/58 49/1/58 52/3/58
+f 53/4/59 51/1/59 54/3/59
+f 55/4/60 53/1/60 56/3/60
+f 57/4/28 55/1/28 58/3/28
+f 59/4/61 57/1/61 60/3/61
+f 61/4/62 59/1/62 62/3/62
+f 48/5/63 54/11/63 52/6/63
+f 46/12/64 54/11/64 48/5/64
+f 46/12/65 56/13/65 54/11/65
+f 44/14/65 56/13/65 46/12/65
+f 44/14/66 58/15/66 56/13/66
+f 42/16/66 58/15/66 44/14/66
+f 42/16/67 60/17/67 58/15/67
+f 40/18/67 60/17/67 42/16/67
+f 40/18/68 62/19/68 60/17/68
+f 38/20/68 62/19/68 40/18/68
+f 38/20/69 64/21/69 62/19/69
+f 20/22/70 24/23/70 22/24/70
+f 16/25/71 20/22/71 18/26/71
+f 16/25/72 24/23/72 20/22/72
+f 36/27/69 64/21/69 38/20/69
+f 34/28/73 64/21/73 36/27/73
+f 2/9/74 64/21/74 34/28/74
+f 4/8/75 2/9/75 34/28/75
+f 4/8/75 34/28/75 32/29/75
+f 6/10/76 4/8/76 32/29/76
+f 6/10/76 32/29/76 30/30/76
+f 6/10/68 30/30/68 28/31/68
+f 8/32/68 6/10/68 28/31/68
+f 10/33/73 8/32/73 28/31/73
+f 10/33/67 28/31/67 26/34/67
+f 12/35/77 10/33/77 26/34/77
+f 12/35/78 26/34/78 24/23/78
+f 14/36/79 12/35/79 24/23/79
+f 16/25/80 14/36/80 24/23/80
+f 1/4/32 63/1/32 2/3/32
+f 63/4/81 61/1/81 64/3/81
+f 19/7/82 15/11/82 17/6/82
+f 41/31/83 37/29/83 39/30/83
+f 3/9/84 5/21/84 63/10/84
+f 45/23/85 41/31/85 43/34/85
+f 45/23/86 37/29/86 41/31/86
+f 49/22/87 45/23/87 47/24/87
+f 49/22/84 37/29/84 45/23/84
+f 49/22/84 35/28/84 37/29/84
+f 49/22/84 33/27/84 35/28/84
+f 49/22/84 31/20/84 33/27/84
+f 55/36/88 51/26/88 53/25/88
+f 59/33/89 55/36/89 57/35/89
+f 61/32/90 55/36/90 59/33/90
+f 63/10/91 55/36/91 61/32/91
+f 63/10/92 5/21/92 55/36/92
+f 5/21/93 7/19/93 55/36/93
+f 7/19/94 9/17/94 55/36/94
+f 29/18/95 25/14/95 27/16/95
+f 31/20/96 25/14/96 29/18/96
+f 49/22/97 25/14/97 31/20/97
+f 49/22/98 23/12/98 25/14/98
+f 9/17/93 11/15/93 55/36/93
+f 11/15/99 13/13/99 55/36/99
+f 13/13/100 15/11/100 55/36/100
+f 15/11/101 19/7/101 55/36/101
+f 19/7/102 21/5/102 55/36/102
+f 21/5/103 23/12/103 55/36/103
+f 23/12/104 49/22/104 55/36/104
+f 49/22/105 51/26/105 55/36/105
+v 0.053672 2.252534 1.125439
+v 0.053673 8.161380 0.083549
+v 0.051751 2.255921 1.144652
+v 0.051751 8.164768 0.102762
+v 0.046060 2.259179 1.163126
+v 0.046061 8.168025 0.121236
+v 0.036819 2.262181 1.180152
+v 0.036820 8.171027 0.138262
+v 0.024383 2.264812 1.195075
+v 0.024384 8.173658 0.153186
+v 0.009229 2.266972 1.207323
+v 0.009230 8.175818 0.165433
+v -0.008059 2.268577 1.216423
+v -0.008059 8.177423 0.174534
+v -0.026819 2.269565 1.222028
+v -0.026818 8.178411 0.180138
+v -0.046328 2.269898 1.223920
+v -0.046327 8.178745 0.182030
+v -0.065837 2.269565 1.222027
+v -0.065836 8.178411 0.180138
+v -0.084596 2.268577 1.216423
+v -0.084595 8.177423 0.174534
+v -0.101885 2.266972 1.207323
+v -0.101884 8.175818 0.165433
+v -0.117038 2.264812 1.195075
+v -0.117038 8.173658 0.153186
+v -0.129475 2.262181 1.180152
+v -0.129474 8.171027 0.138262
+v -0.138716 2.259179 1.163126
+v -0.138715 8.168025 0.121236
+v -0.144406 2.255921 1.144651
+v -0.144406 8.164768 0.102762
+v -0.146328 2.252534 1.125439
+v -0.146327 8.161380 0.083549
+v -0.144406 2.249146 1.106226
+v -0.144406 8.157992 0.064337
+v -0.138716 2.245888 1.087752
+v -0.138715 8.154735 0.045862
+v -0.129475 2.242886 1.070726
+v -0.129474 8.151732 0.028836
+v -0.117038 2.240255 1.055802
+v -0.117038 8.149101 0.013913
+v -0.101885 2.238095 1.043555
+v -0.101884 8.146942 0.001666
+v -0.084596 2.236491 1.034454
+v -0.084595 8.145337 -0.007435
+v -0.065837 2.235502 1.028850
+v -0.065836 8.144349 -0.013039
+v -0.046328 2.235169 1.026958
+v -0.046327 8.144015 -0.014931
+v -0.026819 2.235502 1.028850
+v -0.026818 8.144349 -0.013039
+v -0.008059 2.236491 1.034455
+v -0.008059 8.145337 -0.007435
+v 0.009229 2.238095 1.043555
+v 0.009230 8.146942 0.001666
+v 0.024383 2.240255 1.055803
+v 0.024384 8.149101 0.013913
+v 0.036819 2.242886 1.070726
+v 0.036820 8.151732 0.028837
+v 0.046060 2.245888 1.087752
+v 0.046061 8.154735 0.045863
+v 0.051751 2.249146 1.106226
+v 0.051752 8.157992 0.064337
+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.308659 0.961940
+vt 0.222215 0.915735
+vt 0.853553 0.853553
+vt 0.915735 0.777785
+vt 0.961940 0.691342
+vt 0.990393 0.597545
+vt 0.990393 0.402455
+vt 1.000000 0.500000
+vt 0.853553 0.146447
+vt 0.961940 0.308658
+vt 0.915735 0.222215
+vt 0.691342 0.038060
+vt 0.777785 0.084265
+vt 0.597545 0.009607
+vt 0.500000 0.000000
+vt 0.146447 0.853554
+vt 0.084266 0.777786
+vt 0.038060 0.691342
+vt 0.308658 0.038060
+vt 0.402455 0.009607
+vt 0.146446 0.146447
+vt 0.222215 0.084265
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.009607 0.597546
+vt 0.000000 0.500000
+vn 0.995185 0.017020 0.096528
+vn 0.956940 0.050408 0.285877
+vn 0.881921 0.081857 0.464236
+vn 0.773010 0.110161 0.624756
+vn 0.634396 0.134232 0.761265
+vn 0.471397 0.153144 0.868523
+vn 0.290283 0.166171 0.942403
+vn 0.098018 0.172812 0.980066
+vn -0.098018 0.172812 0.980066
+vn -0.290285 0.166171 0.942402
+vn -0.471398 0.153144 0.868522
+vn -0.634392 0.134232 0.761268
+vn -0.773007 0.110162 0.624759
+vn -0.881923 0.081857 0.464231
+vn -0.956941 0.050407 0.285874
+vn -0.995185 0.017021 0.096528
+vn -0.995185 -0.017021 -0.096529
+vn -0.956940 -0.050408 -0.285877
+vn -0.881921 -0.081857 -0.464236
+vn -0.773008 -0.110162 -0.624758
+vn -0.634391 -0.134232 -0.761269
+vn -0.471388 -0.153145 -0.868528
+vn -0.290288 -0.166171 -0.942401
+vn -0.098006 -0.172812 -0.980067
+vn 0.098021 -0.172812 -0.980065
+vn 0.290285 -0.166171 -0.942402
+vn 0.471402 -0.153144 -0.868520
+vn 0.634392 -0.134232 -0.761267
+vn 0.773010 -0.110161 -0.624755
+vn 0.881922 -0.081857 -0.464233
+vn -0.000356 0.984796 -0.173717
+vn 0.995185 -0.017020 -0.096527
+vn 0.956941 -0.050407 -0.285872
+vn -0.000005 -0.984808 0.173646
+vn 0.995185 0.017020 0.096529
+vn 0.956940 0.050407 0.285875
+vn 0.881920 0.081858 0.464237
+vn 0.773011 0.110161 0.624755
+vn 0.634396 0.134231 0.761264
+vn 0.471389 0.153145 0.868527
+vn 0.290292 0.166171 0.942400
+vn 0.098013 0.172812 0.980066
+vn -0.098019 0.172812 0.980065
+vn -0.290283 0.166171 0.942403
+vn -0.471400 0.153144 0.868521
+vn -0.634396 0.134232 0.761264
+vn -0.773010 0.110161 0.624756
+vn -0.881922 0.081857 0.464234
+vn -0.956940 0.050408 0.285876
+vn -0.995185 0.017020 0.096526
+vn -0.995185 -0.017021 -0.096530
+vn -0.956940 -0.050407 -0.285875
+vn -0.773009 -0.110161 -0.624757
+vn -0.634390 -0.134232 -0.761269
+vn -0.471399 -0.153144 -0.868522
+vn -0.290282 -0.166171 -0.942403
+vn -0.098018 -0.172812 -0.980066
+vn 0.098018 -0.172812 -0.980065
+vn 0.290287 -0.166171 -0.942402
+vn 0.471399 -0.153144 -0.868522
+vn 0.634393 -0.134232 -0.761267
+vn 0.773014 -0.110161 -0.624751
+vn 0.881921 -0.081857 -0.464236
+vn -0.000114 0.984812 -0.173626
+vn -0.000002 0.984808 -0.173648
+vn -0.000054 0.984802 -0.173678
+vn -0.000008 0.984808 -0.173648
+vn -0.000004 0.984808 -0.173647
+vn -0.000107 0.984836 -0.173487
+vn -0.000015 0.984812 -0.173622
+vn -0.000013 0.984820 -0.173580
+vn -0.000001 0.984809 -0.173639
+vn -0.000044 0.984787 -0.173766
+vn -0.000047 0.984804 -0.173672
+vn -0.000051 0.984803 -0.173676
+vn -0.000050 0.984803 -0.173675
+vn -0.000006 0.984799 -0.173697
+vn -0.000037 0.984791 -0.173743
+vn -0.000244 0.984806 -0.173659
+vn -0.000025 0.984806 -0.173659
+vn -0.000168 0.984823 -0.173560
+vn -0.000013 0.984812 -0.173624
+vn -0.000088 0.984819 -0.173584
+vn -0.000036 0.984813 -0.173618
+vn 0.000016 0.984808 -0.173645
+vn 0.000005 0.984808 -0.173650
+vn 0.000006 0.984807 -0.173650
+vn 0.000005 0.984808 -0.173649
+vn 0.000002 0.984808 -0.173648
+vn 0.000003 0.984807 -0.173650
+vn 0.000005 0.984804 -0.173667
+vn 0.956941 -0.050407 -0.285873
+vn -0.000005 -0.984808 0.173649
+vn -0.000001 -0.984818 0.173592
+vn -0.000000 -0.984808 0.173648
+vn -0.000006 -0.984808 0.173646
+vn -0.000001 -0.984808 0.173648
+vn -0.000002 -0.984808 0.173648
+vn -0.000001 -0.984806 0.173661
+vn -0.000000 -0.984805 0.173663
+vn -0.000000 -0.984810 0.173635
+vn -0.000000 -0.984810 0.173634
+vn -0.000000 -0.984807 0.173653
+vn -0.000000 -0.984807 0.173650
+vn -0.000000 -0.984808 0.173647
+vn 0.000000 -0.984807 0.173651
+vn -0.000000 -0.984807 0.173649
+vn -0.000000 -0.984810 0.173637
+vn 0.000000 -0.984806 0.173659
+vn -0.000001 -0.984805 0.173664
+s off
+f 65/37/106 66/38/106 68/39/106
+f 67/37/107 68/38/107 70/39/107
+f 69/37/108 70/38/108 72/39/108
+f 71/37/109 72/38/109 74/39/109
+f 73/37/110 74/38/110 76/39/110
+f 75/37/111 76/38/111 78/39/111
+f 77/37/112 78/38/112 80/39/112
+f 79/37/113 80/38/113 82/39/113
+f 81/37/114 82/38/114 83/40/114
+f 83/37/115 84/38/115 85/40/115
+f 85/37/116 86/38/116 87/40/116
+f 87/37/117 88/38/117 89/40/117
+f 89/37/118 90/38/118 91/40/118
+f 91/37/119 92/38/119 93/40/119
+f 93/37/120 94/38/120 95/40/120
+f 95/37/121 96/38/121 97/40/121
+f 97/37/122 98/38/122 99/40/122
+f 99/37/123 100/38/123 101/40/123
+f 101/37/124 102/38/124 103/40/124
+f 103/37/125 104/38/125 105/40/125
+f 105/37/126 106/38/126 107/40/126
+f 107/37/127 108/38/127 109/40/127
+f 109/37/128 110/38/128 111/40/128
+f 111/37/129 112/38/129 113/40/129
+f 113/37/130 114/38/130 116/39/130
+f 115/37/131 116/38/131 118/39/131
+f 117/37/132 118/38/132 120/39/132
+f 119/37/133 120/38/133 122/39/133
+f 121/37/134 122/38/134 124/39/134
+f 123/37/135 124/38/135 126/39/135
+f 68/41/136 66/42/136 70/43/136
+f 127/37/137 128/38/137 66/39/137
+f 125/37/138 126/38/138 128/39/138
+f 65/41/139 67/42/139 69/44/139
+f 67/40/140 65/37/140 68/39/140
+f 69/40/141 67/37/141 70/39/141
+f 71/40/142 69/37/142 72/39/142
+f 73/40/143 71/37/143 74/39/143
+f 75/40/144 73/37/144 76/39/144
+f 77/40/145 75/37/145 78/39/145
+f 79/40/146 77/37/146 80/39/146
+f 81/40/147 79/37/147 82/39/147
+f 82/38/148 84/39/148 83/40/148
+f 84/38/149 86/39/149 85/40/149
+f 86/38/150 88/39/150 87/40/150
+f 88/38/151 90/39/151 89/40/151
+f 90/38/152 92/39/152 91/40/152
+f 92/38/153 94/39/153 93/40/153
+f 94/38/154 96/39/154 95/40/154
+f 96/38/155 98/39/155 97/40/155
+f 98/38/156 100/39/156 99/40/156
+f 100/38/157 102/39/157 101/40/157
+f 102/38/124 104/39/124 103/40/124
+f 104/38/158 106/39/158 105/40/158
+f 106/38/159 108/39/159 107/40/159
+f 108/38/160 110/39/160 109/40/160
+f 110/38/161 112/39/161 111/40/161
+f 112/38/162 114/39/162 113/40/162
+f 115/40/163 113/37/163 116/39/163
+f 117/40/164 115/37/164 118/39/164
+f 119/40/165 117/37/165 120/39/165
+f 121/40/166 119/37/166 122/39/166
+f 123/40/167 121/37/167 124/39/167
+f 125/40/168 123/37/168 126/39/168
+f 66/42/169 128/44/169 126/45/169
+f 70/43/170 66/42/170 126/45/170
+f 72/46/171 70/43/171 74/47/171
+f 70/43/172 126/45/172 74/47/172
+f 126/45/173 124/48/173 74/47/173
+f 122/49/174 120/50/174 118/51/174
+f 124/48/175 122/49/175 118/51/175
+f 114/52/176 118/51/176 116/53/176
+f 124/48/177 118/51/177 114/52/177
+f 108/54/178 112/55/178 110/56/178
+f 104/57/179 108/54/179 106/58/179
+f 102/59/180 108/54/180 104/57/180
+f 100/60/181 108/54/181 102/59/181
+f 76/61/182 74/47/182 78/62/182
+f 78/62/183 74/47/183 80/63/183
+f 96/64/184 100/60/184 98/65/184
+f 96/64/185 108/54/185 100/60/185
+f 92/66/186 96/64/186 94/67/186
+f 90/68/187 96/64/187 92/66/187
+f 88/69/188 96/64/188 90/68/188
+f 86/70/189 96/64/189 88/69/189
+f 82/71/176 86/70/176 84/72/176
+f 74/47/190 124/48/190 80/63/190
+f 124/48/191 114/52/191 80/63/191
+f 114/52/192 112/55/192 80/63/192
+f 112/55/193 108/54/193 80/63/193
+f 108/54/194 96/64/194 80/63/194
+f 96/64/195 86/70/195 80/63/195
+f 86/70/196 82/71/196 80/63/196
+f 65/40/137 127/37/137 66/39/137
+f 127/40/197 125/37/197 128/39/197
+f 127/43/198 65/41/198 125/46/198
+f 83/52/199 79/51/199 81/53/199
+f 97/60/200 93/57/200 95/59/200
+f 99/65/200 93/57/200 97/60/200
+f 103/67/201 99/65/201 101/64/201
+f 103/67/202 93/57/202 99/65/202
+f 105/66/203 93/57/203 103/67/203
+f 115/71/199 111/70/199 113/72/199
+f 115/71/204 109/69/204 111/70/204
+f 117/63/205 109/69/205 115/71/205
+f 117/63/206 107/68/206 109/69/206
+f 119/62/207 107/68/207 117/63/207
+f 119/62/208 105/66/208 107/68/208
+f 121/61/208 105/66/208 119/62/208
+f 123/47/200 105/66/200 121/61/200
+f 125/46/209 105/66/209 123/47/209
+f 125/46/200 65/41/200 105/66/200
+f 105/66/200 65/41/200 93/57/200
+f 65/41/210 69/44/210 93/57/210
+f 69/44/209 71/45/209 93/57/209
+f 93/57/200 71/45/200 91/58/200
+f 91/58/211 71/45/211 89/54/211
+f 71/45/212 73/48/212 89/54/212
+f 73/48/211 75/49/211 89/54/211
+f 89/54/208 75/49/208 87/56/208
+f 75/49/213 77/50/213 87/56/213
+f 87/56/207 77/50/207 85/55/207
+f 77/50/214 79/51/214 85/55/214
+f 79/51/215 83/52/215 85/55/215
+v 1.116865 2.257815 -0.125221
+v 0.074976 8.166661 -0.125221
+v 1.136078 2.261203 -0.123300
+v 0.094188 8.170050 -0.123300
+v 1.154552 2.264460 -0.117609
+v 0.112663 8.173306 -0.117609
+v 1.171578 2.267462 -0.108368
+v 0.129689 8.176309 -0.108368
+v 1.186502 2.270094 -0.095932
+v 0.144612 8.178940 -0.095932
+v 1.198749 2.272254 -0.080778
+v 0.156859 8.181100 -0.080778
+v 1.207850 2.273858 -0.063490
+v 0.165960 8.182705 -0.063490
+v 1.213454 2.274846 -0.044730
+v 0.171564 8.183693 -0.044730
+v 1.215346 2.275180 -0.025221
+v 0.173456 8.184027 -0.025221
+v 1.213454 2.274846 -0.005712
+v 0.171564 8.183693 -0.005712
+v 1.207850 2.273858 0.013047
+v 0.165960 8.182705 0.013047
+v 1.198749 2.272254 0.030336
+v 0.156859 8.181100 0.030336
+v 1.186502 2.270094 0.045489
+v 0.144612 8.178940 0.045489
+v 1.171578 2.267462 0.057926
+v 0.129689 8.176309 0.057926
+v 1.154552 2.264460 0.067167
+v 0.112663 8.173306 0.067167
+v 1.136078 2.261203 0.072857
+v 0.094188 8.170050 0.072857
+v 1.116865 2.257815 0.074779
+v 0.074976 8.166661 0.074779
+v 1.097653 2.254427 0.072857
+v 0.055763 8.163274 0.072857
+v 1.079178 2.251170 0.067167
+v 0.037289 8.160016 0.067167
+v 1.062152 2.248168 0.057926
+v 0.020263 8.157014 0.057926
+v 1.047229 2.245536 0.045489
+v 0.005339 8.154383 0.045489
+v 1.034981 2.243377 0.030336
+v -0.006908 8.152224 0.030336
+v 1.025881 2.241772 0.013047
+v -0.016009 8.150619 0.013047
+v 1.020277 2.240784 -0.005712
+v -0.021613 8.149631 -0.005712
+v 1.018384 2.240450 -0.025221
+v -0.023505 8.149297 -0.025221
+v 1.020277 2.240784 -0.044730
+v -0.021613 8.149631 -0.044730
+v 1.025881 2.241772 -0.063490
+v -0.016009 8.150619 -0.063490
+v 1.034981 2.243377 -0.080778
+v -0.006908 8.152224 -0.080778
+v 1.047229 2.245536 -0.095932
+v 0.005339 8.154383 -0.095932
+v 1.062152 2.248168 -0.108368
+v 0.020263 8.157014 -0.108368
+v 1.079178 2.251170 -0.117609
+v 0.037289 8.160016 -0.117609
+v 1.097653 2.254427 -0.123300
+v 0.055763 8.163274 -0.123300
+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.500000 0.000000
+vt 0.000000 0.500000
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.146447 0.853554
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.308659 0.961940
+vt 0.222215 0.915735
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.009607 0.597546
+vt 0.084265 0.222215
+vn 0.096528 0.017020 -0.995185
+vn 0.285876 0.050408 -0.956940
+vn 0.464235 0.081857 -0.881921
+vn 0.624757 0.110162 -0.773009
+vn 0.761264 0.134232 -0.634396
+vn 0.868521 0.153144 -0.471400
+vn 0.942403 0.166171 -0.290283
+vn 0.980066 0.172812 -0.098018
+vn 0.980066 0.172812 0.098018
+vn 0.942403 0.166171 0.290283
+vn 0.868521 0.153144 0.471399
+vn 0.761264 0.134232 0.634396
+vn 0.624757 0.110162 0.773009
+vn 0.464235 0.081857 0.881921
+vn 0.285876 0.050408 0.956940
+vn 0.096527 0.017020 0.995185
+vn -0.096528 -0.017021 0.995185
+vn -0.285875 -0.050407 0.956940
+vn -0.464235 -0.081857 0.881921
+vn -0.624754 -0.110161 0.773012
+vn -0.761268 -0.134232 0.634391
+vn -0.868524 -0.153144 0.471394
+vn -0.942401 -0.166171 0.290288
+vn -0.980066 -0.172812 0.098010
+vn -0.980065 -0.172812 -0.098018
+vn -0.942402 -0.166171 -0.290285
+vn -0.868521 -0.153144 -0.471401
+vn -0.761266 -0.134232 -0.634394
+vn -0.624751 -0.110161 -0.773014
+vn -0.464236 -0.081857 -0.881921
+vn -0.173717 0.984796 0.000356
+vn -0.096527 -0.017020 -0.995185
+vn -0.285873 -0.050407 -0.956941
+vn 0.173648 -0.984808 -0.000011
+vn 0.285874 0.050407 -0.956940
+vn 0.464237 0.081858 -0.881920
+vn 0.624752 0.110161 -0.773013
+vn 0.761267 0.134232 -0.634393
+vn 0.868524 0.153144 -0.471394
+vn 0.942402 0.166171 -0.290287
+vn 0.980065 0.172812 -0.098019
+vn 0.980065 0.172812 0.098019
+vn 0.942402 0.166171 0.290287
+vn 0.868524 0.153144 0.471394
+vn 0.761267 0.134232 0.634393
+vn 0.624752 0.110161 0.773013
+vn 0.464237 0.081858 0.881920
+vn 0.285874 0.050407 0.956940
+vn -0.096529 -0.017021 0.995185
+vn -0.285874 -0.050407 0.956940
+vn -0.624758 -0.110162 0.773008
+vn -0.761268 -0.134232 0.634392
+vn -0.868523 -0.153144 0.471397
+vn -0.942402 -0.166171 0.290284
+vn -0.980066 -0.172812 0.098018
+vn -0.980065 -0.172812 -0.098021
+vn -0.868521 -0.153144 -0.471400
+vn -0.761267 -0.134232 -0.634392
+vn -0.624756 -0.110161 -0.773010
+vn -0.464234 -0.081857 -0.881922
+vn -0.173640 0.984809 -0.000036
+vn -0.173648 0.984808 0.000040
+vn -0.173648 0.984808 0.000002
+vn -0.173650 0.984807 -0.000020
+vn -0.173652 0.984807 -0.000031
+vn -0.173635 0.984810 0.000027
+vn -0.173649 0.984808 -0.000009
+vn -0.173641 0.984809 0.000007
+vn -0.173650 0.984807 -0.000006
+vn -0.173640 0.984809 0.000006
+vn -0.173660 0.984806 -0.000014
+vn -0.173675 0.984803 0.000050
+vn -0.173675 0.984803 0.000049
+vn -0.173767 0.984787 -0.000044
+vn -0.173767 0.984787 0.000044
+vn -0.173642 0.984809 0.000000
+vn -0.173677 0.984803 0.000052
+vn -0.173717 0.984796 -0.000357
+vn -0.173646 0.984808 0.000005
+vn -0.173645 0.984808 0.000007
+vn -0.173703 0.984798 -0.000011
+vn -0.173684 0.984802 -0.000003
+vn -0.173667 0.984805 0.000002
+vn -0.173671 0.984804 -0.000015
+vn -0.173656 0.984806 -0.000026
+vn -0.173637 0.984810 0.000008
+vn -0.173643 0.984809 0.000005
+vn -0.096528 -0.017020 -0.995185
+vn -0.285872 -0.050407 -0.956941
+vn 0.173648 -0.984808 -0.000000
+vn 0.173647 -0.984808 0.000006
+vn 0.173647 -0.984808 0.000005
+vn 0.173652 -0.984807 -0.000009
+vn 0.173645 -0.984808 0.000005
+vn 0.173653 -0.984807 -0.000007
+vn 0.173643 -0.984809 0.000006
+vn 0.173652 -0.984807 -0.000003
+vn 0.173643 -0.984809 0.000004
+vn 0.173651 -0.984807 -0.000002
+vn 0.173650 -0.984807 -0.000001
+vn 0.173647 -0.984808 0.000000
+vn 0.173649 -0.984808 0.000000
+vn 0.173652 -0.984807 0.000001
+vn 0.173642 -0.984809 -0.000003
+vn 0.173653 -0.984807 0.000003
+vn 0.173642 -0.984809 -0.000004
+vn 0.173655 -0.984806 0.000007
+vn 0.173641 -0.984809 -0.000008
+vn 0.173658 -0.984806 0.000013
+vn 0.173645 -0.984808 -0.000007
+vn 0.173654 -0.984807 0.000007
+vn 0.173646 -0.984808 -0.000004
+s off
+f 129/73/216 130/74/216 132/75/216
+f 131/73/217 132/74/217 134/75/217
+f 133/73/218 134/74/218 136/75/218
+f 135/73/219 136/74/219 138/75/219
+f 137/73/220 138/74/220 140/75/220
+f 139/73/221 140/74/221 142/75/221
+f 141/73/222 142/74/222 144/75/222
+f 143/73/223 144/74/223 146/75/223
+f 145/73/224 146/74/224 148/75/224
+f 147/73/225 148/74/225 150/75/225
+f 149/73/226 150/74/226 152/75/226
+f 151/73/227 152/74/227 154/75/227
+f 153/73/228 154/74/228 156/75/228
+f 155/73/229 156/74/229 158/75/229
+f 157/73/230 158/74/230 160/75/230
+f 159/73/231 160/74/231 162/75/231
+f 161/73/232 162/74/232 163/76/232
+f 163/73/233 164/74/233 165/76/233
+f 165/73/234 166/74/234 167/76/234
+f 167/73/235 168/74/235 169/76/235
+f 169/73/236 170/74/236 171/76/236
+f 171/73/237 172/74/237 173/76/237
+f 173/73/238 174/74/238 175/76/238
+f 175/73/239 176/74/239 177/76/239
+f 177/73/240 178/74/240 179/76/240
+f 179/73/241 180/74/241 181/76/241
+f 181/73/242 182/74/242 183/76/242
+f 183/73/243 184/74/243 185/76/243
+f 185/73/244 186/74/244 187/76/244
+f 187/73/245 188/74/245 189/76/245
+f 132/77/246 130/78/246 134/79/246
+f 191/73/247 192/74/247 129/76/247
+f 189/73/248 190/74/248 191/76/248
+f 129/77/249 131/78/249 191/79/249
+f 131/76/216 129/73/216 132/75/216
+f 133/76/250 131/73/250 134/75/250
+f 135/76/251 133/73/251 136/75/251
+f 137/76/252 135/73/252 138/75/252
+f 139/76/253 137/73/253 140/75/253
+f 141/76/254 139/73/254 142/75/254
+f 143/76/255 141/73/255 144/75/255
+f 145/76/256 143/73/256 146/75/256
+f 147/76/257 145/73/257 148/75/257
+f 149/76/258 147/73/258 150/75/258
+f 151/76/259 149/73/259 152/75/259
+f 153/76/260 151/73/260 154/75/260
+f 155/76/261 153/73/261 156/75/261
+f 157/76/262 155/73/262 158/75/262
+f 159/76/263 157/73/263 160/75/263
+f 161/76/231 159/73/231 162/75/231
+f 162/74/264 164/75/264 163/76/264
+f 164/74/265 166/75/265 165/76/265
+f 166/74/234 168/75/234 167/76/234
+f 168/74/266 170/75/266 169/76/266
+f 170/74/267 172/75/267 171/76/267
+f 172/74/268 174/75/268 173/76/268
+f 174/74/269 176/75/269 175/76/269
+f 176/74/270 178/75/270 177/76/270
+f 178/74/271 180/75/271 179/76/271
+f 180/74/241 182/75/241 181/76/241
+f 182/74/272 184/75/272 183/76/272
+f 184/74/273 186/75/273 185/76/273
+f 186/74/274 188/75/274 187/76/274
+f 188/74/275 190/75/275 189/76/275
+f 130/78/276 192/80/276 134/79/276
+f 192/80/277 190/81/277 134/79/277
+f 190/81/278 188/82/278 134/79/278
+f 188/82/279 186/83/279 134/79/279
+f 186/83/280 184/84/280 134/79/280
+f 184/84/281 182/85/281 134/79/281
+f 182/85/282 180/86/282 134/79/282
+f 180/86/283 178/87/283 134/79/283
+f 178/87/284 176/88/284 134/79/284
+f 176/88/285 174/89/285 134/79/285
+f 174/89/286 172/90/286 134/79/286
+f 170/91/287 168/92/287 166/93/287
+f 170/91/288 166/93/288 164/94/288
+f 148/95/289 152/96/289 150/97/289
+f 140/98/290 144/99/290 142/100/290
+f 172/90/287 170/91/287 164/94/287
+f 134/79/291 172/90/291 164/94/291
+f 136/101/292 134/79/292 138/102/292
+f 134/79/291 164/94/291 138/102/291
+f 162/103/293 160/104/293 158/105/293
+f 162/103/294 158/105/294 156/106/294
+f 146/107/295 152/96/295 148/95/295
+f 146/107/296 154/108/296 152/96/296
+f 144/99/297 154/108/297 146/107/297
+f 140/98/298 154/108/298 144/99/298
+f 138/102/299 164/94/299 140/98/299
+f 162/103/300 156/106/300 154/108/300
+f 164/94/301 162/103/301 140/98/301
+f 162/103/302 154/108/302 140/98/302
+f 192/74/303 130/75/303 129/76/303
+f 190/74/304 192/75/304 191/76/304
+f 131/78/305 133/80/305 191/79/305
+f 133/80/306 135/81/306 191/79/306
+f 135/81/305 137/82/305 191/79/305
+f 137/82/307 139/83/307 191/79/307
+f 139/83/308 141/84/308 191/79/308
+f 141/84/309 143/85/309 191/79/309
+f 143/85/310 145/86/310 191/79/310
+f 145/86/311 147/87/311 191/79/311
+f 147/87/312 149/88/312 191/79/312
+f 149/88/313 151/89/313 191/79/313
+f 151/89/314 153/90/314 191/79/314
+f 153/90/305 155/91/305 191/79/305
+f 155/91/315 157/92/315 191/79/315
+f 157/92/305 159/93/305 191/79/305
+f 159/93/316 161/94/316 191/79/316
+f 161/94/305 163/103/305 191/79/305
+f 163/103/305 165/104/305 191/79/305
+f 165/104/317 167/105/317 191/79/317
+f 167/105/317 169/106/317 191/79/317
+f 169/106/318 171/108/318 191/79/318
+f 171/108/319 173/96/319 191/79/319
+f 173/96/320 175/97/320 191/79/320
+f 175/97/321 177/95/321 191/79/321
+f 177/95/322 179/107/322 191/79/322
+f 179/107/323 181/99/323 191/79/323
+f 181/99/324 183/100/324 191/79/324
+f 183/100/325 185/98/325 191/79/325
+f 185/98/326 187/102/326 189/101/326
+f 191/79/327 185/98/327 189/101/327
+v -1.178897 2.277600 -0.129009
+v -0.137008 8.186446 -0.129009
+v -1.159685 2.274212 -0.127088
+v -0.117795 8.183058 -0.127088
+v -1.141210 2.270954 -0.121397
+v -0.099321 8.179801 -0.121397
+v -1.124184 2.267952 -0.112156
+v -0.082295 8.176799 -0.112156
+v -1.109261 2.265321 -0.099720
+v -0.067371 8.174168 -0.099720
+v -1.097013 2.263161 -0.084566
+v -0.055124 8.172008 -0.084566
+v -1.087913 2.261557 -0.067277
+v -0.046023 8.170403 -0.067277
+v -1.082309 2.260568 -0.048518
+v -0.040419 8.169415 -0.048518
+v -1.080417 2.260235 -0.029009
+v -0.038527 8.169081 -0.029009
+v -1.082309 2.260568 -0.009500
+v -0.040419 8.169415 -0.009500
+v -1.087913 2.261557 0.009259
+v -0.046023 8.170403 0.009259
+v -1.097013 2.263161 0.026548
+v -0.055124 8.172008 0.026548
+v -1.109261 2.265321 0.041702
+v -0.067371 8.174168 0.041702
+v -1.124184 2.267952 0.054138
+v -0.082295 8.176799 0.054138
+v -1.141210 2.270954 0.063379
+v -0.099321 8.179801 0.063379
+v -1.159685 2.274212 0.069069
+v -0.117795 8.183058 0.069069
+v -1.178897 2.277600 0.070991
+v -0.137008 8.186446 0.070991
+v -1.198110 2.280987 0.069069
+v -0.156220 8.189834 0.069069
+v -1.216584 2.284245 0.063379
+v -0.174695 8.193091 0.063379
+v -1.233610 2.287247 0.054138
+v -0.191721 8.196094 0.054138
+v -1.248534 2.289878 0.041702
+v -0.206644 8.198725 0.041702
+v -1.260781 2.292038 0.026548
+v -0.218892 8.200884 0.026548
+v -1.269882 2.293643 0.009259
+v -0.227992 8.202489 0.009259
+v -1.275486 2.294631 -0.009500
+v -0.233596 8.203477 -0.009500
+v -1.277378 2.294964 -0.029009
+v -0.235489 8.203811 -0.029009
+v -1.275486 2.294631 -0.048518
+v -0.233596 8.203477 -0.048518
+v -1.269882 2.293643 -0.067278
+v -0.227992 8.202489 -0.067278
+v -1.260781 2.292038 -0.084566
+v -0.218892 8.200884 -0.084566
+v -1.248534 2.289878 -0.099720
+v -0.206644 8.198725 -0.099720
+v -1.233610 2.287247 -0.112156
+v -0.191721 8.196094 -0.112156
+v -1.216584 2.284245 -0.121397
+v -0.174695 8.193091 -0.121397
+v -1.198110 2.280987 -0.127088
+v -0.156220 8.189834 -0.127088
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vn 0.096528 -0.017020 -0.995185
+vn 0.285876 -0.050408 -0.956940
+vn 0.464236 -0.081857 -0.881921
+vn 0.624756 -0.110161 -0.773010
+vn 0.761265 -0.134232 -0.634395
+vn 0.868521 -0.153144 -0.471400
+vn 0.942403 -0.166171 -0.290282
+vn 0.980065 -0.172812 -0.098021
+vn 0.980066 -0.172812 0.098018
+vn 0.942402 -0.166171 0.290285
+vn 0.868522 -0.153144 0.471399
+vn 0.761265 -0.134232 0.634395
+vn 0.624756 -0.110161 0.773010
+vn 0.464235 -0.081857 0.881922
+vn 0.285876 -0.050408 0.956940
+vn 0.096527 -0.017020 0.995185
+vn -0.096528 0.017020 0.995185
+vn -0.285876 0.050408 0.956940
+vn -0.464234 0.081857 0.881922
+vn -0.624758 0.110162 0.773008
+vn -0.761264 0.134231 0.634396
+vn -0.868524 0.153144 0.471394
+vn -0.942401 0.166171 0.290288
+vn -0.980066 0.172812 0.098014
+vn -0.980066 0.172812 -0.098014
+vn -0.942403 0.166171 -0.290281
+vn -0.868522 0.153144 -0.471398
+vn -0.761268 0.134232 -0.634392
+vn -0.624751 0.110161 -0.773014
+vn -0.464236 0.081857 -0.881921
+vn 0.173717 0.984795 -0.000357
+vn -0.096527 0.017020 -0.995185
+vn -0.285874 0.050407 -0.956940
+vn -0.173648 -0.984808 0.000011
+vn 0.285874 -0.050407 -0.956940
+vn 0.464237 -0.081858 -0.881920
+vn 0.624755 -0.110161 -0.773011
+vn 0.761264 -0.134231 -0.634396
+vn 0.868524 -0.153144 -0.471394
+vn 0.942402 -0.166171 -0.290287
+vn 0.980066 -0.172812 -0.098013
+vn 0.980066 -0.172812 0.098013
+vn 0.942402 -0.166171 0.290287
+vn 0.868524 -0.153144 0.471394
+vn 0.761264 -0.134231 0.634396
+vn 0.624755 -0.110161 0.773011
+vn 0.464237 -0.081858 0.881920
+vn 0.285874 -0.050407 0.956940
+vn -0.096529 0.017021 0.995185
+vn -0.285874 0.050407 0.956940
+vn -0.464235 0.081857 0.881921
+vn -0.624756 0.110161 0.773010
+vn -0.761269 0.134232 0.634391
+vn -0.868522 0.153144 0.471398
+vn -0.942403 0.166171 0.290282
+vn -0.980066 0.172812 0.098018
+vn -0.980065 0.172812 -0.098019
+vn -0.942402 0.166171 -0.290285
+vn -0.868521 0.153144 -0.471400
+vn -0.761267 0.134232 -0.634392
+vn -0.624756 0.110161 -0.773010
+vn -0.464234 0.081857 -0.881922
+vn 0.173640 0.984809 0.000036
+vn 0.173648 0.984808 -0.000041
+vn 0.173648 0.984808 -0.000002
+vn 0.173650 0.984807 0.000019
+vn 0.173652 0.984807 0.000031
+vn 0.173635 0.984810 -0.000027
+vn 0.173649 0.984808 0.000009
+vn 0.173641 0.984809 -0.000007
+vn 0.173650 0.984807 0.000006
+vn 0.173641 0.984809 -0.000005
+vn 0.173660 0.984806 0.000014
+vn 0.173629 0.984811 -0.000011
+vn 0.173638 0.984810 -0.000005
+vn 0.173649 0.984808 0.000001
+vn 0.173659 0.984806 0.000005
+vn 0.173636 0.984810 -0.000002
+vn 0.173683 0.984802 0.000007
+vn 0.173611 0.984814 0.000000
+vn 0.173649 0.984808 0.000000
+vn 0.173635 0.984810 0.000001
+vn 0.173681 0.984802 -0.000008
+vn 0.173674 0.984803 -0.000006
+vn 0.173644 0.984808 0.000007
+vn 0.173666 0.984805 -0.000005
+vn 0.173677 0.984803 -0.000016
+vn 0.173633 0.984810 0.000028
+vn 0.173518 0.984831 0.000143
+vn 0.173638 0.984810 0.000022
+vn -0.096528 0.017020 -0.995185
+vn -0.285872 0.050407 -0.956941
+vn -0.173648 -0.984808 0.000000
+vn -0.173647 -0.984808 -0.000006
+vn -0.173648 -0.984808 -0.000002
+vn -0.173647 -0.984808 -0.000003
+vn -0.173652 -0.984807 0.000009
+vn -0.173645 -0.984808 -0.000005
+vn -0.173652 -0.984807 0.000005
+vn -0.173644 -0.984809 -0.000005
+vn -0.173652 -0.984807 0.000003
+vn -0.173643 -0.984809 -0.000004
+vn -0.173650 -0.984807 0.000001
+vn -0.173680 -0.984802 0.000024
+vn -0.173592 -0.984818 0.000023
+vn -0.173693 -0.984800 0.000010
+vn -0.173644 -0.984808 -0.000000
+vn -0.173638 -0.984810 0.000013
+vn -0.173653 -0.984807 -0.000003
+vn -0.173644 -0.984808 0.000011
+vn -0.173646 -0.984808 0.000007
+vn -0.173645 -0.984808 -0.000007
+vn -0.173651 -0.984807 0.000003
+vn -0.173649 -0.984808 0.000000
+vn -0.173648 -0.984808 0.000001
+vn -0.173647 -0.984808 0.000002
+vn -0.173640 -0.984809 -0.000005
+vn -0.173647 -0.984808 -0.000001
+s off
+f 193/109/328 194/110/328 196/111/328
+f 195/109/329 196/110/329 198/111/329
+f 197/109/330 198/110/330 200/111/330
+f 199/109/331 200/110/331 202/111/331
+f 201/109/332 202/110/332 204/111/332
+f 203/109/333 204/110/333 206/111/333
+f 205/109/334 206/110/334 208/111/334
+f 207/109/335 208/110/335 210/111/335
+f 209/109/336 210/110/336 212/111/336
+f 211/109/337 212/110/337 214/111/337
+f 213/109/338 214/110/338 216/111/338
+f 215/109/339 216/110/339 218/111/339
+f 217/109/340 218/110/340 220/111/340
+f 219/109/341 220/110/341 222/111/341
+f 221/109/342 222/110/342 224/111/342
+f 223/109/343 224/110/343 226/111/343
+f 225/109/344 226/110/344 227/112/344
+f 227/109/345 228/110/345 229/112/345
+f 229/109/346 230/110/346 231/112/346
+f 231/109/347 232/110/347 233/112/347
+f 233/109/348 234/110/348 235/112/348
+f 235/109/349 236/110/349 237/112/349
+f 237/109/350 238/110/350 239/112/350
+f 239/109/351 240/110/351 241/112/351
+f 241/109/352 242/110/352 243/112/352
+f 243/109/353 244/110/353 245/112/353
+f 245/109/354 246/110/354 247/112/354
+f 247/109/355 248/110/355 249/112/355
+f 249/109/356 250/110/356 251/112/356
+f 251/109/357 252/110/357 253/112/357
+f 196/113/358 194/114/358 198/115/358
+f 255/109/359 256/110/359 193/112/359
+f 253/109/360 254/110/360 255/112/360
+f 193/113/361 195/114/361 255/115/361
+f 195/112/328 193/109/328 196/111/328
+f 197/112/362 195/109/362 198/111/362
+f 199/112/363 197/109/363 200/111/363
+f 201/112/364 199/109/364 202/111/364
+f 203/112/365 201/109/365 204/111/365
+f 205/112/366 203/109/366 206/111/366
+f 207/112/367 205/109/367 208/111/367
+f 209/112/368 207/109/368 210/111/368
+f 211/112/369 209/109/369 212/111/369
+f 213/112/370 211/109/370 214/111/370
+f 215/112/371 213/109/371 216/111/371
+f 217/112/372 215/109/372 218/111/372
+f 219/112/373 217/109/373 220/111/373
+f 221/112/374 219/109/374 222/111/374
+f 223/112/375 221/109/375 224/111/375
+f 225/112/343 223/109/343 226/111/343
+f 226/110/376 228/111/376 227/112/376
+f 228/110/377 230/111/377 229/112/377
+f 230/110/378 232/111/378 231/112/378
+f 232/110/379 234/111/379 233/112/379
+f 234/110/380 236/111/380 235/112/380
+f 236/110/381 238/111/381 237/112/381
+f 238/110/382 240/111/382 239/112/382
+f 240/110/383 242/111/383 241/112/383
+f 242/110/384 244/111/384 243/112/384
+f 244/110/385 246/111/385 245/112/385
+f 246/110/386 248/111/386 247/112/386
+f 248/110/387 250/111/387 249/112/387
+f 250/110/388 252/111/388 251/112/388
+f 252/110/389 254/111/389 253/112/389
+f 194/114/390 256/116/390 198/115/390
+f 256/116/391 254/117/391 198/115/391
+f 254/117/392 252/118/392 198/115/392
+f 252/118/393 250/119/393 198/115/393
+f 250/119/394 248/120/394 198/115/394
+f 248/120/395 246/121/395 198/115/395
+f 246/121/396 244/122/396 198/115/396
+f 244/122/397 242/123/397 198/115/397
+f 242/123/398 240/124/398 198/115/398
+f 240/124/399 238/125/399 198/115/399
+f 238/125/400 236/126/400 198/115/400
+f 236/126/401 234/127/401 198/115/401
+f 234/127/402 232/128/402 198/115/402
+f 232/128/403 230/129/403 198/115/403
+f 230/129/404 228/130/404 198/115/404
+f 228/130/405 226/131/405 198/115/405
+f 226/131/406 224/132/406 198/115/406
+f 224/132/407 222/133/407 198/115/407
+f 222/133/408 220/134/408 198/115/408
+f 220/134/409 218/135/409 198/115/409
+f 218/135/410 216/136/410 198/115/410
+f 216/136/411 214/137/411 198/115/411
+f 214/137/412 212/138/412 198/115/412
+f 212/138/413 210/139/413 198/115/413
+f 210/139/398 208/140/398 198/115/398
+f 208/140/414 206/141/414 198/115/414
+f 206/141/415 204/142/415 198/115/415
+f 204/142/416 202/143/416 200/144/416
+f 198/115/417 204/142/417 200/144/417
+f 256/110/418 194/111/418 193/112/418
+f 254/110/419 256/111/419 255/112/419
+f 195/114/420 197/116/420 255/115/420
+f 197/116/421 199/117/421 255/115/421
+f 199/117/422 201/118/422 255/115/422
+f 201/118/423 203/119/423 255/115/423
+f 203/119/424 205/120/424 255/115/424
+f 205/120/425 207/121/425 255/115/425
+f 207/121/426 209/122/426 255/115/426
+f 209/122/427 211/123/427 255/115/427
+f 211/123/428 213/124/428 255/115/428
+f 213/124/429 215/125/429 255/115/429
+f 215/125/430 217/126/430 255/115/430
+f 237/136/431 233/134/431 235/135/431
+f 247/141/432 243/139/432 245/140/432
+f 241/138/433 237/136/433 239/137/433
+f 241/138/434 233/134/434 237/136/434
+f 251/143/435 247/141/435 249/142/435
+f 251/143/436 243/139/436 247/141/436
+f 219/127/437 221/128/437 223/129/437
+f 219/127/438 223/129/438 225/130/438
+f 233/134/439 229/132/439 231/133/439
+f 241/138/440 229/132/440 233/134/440
+f 255/115/437 251/143/437 253/144/437
+f 255/115/441 217/126/441 251/143/441
+f 251/143/441 217/126/441 243/139/441
+f 219/127/442 225/130/442 227/131/442
+f 217/126/443 219/127/443 227/131/443
+f 243/139/420 217/126/420 227/131/420
+f 241/138/444 243/139/444 229/132/444
+f 243/139/445 227/131/445 229/132/445
+v -3.858562 2.027707 3.871576
+v -3.858562 2.027707 -3.907549
+v 3.920563 2.027707 -3.907549
+v 3.920563 2.027707 3.871576
+v -3.858562 2.306528 3.871576
+v -3.858562 2.306528 -3.907549
+v 3.920563 2.306528 -3.907549
+v 3.920563 2.306528 3.871576
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 0.000000 1.000000
+vt 1.000000 1.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.000000 -1.000000
+vn 1.000000 -0.000000 0.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+s off
+f 261/145/446 262/146/446 257/147/446
+f 262/145/447 263/146/447 258/147/447
+f 263/145/448 264/146/448 260/148/448
+f 264/145/449 261/146/449 257/148/449
+f 257/145/450 258/146/450 259/148/450
+f 264/145/451 263/146/451 262/148/451
+f 262/146/446 258/148/446 257/147/446
+f 263/146/447 259/148/447 258/147/447
+f 259/147/448 263/145/448 260/148/448
+f 260/147/449 264/145/449 257/148/449
+f 260/147/450 257/145/450 259/148/450
+f 261/147/451 264/145/451 262/148/451
+v 2.043798 0.024218 -3.001008
+v 2.043798 2.024218 -3.001008
+v 2.238889 0.024218 -2.981793
+v 2.238889 2.024218 -2.981793
+v 2.426482 0.024218 -2.924888
+v 2.426482 2.024218 -2.924888
+v 2.599369 0.024218 -2.832478
+v 2.599369 2.024218 -2.832478
+v 2.750905 0.024218 -2.708115
+v 2.750905 2.024218 -2.708115
+v 2.875268 0.024218 -2.556578
+v 2.875268 2.024218 -2.556578
+v 2.967678 0.024218 -2.383692
+v 2.967678 2.024218 -2.383692
+v 3.024584 0.024218 -2.196099
+v 3.024584 2.024218 -2.196099
+v 3.043798 0.024218 -2.001008
+v 3.043798 2.024218 -2.001008
+v 3.024584 0.024218 -1.805918
+v 3.024584 2.024218 -1.805918
+v 2.967678 0.024218 -1.618325
+v 2.967678 2.024218 -1.618325
+v 2.875268 0.024218 -1.445438
+v 2.875268 2.024218 -1.445438
+v 2.750905 0.024218 -1.293901
+v 2.750905 2.024218 -1.293901
+v 2.599369 0.024218 -1.169539
+v 2.599369 2.024218 -1.169539
+v 2.426482 0.024218 -1.077129
+v 2.426482 2.024218 -1.077129
+v 2.238889 0.024218 -1.020223
+v 2.238889 2.024218 -1.020223
+v 2.043798 0.024218 -1.001008
+v 2.043798 2.024218 -1.001008
+v 1.848708 0.024218 -1.020223
+v 1.848708 2.024218 -1.020223
+v 1.661115 0.024218 -1.077129
+v 1.661115 2.024218 -1.077129
+v 1.488228 0.024218 -1.169539
+v 1.488228 2.024218 -1.169539
+v 1.336691 0.024218 -1.293902
+v 1.336691 2.024218 -1.293902
+v 1.212328 0.024218 -1.445439
+v 1.212328 2.024218 -1.445439
+v 1.119919 0.024218 -1.618326
+v 1.119919 2.024218 -1.618326
+v 1.063013 0.024218 -1.805919
+v 1.063013 2.024218 -1.805919
+v 1.043798 0.024218 -2.001009
+v 1.043798 2.024218 -2.001009
+v 1.063013 0.024218 -2.196100
+v 1.063013 2.024218 -2.196100
+v 1.119919 0.024218 -2.383693
+v 1.119919 2.024218 -2.383693
+v 1.212330 0.024218 -2.556580
+v 1.212330 2.024218 -2.556580
+v 1.336693 0.024218 -2.708116
+v 1.336693 2.024218 -2.708116
+v 1.488229 0.024218 -2.832479
+v 1.488229 2.024218 -2.832479
+v 1.661116 0.024218 -2.924888
+v 1.661116 2.024218 -2.924888
+v 1.848710 0.024218 -2.981794
+v 1.848710 2.024218 -2.981794
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vn 0.098018 0.000000 -0.995185
+vn 0.290285 0.000000 -0.956940
+vn 0.471397 0.000000 -0.881921
+vn 0.634393 0.000000 -0.773011
+vn 0.773011 0.000000 -0.634393
+vn 0.881921 0.000000 -0.471398
+vn 0.956940 0.000000 -0.290285
+vn 0.995185 0.000000 -0.098017
+vn 0.995185 0.000000 0.098017
+vn 0.956940 0.000000 0.290285
+vn 0.881921 0.000000 0.471397
+vn 0.773011 0.000000 0.634393
+vn 0.634393 0.000000 0.773011
+vn 0.471397 0.000000 0.881921
+vn 0.290285 0.000000 0.956940
+vn 0.098017 0.000000 0.995185
+vn -0.098018 0.000000 0.995185
+vn -0.290285 0.000000 0.956940
+vn -0.471397 0.000000 0.881921
+vn -0.634394 0.000000 0.773010
+vn -0.773011 0.000000 0.634393
+vn -0.881922 0.000000 0.471396
+vn -0.956941 0.000000 0.290283
+vn -0.995185 0.000000 0.098017
+vn -0.995185 -0.000000 -0.098018
+vn -0.956940 -0.000000 -0.290286
+vn -0.881921 -0.000000 -0.471398
+vn -0.773010 -0.000000 -0.634394
+vn -0.634392 -0.000000 -0.773012
+vn -0.471396 -0.000000 -0.881922
+vn -0.098016 -0.000000 -0.995185
+vn -0.290283 -0.000000 -0.956941
+s off
+f 265/149/452 266/150/452 268/151/452
+f 267/149/453 268/150/453 270/151/453
+f 269/149/454 270/150/454 272/151/454
+f 271/149/455 272/150/455 274/151/455
+f 273/149/456 274/150/456 276/151/456
+f 275/149/457 276/150/457 278/151/457
+f 277/149/458 278/150/458 280/151/458
+f 279/149/459 280/150/459 282/151/459
+f 281/149/460 282/150/460 284/151/460
+f 283/149/461 284/150/461 286/151/461
+f 285/149/462 286/150/462 288/151/462
+f 287/149/463 288/150/463 290/151/463
+f 289/149/464 290/150/464 292/151/464
+f 291/149/465 292/150/465 294/151/465
+f 293/149/466 294/150/466 296/151/466
+f 295/149/467 296/150/467 298/151/467
+f 297/149/468 298/150/468 299/152/468
+f 299/149/469 300/150/469 301/152/469
+f 301/149/470 302/150/470 303/152/470
+f 303/149/471 304/150/471 305/152/471
+f 305/149/472 306/150/472 307/152/472
+f 307/149/473 308/150/473 309/152/473
+f 309/149/474 310/150/474 311/152/474
+f 311/149/475 312/150/475 313/152/475
+f 313/149/476 314/150/476 315/152/476
+f 315/149/477 316/150/477 317/152/477
+f 317/149/478 318/150/478 319/152/478
+f 319/149/479 320/150/479 321/152/479
+f 321/149/480 322/150/480 323/152/480
+f 323/149/481 324/150/481 325/152/481
+f 268/153/451 266/154/451 270/155/451
+f 327/149/482 328/150/482 265/152/482
+f 325/149/483 326/150/483 327/152/483
+f 265/153/450 267/154/450 327/155/450
+f 267/152/452 265/149/452 268/151/452
+f 269/152/453 267/149/453 270/151/453
+f 271/152/454 269/149/454 272/151/454
+f 273/152/455 271/149/455 274/151/455
+f 275/152/456 273/149/456 276/151/456
+f 277/152/457 275/149/457 278/151/457
+f 279/152/458 277/149/458 280/151/458
+f 281/152/459 279/149/459 282/151/459
+f 283/152/460 281/149/460 284/151/460
+f 285/152/461 283/149/461 286/151/461
+f 287/152/462 285/149/462 288/151/462
+f 289/152/463 287/149/463 290/151/463
+f 291/152/464 289/149/464 292/151/464
+f 293/152/465 291/149/465 294/151/465
+f 295/152/466 293/149/466 296/151/466
+f 297/152/467 295/149/467 298/151/467
+f 298/150/468 300/151/468 299/152/468
+f 300/150/469 302/151/469 301/152/469
+f 302/150/470 304/151/470 303/152/470
+f 304/150/471 306/151/471 305/152/471
+f 306/150/472 308/151/472 307/152/472
+f 308/150/473 310/151/473 309/152/473
+f 310/150/474 312/151/474 311/152/474
+f 312/150/475 314/151/475 313/152/475
+f 314/150/476 316/151/476 315/152/476
+f 316/150/477 318/151/477 317/152/477
+f 318/150/478 320/151/478 319/152/478
+f 320/150/479 322/151/479 321/152/479
+f 322/150/480 324/151/480 323/152/480
+f 324/150/481 326/151/481 325/152/481
+f 266/154/451 328/156/451 270/155/451
+f 328/156/451 326/157/451 270/155/451
+f 326/157/451 324/158/451 270/155/451
+f 324/158/451 322/159/451 270/155/451
+f 322/159/451 320/160/451 270/155/451
+f 320/160/451 318/161/451 270/155/451
+f 318/161/451 316/162/451 270/155/451
+f 316/162/451 314/163/451 270/155/451
+f 314/163/451 312/164/451 270/155/451
+f 312/164/451 310/165/451 270/155/451
+f 310/165/451 308/166/451 270/155/451
+f 308/166/451 306/167/451 270/155/451
+f 306/167/451 304/168/451 270/155/451
+f 304/168/451 302/169/451 270/155/451
+f 302/169/451 300/170/451 270/155/451
+f 300/170/451 298/171/451 270/155/451
+f 298/171/451 296/172/451 270/155/451
+f 296/172/451 294/173/451 270/155/451
+f 294/173/451 292/174/451 270/155/451
+f 292/174/451 290/175/451 270/155/451
+f 290/175/451 288/176/451 270/155/451
+f 288/176/451 286/177/451 270/155/451
+f 286/177/451 284/178/451 270/155/451
+f 284/178/451 282/179/451 270/155/451
+f 282/179/451 280/180/451 270/155/451
+f 280/180/451 278/181/451 270/155/451
+f 278/181/451 276/182/451 270/155/451
+f 276/182/451 274/183/451 270/155/451
+f 274/183/451 272/184/451 270/155/451
+f 328/150/482 266/151/482 265/152/482
+f 326/150/483 328/151/483 327/152/483
+f 267/154/450 269/156/450 327/155/450
+f 269/156/450 271/157/450 327/155/450
+f 271/157/450 273/158/450 327/155/450
+f 273/158/450 275/159/450 327/155/450
+f 275/159/450 277/160/450 327/155/450
+f 277/160/450 279/161/450 327/155/450
+f 279/161/450 281/162/450 327/155/450
+f 281/162/450 283/163/450 327/155/450
+f 283/163/450 285/164/450 327/155/450
+f 285/164/450 287/165/450 327/155/450
+f 287/165/450 289/166/450 327/155/450
+f 289/166/450 291/167/450 327/155/450
+f 291/167/450 293/168/450 327/155/450
+f 293/168/450 295/169/450 327/155/450
+f 295/169/450 297/170/450 327/155/450
+f 297/170/450 299/171/450 327/155/450
+f 299/171/450 301/172/450 327/155/450
+f 301/172/450 303/173/450 327/155/450
+f 303/173/450 305/174/450 327/155/450
+f 305/174/450 307/175/450 327/155/450
+f 307/175/450 309/176/450 327/155/450
+f 309/176/450 311/177/450 327/155/450
+f 311/177/450 313/178/450 327/155/450
+f 313/178/450 315/179/450 327/155/450
+f 315/179/450 317/180/450 327/155/450
+f 317/180/450 319/181/450 327/155/450
+f 319/181/450 321/182/450 327/155/450
+f 321/182/450 323/183/450 325/184/450
+f 327/155/450 321/182/450 325/184/450
+v -2.014818 0.007922 0.998641
+v -2.014818 2.007922 0.998641
+v -1.819728 0.007922 1.017856
+v -1.819728 2.007922 1.017856
+v -1.632135 0.007922 1.074762
+v -1.632135 2.007922 1.074762
+v -1.459248 0.007922 1.167172
+v -1.459248 2.007922 1.167172
+v -1.307712 0.007922 1.291534
+v -1.307712 2.007922 1.291534
+v -1.183349 0.007922 1.443071
+v -1.183349 2.007922 1.443071
+v -1.090939 0.007922 1.615958
+v -1.090939 2.007922 1.615958
+v -1.034033 0.007922 1.803551
+v -1.034033 2.007922 1.803551
+v -1.014818 0.007922 1.998641
+v -1.014818 2.007922 1.998641
+v -1.034033 0.007922 2.193732
+v -1.034033 2.007922 2.193732
+v -1.090939 0.007922 2.381325
+v -1.090939 2.007922 2.381325
+v -1.183349 0.007922 2.554211
+v -1.183349 2.007922 2.554211
+v -1.307712 0.007922 2.705748
+v -1.307712 2.007922 2.705748
+v -1.459248 0.007922 2.830111
+v -1.459248 2.007922 2.830111
+v -1.632135 0.007922 2.922521
+v -1.632135 2.007922 2.922521
+v -1.819728 0.007922 2.979427
+v -1.819728 2.007922 2.979427
+v -2.014819 0.007922 2.998641
+v -2.014819 2.007922 2.998641
+v -2.209909 0.007922 2.979426
+v -2.209909 2.007922 2.979426
+v -2.397502 0.007922 2.922521
+v -2.397502 2.007922 2.922521
+v -2.570389 0.007922 2.830111
+v -2.570389 2.007922 2.830111
+v -2.721926 0.007922 2.705748
+v -2.721926 2.007922 2.705748
+v -2.846288 0.007922 2.554211
+v -2.846288 2.007922 2.554211
+v -2.938698 0.007922 2.381324
+v -2.938698 2.007922 2.381324
+v -2.995604 0.007922 2.193731
+v -2.995604 2.007922 2.193731
+v -3.014818 0.007922 1.998640
+v -3.014818 2.007922 1.998640
+v -2.995604 0.007922 1.803550
+v -2.995604 2.007922 1.803550
+v -2.938698 0.007922 1.615957
+v -2.938698 2.007922 1.615957
+v -2.846287 0.007922 1.443070
+v -2.846287 2.007922 1.443070
+v -2.721924 0.007922 1.291534
+v -2.721924 2.007922 1.291534
+v -2.570388 0.007922 1.167171
+v -2.570388 2.007922 1.167171
+v -2.397501 0.007922 1.074761
+v -2.397501 2.007922 1.074761
+v -2.209907 0.007922 1.017856
+v -2.209907 2.007922 1.017856
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vn 0.098017 0.000000 -0.995185
+vn 0.881921 0.000000 -0.471397
+vn 0.634393 0.000000 0.773010
+vn 0.471396 0.000000 0.881922
+vn -0.881920 -0.000000 -0.471398
+vn -0.634393 -0.000000 -0.773011
+vn -0.471395 -0.000000 -0.881922
+s off
+f 329/185/484 330/186/484 332/187/484
+f 331/185/453 332/186/453 334/187/453
+f 333/185/454 334/186/454 336/187/454
+f 335/185/455 336/186/455 338/187/455
+f 337/185/456 338/186/456 340/187/456
+f 339/185/485 340/186/485 342/187/485
+f 341/185/458 342/186/458 344/187/458
+f 343/185/459 344/186/459 346/187/459
+f 345/185/460 346/186/460 348/187/460
+f 347/185/461 348/186/461 350/187/461
+f 349/185/462 350/186/462 352/187/462
+f 351/185/463 352/186/463 354/187/463
+f 353/185/486 354/186/486 356/187/486
+f 355/185/487 356/186/487 358/187/487
+f 357/185/466 358/186/466 360/187/466
+f 359/185/467 360/186/467 362/187/467
+f 361/185/468 362/186/468 363/188/468
+f 363/185/469 364/186/469 365/188/469
+f 365/185/470 366/186/470 367/188/470
+f 367/185/471 368/186/471 369/188/471
+f 369/185/472 370/186/472 371/188/472
+f 371/185/473 372/186/473 373/188/473
+f 373/185/474 374/186/474 375/188/474
+f 375/185/475 376/186/475 377/188/475
+f 377/185/476 378/186/476 379/188/476
+f 379/185/477 380/186/477 381/188/477
+f 381/185/488 382/186/488 383/188/488
+f 383/185/479 384/186/479 385/188/479
+f 385/185/489 386/186/489 387/188/489
+f 387/185/490 388/186/490 389/188/490
+f 332/189/451 330/190/451 334/191/451
+f 391/185/482 392/186/482 329/188/482
+f 389/185/483 390/186/483 391/188/483
+f 329/189/450 331/190/450 391/191/450
+f 331/188/484 329/185/484 332/187/484
+f 333/188/453 331/185/453 334/187/453
+f 335/188/454 333/185/454 336/187/454
+f 337/188/455 335/185/455 338/187/455
+f 339/188/456 337/185/456 340/187/456
+f 341/188/485 339/185/485 342/187/485
+f 343/188/458 341/185/458 344/187/458
+f 345/188/459 343/185/459 346/187/459
+f 347/188/460 345/185/460 348/187/460
+f 349/188/461 347/185/461 350/187/461
+f 351/188/462 349/185/462 352/187/462
+f 353/188/463 351/185/463 354/187/463
+f 355/188/486 353/185/486 356/187/486
+f 357/188/487 355/185/487 358/187/487
+f 359/188/466 357/185/466 360/187/466
+f 361/188/467 359/185/467 362/187/467
+f 362/186/468 364/187/468 363/188/468
+f 364/186/469 366/187/469 365/188/469
+f 366/186/470 368/187/470 367/188/470
+f 368/186/471 370/187/471 369/188/471
+f 370/186/472 372/187/472 371/188/472
+f 372/186/473 374/187/473 373/188/473
+f 374/186/474 376/187/474 375/188/474
+f 376/186/475 378/187/475 377/188/475
+f 378/186/476 380/187/476 379/188/476
+f 380/186/477 382/187/477 381/188/477
+f 382/186/488 384/187/488 383/188/488
+f 384/186/479 386/187/479 385/188/479
+f 386/186/489 388/187/489 387/188/489
+f 388/186/490 390/187/490 389/188/490
+f 330/190/451 392/192/451 334/191/451
+f 392/192/451 390/193/451 334/191/451
+f 390/193/451 388/194/451 334/191/451
+f 388/194/451 386/195/451 334/191/451
+f 386/195/451 384/196/451 334/191/451
+f 384/196/451 382/197/451 334/191/451
+f 382/197/451 380/198/451 334/191/451
+f 380/198/451 378/199/451 334/191/451
+f 378/199/451 376/200/451 334/191/451
+f 376/200/451 374/201/451 334/191/451
+f 374/201/451 372/202/451 334/191/451
+f 372/202/451 370/203/451 334/191/451
+f 370/203/451 368/204/451 334/191/451
+f 368/204/451 366/205/451 334/191/451
+f 366/205/451 364/206/451 334/191/451
+f 364/206/451 362/207/451 334/191/451
+f 362/207/451 360/208/451 334/191/451
+f 360/208/451 358/209/451 334/191/451
+f 358/209/451 356/210/451 334/191/451
+f 356/210/451 354/211/451 334/191/451
+f 354/211/451 352/212/451 334/191/451
+f 352/212/451 350/213/451 334/191/451
+f 350/213/451 348/214/451 334/191/451
+f 348/214/451 346/215/451 334/191/451
+f 346/215/451 344/216/451 334/191/451
+f 344/216/451 342/217/451 334/191/451
+f 342/217/451 340/218/451 334/191/451
+f 340/218/451 338/219/451 334/191/451
+f 338/219/451 336/220/451 334/191/451
+f 392/186/482 330/187/482 329/188/482
+f 390/186/483 392/187/483 391/188/483
+f 331/190/450 333/192/450 391/191/450
+f 333/192/450 335/193/450 391/191/450
+f 335/193/450 337/194/450 391/191/450
+f 337/194/450 339/195/450 391/191/450
+f 339/195/450 341/196/450 391/191/450
+f 341/196/450 343/197/450 391/191/450
+f 343/197/450 345/198/450 391/191/450
+f 345/198/450 347/199/450 391/191/450
+f 347/199/450 349/200/450 391/191/450
+f 349/200/450 351/201/450 391/191/450
+f 351/201/450 353/202/450 391/191/450
+f 353/202/450 355/203/450 391/191/450
+f 355/203/450 357/204/450 391/191/450
+f 357/204/450 359/205/450 391/191/450
+f 359/205/450 361/206/450 391/191/450
+f 361/206/450 363/207/450 391/191/450
+f 363/207/450 365/208/450 391/191/450
+f 365/208/450 367/209/450 391/191/450
+f 367/209/450 369/210/450 391/191/450
+f 369/210/450 371/211/450 391/191/450
+f 371/211/450 373/212/450 391/191/450
+f 373/212/450 375/213/450 391/191/450
+f 375/213/450 377/214/450 391/191/450
+f 377/214/450 379/215/450 391/191/450
+f 379/215/450 381/216/450 391/191/450
+f 381/216/450 383/217/450 391/191/450
+f 383/217/450 385/218/450 391/191/450
+f 385/218/450 387/219/450 391/191/450
+f 387/219/450 389/220/450 391/191/450
+v -2.001621 -0.021814 -3.021079
+v -2.001621 1.978186 -3.021079
+v -1.806530 -0.021814 -3.001864
+v -1.806530 1.978186 -3.001864
+v -1.618937 -0.021814 -2.944958
+v -1.618937 1.978186 -2.944958
+v -1.446051 -0.021814 -2.852548
+v -1.446051 1.978186 -2.852548
+v -1.294514 -0.021814 -2.728185
+v -1.294514 1.978186 -2.728185
+v -1.170151 -0.021814 -2.576649
+v -1.170151 1.978186 -2.576649
+v -1.077741 -0.021814 -2.403762
+v -1.077741 1.978186 -2.403762
+v -1.020836 -0.021814 -2.216169
+v -1.020836 1.978186 -2.216169
+v -1.001621 -0.021814 -2.021079
+v -1.001621 1.978186 -2.021079
+v -1.020835 -0.021814 -1.825988
+v -1.020835 1.978186 -1.825988
+v -1.077741 -0.021814 -1.638395
+v -1.077741 1.978186 -1.638395
+v -1.170151 -0.021814 -1.465508
+v -1.170151 1.978186 -1.465508
+v -1.294514 -0.021814 -1.313972
+v -1.294514 1.978186 -1.313972
+v -1.446051 -0.021814 -1.189609
+v -1.446051 1.978186 -1.189609
+v -1.618937 -0.021814 -1.097199
+v -1.618937 1.978186 -1.097199
+v -1.806531 -0.021814 -1.040293
+v -1.806531 1.978186 -1.040293
+v -2.001621 -0.021814 -1.021079
+v -2.001621 1.978186 -1.021079
+v -2.196712 -0.021814 -1.040293
+v -2.196712 1.978186 -1.040293
+v -2.384305 -0.021814 -1.097199
+v -2.384305 1.978186 -1.097199
+v -2.557191 -0.021814 -1.189609
+v -2.557191 1.978186 -1.189609
+v -2.708728 -0.021814 -1.313972
+v -2.708728 1.978186 -1.313972
+v -2.833091 -0.021814 -1.465509
+v -2.833091 1.978186 -1.465509
+v -2.925501 -0.021814 -1.638396
+v -2.925501 1.978186 -1.638396
+v -2.982406 -0.021814 -1.825989
+v -2.982406 1.978186 -1.825989
+v -3.001621 -0.021814 -2.021080
+v -3.001621 1.978186 -2.021080
+v -2.982406 -0.021814 -2.216170
+v -2.982406 1.978186 -2.216170
+v -2.925500 -0.021814 -2.403763
+v -2.925500 1.978186 -2.403763
+v -2.833090 -0.021814 -2.576650
+v -2.833090 1.978186 -2.576650
+v -2.708727 -0.021814 -2.728186
+v -2.708727 1.978186 -2.728186
+v -2.557190 -0.021814 -2.852549
+v -2.557190 1.978186 -2.852549
+v -2.384303 -0.021814 -2.944959
+v -2.384303 1.978186 -2.944959
+v -2.196710 -0.021814 -3.001864
+v -2.196710 1.978186 -3.001864
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vn 0.471398 0.000000 -0.881921
+vn -0.634393 0.000000 0.773010
+vn -0.881921 -0.000000 -0.471397
+vn -0.773009 -0.000000 -0.634395
+vn -0.634393 -0.000000 -0.773010
+s off
+f 393/221/484 394/222/484 396/223/484
+f 395/221/453 396/222/453 398/223/453
+f 397/221/491 398/222/491 400/223/491
+f 399/221/455 400/222/455 402/223/455
+f 401/221/456 402/222/456 404/223/456
+f 403/221/485 404/222/485 406/223/485
+f 405/221/458 406/222/458 408/223/458
+f 407/221/459 408/222/459 410/223/459
+f 409/221/460 410/222/460 412/223/460
+f 411/221/461 412/222/461 414/223/461
+f 413/221/462 414/222/462 416/223/462
+f 415/221/463 416/222/463 418/223/463
+f 417/221/464 418/222/464 420/223/464
+f 419/221/465 420/222/465 422/223/465
+f 421/221/466 422/222/466 424/223/466
+f 423/221/467 424/222/467 426/223/467
+f 425/221/468 426/222/468 427/224/468
+f 427/221/469 428/222/469 429/224/469
+f 429/221/470 430/222/470 431/224/470
+f 431/221/492 432/222/492 433/224/492
+f 433/221/472 434/222/472 435/224/472
+f 435/221/473 436/222/473 437/224/473
+f 437/221/474 438/222/474 439/224/474
+f 439/221/475 440/222/475 441/224/475
+f 441/221/476 442/222/476 443/224/476
+f 443/221/477 444/222/477 445/224/477
+f 445/221/493 446/222/493 447/224/493
+f 447/221/494 448/222/494 449/224/494
+f 449/221/495 450/222/495 451/224/495
+f 451/221/490 452/222/490 453/224/490
+f 396/225/451 394/226/451 398/227/451
+f 455/221/482 456/222/482 393/224/482
+f 453/221/483 454/222/483 455/224/483
+f 393/225/450 395/226/450 455/227/450
+f 395/224/484 393/221/484 396/223/484
+f 397/224/453 395/221/453 398/223/453
+f 399/224/491 397/221/491 400/223/491
+f 401/224/455 399/221/455 402/223/455
+f 403/224/456 401/221/456 404/223/456
+f 405/224/485 403/221/485 406/223/485
+f 407/224/458 405/221/458 408/223/458
+f 409/224/459 407/221/459 410/223/459
+f 411/224/460 409/221/460 412/223/460
+f 413/224/461 411/221/461 414/223/461
+f 415/224/462 413/221/462 416/223/462
+f 417/224/463 415/221/463 418/223/463
+f 419/224/464 417/221/464 420/223/464
+f 421/224/465 419/221/465 422/223/465
+f 423/224/466 421/221/466 424/223/466
+f 425/224/467 423/221/467 426/223/467
+f 426/222/468 428/223/468 427/224/468
+f 428/222/469 430/223/469 429/224/469
+f 430/222/470 432/223/470 431/224/470
+f 432/222/492 434/223/492 433/224/492
+f 434/222/472 436/223/472 435/224/472
+f 436/222/473 438/223/473 437/224/473
+f 438/222/474 440/223/474 439/224/474
+f 440/222/475 442/223/475 441/224/475
+f 442/222/476 444/223/476 443/224/476
+f 444/222/477 446/223/477 445/224/477
+f 446/222/493 448/223/493 447/224/493
+f 448/222/494 450/223/494 449/224/494
+f 450/222/495 452/223/495 451/224/495
+f 452/222/490 454/223/490 453/224/490
+f 394/226/451 456/228/451 398/227/451
+f 456/228/451 454/229/451 398/227/451
+f 454/229/451 452/230/451 398/227/451
+f 452/230/451 450/231/451 398/227/451
+f 450/231/451 448/232/451 398/227/451
+f 448/232/451 446/233/451 398/227/451
+f 446/233/451 444/234/451 398/227/451
+f 444/234/451 442/235/451 398/227/451
+f 442/235/451 440/236/451 398/227/451
+f 440/236/451 438/237/451 398/227/451
+f 438/237/451 436/238/451 398/227/451
+f 436/238/451 434/239/451 398/227/451
+f 434/239/451 432/240/451 398/227/451
+f 432/240/451 430/241/451 398/227/451
+f 430/241/451 428/242/451 398/227/451
+f 428/242/451 426/243/451 398/227/451
+f 426/243/451 424/244/451 398/227/451
+f 424/244/451 422/245/451 398/227/451
+f 422/245/451 420/246/451 398/227/451
+f 420/246/451 418/247/451 398/227/451
+f 418/247/451 416/248/451 398/227/451
+f 416/248/451 414/249/451 398/227/451
+f 414/249/451 412/250/451 398/227/451
+f 412/250/451 410/251/451 398/227/451
+f 410/251/451 408/252/451 398/227/451
+f 408/252/451 406/253/451 398/227/451
+f 406/253/451 404/254/451 398/227/451
+f 404/254/451 402/255/451 398/227/451
+f 402/255/451 400/256/451 398/227/451
+f 456/222/482 394/223/482 393/224/482
+f 454/222/483 456/223/483 455/224/483
+f 395/226/450 397/228/450 455/227/450
+f 397/228/450 399/229/450 455/227/450
+f 399/229/450 401/230/450 455/227/450
+f 401/230/450 403/231/450 455/227/450
+f 403/231/450 405/232/450 455/227/450
+f 405/232/450 407/233/450 455/227/450
+f 407/233/450 409/234/450 455/227/450
+f 409/234/450 411/235/450 455/227/450
+f 411/235/450 413/236/450 455/227/450
+f 413/236/450 415/237/450 455/227/450
+f 415/237/450 417/238/450 455/227/450
+f 417/238/450 419/239/450 455/227/450
+f 419/239/450 421/240/450 455/227/450
+f 421/240/450 423/241/450 455/227/450
+f 423/241/450 425/242/450 455/227/450
+f 425/242/450 427/243/450 455/227/450
+f 427/243/450 429/244/450 455/227/450
+f 429/244/450 431/245/450 455/227/450
+f 431/245/450 433/246/450 455/227/450
+f 433/246/450 435/247/450 455/227/450
+f 435/247/450 437/248/450 455/227/450
+f 437/248/450 439/249/450 455/227/450
+f 439/249/450 441/250/450 455/227/450
+f 441/250/450 443/251/450 455/227/450
+f 443/251/450 445/252/450 455/227/450
+f 445/252/450 447/253/450 455/227/450
+f 447/253/450 449/254/450 455/227/450
+f 449/254/450 451/255/450 455/227/450
+f 451/255/450 453/256/450 455/227/450
+v 2.021592 0.003623 1.016610
+v 2.021592 2.003623 1.016610
+v 2.216682 0.003623 1.035825
+v 2.216682 2.003623 1.035825
+v 2.404276 0.003623 1.092731
+v 2.404276 2.003623 1.092731
+v 2.577162 0.003623 1.185141
+v 2.577162 2.003623 1.185141
+v 2.728699 0.003623 1.309503
+v 2.728699 2.003623 1.309503
+v 2.853062 0.003623 1.461040
+v 2.853062 2.003623 1.461040
+v 2.945472 0.003623 1.633927
+v 2.945472 2.003623 1.633927
+v 3.002378 0.003623 1.821520
+v 3.002378 2.003623 1.821520
+v 3.021592 0.003623 2.016610
+v 3.021592 2.003623 2.016610
+v 3.002378 0.003623 2.211700
+v 3.002378 2.003623 2.211700
+v 2.945472 0.003623 2.399293
+v 2.945472 2.003623 2.399293
+v 2.853062 0.003623 2.572180
+v 2.853062 2.003623 2.572180
+v 2.728699 0.003623 2.723717
+v 2.728699 2.003623 2.723717
+v 2.577162 0.003623 2.848080
+v 2.577162 2.003623 2.848080
+v 2.404275 0.003623 2.940490
+v 2.404275 2.003623 2.940490
+v 2.216682 0.003623 2.997396
+v 2.216682 2.003623 2.997396
+v 2.021592 0.003623 3.016610
+v 2.021592 2.003623 3.016610
+v 1.826501 0.003623 2.997395
+v 1.826501 2.003623 2.997395
+v 1.638908 0.003623 2.940490
+v 1.638908 2.003623 2.940490
+v 1.466021 0.003623 2.848079
+v 1.466021 2.003623 2.848079
+v 1.314485 0.003623 2.723716
+v 1.314485 2.003623 2.723716
+v 1.190122 0.003623 2.572180
+v 1.190122 2.003623 2.572180
+v 1.097712 0.003623 2.399293
+v 1.097712 2.003623 2.399293
+v 1.040807 0.003623 2.211699
+v 1.040807 2.003623 2.211699
+v 1.021592 0.003623 2.016609
+v 1.021592 2.003623 2.016609
+v 1.040807 0.003623 1.821519
+v 1.040807 2.003623 1.821519
+v 1.097713 0.003623 1.633926
+v 1.097713 2.003623 1.633926
+v 1.190123 0.003623 1.461039
+v 1.190123 2.003623 1.461039
+v 1.314486 0.003623 1.309502
+v 1.314486 2.003623 1.309502
+v 1.466023 0.003623 1.185140
+v 1.466023 2.003623 1.185140
+v 1.638910 0.003623 1.092730
+v 1.638910 2.003623 1.092730
+v 1.826503 0.003623 1.035825
+v 1.826503 2.003623 1.035825
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+s off
+f 457/257/484 458/258/484 460/259/484
+f 459/257/453 460/258/453 462/259/453
+f 461/257/454 462/258/454 464/259/454
+f 463/257/455 464/258/455 466/259/455
+f 465/257/456 466/258/456 468/259/456
+f 467/257/457 468/258/457 470/259/457
+f 469/257/458 470/258/458 472/259/458
+f 471/257/459 472/258/459 474/259/459
+f 473/257/460 474/258/460 476/259/460
+f 475/257/461 476/258/461 478/259/461
+f 477/257/462 478/258/462 480/259/462
+f 479/257/463 480/258/463 482/259/463
+f 481/257/464 482/258/464 484/259/464
+f 483/257/465 484/258/465 486/259/465
+f 485/257/466 486/258/466 488/259/466
+f 487/257/467 488/258/467 490/259/467
+f 489/257/468 490/258/468 491/260/468
+f 491/257/469 492/258/469 493/260/469
+f 493/257/470 494/258/470 495/260/470
+f 495/257/471 496/258/471 497/260/471
+f 497/257/472 498/258/472 499/260/472
+f 499/257/473 500/258/473 501/260/473
+f 501/257/474 502/258/474 503/260/474
+f 503/257/475 504/258/475 505/260/475
+f 505/257/476 506/258/476 507/260/476
+f 507/257/477 508/258/477 509/260/477
+f 509/257/478 510/258/478 511/260/478
+f 511/257/494 512/258/494 513/260/494
+f 513/257/489 514/258/489 515/260/489
+f 515/257/490 516/258/490 517/260/490
+f 460/261/451 458/262/451 462/263/451
+f 519/257/482 520/258/482 457/260/482
+f 517/257/483 518/258/483 519/260/483
+f 457/261/450 459/262/450 519/263/450
+f 459/260/484 457/257/484 460/259/484
+f 461/260/453 459/257/453 462/259/453
+f 463/260/454 461/257/454 464/259/454
+f 465/260/455 463/257/455 466/259/455
+f 467/260/456 465/257/456 468/259/456
+f 469/260/457 467/257/457 470/259/457
+f 471/260/458 469/257/458 472/259/458
+f 473/260/459 471/257/459 474/259/459
+f 475/260/460 473/257/460 476/259/460
+f 477/260/461 475/257/461 478/259/461
+f 479/260/462 477/257/462 480/259/462
+f 481/260/463 479/257/463 482/259/463
+f 483/260/464 481/257/464 484/259/464
+f 485/260/465 483/257/465 486/259/465
+f 487/260/466 485/257/466 488/259/466
+f 489/260/467 487/257/467 490/259/467
+f 490/258/468 492/259/468 491/260/468
+f 492/258/469 494/259/469 493/260/469
+f 494/258/470 496/259/470 495/260/470
+f 496/258/471 498/259/471 497/260/471
+f 498/258/472 500/259/472 499/260/472
+f 500/258/473 502/259/473 501/260/473
+f 502/258/474 504/259/474 503/260/474
+f 504/258/475 506/259/475 505/260/475
+f 506/258/476 508/259/476 507/260/476
+f 508/258/477 510/259/477 509/260/477
+f 510/258/478 512/259/478 511/260/478
+f 512/258/494 514/259/494 513/260/494
+f 514/258/489 516/259/489 515/260/489
+f 516/258/490 518/259/490 517/260/490
+f 458/262/451 520/264/451 462/263/451
+f 520/264/451 518/265/451 462/263/451
+f 518/265/451 516/266/451 462/263/451
+f 516/266/451 514/267/451 462/263/451
+f 514/267/451 512/268/451 462/263/451
+f 512/268/451 510/269/451 462/263/451
+f 510/269/451 508/270/451 462/263/451
+f 508/270/451 506/271/451 462/263/451
+f 506/271/451 504/272/451 462/263/451
+f 504/272/451 502/273/451 462/263/451
+f 502/273/451 500/274/451 462/263/451
+f 500/274/451 498/275/451 462/263/451
+f 498/275/451 496/276/451 462/263/451
+f 496/276/451 494/277/451 462/263/451
+f 494/277/451 492/278/451 462/263/451
+f 492/278/451 490/279/451 462/263/451
+f 490/279/451 488/280/451 462/263/451
+f 488/280/451 486/281/451 462/263/451
+f 486/281/451 484/282/451 462/263/451
+f 484/282/451 482/283/451 462/263/451
+f 482/283/451 480/284/451 462/263/451
+f 480/284/451 478/285/451 462/263/451
+f 478/285/451 476/286/451 462/263/451
+f 476/286/451 474/287/451 462/263/451
+f 474/287/451 472/288/451 462/263/451
+f 472/288/451 470/289/451 462/263/451
+f 470/289/451 468/290/451 462/263/451
+f 468/290/451 466/291/451 462/263/451
+f 466/291/451 464/292/451 462/263/451
+f 520/258/482 458/259/482 457/260/482
+f 518/258/483 520/259/483 519/260/483
+f 459/262/450 461/264/450 519/263/450
+f 461/264/450 463/265/450 519/263/450
+f 463/265/450 465/266/450 519/263/450
+f 465/266/450 467/267/450 519/263/450
+f 467/267/450 469/268/450 519/263/450
+f 469/268/450 471/269/450 519/263/450
+f 471/269/450 473/270/450 519/263/450
+f 473/270/450 475/271/450 519/263/450
+f 475/271/450 477/272/450 519/263/450
+f 477/272/450 479/273/450 519/263/450
+f 479/273/450 481/274/450 519/263/450
+f 481/274/450 483/275/450 519/263/450
+f 483/275/450 485/276/450 519/263/450
+f 485/276/450 487/277/450 519/263/450
+f 487/277/450 489/278/450 519/263/450
+f 489/278/450 491/279/450 519/263/450
+f 491/279/450 493/280/450 519/263/450
+f 493/280/450 495/281/450 519/263/450
+f 495/281/450 497/282/450 519/263/450
+f 497/282/450 499/283/450 519/263/450
+f 499/283/450 501/284/450 519/263/450
+f 501/284/450 503/285/450 519/263/450
+f 503/285/450 505/286/450 519/263/450
+f 505/286/450 507/287/450 519/263/450
+f 507/287/450 509/288/450 519/263/450
+f 509/288/450 511/289/450 519/263/450
+f 511/289/450 513/290/450 519/263/450
+f 513/290/450 515/291/450 519/263/450
+f 515/291/450 517/292/450 519/263/450
diff --git a/examples/datavisualization/customitems/pipe.obj b/examples/datavisualization/customitems/pipe.obj
new file mode 100644
index 00000000..6ccbb286
--- /dev/null
+++ b/examples/datavisualization/customitems/pipe.obj
@@ -0,0 +1,330 @@
+# Blender v2.66 (sub 0) OBJ File: 'cylinder.blend'
+# www.blender.org
+o Cylinder
+v 0.000000 -1.000000 -1.000000
+v 0.000000 1.000000 -1.000000
+v 0.195090 -1.000000 -0.980785
+v 0.195090 1.000000 -0.980785
+v 0.382683 -1.000000 -0.923880
+v 0.382683 1.000000 -0.923880
+v 0.555570 -1.000000 -0.831470
+v 0.555570 1.000000 -0.831470
+v 0.707107 -1.000000 -0.707107
+v 0.707107 1.000000 -0.707107
+v 0.831470 -1.000000 -0.555570
+v 0.831470 1.000000 -0.555570
+v 0.923880 -1.000000 -0.382683
+v 0.923880 1.000000 -0.382683
+v 0.980785 -1.000000 -0.195090
+v 0.980785 1.000000 -0.195090
+v 1.000000 -1.000000 -0.000000
+v 1.000000 1.000000 -0.000000
+v 0.980785 -1.000000 0.195090
+v 0.980785 1.000000 0.195090
+v 0.923880 -1.000000 0.382683
+v 0.923880 1.000000 0.382683
+v 0.831470 -1.000000 0.555570
+v 0.831470 1.000000 0.555570
+v 0.707107 -1.000000 0.707107
+v 0.707107 1.000000 0.707107
+v 0.555570 -1.000000 0.831470
+v 0.555570 1.000000 0.831470
+v 0.382683 -1.000000 0.923880
+v 0.382683 1.000000 0.923880
+v 0.195090 -1.000000 0.980785
+v 0.195090 1.000000 0.980785
+v -0.000000 -1.000000 1.000000
+v -0.000000 1.000000 1.000000
+v -0.195091 -1.000000 0.980785
+v -0.195091 1.000000 0.980785
+v -0.382684 -1.000000 0.923879
+v -0.382684 1.000000 0.923879
+v -0.555571 -1.000000 0.831469
+v -0.555571 1.000000 0.831469
+v -0.707107 -1.000000 0.707106
+v -0.707107 1.000000 0.707106
+v -0.831470 -1.000000 0.555570
+v -0.831470 1.000000 0.555570
+v -0.923880 -1.000000 0.382683
+v -0.923880 1.000000 0.382683
+v -0.980785 -1.000000 0.195089
+v -0.980785 1.000000 0.195089
+v -1.000000 -1.000000 -0.000001
+v -1.000000 1.000000 -0.000001
+v -0.980785 -1.000000 -0.195091
+v -0.980785 1.000000 -0.195091
+v -0.923879 -1.000000 -0.382684
+v -0.923879 1.000000 -0.382684
+v -0.831469 -1.000000 -0.555571
+v -0.831469 1.000000 -0.555571
+v -0.707106 -1.000000 -0.707108
+v -0.707106 1.000000 -0.707108
+v -0.555569 -1.000000 -0.831470
+v -0.555569 1.000000 -0.831470
+v -0.382682 -1.000000 -0.923880
+v -0.382682 1.000000 -0.923880
+v -0.195089 -1.000000 -0.980786
+v -0.195089 1.000000 -0.980786
+vt 0.289718 0.879351
+vt 0.288367 0.438844
+vt 0.330714 0.438714
+vt 0.332066 0.879221
+vt 0.370605 0.438592
+vt 0.371956 0.879099
+vt 0.406505 0.438482
+vt 0.407857 0.878988
+vt 0.437036 0.438388
+vt 0.778904 0.000000
+vt 0.780256 0.440507
+vt 0.749725 0.440601
+vt 0.748373 0.000094
+vt 0.713824 0.440711
+vt 0.712473 0.000204
+vt 0.673934 0.440833
+vt 0.672582 0.000326
+vt 0.631586 0.440963
+vt 0.630235 0.000456
+vt 0.588409 0.441095
+vt 0.587057 0.000588
+vt 0.546061 0.441225
+vt 0.544710 0.000718
+vt 0.506171 0.441348
+vt 0.504819 0.000841
+vt 0.470270 0.441458
+vt 0.468919 0.000951
+vt 0.439739 0.441552
+vt 0.720545 0.882916
+vt 0.719194 0.442409
+vt 0.755094 0.442299
+vt 0.756446 0.882806
+vt 0.794985 0.442176
+vt 0.796336 0.882683
+vt 0.837333 0.442046
+vt 0.838684 0.882553
+vt 0.881861 0.882421
+vt 0.880510 0.441914
+vt 0.924209 0.882291
+vt 0.922857 0.441784
+vt 0.964099 0.882168
+vt 0.962748 0.441662
+vt 1.000000 0.882058
+vt 0.717842 0.441552
+vt 0.719194 0.882058
+vt 0.681942 0.441662
+vt 0.683293 0.882169
+vt 0.642051 0.441784
+vt 0.643403 0.882291
+vt 0.599704 0.441914
+vt 0.601055 0.882421
+vt 0.556526 0.442046
+vt 0.557878 0.882553
+vt 0.514179 0.442176
+vt 0.515530 0.882683
+vt 0.474288 0.442299
+vt 0.475640 0.882806
+vt 0.438388 0.442409
+vt 0.097872 0.879939
+vt 0.096520 0.439433
+vt 0.128403 0.879846
+vt 0.127051 0.439339
+vt 0.164303 0.879735
+vt 0.162952 0.439229
+vt 0.204194 0.879613
+vt 0.000000 0.197605
+vt 0.008423 0.155257
+vt 0.000000 0.240783
+vt 0.246541 0.879483
+vt 0.245190 0.438976
+vt 0.202842 0.439106
+vt 0.438388 0.878895
+vt 0.438388 0.001045
+vt 0.998649 0.441552
+vt 0.439739 0.882916
+vt 0.024947 0.115367
+vt 0.048935 0.079466
+vt 0.079466 0.048935
+vt 0.115366 0.024947
+vt 0.155257 0.008424
+vt 0.197605 0.000000
+vt 0.240782 0.000000
+vt 0.283130 0.008423
+vt 0.323021 0.024947
+vt 0.358922 0.048935
+vt 0.389453 0.079466
+vt 0.413441 0.115367
+vt 0.429964 0.155257
+vt 0.438388 0.197605
+vt 0.438388 0.240783
+vt 0.429964 0.283130
+vt 0.413441 0.323021
+vt 0.389453 0.358922
+vt 0.358922 0.389453
+vt 0.323021 0.413441
+vt 0.283130 0.429964
+vt 0.240783 0.438388
+vt 0.197605 0.438388
+vt 0.155257 0.429964
+vt 0.115367 0.413441
+vt 0.079466 0.389453
+vt 0.048935 0.358922
+vt 0.024947 0.323021
+vt 0.008423 0.283130
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.685690 -0.727866
+vn 0.142003 0.685690 -0.713889
+vn 0.195074 0.000000 -0.980773
+vn 0.278542 0.685690 -0.672475
+vn 0.382672 0.000000 -0.923856
+vn 0.404370 0.685690 -0.605213
+vn 0.555559 0.000000 -0.831446
+vn 0.514664 0.685690 -0.514664
+vn 0.707083 0.000000 -0.707083
+vn 0.605213 0.685690 -0.404370
+vn 0.831446 0.000000 -0.555559
+vn 0.672475 0.685690 -0.278542
+vn 0.923856 0.000000 -0.382672
+vn 0.713889 0.685690 -0.142003
+vn 0.980773 0.000000 -0.195074
+vn 0.727866 0.685690 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.713889 0.685690 0.142003
+vn 0.980773 0.000000 0.195074
+vn 0.672475 0.685690 0.278542
+vn 0.923856 0.000000 0.382672
+vn 0.605213 0.685690 0.404370
+vn 0.831446 0.000000 0.555559
+vn 0.514664 0.685690 0.514664
+vn 0.707083 0.000000 0.707083
+vn 0.404370 0.685690 0.605213
+vn 0.555559 0.000000 0.831446
+vn 0.278542 0.685690 0.672475
+vn 0.382672 0.000000 0.923856
+vn 0.142003 0.685690 0.713889
+vn 0.195074 0.000000 0.980773
+vn 0.000000 0.685690 0.727866
+vn 0.000000 0.000000 0.999969
+vn -0.195074 0.000000 0.980773
+vn -0.142003 0.685690 0.713889
+vn -0.382672 0.000000 0.923856
+vn -0.278542 0.685690 0.672475
+vn -0.555559 0.000000 0.831446
+vn -0.404370 0.685690 0.605213
+vn -0.707083 0.000000 0.707083
+vn -0.514664 0.685690 0.514664
+vn -0.831446 0.000000 0.555559
+vn -0.605213 0.685690 0.404370
+vn -0.923856 0.000000 0.382672
+vn -0.672475 0.685690 0.278542
+vn -0.980773 0.000000 0.195074
+vn -0.713889 0.685690 0.142003
+vn -1.000000 0.000000 0.000000
+vn -0.727866 0.685690 0.000000
+vn -0.980773 0.000000 -0.195074
+vn -0.713889 0.685690 -0.142003
+vn -0.923856 0.000000 -0.382672
+vn -0.672475 0.685690 -0.278542
+vn -0.831446 0.000000 -0.555559
+vn -0.605213 0.685690 -0.404370
+vn -0.707083 0.000000 -0.707083
+vn -0.514664 0.685690 -0.514695
+vn -0.555559 0.000000 -0.831446
+vn -0.404370 0.685690 -0.605213
+vn -0.382672 0.000000 -0.923856
+vn -0.195074 0.000000 -0.980773
+vn -0.142003 0.685690 -0.713889
+vn -0.278542 0.685690 -0.672475
+s 1
+f 1/1/1 2/2/2 4/3/3
+f 3/4/4 4/3/3 6/5/5
+f 5/6/6 6/5/5 8/7/7
+f 7/8/8 8/7/7 10/9/9
+f 9/10/10 10/11/9 12/12/11
+f 11/13/12 12/12/11 14/14/13
+f 13/15/14 14/14/13 16/16/15
+f 15/17/16 16/16/15 18/18/17
+f 17/19/18 18/18/17 20/20/19
+f 19/21/20 20/20/19 22/22/21
+f 21/23/22 22/22/21 24/24/23
+f 23/25/24 24/24/23 26/26/25
+f 25/27/26 26/26/25 28/28/27
+f 27/29/28 28/30/27 30/31/29
+f 29/32/30 30/31/29 32/33/31
+f 31/34/32 32/33/31 34/35/33
+f 33/36/34 34/35/33 35/37/35
+f 35/37/35 36/38/36 37/39/37
+f 37/39/37 38/40/38 39/41/39
+f 39/41/39 40/42/40 41/43/41
+f 41/44/41 42/45/42 43/46/43
+f 43/46/43 44/47/44 45/48/45
+f 45/48/45 46/49/46 47/50/47
+f 47/50/47 48/51/48 49/52/49
+f 49/52/49 50/53/50 51/54/51
+f 51/54/51 52/55/52 53/56/53
+f 53/56/53 54/57/54 55/58/55
+f 55/59/55 56/60/56 57/61/57
+f 57/61/57 58/62/58 59/63/59
+f 59/63/59 60/64/60 61/65/61
+f 4/66/3 2/67/2 6/68/5
+f 63/69/62 64/70/63 1/1/1
+f 61/65/61 62/71/64 63/69/62
+f 3/4/4 1/1/1 4/3/3
+f 5/6/6 3/4/4 6/5/5
+f 7/8/8 5/6/6 8/7/7
+f 9/72/10 7/8/8 10/9/9
+f 11/13/12 9/10/10 12/12/11
+f 13/15/14 11/13/12 14/14/13
+f 15/17/16 13/15/14 16/16/15
+f 17/19/18 15/17/16 18/18/17
+f 19/21/20 17/19/18 20/20/19
+f 21/23/22 19/21/20 22/22/21
+f 23/25/24 21/23/22 24/24/23
+f 25/27/26 23/25/24 26/26/25
+f 27/73/28 25/27/26 28/28/27
+f 29/32/30 27/29/28 30/31/29
+f 31/34/32 29/32/30 32/33/31
+f 33/36/34 31/34/32 34/35/33
+f 34/35/33 36/38/36 35/37/35
+f 36/38/36 38/40/38 37/39/37
+f 38/40/38 40/42/40 39/41/39
+f 40/42/40 42/74/42 41/43/41
+f 42/45/42 44/47/44 43/46/43
+f 44/47/44 46/49/46 45/48/45
+f 46/49/46 48/51/48 47/50/47
+f 48/51/48 50/53/50 49/52/49
+f 50/53/50 52/55/52 51/54/51
+f 52/55/52 54/57/54 53/56/53
+f 54/57/54 56/75/56 55/58/55
+f 56/60/56 58/62/58 57/61/57
+f 58/62/58 60/64/60 59/63/59
+f 60/64/60 62/71/64 61/65/61
+f 2/67/2 64/76/63 6/68/5
+f 64/76/63 62/77/64 6/68/5
+f 62/77/64 60/78/60 6/68/5
+f 60/78/60 58/79/58 6/68/5
+f 58/79/58 56/80/56 6/68/5
+f 56/80/56 54/81/54 6/68/5
+f 54/81/54 52/82/52 6/68/5
+f 52/82/52 50/83/50 6/68/5
+f 50/83/50 48/84/48 6/68/5
+f 48/84/48 46/85/46 6/68/5
+f 46/85/46 44/86/44 6/68/5
+f 44/86/44 42/87/42 6/68/5
+f 42/87/42 40/88/40 6/68/5
+f 40/88/40 38/89/38 6/68/5
+f 38/89/38 36/90/36 6/68/5
+f 36/90/36 34/91/33 6/68/5
+f 34/91/33 32/92/31 6/68/5
+f 32/92/31 30/93/29 6/68/5
+f 30/93/29 28/94/27 6/68/5
+f 28/94/27 26/95/25 6/68/5
+f 26/95/25 24/96/23 6/68/5
+f 24/96/23 22/97/21 6/68/5
+f 22/97/21 20/98/19 6/68/5
+f 20/98/19 18/99/17 6/68/5
+f 18/99/17 16/100/15 6/68/5
+f 16/100/15 14/101/13 6/68/5
+f 14/101/13 12/102/11 6/68/5
+f 12/102/11 10/103/9 8/104/7
+f 6/68/5 12/102/11 8/104/7
+f 64/70/63 2/2/2 1/1/1
+f 62/71/64 64/70/63 63/69/62
diff --git a/examples/datavisualization/customitems/refinery.obj b/examples/datavisualization/customitems/refinery.obj
new file mode 100644
index 00000000..ed90c361
--- /dev/null
+++ b/examples/datavisualization/customitems/refinery.obj
@@ -0,0 +1,2330 @@
+# Blender v2.66 (sub 0) OBJ File: 'oilrefinery.blend'
+# www.blender.org
+v -2.719012 -0.196783 4.805554
+v -2.719012 -0.196783 -4.824533
+v 2.730989 -0.196783 -4.824533
+v 2.730989 -0.196783 4.805554
+v -2.719012 0.012961 4.805554
+v -2.719012 0.012961 -4.824533
+v 2.730989 0.012961 -4.824533
+v 2.730989 0.012961 4.805554
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 0.000000 1.000000
+vt 1.000000 1.000000
+vn -0.577349 0.577349 0.577349
+vn -0.577349 0.577349 -0.577349
+vn -0.577349 -0.577349 0.577349
+vn 0.577349 0.577349 -0.577349
+vn 0.577349 -0.577349 -0.577349
+vn 0.577349 0.577349 0.577349
+vn 0.577349 -0.577349 0.577349
+vn -0.577349 -0.577349 -0.577349
+s 1
+f 5/1/1 6/2/2 1/3/3
+f 6/1/2 7/2/4 3/4/5
+f 7/1/4 8/2/6 4/4/7
+f 8/1/6 5/2/1 1/4/3
+f 1/1/3 2/2/8 3/4/5
+f 8/1/6 7/2/4 6/4/2
+f 6/2/2 2/4/8 1/3/3
+f 2/3/8 6/1/2 3/4/5
+f 3/3/5 7/1/4 4/4/7
+f 4/3/7 8/1/6 1/4/3
+f 4/3/7 1/1/3 3/4/5
+f 5/3/1 8/1/6 6/4/2
+v -1.384247 1.252743 0.422195
+v -1.384247 2.069450 0.422195
+v -1.303725 1.252743 0.430041
+v -1.303725 2.069450 0.430041
+v -1.226298 1.252743 0.453279
+v -1.226298 2.069450 0.453279
+v -1.154941 1.252743 0.491015
+v -1.154941 2.069450 0.491015
+v -1.092396 1.252743 0.541799
+v -1.092396 2.069450 0.541799
+v -1.041066 1.252743 0.603679
+v -1.041066 2.069450 0.603679
+v -1.002925 1.252743 0.674278
+v -1.002925 2.069450 0.674278
+v -0.979437 1.252743 0.750883
+v -0.979437 2.069450 0.750883
+v -0.971507 1.252743 0.830548
+v -0.971507 2.069450 0.830548
+v -0.979437 1.252743 0.910214
+v -0.979437 2.069450 0.910214
+v -1.002925 1.252743 0.986818
+v -1.002925 2.069450 0.986818
+v -1.041066 1.252743 1.057417
+v -1.041066 2.069450 1.057417
+v -1.092396 1.252743 1.119298
+v -1.092396 2.069450 1.119298
+v -1.154941 1.252743 1.170082
+v -1.154941 2.069450 1.170082
+v -1.226298 1.252743 1.207818
+v -1.226298 2.069450 1.207818
+v -1.303726 1.252743 1.231055
+v -1.303726 2.069450 1.231055
+v -1.384247 1.252743 1.238902
+v -1.384247 2.069450 1.238902
+v -1.464769 1.252743 1.231055
+v -1.464769 2.069450 1.231055
+v -1.542196 1.252743 1.207818
+v -1.542196 2.069450 1.207818
+v -1.613554 1.252743 1.170082
+v -1.613554 2.069450 1.170082
+v -1.676099 1.252743 1.119298
+v -1.676099 2.069450 1.119298
+v -1.727429 1.252743 1.057417
+v -1.727429 2.069450 1.057417
+v -1.765570 1.252743 0.986818
+v -1.765570 2.069450 0.986818
+v -1.789057 1.252743 0.910214
+v -1.789057 2.069450 0.910214
+v -1.796988 1.252743 0.830548
+v -1.796988 2.069450 0.830548
+v -1.789057 1.252743 0.750882
+v -1.789057 2.069450 0.750882
+v -1.765570 1.252743 0.674278
+v -1.765570 2.069450 0.674278
+v -1.727428 1.252743 0.603679
+v -1.727428 2.069450 0.603679
+v -1.676098 1.252743 0.541798
+v -1.676098 2.069450 0.541798
+v -1.613553 1.252743 0.491015
+v -1.613553 2.069450 0.491015
+v -1.542196 1.252743 0.453279
+v -1.542196 2.069450 0.453279
+v -1.464768 1.252743 0.430041
+v -1.464768 2.069450 0.430041
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vn 0.096985 0.000000 -0.995286
+vn 0.287455 0.000000 -0.957794
+vn 0.467486 0.000000 -0.884001
+vn 0.630338 0.000000 -0.776321
+vn 0.769672 0.000000 -0.638440
+vn 0.879812 0.000000 -0.475321
+vn 0.956070 0.000000 -0.293137
+vn 0.995081 0.000000 -0.099061
+vn 0.995081 0.000000 0.099061
+vn 0.956070 0.000000 0.293137
+vn 0.879813 0.000000 0.475321
+vn 0.769672 0.000000 0.638440
+vn 0.630338 0.000000 0.776321
+vn 0.467486 0.000000 0.884001
+vn 0.287455 0.000000 0.957794
+vn 0.096986 0.000000 0.995286
+vn -0.096986 0.000000 0.995286
+vn -0.287456 0.000000 0.957794
+vn -0.467486 0.000000 0.884001
+vn -0.630338 0.000000 0.776321
+vn -0.769673 0.000000 0.638438
+vn -0.879812 0.000000 0.475322
+vn -0.956071 0.000000 0.293135
+vn -0.995081 0.000000 0.099059
+vn -0.995081 -0.000000 -0.099061
+vn -0.956070 -0.000000 -0.293138
+vn -0.879812 -0.000000 -0.475322
+vn -0.769671 -0.000000 -0.638441
+vn -0.630337 -0.000000 -0.776322
+vn -0.467484 -0.000000 -0.884001
+vn -0.000000 1.000000 0.000000
+vn -0.096985 -0.000000 -0.995286
+vn -0.287454 -0.000000 -0.957794
+vn 0.000000 -1.000000 -0.000000
+s off
+f 9/5/9 10/6/9 12/7/9
+f 11/5/10 12/6/10 14/7/10
+f 13/5/11 14/6/11 16/7/11
+f 15/5/12 16/6/12 18/7/12
+f 17/5/13 18/6/13 20/7/13
+f 19/5/14 20/6/14 22/7/14
+f 21/5/15 22/6/15 24/7/15
+f 23/5/16 24/6/16 26/7/16
+f 25/5/17 26/6/17 28/7/17
+f 27/5/18 28/6/18 30/7/18
+f 29/5/19 30/6/19 32/7/19
+f 31/5/20 32/6/20 34/7/20
+f 33/5/21 34/6/21 36/7/21
+f 35/5/22 36/6/22 38/7/22
+f 37/5/23 38/6/23 40/7/23
+f 39/5/24 40/6/24 42/7/24
+f 41/5/25 42/6/25 43/8/25
+f 43/5/26 44/6/26 45/8/26
+f 45/5/27 46/6/27 47/8/27
+f 47/5/28 48/6/28 49/8/28
+f 49/5/29 50/6/29 51/8/29
+f 51/5/30 52/6/30 53/8/30
+f 53/5/31 54/6/31 55/8/31
+f 55/5/32 56/6/32 57/8/32
+f 57/5/33 58/6/33 59/8/33
+f 59/5/34 60/6/34 61/8/34
+f 61/5/35 62/6/35 63/8/35
+f 63/5/36 64/6/36 65/8/36
+f 65/5/37 66/6/37 67/8/37
+f 67/5/38 68/6/38 69/8/38
+f 12/9/39 10/10/39 14/11/39
+f 71/5/40 72/6/40 9/8/40
+f 69/5/41 70/6/41 71/8/41
+f 9/9/42 11/10/42 71/11/42
+f 11/8/9 9/5/9 12/7/9
+f 13/8/10 11/5/10 14/7/10
+f 15/8/11 13/5/11 16/7/11
+f 17/8/12 15/5/12 18/7/12
+f 19/8/13 17/5/13 20/7/13
+f 21/8/14 19/5/14 22/7/14
+f 23/8/15 21/5/15 24/7/15
+f 25/8/16 23/5/16 26/7/16
+f 27/8/17 25/5/17 28/7/17
+f 29/8/18 27/5/18 30/7/18
+f 31/8/19 29/5/19 32/7/19
+f 33/8/20 31/5/20 34/7/20
+f 35/8/21 33/5/21 36/7/21
+f 37/8/22 35/5/22 38/7/22
+f 39/8/23 37/5/23 40/7/23
+f 41/8/24 39/5/24 42/7/24
+f 42/6/25 44/7/25 43/8/25
+f 44/6/26 46/7/26 45/8/26
+f 46/6/27 48/7/27 47/8/27
+f 48/6/28 50/7/28 49/8/28
+f 50/6/29 52/7/29 51/8/29
+f 52/6/30 54/7/30 53/8/30
+f 54/6/31 56/7/31 55/8/31
+f 56/6/32 58/7/32 57/8/32
+f 58/6/33 60/7/33 59/8/33
+f 60/6/34 62/7/34 61/8/34
+f 62/6/35 64/7/35 63/8/35
+f 64/6/36 66/7/36 65/8/36
+f 66/6/37 68/7/37 67/8/37
+f 68/6/38 70/7/38 69/8/38
+f 10/10/39 72/12/39 14/11/39
+f 72/12/39 70/13/39 14/11/39
+f 70/13/39 68/14/39 14/11/39
+f 68/14/39 66/15/39 14/11/39
+f 66/15/39 64/16/39 14/11/39
+f 64/16/39 62/17/39 14/11/39
+f 62/17/39 60/18/39 14/11/39
+f 60/18/39 58/19/39 14/11/39
+f 58/19/39 56/20/39 14/11/39
+f 56/20/39 54/21/39 14/11/39
+f 54/21/39 52/22/39 14/11/39
+f 52/22/39 50/23/39 14/11/39
+f 50/23/39 48/24/39 14/11/39
+f 48/24/39 46/25/39 14/11/39
+f 46/25/39 44/26/39 14/11/39
+f 44/26/39 42/27/39 14/11/39
+f 42/27/39 40/28/39 14/11/39
+f 40/28/39 38/29/39 14/11/39
+f 38/29/39 36/30/39 14/11/39
+f 36/30/39 34/31/39 14/11/39
+f 34/31/39 32/32/39 14/11/39
+f 32/32/39 30/33/39 14/11/39
+f 30/33/39 28/34/39 14/11/39
+f 28/34/39 26/35/39 14/11/39
+f 26/35/39 24/36/39 14/11/39
+f 24/36/39 22/37/39 14/11/39
+f 22/37/39 20/38/39 14/11/39
+f 20/38/39 18/39/39 16/40/39
+f 14/11/39 20/38/39 16/40/39
+f 72/6/40 10/7/40 9/8/40
+f 70/6/41 72/7/41 71/8/41
+f 11/10/42 13/12/42 71/11/42
+f 13/12/42 15/13/42 71/11/42
+f 15/13/42 17/14/42 71/11/42
+f 17/14/42 19/15/42 71/11/42
+f 19/15/42 21/16/42 71/11/42
+f 21/16/42 23/17/42 71/11/42
+f 23/17/42 25/18/42 71/11/42
+f 25/18/42 27/19/42 71/11/42
+f 27/19/42 29/20/42 71/11/42
+f 29/20/42 31/21/42 71/11/42
+f 31/21/42 33/22/42 71/11/42
+f 33/22/42 35/23/42 71/11/42
+f 35/23/42 37/24/42 71/11/42
+f 37/24/42 39/25/42 71/11/42
+f 39/25/42 41/26/42 71/11/42
+f 41/26/42 43/27/42 71/11/42
+f 43/27/42 45/28/42 71/11/42
+f 45/28/42 47/29/42 71/11/42
+f 47/29/42 49/30/42 71/11/42
+f 49/30/42 51/31/42 71/11/42
+f 51/31/42 53/32/42 71/11/42
+f 53/32/42 55/33/42 71/11/42
+f 55/33/42 57/34/42 71/11/42
+f 57/34/42 59/35/42 71/11/42
+f 59/35/42 61/36/42 71/11/42
+f 61/36/42 63/37/42 71/11/42
+f 63/37/42 65/38/42 71/11/42
+f 65/38/42 67/39/42 71/11/42
+f 67/39/42 69/40/42 71/11/42
+v 1.365790 1.252743 0.402799
+v 1.365790 2.069450 0.402799
+v 1.446312 1.252743 0.410646
+v 1.446312 2.069450 0.410646
+v 1.523739 1.252743 0.433883
+v 1.523739 2.069450 0.433883
+v 1.595097 1.252743 0.471619
+v 1.595097 2.069450 0.471619
+v 1.657642 1.252743 0.522403
+v 1.657642 2.069450 0.522403
+v 1.708972 1.252743 0.584284
+v 1.708972 2.069450 0.584284
+v 1.747113 1.252743 0.654883
+v 1.747113 2.069450 0.654883
+v 1.770600 1.252743 0.731487
+v 1.770600 2.069450 0.731487
+v 1.778531 1.252743 0.811153
+v 1.778531 2.069450 0.811153
+v 1.770600 1.252743 0.890818
+v 1.770600 2.069450 0.890818
+v 1.747113 1.252743 0.967423
+v 1.747113 2.069450 0.967423
+v 1.708972 1.252743 1.038022
+v 1.708972 2.069450 1.038022
+v 1.657642 1.252743 1.099902
+v 1.657642 2.069450 1.099902
+v 1.595097 1.252743 1.150686
+v 1.595097 2.069450 1.150686
+v 1.523739 1.252743 1.188422
+v 1.523739 2.069450 1.188422
+v 1.446312 1.252743 1.211660
+v 1.446312 2.069450 1.211660
+v 1.365790 1.252743 1.219506
+v 1.365790 2.069450 1.219506
+v 1.285269 1.252743 1.211660
+v 1.285269 2.069450 1.211660
+v 1.207841 1.252743 1.188422
+v 1.207841 2.069450 1.188422
+v 1.136484 1.252743 1.150686
+v 1.136484 2.069450 1.150686
+v 1.073939 1.252743 1.099902
+v 1.073939 2.069450 1.099902
+v 1.022609 1.252743 1.038021
+v 1.022609 2.069450 1.038021
+v 0.984468 1.252743 0.967422
+v 0.984468 2.069450 0.967422
+v 0.960981 1.252743 0.890818
+v 0.960981 2.069450 0.890818
+v 0.953050 1.252743 0.811152
+v 0.953050 2.069450 0.811152
+v 0.960981 1.252743 0.731486
+v 0.960981 2.069450 0.731486
+v 0.984468 1.252743 0.654882
+v 0.984468 2.069450 0.654882
+v 1.022609 1.252743 0.584283
+v 1.022609 2.069450 0.584283
+v 1.073939 1.252743 0.522403
+v 1.073939 2.069450 0.522403
+v 1.136485 1.252743 0.471619
+v 1.136485 2.069450 0.471619
+v 1.207842 1.252743 0.433883
+v 1.207842 2.069450 0.433883
+v 1.285269 1.252743 0.410646
+v 1.285269 2.069450 0.410646
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vn -0.879812 0.000000 0.475321
+vn -0.956071 0.000000 0.293136
+vn -0.956070 -0.000000 -0.293137
+s off
+f 73/41/9 74/42/9 76/43/9
+f 75/41/10 76/42/10 78/43/10
+f 77/41/11 78/42/11 80/43/11
+f 79/41/12 80/42/12 82/43/12
+f 81/41/13 82/42/13 84/43/13
+f 83/41/14 84/42/14 86/43/14
+f 85/41/15 86/42/15 88/43/15
+f 87/41/16 88/42/16 90/43/16
+f 89/41/17 90/42/17 92/43/17
+f 91/41/18 92/42/18 94/43/18
+f 93/41/19 94/42/19 96/43/19
+f 95/41/20 96/42/20 98/43/20
+f 97/41/21 98/42/21 100/43/21
+f 99/41/22 100/42/22 102/43/22
+f 101/41/23 102/42/23 104/43/23
+f 103/41/24 104/42/24 106/43/24
+f 105/41/25 106/42/25 107/44/25
+f 107/41/26 108/42/26 109/44/26
+f 109/41/27 110/42/27 111/44/27
+f 111/41/28 112/42/28 113/44/28
+f 113/41/29 114/42/29 115/44/29
+f 115/41/43 116/42/43 117/44/43
+f 117/41/44 118/42/44 119/44/44
+f 119/41/32 120/42/32 121/44/32
+f 121/41/33 122/42/33 123/44/33
+f 123/41/45 124/42/45 125/44/45
+f 125/41/35 126/42/35 127/44/35
+f 127/41/36 128/42/36 129/44/36
+f 129/41/37 130/42/37 131/44/37
+f 131/41/38 132/42/38 133/44/38
+f 76/45/39 74/46/39 78/47/39
+f 135/41/40 136/42/40 73/44/40
+f 133/41/41 134/42/41 135/44/41
+f 73/45/42 75/46/42 135/47/42
+f 75/44/9 73/41/9 76/43/9
+f 77/44/10 75/41/10 78/43/10
+f 79/44/11 77/41/11 80/43/11
+f 81/44/12 79/41/12 82/43/12
+f 83/44/13 81/41/13 84/43/13
+f 85/44/14 83/41/14 86/43/14
+f 87/44/15 85/41/15 88/43/15
+f 89/44/16 87/41/16 90/43/16
+f 91/44/17 89/41/17 92/43/17
+f 93/44/18 91/41/18 94/43/18
+f 95/44/19 93/41/19 96/43/19
+f 97/44/20 95/41/20 98/43/20
+f 99/44/21 97/41/21 100/43/21
+f 101/44/22 99/41/22 102/43/22
+f 103/44/23 101/41/23 104/43/23
+f 105/44/24 103/41/24 106/43/24
+f 106/42/25 108/43/25 107/44/25
+f 108/42/26 110/43/26 109/44/26
+f 110/42/27 112/43/27 111/44/27
+f 112/42/28 114/43/28 113/44/28
+f 114/42/29 116/43/29 115/44/29
+f 116/42/43 118/43/43 117/44/43
+f 118/42/44 120/43/44 119/44/44
+f 120/42/32 122/43/32 121/44/32
+f 122/42/33 124/43/33 123/44/33
+f 124/42/45 126/43/45 125/44/45
+f 126/42/35 128/43/35 127/44/35
+f 128/42/36 130/43/36 129/44/36
+f 130/42/37 132/43/37 131/44/37
+f 132/42/38 134/43/38 133/44/38
+f 74/46/39 136/48/39 78/47/39
+f 136/48/39 134/49/39 78/47/39
+f 134/49/39 132/50/39 78/47/39
+f 132/50/39 130/51/39 78/47/39
+f 130/51/39 128/52/39 78/47/39
+f 128/52/39 126/53/39 78/47/39
+f 126/53/39 124/54/39 78/47/39
+f 124/54/39 122/55/39 78/47/39
+f 122/55/39 120/56/39 78/47/39
+f 120/56/39 118/57/39 78/47/39
+f 118/57/39 116/58/39 78/47/39
+f 116/58/39 114/59/39 78/47/39
+f 114/59/39 112/60/39 78/47/39
+f 112/60/39 110/61/39 78/47/39
+f 110/61/39 108/62/39 78/47/39
+f 108/62/39 106/63/39 78/47/39
+f 106/63/39 104/64/39 78/47/39
+f 104/64/39 102/65/39 78/47/39
+f 102/65/39 100/66/39 78/47/39
+f 100/66/39 98/67/39 78/47/39
+f 98/67/39 96/68/39 78/47/39
+f 96/68/39 94/69/39 78/47/39
+f 94/69/39 92/70/39 78/47/39
+f 92/70/39 90/71/39 78/47/39
+f 90/71/39 88/72/39 78/47/39
+f 88/72/39 86/73/39 78/47/39
+f 86/73/39 84/74/39 78/47/39
+f 84/74/39 82/75/39 80/76/39
+f 78/47/39 84/74/39 80/76/39
+f 136/42/40 74/43/40 73/44/40
+f 134/42/41 136/43/41 135/44/41
+f 75/46/42 77/48/42 135/47/42
+f 77/48/42 79/49/42 135/47/42
+f 79/49/42 81/50/42 135/47/42
+f 81/50/42 83/51/42 135/47/42
+f 83/51/42 85/52/42 135/47/42
+f 85/52/42 87/53/42 135/47/42
+f 87/53/42 89/54/42 135/47/42
+f 89/54/42 91/55/42 135/47/42
+f 91/55/42 93/56/42 135/47/42
+f 93/56/42 95/57/42 135/47/42
+f 95/57/42 97/58/42 135/47/42
+f 97/58/42 99/59/42 135/47/42
+f 99/59/42 101/60/42 135/47/42
+f 101/60/42 103/61/42 135/47/42
+f 103/61/42 105/62/42 135/47/42
+f 105/62/42 107/63/42 135/47/42
+f 107/63/42 109/64/42 135/47/42
+f 109/64/42 111/65/42 135/47/42
+f 111/65/42 113/66/42 135/47/42
+f 113/66/42 115/67/42 135/47/42
+f 115/67/42 117/68/42 135/47/42
+f 117/68/42 119/69/42 135/47/42
+f 119/69/42 121/70/42 135/47/42
+f 121/70/42 123/71/42 135/47/42
+f 123/71/42 125/72/42 135/47/42
+f 125/72/42 127/73/42 135/47/42
+f 127/73/42 129/74/42 135/47/42
+f 129/74/42 131/75/42 135/47/42
+f 131/75/42 133/76/42 135/47/42
+v -2.345663 0.025178 -0.194338
+v -2.345663 0.025178 -0.594338
+v -1.345663 0.025178 -0.594338
+v -1.345663 0.025178 -0.194338
+v -2.345663 1.525178 -0.194338
+v -2.345663 1.525178 -0.594338
+v -1.345663 1.525178 -0.594338
+v -1.345663 1.525178 -0.194338
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 0.000000 1.000000
+vt 1.000000 1.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.000000 -1.000000
+vn 1.000000 -0.000000 0.000000
+vn 0.000000 0.000000 1.000000
+s off
+f 141/77/46 142/78/46 137/79/46
+f 142/77/47 143/78/47 138/79/47
+f 143/77/48 144/78/48 140/80/48
+f 144/77/49 141/78/49 137/80/49
+f 137/77/42 138/78/42 139/80/42
+f 144/77/39 143/78/39 142/80/39
+f 142/78/46 138/80/46 137/79/46
+f 143/78/47 139/80/47 138/79/47
+f 139/79/48 143/77/48 140/80/48
+f 140/79/49 144/77/49 137/80/49
+f 140/79/42 137/77/42 139/80/42
+f 141/79/39 144/77/39 142/80/39
+v 1.364119 0.019809 -0.205019
+v 1.364119 0.019809 -0.605019
+v 2.364120 0.019809 -0.605019
+v 2.364120 0.019809 -0.205019
+v 1.364119 1.419809 -0.205019
+v 1.364119 1.419809 -0.605019
+v 2.364120 1.419809 -0.605019
+v 2.364120 1.419809 -0.205019
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 0.000000 1.000000
+vt 1.000000 1.000000
+s off
+f 149/81/46 150/82/46 145/83/46
+f 150/81/47 151/82/47 146/83/47
+f 151/81/48 152/82/48 148/84/48
+f 152/81/49 149/82/49 145/84/49
+f 145/81/42 146/82/42 147/84/42
+f 152/81/39 151/82/39 150/84/39
+f 150/82/46 146/84/46 145/83/46
+f 151/82/47 147/84/47 146/83/47
+f 147/83/48 151/81/48 148/84/48
+f 148/83/49 152/81/49 145/84/49
+f 148/83/42 145/81/42 147/84/42
+f 149/83/39 152/81/39 150/84/39
+v -1.384247 0.015116 3.993316
+v -1.384247 0.015113 -0.006684
+v -1.189157 0.034331 3.993316
+v -1.189157 0.034328 -0.006684
+v -1.001564 0.091236 3.993316
+v -1.001564 0.091234 -0.006684
+v -0.828677 0.183646 3.993316
+v -0.828677 0.183644 -0.006684
+v -0.677140 0.308009 3.993316
+v -0.677140 0.308007 -0.006684
+v -0.552777 0.459546 3.993316
+v -0.552777 0.459543 -0.006684
+v -0.460368 0.632432 3.993316
+v -0.460368 0.632430 -0.006684
+v -0.403462 0.820025 3.993316
+v -0.403462 0.820023 -0.006684
+v -0.384247 1.015116 3.993316
+v -0.384247 1.015113 -0.006684
+v -0.403462 1.210206 3.993316
+v -0.403462 1.210203 -0.006685
+v -0.460368 1.397799 3.993315
+v -0.460368 1.397797 -0.006685
+v -0.552777 1.570686 3.993315
+v -0.552777 1.570683 -0.006685
+v -0.677140 1.722223 3.993315
+v -0.677140 1.722220 -0.006685
+v -0.828677 1.846586 3.993315
+v -0.828677 1.846583 -0.006685
+v -1.001564 1.938995 3.993315
+v -1.001564 1.938993 -0.006685
+v -1.189157 1.995901 3.993315
+v -1.189157 1.995899 -0.006685
+v -1.384247 2.015116 3.993315
+v -1.384247 2.015113 -0.006685
+v -1.579338 1.995901 3.993315
+v -1.579338 1.995898 -0.006685
+v -1.766931 1.938995 3.993315
+v -1.766931 1.938993 -0.006685
+v -1.939818 1.846585 3.993315
+v -1.939818 1.846583 -0.006685
+v -2.091354 1.722222 3.993315
+v -2.091354 1.722220 -0.006685
+v -2.215717 1.570685 3.993315
+v -2.215717 1.570683 -0.006685
+v -2.308127 1.397799 3.993315
+v -2.308127 1.397796 -0.006685
+v -2.365032 1.210205 3.993316
+v -2.365032 1.210203 -0.006685
+v -2.384247 1.015115 3.993316
+v -2.384247 1.015112 -0.006684
+v -2.365032 0.820024 3.993316
+v -2.365032 0.820022 -0.006684
+v -2.308126 0.632431 3.993316
+v -2.308126 0.632429 -0.006684
+v -2.215716 0.459545 3.993316
+v -2.215716 0.459542 -0.006684
+v -2.091353 0.308008 3.993316
+v -2.091353 0.308006 -0.006684
+v -1.939816 0.183645 3.993316
+v -1.939816 0.183643 -0.006684
+v -1.766929 0.091236 3.993316
+v -1.766929 0.091233 -0.006684
+v -1.579336 0.034330 3.993316
+v -1.579336 0.034328 -0.006684
+v -1.384247 0.619839 -0.156215
+v -1.307133 0.627434 -0.156215
+v -1.232982 0.649928 -0.156215
+v -1.164645 0.686455 -0.156215
+v -1.104746 0.735612 -0.156215
+v -1.055589 0.795511 -0.156215
+v -1.019062 0.863848 -0.156216
+v -0.996568 0.937999 -0.156216
+v -0.988973 1.015113 -0.156216
+v -0.996568 1.092227 -0.156216
+v -1.019062 1.166378 -0.156216
+v -1.055589 1.234715 -0.156216
+v -1.104746 1.294614 -0.156216
+v -1.164645 1.343771 -0.156216
+v -1.232982 1.380298 -0.156216
+v -1.307133 1.402792 -0.156216
+v -1.384247 1.410387 -0.156216
+v -1.461361 1.402792 -0.156216
+v -1.535512 1.380298 -0.156216
+v -1.603849 1.343771 -0.156216
+v -1.663748 1.294613 -0.156216
+v -1.712905 1.234715 -0.156216
+v -1.749432 1.166377 -0.156216
+v -1.771926 1.092227 -0.156216
+v -1.779521 1.015113 -0.156216
+v -1.771925 0.937999 -0.156216
+v -1.749432 0.863848 -0.156216
+v -1.712905 0.795510 -0.156215
+v -1.663747 0.735612 -0.156215
+v -1.603849 0.686455 -0.156215
+v -1.535511 0.649928 -0.156215
+v -1.461360 0.627434 -0.156215
+v -1.384247 0.605419 4.159918
+v -1.304319 0.613291 4.159918
+v -1.227463 0.636605 4.159918
+v -1.156632 0.674465 4.159918
+v -1.094548 0.725416 4.159918
+v -1.043596 0.787500 4.159918
+v -1.005736 0.858332 4.159918
+v -0.982422 0.935188 4.159918
+v -0.974550 1.015116 4.159918
+v -0.982422 1.095044 4.159918
+v -1.005736 1.171900 4.159918
+v -1.043596 1.242731 4.159918
+v -1.094548 1.304815 4.159918
+v -1.156632 1.355766 4.159918
+v -1.227463 1.393626 4.159918
+v -1.304319 1.416940 4.159918
+v -1.384247 1.424813 4.159918
+v -1.464175 1.416940 4.159918
+v -1.541031 1.393626 4.159918
+v -1.611863 1.355766 4.159918
+v -1.673947 1.304815 4.159918
+v -1.724898 1.242731 4.159918
+v -1.762758 1.171900 4.159918
+v -1.786072 1.095043 4.159918
+v -1.793944 1.015115 4.159918
+v -1.786072 0.935187 4.159918
+v -1.762757 0.858331 4.159918
+v -1.724897 0.787500 4.159918
+v -1.673946 0.725416 4.159918
+v -1.611862 0.674465 4.159918
+v -1.541031 0.636605 4.159918
+v -1.464174 0.613291 4.159918
+v 0.006492 3.927105 -3.525056
+v 0.006492 4.374522 -3.525055
+v 0.050135 3.927105 -3.520757
+v 0.050135 4.374522 -3.520757
+v 0.092102 3.927104 -3.508027
+v 0.092102 4.374522 -3.508027
+v 0.130778 3.927104 -3.487354
+v 0.130778 4.374522 -3.487354
+v 0.164678 3.927104 -3.459533
+v 0.164678 4.374522 -3.459533
+v 0.192499 3.927104 -3.425632
+v 0.192499 4.374522 -3.425633
+v 0.213172 3.927105 -3.386956
+v 0.213172 4.374522 -3.386957
+v 0.225902 3.927105 -3.344990
+v 0.225902 4.374522 -3.344990
+v 0.230201 3.927105 -3.301347
+v 0.230201 4.374522 -3.301347
+v 0.225902 3.927105 -3.257704
+v 0.225902 4.374522 -3.257703
+v 0.213172 3.927105 -3.215737
+v 0.213172 4.374522 -3.215738
+v 0.192499 3.927105 -3.177061
+v 0.192499 4.374522 -3.177062
+v 0.164678 3.927105 -3.143161
+v 0.164678 4.374522 -3.143161
+v 0.130778 3.927105 -3.115340
+v 0.130778 4.374522 -3.115340
+v 0.092102 3.927105 -3.094666
+v 0.092102 4.374522 -3.094667
+v 0.050135 3.927105 -3.081937
+v 0.050135 4.374522 -3.081936
+v 0.006492 3.927105 -3.077638
+v 0.006492 4.374522 -3.077638
+v -0.037151 3.927105 -3.081937
+v -0.037151 4.374522 -3.081936
+v -0.079118 3.927105 -3.094666
+v -0.079118 4.374522 -3.094667
+v -0.117794 3.927105 -3.115340
+v -0.117794 4.374522 -3.115340
+v -0.151694 3.927105 -3.143161
+v -0.151694 4.374522 -3.143161
+v -0.179515 3.927105 -3.177061
+v -0.179515 4.374522 -3.177062
+v -0.200188 3.927105 -3.215737
+v -0.200188 4.374522 -3.215738
+v -0.212918 3.927105 -3.257704
+v -0.212918 4.374522 -3.257704
+v -0.217217 3.927105 -3.301347
+v -0.217217 4.374522 -3.301347
+v -0.212918 3.927105 -3.344991
+v -0.212918 4.374522 -3.344990
+v -0.200188 3.927105 -3.386957
+v -0.200188 4.374522 -3.386957
+v -0.179515 3.927104 -3.425633
+v -0.179515 4.374522 -3.425633
+v -0.151694 3.927104 -3.459533
+v -0.151694 4.374522 -3.459533
+v -0.117794 3.927104 -3.487354
+v -0.117794 4.374522 -3.487354
+v -0.079117 3.927104 -3.508027
+v -0.079117 4.374522 -3.508027
+v -0.037151 3.927105 -3.520757
+v -0.037151 4.374522 -3.520757
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.853553 0.853553
+vt 0.691342 0.961940
+vt 0.777785 0.915735
+vt 0.500000 1.000000
+vt 0.597545 0.990393
+vt 0.402456 0.990393
+vt 0.915735 0.777785
+vt 0.961940 0.691342
+vt 0.500000 0.000000
+vt 0.691342 0.038060
+vt 0.597545 0.009607
+vt 0.777785 0.084265
+vt 0.853553 0.146447
+vt 0.084265 0.222215
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.038060 0.308659
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vt 0.146447 0.853554
+vt 0.990393 0.597545
+vt 0.084266 0.777786
+vt 0.038060 0.691342
+vt 1.000000 0.500000
+vt 0.990393 0.402455
+vt 0.961940 0.308658
+vt 0.009607 0.597546
+vt 0.000000 0.500000
+vt 0.915735 0.222215
+vt 0.009607 0.402455
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vn 0.098018 -0.995185 0.000001
+vn 0.290285 -0.956940 0.000001
+vn 0.471397 -0.881921 0.000001
+vn 0.634393 -0.773010 0.000000
+vn 0.773010 -0.634393 0.000000
+vn 0.881921 -0.471397 0.000000
+vn 0.956940 -0.290285 0.000000
+vn 0.995185 -0.098017 0.000000
+vn 0.995185 0.098017 -0.000000
+vn 0.956940 0.290285 -0.000000
+vn 0.881922 0.471396 -0.000000
+vn 0.773010 0.634393 -0.000000
+vn 0.634393 0.773011 -0.000000
+vn 0.471397 0.881921 -0.000001
+vn 0.290284 0.956941 -0.000001
+vn 0.098017 0.995185 -0.000001
+vn -0.098017 0.995185 -0.000001
+vn -0.290285 0.956940 -0.000001
+vn -0.471397 0.881921 -0.000001
+vn -0.634394 0.773010 -0.000000
+vn -0.773011 0.634393 -0.000000
+vn -0.881922 0.471396 -0.000000
+vn -0.956941 0.290283 -0.000000
+vn -0.995185 0.098017 -0.000000
+vn -0.995185 -0.098018 0.000000
+vn -0.956940 -0.290286 0.000000
+vn -0.881920 -0.471398 0.000000
+vn -0.773010 -0.634394 0.000000
+vn -0.634393 -0.773011 0.000000
+vn -0.471395 -0.881922 0.000001
+vn -0.239975 -0.023636 -0.970491
+vn -0.098017 -0.995185 0.000001
+vn -0.290283 -0.956941 0.000001
+vn -0.210907 0.173086 0.962060
+vn 0.152975 0.186400 -0.970492
+vn -0.023635 -0.239975 -0.970491
+vn -0.152975 0.186400 -0.970492
+vn 0.239975 -0.023636 -0.970491
+vn -0.212662 -0.113672 -0.970491
+vn 0.069999 0.230752 -0.970492
+vn 0.113670 -0.212663 -0.970491
+vn -0.212662 0.113670 -0.970492
+vn 0.230752 0.069998 -0.970492
+vn -0.152975 -0.186401 -0.970491
+vn -0.023636 0.239974 -0.970492
+vn 0.186400 -0.152976 -0.970491
+vn -0.239974 0.023634 -0.970491
+vn 0.186401 0.152974 -0.970491
+vn -0.069998 -0.230753 -0.970491
+vn -0.113670 0.212662 -0.970492
+vn 0.230753 -0.069999 -0.970491
+vn -0.230752 -0.069999 -0.970491
+vn 0.113670 0.212662 -0.970491
+vn 0.069998 -0.230753 -0.970491
+vn -0.186401 0.152974 -0.970491
+vn 0.239975 0.023634 -0.970492
+vn -0.186400 -0.152976 -0.970491
+vn 0.023635 0.239974 -0.970492
+vn 0.152975 -0.186401 -0.970491
+vn -0.230752 0.069998 -0.970492
+vn 0.023636 -0.239975 -0.970491
+vn 0.212662 0.113670 -0.970492
+vn -0.113670 -0.212664 -0.970491
+vn -0.069999 0.230751 -0.970492
+vn 0.212663 -0.113671 -0.970491
+vn 0.271524 0.026743 0.962060
+vn -0.210906 -0.173085 0.962060
+vn 0.026743 0.271524 0.962060
+vn 0.173086 -0.210906 0.962060
+vn -0.261089 0.079201 0.962060
+vn 0.026743 -0.271523 0.962060
+vn 0.240621 0.128616 0.962060
+vn -0.128614 -0.240621 0.962060
+vn -0.079201 0.261090 0.962060
+vn 0.240621 -0.128614 0.962060
+vn -0.271524 -0.026742 0.962060
+vn 0.173087 0.210907 0.962060
+vn -0.026742 -0.271523 0.962060
+vn -0.173087 0.210907 0.962060
+vn 0.271524 -0.026742 0.962060
+vn -0.240621 -0.128615 0.962060
+vn 0.079201 0.261090 0.962060
+vn 0.128614 -0.240621 0.962060
+vn -0.240621 0.128616 0.962060
+vn 0.261089 0.079202 0.962060
+vn -0.173086 -0.210906 0.962060
+vn -0.026743 0.271524 0.962060
+vn 0.210907 -0.173085 0.962060
+vn -0.271524 0.026743 0.962060
+vn 0.210907 0.173087 0.962060
+vn -0.079201 -0.261088 0.962060
+vn -0.128615 0.240622 0.962060
+vn 0.261089 -0.079200 0.962060
+vn -0.261089 -0.079201 0.962060
+vn 0.128615 0.240622 0.962060
+vn 0.079201 -0.261088 0.962060
+vn 0.098012 0.000001 -0.995185
+vn 0.290289 -0.000001 -0.956939
+vn 0.471395 0.000001 -0.881922
+vn 0.634385 0.000001 -0.773018
+vn 0.773012 -0.000001 -0.634391
+vn 0.881922 -0.000001 -0.471395
+vn 0.956942 -0.000000 -0.290279
+vn 0.995184 -0.000000 -0.098022
+vn 0.995184 0.000000 0.098020
+vn 0.956940 -0.000000 0.290285
+vn 0.881922 0.000001 0.471395
+vn 0.773012 0.000001 0.634391
+vn 0.634398 0.000001 0.773007
+vn 0.471395 -0.000001 0.881922
+vn 0.290289 0.000001 0.956939
+vn 0.098010 -0.000001 0.995185
+vn -0.098033 0.000001 0.995183
+vn -0.290269 -0.000001 0.956945
+vn -0.471412 0.000001 0.881913
+vn -0.634385 -0.000001 0.773018
+vn -0.773012 0.000001 0.634391
+vn -0.881922 0.000001 0.471395
+vn -0.956942 0.000000 0.290279
+vn -0.995184 0.000000 0.098022
+vn -0.995184 -0.000000 -0.098020
+vn -0.956939 0.000000 -0.290289
+vn -0.881922 0.000001 -0.471395
+vn -0.773003 0.000001 -0.634402
+vn -0.634398 -0.000001 -0.773007
+vn -0.471395 0.000001 -0.881922
+vn -0.098032 -0.000001 -0.995183
+vn -0.290292 0.000001 -0.956938
+vn 0.098017 -0.995185 0.000001
+vn 0.881921 -0.471396 0.000000
+vn 0.881921 0.471397 -0.000000
+vn 0.634394 0.773010 -0.000001
+vn 0.471396 0.881922 -0.000001
+vn 0.290285 0.956940 -0.000001
+vn -0.098018 0.995185 -0.000001
+vn -0.881920 -0.471399 0.000000
+vn -0.239974 -0.023636 -0.970491
+vn -0.210907 0.173087 0.962060
+vn 0.000000 -0.000003 -1.000000
+vn 0.152975 0.186400 -0.970491
+vn 0.239975 -0.023635 -0.970491
+vn -0.212662 -0.113674 -0.970491
+vn 0.069998 0.230752 -0.970492
+vn 0.113671 -0.212663 -0.970491
+vn -0.212664 0.113668 -0.970491
+vn 0.230752 0.069998 -0.970491
+vn -0.023635 0.239974 -0.970492
+vn 0.186401 -0.152975 -0.970491
+vn -0.239974 0.023635 -0.970492
+vn 0.186400 0.152975 -0.970491
+vn 0.230753 -0.069998 -0.970491
+vn -0.230753 -0.069998 -0.970491
+vn -0.186400 0.152974 -0.970492
+vn 0.239974 0.023635 -0.970492
+vn -0.186400 -0.152975 -0.970491
+vn 0.023635 -0.239975 -0.970491
+vn 0.212664 0.113668 -0.970491
+vn -0.113670 -0.212663 -0.970491
+vn -0.069998 0.230752 -0.970492
+vn 0.212662 -0.113674 -0.970491
+vn -0.210905 -0.173086 0.962060
+vn -0.261089 0.079200 0.962060
+vn 0.026743 -0.271523 0.962061
+vn 0.240622 0.128615 0.962060
+vn 0.240621 -0.128615 0.962060
+vn -0.271523 -0.026743 0.962060
+vn 0.271523 -0.026743 0.962060
+vn 0.079200 0.261090 0.962060
+vn 0.128615 -0.240620 0.962060
+vn -0.240622 0.128615 0.962060
+vn 0.261089 0.079200 0.962060
+vn -0.173085 -0.210906 0.962060
+vn 0.210906 -0.173086 0.962060
+vn -0.271524 0.026742 0.962060
+vn -0.079200 -0.261088 0.962061
+vn -0.261089 -0.079200 0.962060
+vn 0.079200 -0.261088 0.962060
+vn 0.098033 -0.000001 -0.995183
+vn 0.290269 0.000001 -0.956945
+vn 0.634398 -0.000001 -0.773007
+vn 0.995184 -0.000000 0.098022
+vn 0.956942 0.000000 0.290279
+vn 0.634385 -0.000001 0.773018
+vn 0.471412 0.000001 0.881913
+vn 0.290269 -0.000001 0.956945
+vn 0.098032 0.000001 0.995183
+vn -0.098012 -0.000001 0.995185
+vn -0.290289 0.000001 0.956939
+vn -0.471395 -0.000001 0.881922
+vn -0.634398 0.000001 0.773007
+vn -0.995184 0.000000 -0.098022
+vn -0.773012 -0.000001 -0.634391
+vn -0.634385 0.000001 -0.773018
+vn -0.098010 0.000001 -0.995185
+vn -0.290272 -0.000001 -0.956944
+vn 0.000000 -1.000000 -0.000019
+vn -0.000002 -1.000000 0.000007
+vn 0.000001 -1.000000 -0.000000
+vn -0.000027 -1.000000 -0.000008
+vn -0.000009 -1.000000 -0.000001
+vn -0.000005 -1.000000 0.000000
+vn -0.000003 -1.000000 0.000001
+vn -0.000002 -1.000000 0.000001
+vn -0.000001 -1.000000 0.000001
+vn 0.000000 -1.000000 0.000001
+s off
+f 153/85/50 154/86/50 156/87/50
+f 155/85/51 156/86/51 158/87/51
+f 157/85/52 158/86/52 160/87/52
+f 159/85/53 160/86/53 162/87/53
+f 161/85/54 162/86/54 164/87/54
+f 163/85/55 164/86/55 166/87/55
+f 165/85/56 166/86/56 168/87/56
+f 167/85/57 168/86/57 170/87/57
+f 169/85/58 170/86/58 172/87/58
+f 171/85/59 172/86/59 174/87/59
+f 173/85/60 174/86/60 176/87/60
+f 175/85/61 176/86/61 178/87/61
+f 177/85/62 178/86/62 180/87/62
+f 179/85/63 180/86/63 182/87/63
+f 181/85/64 182/86/64 184/87/64
+f 183/85/65 184/86/65 186/87/65
+f 185/85/66 186/86/66 187/88/66
+f 187/85/67 188/86/67 189/88/67
+f 189/85/68 190/86/68 191/88/68
+f 191/85/69 192/86/69 193/88/69
+f 193/85/70 194/86/70 195/88/70
+f 195/85/71 196/86/71 197/88/71
+f 197/85/72 198/86/72 199/88/72
+f 199/85/73 200/86/73 201/88/73
+f 201/85/74 202/86/74 203/88/74
+f 203/85/75 204/86/75 205/88/75
+f 205/85/76 206/86/76 207/88/76
+f 207/85/77 208/86/77 209/88/77
+f 209/85/78 210/86/78 211/88/78
+f 211/85/79 212/86/79 213/88/79
+f 204/85/80 202/86/80 242/88/80
+f 215/85/81 216/86/81 153/88/81
+f 213/85/82 214/86/82 215/88/82
+f 193/85/83 195/86/83 269/88/83
+f 246/89/47 248/90/47 247/91/47
+f 180/85/84 178/86/84 229/87/84
+f 154/85/85 216/86/85 217/88/85
+f 194/85/86 192/86/86 237/88/86
+f 170/85/87 168/86/87 224/87/87
+f 208/85/88 206/86/88 244/88/88
+f 184/85/89 182/86/89 231/87/89
+f 160/85/90 158/86/90 219/87/90
+f 198/85/91 196/86/91 239/88/91
+f 174/85/92 172/86/92 226/87/92
+f 212/85/93 210/86/93 246/88/93
+f 188/85/94 186/86/94 234/88/94
+f 164/85/95 162/86/95 221/87/95
+f 202/85/96 200/86/96 241/88/96
+f 178/85/97 176/86/97 228/87/97
+f 216/85/98 214/86/98 248/88/98
+f 192/85/99 190/86/99 236/88/99
+f 168/85/100 166/86/100 223/87/100
+f 206/85/101 204/86/101 243/88/101
+f 182/85/102 180/86/102 230/87/102
+f 158/85/103 156/86/103 218/87/103
+f 196/85/104 194/86/104 238/88/104
+f 172/85/105 170/86/105 225/87/105
+f 210/85/106 208/86/106 245/88/106
+f 186/85/107 184/86/107 232/87/107
+f 162/85/108 160/86/108 220/87/108
+f 200/85/109 198/86/109 240/88/109
+f 156/85/110 154/86/110 217/87/110
+f 176/85/111 174/86/111 227/87/111
+f 214/85/112 212/86/112 247/88/112
+f 190/85/113 188/86/113 235/88/113
+f 166/85/114 164/86/114 222/87/114
+f 249/92/49 250/93/49 280/94/49
+f 169/85/115 171/86/115 258/87/115
+f 207/85/116 209/86/116 276/88/116
+f 183/85/117 185/86/117 265/87/117
+f 159/85/118 161/86/118 253/87/118
+f 197/85/119 199/86/119 271/88/119
+f 153/85/120 155/86/120 250/87/120
+f 173/85/121 175/86/121 260/87/121
+f 211/85/122 213/86/122 278/88/122
+f 187/85/123 189/86/123 266/88/123
+f 163/85/124 165/86/124 255/87/124
+f 201/85/125 203/86/125 273/88/125
+f 177/85/126 179/86/126 262/87/126
+f 215/85/127 153/86/127 280/88/127
+f 191/85/128 193/86/128 268/88/128
+f 167/85/129 169/86/129 257/87/129
+f 205/85/130 207/86/130 275/88/130
+f 181/85/131 183/86/131 264/87/131
+f 157/85/132 159/86/132 252/87/132
+f 195/85/133 197/86/133 270/88/133
+f 171/85/134 173/86/134 259/87/134
+f 209/85/135 211/86/135 277/88/135
+f 185/85/136 187/86/136 265/88/136
+f 161/85/137 163/86/137 254/87/137
+f 199/85/138 201/86/138 272/88/138
+f 175/85/139 177/86/139 261/87/139
+f 213/85/140 215/86/140 279/88/140
+f 189/85/141 191/86/141 267/88/141
+f 165/85/142 167/86/142 256/87/142
+f 203/85/143 205/86/143 274/88/143
+f 179/85/144 181/86/144 263/87/144
+f 155/85/145 157/86/145 251/87/145
+f 281/85/146 282/86/146 284/87/146
+f 283/85/147 284/86/147 286/87/147
+f 285/85/148 286/86/148 288/87/148
+f 287/85/149 288/86/149 290/87/149
+f 289/85/150 290/86/150 292/87/150
+f 291/85/151 292/86/151 294/87/151
+f 293/85/152 294/86/152 296/87/152
+f 295/85/153 296/86/153 298/87/153
+f 297/85/154 298/86/154 300/87/154
+f 299/85/155 300/86/155 302/87/155
+f 301/85/156 302/86/156 304/87/156
+f 303/85/157 304/86/157 306/87/157
+f 305/85/158 306/86/158 308/87/158
+f 307/85/159 308/86/159 310/87/159
+f 309/85/160 310/86/160 312/87/160
+f 311/85/161 312/86/161 314/87/161
+f 313/85/162 314/86/162 315/88/162
+f 315/85/163 316/86/163 317/88/163
+f 317/85/164 318/86/164 319/88/164
+f 319/85/165 320/86/165 321/88/165
+f 321/85/166 322/86/166 323/88/166
+f 323/85/167 324/86/167 325/88/167
+f 325/85/168 326/86/168 327/88/168
+f 327/85/169 328/86/169 329/88/169
+f 329/85/170 330/86/170 331/88/170
+f 331/85/171 332/86/171 333/88/171
+f 333/85/172 334/86/172 335/88/172
+f 335/85/173 336/86/173 337/88/173
+f 337/85/174 338/86/174 339/88/174
+f 339/85/175 340/86/175 341/88/175
+f 284/92/39 282/93/39 286/94/39
+f 343/85/176 344/86/176 281/88/176
+f 341/85/177 342/86/177 344/87/177
+f 281/92/42 283/93/42 343/94/42
+f 155/88/178 153/85/178 156/87/178
+f 157/88/51 155/85/51 158/87/51
+f 159/88/52 157/85/52 160/87/52
+f 161/88/53 159/85/53 162/87/53
+f 163/88/54 161/85/54 164/87/54
+f 165/88/179 163/85/179 166/87/179
+f 167/88/56 165/85/56 168/87/56
+f 169/88/57 167/85/57 170/87/57
+f 171/88/58 169/85/58 172/87/58
+f 173/88/59 171/85/59 174/87/59
+f 175/88/180 173/85/180 176/87/180
+f 177/88/61 175/85/61 178/87/61
+f 179/88/181 177/85/181 180/87/181
+f 181/88/182 179/85/182 182/87/182
+f 183/88/183 181/85/183 184/87/183
+f 185/88/65 183/85/65 186/87/65
+f 186/86/184 188/87/184 187/88/184
+f 188/86/67 190/87/67 189/88/67
+f 190/86/68 192/87/68 191/88/68
+f 192/86/69 194/87/69 193/88/69
+f 194/86/70 196/87/70 195/88/70
+f 196/86/71 198/87/71 197/88/71
+f 198/86/72 200/87/72 199/88/72
+f 200/86/73 202/87/73 201/88/73
+f 202/86/74 204/87/74 203/88/74
+f 204/86/75 206/87/75 205/88/75
+f 206/86/185 208/87/185 207/88/185
+f 208/86/77 210/87/77 209/88/77
+f 210/86/78 212/87/78 211/88/78
+f 212/86/79 214/87/79 213/88/79
+f 202/86/186 241/87/186 242/88/186
+f 216/86/81 154/87/81 153/88/81
+f 214/86/82 216/87/82 215/88/82
+f 195/86/187 270/87/187 269/88/187
+f 245/95/47 248/90/47 246/89/47
+f 244/96/47 248/90/47 245/95/47
+f 234/97/47 236/98/47 235/99/47
+f 234/97/47 237/100/47 236/98/47
+f 234/97/47 238/101/47 237/100/47
+f 229/102/47 231/103/47 230/104/47
+f 228/105/47 231/103/47 229/102/47
+f 219/94/47 221/106/47 220/107/47
+f 219/94/47 222/108/47 221/106/47
+f 218/92/47 217/93/47 219/94/47
+f 217/93/47 248/90/47 219/94/47
+f 248/90/47 244/96/47 219/94/47
+f 219/94/47 244/96/47 222/108/47
+f 244/96/188 243/109/188 222/108/188
+f 222/108/188 243/109/188 223/110/188
+f 223/110/47 243/109/47 224/111/47
+f 243/109/47 242/112/47 224/111/47
+f 242/112/47 241/113/47 224/111/47
+f 241/113/47 240/114/47 224/111/47
+f 224/111/47 240/114/47 225/115/47
+f 225/115/47 240/114/47 226/116/47
+f 240/114/47 239/117/47 226/116/47
+f 226/116/47 239/117/47 227/118/47
+f 239/117/188 238/101/188 227/118/188
+f 227/118/188 238/101/188 228/105/188
+f 228/105/47 238/101/47 231/103/47
+f 238/101/47 234/97/47 231/103/47
+f 234/97/47 233/119/47 232/120/47
+f 231/103/47 234/97/47 232/120/47
+f 230/88/189 180/85/189 229/87/189
+f 216/86/85 248/87/85 217/88/85
+f 192/86/86 236/87/86 237/88/86
+f 225/88/190 170/85/190 224/87/190
+f 206/86/191 243/87/191 244/88/191
+f 232/88/192 184/85/192 231/87/192
+f 220/88/193 160/85/193 219/87/193
+f 196/86/194 238/87/194 239/88/194
+f 227/88/195 174/85/195 226/87/195
+f 210/86/93 245/87/93 246/88/93
+f 186/86/196 233/87/196 234/88/196
+f 222/88/197 164/85/197 221/87/197
+f 200/86/198 240/87/198 241/88/198
+f 229/88/199 178/85/199 228/87/199
+f 214/86/98 247/87/98 248/88/98
+f 190/86/99 235/87/99 236/88/99
+f 224/88/200 168/85/200 223/87/200
+f 204/86/201 242/87/201 243/88/201
+f 231/88/102 182/85/102 230/87/102
+f 219/88/103 158/85/103 218/87/103
+f 194/86/202 237/87/202 238/88/202
+f 226/88/203 172/85/203 225/87/203
+f 208/86/204 244/87/204 245/88/204
+f 233/88/107 186/85/107 232/87/107
+f 221/88/108 162/85/108 220/87/108
+f 198/86/109 239/87/109 240/88/109
+f 218/88/205 156/85/205 217/87/205
+f 228/88/206 176/85/206 227/87/206
+f 212/86/207 246/87/207 247/88/207
+f 188/86/208 234/87/208 235/88/208
+f 223/88/209 166/85/209 222/87/209
+f 250/93/49 251/90/49 280/94/49
+f 251/90/49 252/91/49 280/94/49
+f 252/91/49 253/89/49 280/94/49
+f 253/89/49 254/95/49 280/94/49
+f 254/95/49 255/96/49 280/94/49
+f 255/96/49 256/109/49 280/94/49
+f 256/109/49 257/112/49 280/94/49
+f 257/112/49 258/113/49 280/94/49
+f 258/113/49 259/114/49 280/94/49
+f 259/114/49 260/117/49 280/94/49
+f 260/117/49 261/101/49 280/94/49
+f 261/101/49 262/100/49 280/94/49
+f 262/100/49 263/98/49 280/94/49
+f 263/98/49 264/99/49 280/94/49
+f 264/99/49 265/97/49 280/94/49
+f 265/97/49 266/119/49 280/94/49
+f 266/119/49 267/120/49 280/94/49
+f 267/120/49 268/103/49 280/94/49
+f 268/103/49 269/104/49 280/94/49
+f 269/104/49 270/102/49 280/94/49
+f 270/102/49 271/105/49 280/94/49
+f 271/105/49 272/118/49 280/94/49
+f 272/118/49 273/116/49 280/94/49
+f 273/116/49 274/115/49 280/94/49
+f 274/115/49 275/111/49 280/94/49
+f 275/111/49 276/110/49 280/94/49
+f 276/110/49 277/108/49 280/94/49
+f 277/108/49 278/106/49 279/107/49
+f 280/94/49 277/108/49 279/107/49
+f 257/88/115 169/85/115 258/87/115
+f 209/86/210 277/87/210 276/88/210
+f 264/88/117 183/85/117 265/87/117
+f 252/88/118 159/85/118 253/87/118
+f 199/86/211 272/87/211 271/88/211
+f 249/88/212 153/85/212 250/87/212
+f 259/88/213 173/85/213 260/87/213
+f 213/86/122 279/87/122 278/88/122
+f 189/86/123 267/87/123 266/88/123
+f 254/88/214 163/85/214 255/87/214
+f 203/86/215 274/87/215 273/88/215
+f 261/88/126 177/85/126 262/87/126
+f 153/86/127 249/87/127 280/88/127
+f 193/86/128 269/87/128 268/88/128
+f 256/88/216 167/85/216 257/87/216
+f 207/86/130 276/87/130 275/88/130
+f 263/88/217 181/85/217 264/87/217
+f 251/88/218 157/85/218 252/87/218
+f 197/86/219 271/87/219 270/88/219
+f 258/88/220 171/85/220 259/87/220
+f 211/86/221 278/87/221 277/88/221
+f 187/86/136 266/87/136 265/88/136
+f 253/88/222 161/85/222 254/87/222
+f 201/86/223 273/87/223 272/88/223
+f 260/88/139 175/85/139 261/87/139
+f 215/86/224 280/87/224 279/88/224
+f 191/86/141 268/87/141 267/88/141
+f 255/88/142 165/85/142 256/87/142
+f 205/86/225 275/87/225 274/88/225
+f 262/88/144 179/85/144 263/87/144
+f 250/88/226 155/85/226 251/87/226
+f 283/88/227 281/85/227 284/87/227
+f 285/88/228 283/85/228 286/87/228
+f 287/88/148 285/85/148 288/87/148
+f 289/88/229 287/85/229 290/87/229
+f 291/88/150 289/85/150 292/87/150
+f 293/88/151 291/85/151 294/87/151
+f 295/88/152 293/85/152 296/87/152
+f 297/88/153 295/85/153 298/87/153
+f 299/88/230 297/85/230 300/87/230
+f 301/88/231 299/85/231 302/87/231
+f 303/88/156 301/85/156 304/87/156
+f 305/88/157 303/85/157 306/87/157
+f 307/88/232 305/85/232 308/87/232
+f 309/88/233 307/85/233 310/87/233
+f 311/88/234 309/85/234 312/87/234
+f 313/88/235 311/85/235 314/87/235
+f 314/86/236 316/87/236 315/88/236
+f 316/86/237 318/87/237 317/88/237
+f 318/86/238 320/87/238 319/88/238
+f 320/86/239 322/87/239 321/88/239
+f 322/86/166 324/87/166 323/88/166
+f 324/86/167 326/87/167 325/88/167
+f 326/86/168 328/87/168 327/88/168
+f 328/86/169 330/87/169 329/88/169
+f 330/86/240 332/87/240 331/88/240
+f 332/86/171 334/87/171 333/88/171
+f 334/86/172 336/87/172 335/88/172
+f 336/86/241 338/87/241 337/88/241
+f 338/86/242 340/87/242 339/88/242
+f 340/86/175 342/87/175 341/88/175
+f 282/93/39 344/90/39 286/94/39
+f 344/90/39 342/91/39 286/94/39
+f 342/91/39 340/89/39 286/94/39
+f 340/89/39 338/95/39 286/94/39
+f 338/95/39 336/96/39 286/94/39
+f 336/96/39 334/109/39 286/94/39
+f 334/109/39 332/112/39 286/94/39
+f 332/112/39 330/113/39 286/94/39
+f 330/113/39 328/114/39 286/94/39
+f 328/114/39 326/117/39 286/94/39
+f 326/117/39 324/101/39 286/94/39
+f 324/101/39 322/100/39 286/94/39
+f 322/100/39 320/98/39 286/94/39
+f 320/98/39 318/99/39 286/94/39
+f 318/99/39 316/97/39 286/94/39
+f 316/97/39 314/119/39 286/94/39
+f 314/119/39 312/120/39 286/94/39
+f 312/120/39 310/103/39 286/94/39
+f 310/103/39 308/104/39 286/94/39
+f 308/104/39 306/102/39 286/94/39
+f 306/102/39 304/105/39 286/94/39
+f 304/105/39 302/118/39 286/94/39
+f 302/118/39 300/116/39 286/94/39
+f 300/116/39 298/115/39 286/94/39
+f 298/115/39 296/111/39 286/94/39
+f 296/111/39 294/110/39 286/94/39
+f 294/110/39 292/108/39 286/94/39
+f 292/108/39 290/106/39 286/94/39
+f 290/106/39 288/107/39 286/94/39
+f 344/86/243 282/87/243 281/88/243
+f 343/88/244 341/85/244 344/87/244
+f 283/93/245 285/90/245 343/94/245
+f 343/94/245 285/90/245 341/107/245
+f 285/90/42 287/91/42 341/107/42
+f 287/91/42 289/89/42 341/107/42
+f 289/89/42 291/95/42 341/107/42
+f 291/95/246 293/96/246 341/107/246
+f 293/96/247 295/109/247 341/107/247
+f 335/110/248 331/115/248 333/111/248
+f 295/109/247 297/112/247 341/107/247
+f 297/112/247 299/113/247 341/107/247
+f 335/110/249 329/116/249 331/115/249
+f 299/113/247 301/114/247 341/107/247
+f 335/110/250 327/118/250 329/116/250
+f 301/114/247 303/117/247 341/107/247
+f 335/110/251 325/105/251 327/118/251
+f 303/117/42 305/101/42 341/107/42
+f 335/110/252 323/102/252 325/105/252
+f 305/101/42 307/100/42 341/107/42
+f 335/110/253 321/104/253 323/102/253
+f 307/100/42 309/98/42 341/107/42
+f 335/110/253 319/103/253 321/104/253
+f 309/98/254 311/99/254 341/107/254
+f 335/110/254 317/120/254 319/103/254
+f 311/99/254 313/97/254 341/107/254
+f 315/119/254 317/120/254 335/110/254
+f 313/97/254 315/119/254 341/107/254
+f 315/119/254 335/110/254 341/107/254
+f 335/110/42 337/108/42 339/106/42
+f 341/107/42 335/110/42 339/106/42
+v 1.365790 0.015116 4.001092
+v 1.365790 0.015113 0.001092
+v 1.560881 0.034331 4.001092
+v 1.560881 0.034328 0.001092
+v 1.748474 0.091236 4.001092
+v 1.748474 0.091234 0.001092
+v 1.921361 0.183646 4.001092
+v 1.921361 0.183644 0.001092
+v 2.072897 0.308009 4.001092
+v 2.072897 0.308007 0.001092
+v 2.197260 0.459546 4.001092
+v 2.197260 0.459543 0.001092
+v 2.289670 0.632432 4.001092
+v 2.289670 0.632430 0.001092
+v 2.346576 0.820025 4.001092
+v 2.346576 0.820023 0.001092
+v 2.365790 1.015116 4.001092
+v 2.365790 1.015113 0.001092
+v 2.346576 1.210206 4.001091
+v 2.346576 1.210203 0.001091
+v 2.289670 1.397799 4.001091
+v 2.289670 1.397797 0.001091
+v 2.197260 1.570686 4.001091
+v 2.197260 1.570683 0.001091
+v 2.072897 1.722223 4.001091
+v 2.072897 1.722220 0.001091
+v 1.921361 1.846586 4.001091
+v 1.921361 1.846583 0.001091
+v 1.748474 1.938995 4.001091
+v 1.748474 1.938993 0.001091
+v 1.560881 1.995901 4.001091
+v 1.560881 1.995899 0.001091
+v 1.365790 2.015116 4.001091
+v 1.365790 2.015113 0.001091
+v 1.170700 1.995901 4.001091
+v 1.170700 1.995898 0.001091
+v 0.983107 1.938995 4.001091
+v 0.983107 1.938993 0.001091
+v 0.810220 1.846585 4.001091
+v 0.810220 1.846583 0.001091
+v 0.658683 1.722222 4.001091
+v 0.658683 1.722220 0.001091
+v 0.534320 1.570685 4.001091
+v 0.534320 1.570683 0.001091
+v 0.441911 1.397799 4.001091
+v 0.441911 1.397796 0.001091
+v 0.385005 1.210205 4.001091
+v 0.385005 1.210203 0.001091
+v 0.365790 1.015115 4.001092
+v 0.365790 1.015112 0.001092
+v 0.385005 0.820024 4.001092
+v 0.385005 0.820022 0.001092
+v 0.441911 0.632431 4.001092
+v 0.441911 0.632429 0.001092
+v 0.534322 0.459545 4.001092
+v 0.534322 0.459542 0.001092
+v 0.658685 0.308008 4.001092
+v 0.658685 0.308006 0.001092
+v 0.810221 0.183645 4.001092
+v 0.810221 0.183643 0.001092
+v 0.983108 0.091236 4.001092
+v 0.983108 0.091233 0.001092
+v 1.170702 0.034330 4.001092
+v 1.170702 0.034328 0.001092
+v 1.365791 0.649119 -0.167860
+v 1.437192 0.656151 -0.167860
+v 1.505850 0.676978 -0.167860
+v 1.569126 0.710800 -0.167860
+v 1.624587 0.756316 -0.167860
+v 1.670104 0.811778 -0.167860
+v 1.703925 0.875053 -0.167860
+v 1.724752 0.943711 -0.167860
+v 1.731785 1.015113 -0.167860
+v 1.724752 1.086515 -0.167860
+v 1.703925 1.155173 -0.167860
+v 1.670104 1.218448 -0.167861
+v 1.624587 1.273910 -0.167861
+v 1.569126 1.319426 -0.167861
+v 1.505850 1.353247 -0.167861
+v 1.437192 1.374075 -0.167861
+v 1.365790 1.381107 -0.167861
+v 1.294389 1.374075 -0.167861
+v 1.225731 1.353247 -0.167861
+v 1.162455 1.319426 -0.167861
+v 1.106993 1.273910 -0.167861
+v 1.061477 1.218448 -0.167861
+v 1.027656 1.155173 -0.167860
+v 1.006829 1.086515 -0.167860
+v 0.999797 1.015113 -0.167860
+v 1.006829 0.943711 -0.167860
+v 1.027656 0.875053 -0.167860
+v 1.061478 0.811777 -0.167860
+v 1.106994 0.756316 -0.167860
+v 1.162456 0.710800 -0.167860
+v 1.225731 0.676978 -0.167860
+v 1.294389 0.656151 -0.167860
+v 1.365791 0.605024 4.157856
+v 1.445795 0.612904 4.157856
+v 1.522726 0.636241 4.157856
+v 1.593625 0.674137 4.157856
+v 1.655769 0.725137 4.157856
+v 1.706769 0.787281 4.157856
+v 1.744666 0.858181 4.157855
+v 1.768002 0.935111 4.157855
+v 1.775882 1.015116 4.157855
+v 1.768002 1.095121 4.157855
+v 1.744666 1.172051 4.157855
+v 1.706769 1.242950 4.157855
+v 1.655769 1.305094 4.157855
+v 1.593625 1.356094 4.157855
+v 1.522726 1.393991 4.157855
+v 1.445795 1.417328 4.157855
+v 1.365790 1.425207 4.157855
+v 1.285786 1.417327 4.157855
+v 1.208855 1.393991 4.157855
+v 1.137956 1.356094 4.157855
+v 1.075812 1.305094 4.157855
+v 1.024812 1.242950 4.157855
+v 0.986915 1.172051 4.157855
+v 0.963579 1.095120 4.157855
+v 0.955699 1.015115 4.157855
+v 0.963579 0.935110 4.157855
+v 0.986916 0.858180 4.157855
+v 1.024812 0.787281 4.157856
+v 1.075812 0.725137 4.157856
+v 1.137956 0.674137 4.157856
+v 1.208856 0.636240 4.157856
+v 1.285786 0.612904 4.157856
+vt 0.000000 0.000000
+vt 0.450363 0.000088
+vt 0.519265 0.025135
+vt 0.412277 0.001462
+vt 0.592585 0.072108
+vt 0.660664 0.134431
+vt 0.714751 0.214466
+vt 0.755741 0.304410
+vt 0.778531 0.401983
+vt 0.781786 0.502742
+vt 0.147188 0.142771
+vt 0.050179 0.306373
+vt 0.093406 0.218681
+vt 0.765337 0.602148
+vt 0.019781 0.402090
+vt 0.729413 0.696327
+vt 0.000089 0.500905
+vt 0.680707 0.782826
+vt 0.000088 0.601389
+vt 0.627360 0.858268
+vt 0.022810 0.698277
+vt 0.566443 0.918999
+vt 0.063602 0.787572
+vt 0.501474 0.962949
+vt 0.119962 0.865210
+vt 0.436606 0.989270
+vt 0.188187 0.927714
+vt 0.377255 0.998855
+vt 0.263175 0.972402
+vt 0.336538 0.999912
+vt 0.208578 0.081678
+vt 0.280064 0.037078
+vt 0.344761 0.010798
+vn 0.634394 -0.773010 0.000000
+vn 0.773010 -0.634394 0.000000
+vn 0.773010 0.634394 -0.000000
+vn 0.634394 0.773010 -0.000000
+vn -0.956941 0.290284 -0.000000
+vn -0.995185 0.098016 -0.000000
+vn -0.881921 -0.471398 0.000000
+vn -0.634392 -0.773011 0.000000
+vn -0.075085 -0.247523 -0.965968
+vn -0.199427 0.163668 0.966148
+vn -0.121931 0.228117 -0.965969
+vn 0.247522 -0.075086 -0.965968
+vn -0.247522 -0.075086 -0.965968
+vn 0.121931 0.228117 -0.965969
+vn 0.075085 -0.247523 -0.965968
+vn -0.199948 0.164091 -0.965968
+vn 0.257414 0.025352 -0.965968
+vn -0.199947 -0.164093 -0.965968
+vn 0.025353 0.257414 -0.965969
+vn 0.164092 -0.199947 -0.965968
+vn -0.247522 0.075085 -0.965969
+vn 0.025353 -0.257415 -0.965968
+vn 0.228118 0.121931 -0.965969
+vn -0.121931 -0.228119 -0.965968
+vn -0.075086 0.247521 -0.965969
+vn 0.228118 -0.121932 -0.965968
+vn -0.257414 -0.025354 -0.965968
+vn 0.164092 0.199946 -0.965969
+vn -0.025353 -0.257415 -0.965968
+vn -0.164092 0.199946 -0.965969
+vn 0.257415 -0.025354 -0.965968
+vn -0.228117 -0.121932 -0.965968
+vn 0.075086 0.247521 -0.965969
+vn 0.121931 -0.228119 -0.965968
+vn -0.228117 0.121931 -0.965968
+vn 0.247522 0.075085 -0.965969
+vn -0.164092 -0.199947 -0.965968
+vn -0.025353 0.257414 -0.965969
+vn 0.199947 -0.164093 -0.965968
+vn -0.257414 0.025352 -0.965968
+vn 0.199947 0.164091 -0.965968
+vn 0.256746 0.025290 0.966148
+vn -0.199428 -0.163666 0.966148
+vn 0.025287 0.256747 0.966148
+vn 0.163666 -0.199428 0.966148
+vn -0.246880 0.074890 0.966148
+vn 0.025287 -0.256746 0.966148
+vn 0.227526 0.121615 0.966148
+vn -0.121615 -0.227526 0.966148
+vn -0.074890 0.246880 0.966148
+vn 0.227525 -0.121615 0.966148
+vn -0.256745 -0.025287 0.966148
+vn 0.163667 0.199428 0.966148
+vn -0.025287 -0.256746 0.966148
+vn -0.163667 0.199428 0.966148
+vn 0.256746 -0.025287 0.966148
+vn -0.227525 -0.121615 0.966148
+vn 0.074890 0.246880 0.966148
+vn 0.121615 -0.227526 0.966148
+vn -0.227526 0.121615 0.966148
+vn 0.246880 0.074890 0.966148
+vn -0.163666 -0.199428 0.966148
+vn -0.025287 0.256747 0.966148
+vn 0.199428 -0.163666 0.966148
+vn -0.256746 0.025289 0.966148
+vn 0.199427 0.163668 0.966148
+vn -0.074892 -0.246879 0.966148
+vn -0.121615 0.227526 0.966148
+vn 0.246879 -0.074890 0.966148
+vn -0.246879 -0.074890 0.966148
+vn 0.121615 0.227526 0.966148
+vn 0.074892 -0.246879 0.966148
+vn -0.199428 0.163666 0.966148
+vn 0.000000 -0.000004 -1.000000
+vn 0.247522 -0.075085 -0.965968
+vn -0.199947 0.164092 -0.965969
+vn 0.257414 0.025353 -0.965969
+vn -0.199947 -0.164092 -0.965968
+vn 0.228120 0.121929 -0.965968
+vn -0.121931 -0.228118 -0.965968
+vn -0.075085 0.247521 -0.965969
+vn 0.228117 -0.121935 -0.965968
+vn -0.257414 -0.025353 -0.965968
+vn 0.164092 0.199947 -0.965969
+vn 0.257415 -0.025353 -0.965968
+vn -0.228117 -0.121935 -0.965968
+vn 0.075085 0.247521 -0.965969
+vn 0.121932 -0.228118 -0.965968
+vn -0.228120 0.121928 -0.965968
+vn 0.199947 -0.164092 -0.965968
+vn -0.257414 0.025353 -0.965969
+vn 0.199946 0.164092 -0.965969
+vn -0.000004 0.000009 1.000000
+vn 0.000001 -0.000000 1.000000
+vn -0.000029 -0.000009 1.000000
+vn -0.000010 -0.000001 1.000000
+vn -0.000005 0.000001 1.000000
+vn -0.000003 0.000001 1.000000
+vn -0.000002 0.000001 1.000000
+vn -0.000001 0.000001 1.000000
+vn 0.000000 0.000001 1.000000
+vn 0.256746 0.025287 0.966148
+vn -0.074891 0.246880 0.966148
+vn 0.227529 -0.121610 0.966148
+vn -0.256746 -0.025287 0.966148
+vn -0.227529 -0.121610 0.966148
+vn -0.256746 0.025287 0.966148
+vn 0.199428 0.163666 0.966148
+vn -0.074889 -0.246879 0.966148
+vn 0.074890 -0.246879 0.966148
+s off
+f 345/121/50 346/121/50 348/121/50
+f 347/121/51 348/121/51 350/121/51
+f 349/121/52 350/121/52 352/121/52
+f 351/121/255 352/121/255 354/121/255
+f 353/121/256 354/121/256 356/121/256
+f 355/121/55 356/121/55 358/121/55
+f 357/121/56 358/121/56 360/121/56
+f 359/121/57 360/121/57 362/121/57
+f 361/121/58 362/121/58 364/121/58
+f 363/121/59 364/121/59 366/121/59
+f 365/121/60 366/121/60 368/121/60
+f 367/121/257 368/121/257 370/121/257
+f 369/121/258 370/121/258 372/121/258
+f 371/121/63 372/121/63 374/121/63
+f 373/121/64 374/121/64 376/121/64
+f 375/121/65 376/121/65 378/121/65
+f 377/121/66 378/121/66 379/121/66
+f 379/121/67 380/121/67 381/121/67
+f 381/121/68 382/121/68 383/121/68
+f 383/121/69 384/121/69 385/121/69
+f 385/121/70 386/121/70 387/121/70
+f 387/121/71 388/121/71 389/121/71
+f 389/121/259 390/121/259 391/121/259
+f 391/121/260 392/121/260 393/121/260
+f 393/121/74 394/121/74 395/121/74
+f 395/121/75 396/121/75 397/121/75
+f 397/121/261 398/121/261 399/121/261
+f 399/121/77 400/121/77 401/121/77
+f 401/121/262 402/121/262 403/121/262
+f 403/121/79 404/121/79 405/121/79
+f 408/121/263 406/121/263 440/121/263
+f 407/121/81 408/121/81 345/121/81
+f 405/121/82 406/121/82 407/121/82
+f 385/121/264 387/121/264 461/121/264
+f 437/121/47 439/121/47 438/121/47
+f 384/121/265 382/121/265 428/121/265
+f 360/121/266 358/121/266 415/121/266
+f 398/121/267 396/121/267 435/121/267
+f 374/121/268 372/121/268 422/121/268
+f 350/121/269 348/121/269 410/121/269
+f 388/121/270 386/121/270 430/121/270
+f 364/121/271 362/121/271 417/121/271
+f 402/121/272 400/121/272 437/121/272
+f 378/121/273 376/121/273 424/121/273
+f 354/121/274 352/121/274 412/121/274
+f 392/121/275 390/121/275 432/121/275
+f 348/121/276 346/121/276 409/121/276
+f 368/121/277 366/121/277 419/121/277
+f 406/121/278 404/121/278 439/121/278
+f 382/121/279 380/121/279 427/121/279
+f 358/121/280 356/121/280 414/121/280
+f 396/121/281 394/121/281 434/121/281
+f 372/121/282 370/121/282 421/121/282
+f 346/121/283 408/121/283 409/121/283
+f 386/121/284 384/121/284 429/121/284
+f 362/121/285 360/121/285 416/121/285
+f 400/121/286 398/121/286 436/121/286
+f 376/121/287 374/121/287 423/121/287
+f 352/121/288 350/121/288 411/121/288
+f 390/121/289 388/121/289 431/121/289
+f 366/121/290 364/121/290 418/121/290
+f 404/121/291 402/121/291 438/121/291
+f 380/121/292 378/121/292 426/121/292
+f 356/121/293 354/121/293 413/121/293
+f 394/121/294 392/121/294 433/121/294
+f 370/121/295 368/121/295 420/121/295
+f 441/122/49 442/123/49 472/124/49
+f 361/121/296 363/121/296 450/121/296
+f 399/121/297 401/121/297 468/121/297
+f 375/121/298 377/121/298 457/121/298
+f 351/121/299 353/121/299 445/121/299
+f 389/121/300 391/121/300 463/121/300
+f 345/121/301 347/121/301 442/121/301
+f 365/121/302 367/121/302 452/121/302
+f 403/121/303 405/121/303 470/121/303
+f 379/121/304 381/121/304 458/121/304
+f 355/121/305 357/121/305 447/121/305
+f 393/121/306 395/121/306 465/121/306
+f 369/121/307 371/121/307 454/121/307
+f 407/121/308 345/121/308 472/121/308
+f 383/121/309 385/121/309 460/121/309
+f 359/121/310 361/121/310 449/121/310
+f 397/121/311 399/121/311 467/121/311
+f 373/121/312 375/121/312 456/121/312
+f 349/121/313 351/121/313 444/121/313
+f 387/121/314 389/121/314 462/121/314
+f 363/121/315 365/121/315 451/121/315
+f 401/121/316 403/121/316 469/121/316
+f 377/121/317 379/121/317 457/121/317
+f 353/121/318 355/121/318 446/121/318
+f 391/121/319 393/121/319 464/121/319
+f 367/121/320 369/121/320 453/121/320
+f 405/121/321 407/121/321 471/121/321
+f 381/121/322 383/121/322 459/121/322
+f 357/121/323 359/121/323 448/121/323
+f 395/121/324 397/121/324 466/121/324
+f 371/121/325 373/121/325 455/121/325
+f 347/121/326 349/121/326 443/121/326
+f 347/121/178 345/121/178 348/121/178
+f 349/121/51 347/121/51 350/121/51
+f 351/121/52 349/121/52 352/121/52
+f 353/121/255 351/121/255 354/121/255
+f 355/121/256 353/121/256 356/121/256
+f 357/121/179 355/121/179 358/121/179
+f 359/121/56 357/121/56 360/121/56
+f 361/121/57 359/121/57 362/121/57
+f 363/121/58 361/121/58 364/121/58
+f 365/121/59 363/121/59 366/121/59
+f 367/121/60 365/121/60 368/121/60
+f 369/121/257 367/121/257 370/121/257
+f 371/121/181 369/121/181 372/121/181
+f 373/121/182 371/121/182 374/121/182
+f 375/121/183 373/121/183 376/121/183
+f 377/121/65 375/121/65 378/121/65
+f 378/121/184 380/121/184 379/121/184
+f 380/121/67 382/121/67 381/121/67
+f 382/121/68 384/121/68 383/121/68
+f 384/121/69 386/121/69 385/121/69
+f 386/121/70 388/121/70 387/121/70
+f 388/121/71 390/121/71 389/121/71
+f 390/121/259 392/121/259 391/121/259
+f 392/121/260 394/121/260 393/121/260
+f 394/121/74 396/121/74 395/121/74
+f 396/121/75 398/121/75 397/121/75
+f 398/121/261 400/121/261 399/121/261
+f 400/121/77 402/121/77 401/121/77
+f 402/121/262 404/121/262 403/121/262
+f 404/121/79 406/121/79 405/121/79
+f 406/121/263 439/121/263 440/121/263
+f 408/121/81 346/121/81 345/121/81
+f 406/121/82 408/121/82 407/121/82
+f 387/121/327 462/121/327 461/121/327
+f 436/121/47 439/121/47 437/121/47
+f 427/121/47 429/121/47 428/121/47
+f 427/121/47 430/121/47 429/121/47
+f 421/121/47 423/121/47 422/121/47
+f 420/121/47 423/121/47 421/121/47
+f 411/121/47 413/121/47 412/121/47
+f 411/121/47 414/121/47 413/121/47
+f 410/121/47 409/121/47 411/121/47
+f 409/121/47 440/121/47 411/121/47
+f 440/121/47 439/121/47 411/121/47
+f 439/121/47 436/121/47 411/121/47
+f 411/121/47 436/121/47 414/121/47
+f 436/121/328 435/121/328 414/121/328
+f 414/121/328 435/121/328 415/121/328
+f 435/121/47 434/121/47 415/121/47
+f 434/121/47 433/121/47 415/121/47
+f 433/121/47 432/121/47 415/121/47
+f 432/121/47 431/121/47 415/121/47
+f 415/121/47 431/121/47 416/121/47
+f 416/121/47 431/121/47 417/121/47
+f 417/121/47 431/121/47 418/121/47
+f 418/121/47 431/121/47 419/121/47
+f 431/121/328 430/121/328 419/121/328
+f 419/121/328 430/121/328 420/121/328
+f 430/121/47 427/121/47 420/121/47
+f 420/121/47 427/121/47 423/121/47
+f 427/121/47 426/121/47 423/121/47
+f 426/121/47 425/121/47 424/121/47
+f 423/121/47 426/121/47 424/121/47
+f 382/121/265 427/121/265 428/121/265
+f 416/121/329 360/121/329 415/121/329
+f 396/121/267 434/121/267 435/121/267
+f 423/121/268 374/121/268 422/121/268
+f 411/121/269 350/121/269 410/121/269
+f 386/121/330 429/121/330 430/121/330
+f 418/121/331 364/121/331 417/121/331
+f 400/121/332 436/121/332 437/121/332
+f 425/121/273 378/121/273 424/121/273
+f 413/121/274 354/121/274 412/121/274
+f 390/121/275 431/121/275 432/121/275
+f 410/121/276 348/121/276 409/121/276
+f 420/121/333 368/121/333 419/121/333
+f 404/121/334 438/121/334 439/121/334
+f 380/121/335 426/121/335 427/121/335
+f 415/121/336 358/121/336 414/121/336
+f 394/121/337 433/121/337 434/121/337
+f 422/121/338 372/121/338 421/121/338
+f 408/121/283 440/121/283 409/121/283
+f 384/121/284 428/121/284 429/121/284
+f 417/121/339 362/121/339 416/121/339
+f 398/121/340 435/121/340 436/121/340
+f 424/121/341 376/121/341 423/121/341
+f 412/121/342 352/121/342 411/121/342
+f 388/121/343 430/121/343 431/121/343
+f 419/121/290 366/121/290 418/121/290
+f 402/121/291 437/121/291 438/121/291
+f 378/121/292 425/121/292 426/121/292
+f 414/121/344 356/121/344 413/121/344
+f 392/121/345 432/121/345 433/121/345
+f 421/121/346 370/121/346 420/121/346
+f 442/123/49 443/125/49 472/124/49
+f 443/125/49 444/126/49 472/124/49
+f 444/126/49 445/127/49 472/124/49
+f 445/127/49 446/128/49 472/124/49
+f 446/128/347 447/129/347 472/124/347
+f 447/129/348 448/130/348 472/124/348
+f 468/131/349 466/132/349 467/133/349
+f 448/130/348 449/134/348 472/124/348
+f 468/131/350 465/135/350 466/132/350
+f 449/134/348 450/136/348 472/124/348
+f 468/131/351 464/137/351 465/135/351
+f 450/136/348 451/138/348 472/124/348
+f 468/131/352 463/139/352 464/137/352
+f 451/138/348 452/140/348 472/124/348
+f 468/131/353 462/141/353 463/139/353
+f 452/140/348 453/142/348 472/124/348
+f 468/131/354 461/143/354 462/141/354
+f 453/142/49 454/144/49 472/124/49
+f 468/131/354 460/145/354 461/143/354
+f 454/144/355 455/146/355 472/124/355
+f 468/131/354 459/147/354 460/145/354
+f 455/146/355 456/148/355 472/124/355
+f 468/131/355 458/149/355 459/147/355
+f 456/148/355 457/150/355 472/124/355
+f 457/150/355 458/149/355 472/124/355
+f 458/149/355 468/131/355 472/124/355
+f 468/131/49 469/151/49 472/124/49
+f 469/151/49 470/152/49 471/153/49
+f 472/124/49 469/151/49 471/153/49
+f 449/121/356 361/121/356 450/121/356
+f 401/121/297 469/121/297 468/121/297
+f 456/121/298 375/121/298 457/121/298
+f 444/121/299 351/121/299 445/121/299
+f 391/121/300 464/121/300 463/121/300
+f 441/121/301 345/121/301 442/121/301
+f 451/121/302 365/121/302 452/121/302
+f 405/121/303 471/121/303 470/121/303
+f 381/121/357 459/121/357 458/121/357
+f 446/121/358 355/121/358 447/121/358
+f 395/121/359 466/121/359 465/121/359
+f 453/121/307 369/121/307 454/121/307
+f 345/121/308 441/121/308 472/121/308
+f 385/121/309 461/121/309 460/121/309
+f 448/121/310 359/121/310 449/121/310
+f 399/121/360 468/121/360 467/121/360
+f 455/121/312 373/121/312 456/121/312
+f 443/121/313 349/121/313 444/121/313
+f 389/121/314 463/121/314 462/121/314
+f 450/121/315 363/121/315 451/121/315
+f 403/121/316 470/121/316 469/121/316
+f 379/121/317 458/121/317 457/121/317
+f 445/121/318 353/121/318 446/121/318
+f 393/121/361 465/121/361 464/121/361
+f 452/121/362 367/121/362 453/121/362
+f 407/121/363 472/121/363 471/121/363
+f 383/121/322 460/121/322 459/121/322
+f 447/121/323 357/121/323 448/121/323
+f 397/121/324 467/121/324 466/121/324
+f 454/121/325 371/121/325 455/121/325
+f 442/121/364 347/121/364 443/121/364
+v 0.000000 0.010026 -4.301087
+v 0.000000 4.010026 -4.301087
+v 0.195090 0.010026 -4.281873
+v 0.195090 4.010026 -4.281873
+v 0.382683 0.010026 -4.224967
+v 0.382683 4.010026 -4.224967
+v 0.555570 0.010026 -4.132557
+v 0.555570 4.010026 -4.132557
+v 0.707107 0.010026 -4.008194
+v 0.707107 4.010026 -4.008194
+v 0.831470 0.010026 -3.856658
+v 0.831470 4.010026 -3.856658
+v 0.923880 0.010026 -3.683771
+v 0.923880 4.010026 -3.683771
+v 0.980785 0.010026 -3.496178
+v 0.980785 4.010026 -3.496178
+v 1.000000 0.010026 -3.301088
+v 1.000000 4.010026 -3.301088
+v 0.980785 0.010026 -3.105997
+v 0.980785 4.010026 -3.105997
+v 0.923880 0.010026 -2.918404
+v 0.923880 4.010026 -2.918404
+v 0.831470 0.010026 -2.745517
+v 0.831470 4.010026 -2.745517
+v 0.707107 0.010026 -2.593981
+v 0.707107 4.010026 -2.593981
+v 0.555570 0.010026 -2.469618
+v 0.555570 4.010026 -2.469618
+v 0.382683 0.010026 -2.377208
+v 0.382683 4.010026 -2.377208
+v 0.195090 0.010026 -2.320302
+v 0.195090 4.010026 -2.320302
+v -0.000000 0.010026 -2.301088
+v -0.000000 4.010026 -2.301088
+v -0.195091 0.010026 -2.320302
+v -0.195091 4.010026 -2.320302
+v -0.382684 0.010026 -2.377208
+v -0.382684 4.010026 -2.377208
+v -0.555571 0.010026 -2.469618
+v -0.555571 4.010026 -2.469618
+v -0.707107 0.010026 -2.593981
+v -0.707107 4.010026 -2.593981
+v -0.831470 0.010026 -2.745518
+v -0.831470 4.010026 -2.745518
+v -0.923880 0.010026 -2.918405
+v -0.923880 4.010026 -2.918405
+v -0.980785 0.010026 -3.105998
+v -0.980785 4.010026 -3.105998
+v -1.000000 0.010026 -3.301089
+v -1.000000 4.010026 -3.301089
+v -0.980785 0.010026 -3.496179
+v -0.980785 4.010026 -3.496179
+v -0.923879 0.010026 -3.683772
+v -0.923879 4.010026 -3.683772
+v -0.831469 0.010026 -3.856659
+v -0.831469 4.010026 -3.856659
+v -0.707106 0.010026 -4.008195
+v -0.707106 4.010026 -4.008195
+v -0.555569 0.010026 -4.132558
+v -0.555569 4.010026 -4.132558
+v -0.382682 0.010026 -4.224968
+v -0.382682 4.010026 -4.224968
+v -0.195089 0.010026 -4.281873
+v -0.195089 4.010026 -4.281873
+v 0.000000 4.270857 -3.619825
+v 0.062183 4.270857 -3.613700
+v 0.121975 4.270857 -3.595562
+v 0.177081 4.270857 -3.566108
+v 0.225381 4.270857 -3.526469
+v 0.265020 4.270857 -3.478168
+v 0.294475 4.270857 -3.423063
+v 0.312612 4.270857 -3.363270
+v 0.318737 4.270857 -3.301088
+v 0.312613 4.270857 -3.238905
+v 0.294475 4.270857 -3.179112
+v 0.265020 4.270857 -3.124007
+v 0.225381 4.270857 -3.075707
+v 0.177081 4.270857 -3.036068
+v 0.121975 4.270857 -3.006613
+v 0.062182 4.270857 -2.988475
+v -0.000000 4.270857 -2.982351
+v -0.062183 4.270857 -2.988475
+v -0.121975 4.270857 -3.006613
+v -0.177081 4.270857 -3.036068
+v -0.225381 4.270857 -3.075707
+v -0.265020 4.270857 -3.124007
+v -0.294475 4.270857 -3.179113
+v -0.312613 4.270857 -3.238906
+v -0.318737 4.270857 -3.301088
+v -0.312612 4.270857 -3.363271
+v -0.294474 4.270857 -3.423064
+v -0.265020 4.270857 -3.478169
+v -0.225381 4.270857 -3.526469
+v -0.177080 4.270857 -3.566108
+v -0.121975 4.270857 -3.595562
+v -0.062182 4.270857 -3.613700
+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.500000 0.000000
+vt 0.402455 0.009607
+vt 0.308658 0.038060
+vt 0.222215 0.084265
+vt 0.146446 0.146447
+vt 0.084265 0.222215
+vt 0.038060 0.308659
+vt 0.009607 0.402455
+vt 0.000000 0.500000
+vt 0.009607 0.597546
+vt 0.038060 0.691342
+vt 0.084266 0.777786
+vt 0.146447 0.853554
+vt 0.222215 0.915735
+vt 0.308659 0.961940
+vn 0.098017 0.000000 -0.995185
+vn 0.290285 0.000000 -0.956940
+vn 0.471396 0.000000 -0.881922
+vn 0.634394 0.000000 -0.773010
+vn 0.773011 0.000000 -0.634393
+vn 0.881921 0.000000 -0.471397
+vn 0.956940 0.000000 -0.290285
+vn 0.995185 0.000000 -0.098017
+vn 0.995185 0.000000 0.098017
+vn 0.881921 0.000000 0.471397
+vn 0.773011 0.000000 0.634393
+vn 0.634394 0.000000 0.773010
+vn 0.471396 0.000000 0.881921
+vn 0.290285 0.000000 0.956940
+vn 0.098017 0.000000 0.995185
+vn -0.098018 0.000000 0.995185
+vn -0.290285 0.000000 0.956940
+vn -0.471397 0.000000 0.881921
+vn -0.634394 0.000000 0.773010
+vn -0.773011 0.000000 0.634393
+vn -0.881922 0.000000 0.471396
+vn -0.956941 0.000000 0.290284
+vn -0.995185 0.000000 0.098016
+vn -0.995185 -0.000000 -0.098018
+vn -0.956940 -0.000000 -0.290286
+vn -0.881921 -0.000000 -0.471398
+vn -0.773010 -0.000000 -0.634394
+vn -0.634392 -0.000000 -0.773012
+vn -0.471397 -0.000000 -0.881921
+vn -0.357332 0.933314 -0.035195
+vn -0.098015 -0.000000 -0.995185
+vn -0.290282 -0.000000 -0.956941
+vn 0.227786 0.933314 0.277558
+vn -0.035193 0.933314 -0.357332
+vn -0.227786 0.933314 0.277558
+vn 0.357332 0.933314 -0.035194
+vn -0.316663 0.933314 -0.169261
+vn 0.104230 0.933314 0.343600
+vn 0.169260 0.933314 -0.316664
+vn -0.316664 0.933314 0.169260
+vn 0.343600 0.933314 0.104230
+vn -0.227785 0.933314 -0.277559
+vn -0.035194 0.933314 0.357332
+vn 0.277558 0.933314 -0.227786
+vn -0.357332 0.933314 0.035194
+vn 0.277558 0.933314 0.227786
+vn -0.104229 0.933314 -0.343600
+vn -0.169260 0.933314 0.316663
+vn 0.343600 0.933314 -0.104230
+vn -0.343600 0.933314 -0.104230
+vn 0.169260 0.933314 0.316664
+vn 0.104230 0.933314 -0.343600
+vn -0.277558 0.933314 0.227786
+vn 0.357332 0.933314 0.035194
+vn -0.277558 0.933314 -0.227786
+vn 0.035194 0.933314 0.357332
+vn 0.227786 0.933314 -0.277558
+vn -0.343600 0.933314 0.104230
+vn 0.035194 0.933314 -0.357332
+vn 0.316664 0.933314 0.169260
+vn -0.169260 0.933314 -0.316664
+vn -0.104230 0.933314 0.343600
+vn 0.316664 0.933314 -0.169260
+vn -0.357332 0.933314 -0.035194
+vn -0.035195 0.933314 -0.357332
+vn -0.316664 0.933314 -0.169260
+vn 0.169261 0.933314 -0.316663
+vn -0.227786 0.933314 -0.277558
+vn -0.357332 0.933314 0.035193
+vn -0.104230 0.933314 -0.343600
+vn -0.169261 0.933314 0.316663
+vn 0.035195 0.933314 -0.357332
+vn -0.169259 0.933314 -0.316664
+s off
+f 473/154/365 474/155/365 476/156/365
+f 475/154/366 476/155/366 478/156/366
+f 477/154/367 478/155/367 480/156/367
+f 479/154/368 480/155/368 482/156/368
+f 481/154/369 482/155/369 484/156/369
+f 483/154/370 484/155/370 486/156/370
+f 485/154/371 486/155/371 488/156/371
+f 487/154/372 488/155/372 490/156/372
+f 489/154/373 490/155/373 492/156/373
+f 491/154/155 492/155/155 494/156/155
+f 493/154/374 494/155/374 496/156/374
+f 495/154/375 496/155/375 498/156/375
+f 497/154/376 498/155/376 500/156/376
+f 499/154/377 500/155/377 502/156/377
+f 501/154/378 502/155/378 504/156/378
+f 503/154/379 504/155/379 506/156/379
+f 505/154/380 506/155/380 507/157/380
+f 507/154/381 508/155/381 509/157/381
+f 509/154/382 510/155/382 511/157/382
+f 511/154/383 512/155/383 513/157/383
+f 513/154/384 514/155/384 515/157/384
+f 515/154/385 516/155/385 517/157/385
+f 517/154/386 518/155/386 519/157/386
+f 519/154/387 520/155/387 521/157/387
+f 521/154/388 522/155/388 523/157/388
+f 523/154/389 524/155/389 525/157/389
+f 525/154/390 526/155/390 527/157/390
+f 527/154/391 528/155/391 529/157/391
+f 529/154/392 530/155/392 531/157/392
+f 531/154/393 532/155/393 533/157/393
+f 524/154/394 522/155/394 562/157/394
+f 535/154/395 536/155/395 473/157/395
+f 533/154/396 534/155/396 535/157/396
+f 473/158/42 475/159/42 535/160/42
+f 538/158/39 537/159/39 539/160/39
+f 500/154/397 498/155/397 549/156/397
+f 474/154/398 536/155/398 537/157/398
+f 514/154/399 512/155/399 557/157/399
+f 490/154/400 488/155/400 544/156/400
+f 528/154/401 526/155/401 564/157/401
+f 504/154/402 502/155/402 551/156/402
+f 480/154/403 478/155/403 539/156/403
+f 518/154/404 516/155/404 559/157/404
+f 494/154/405 492/155/405 546/156/405
+f 532/154/406 530/155/406 566/157/406
+f 508/154/407 506/155/407 554/157/407
+f 484/154/408 482/155/408 541/156/408
+f 522/154/409 520/155/409 561/157/409
+f 498/154/410 496/155/410 548/156/410
+f 536/154/411 534/155/411 568/157/411
+f 512/154/412 510/155/412 556/157/412
+f 488/154/413 486/155/413 543/156/413
+f 526/154/414 524/155/414 563/157/414
+f 502/154/415 500/155/415 550/156/415
+f 478/154/416 476/155/416 538/156/416
+f 516/154/417 514/155/417 558/157/417
+f 492/154/418 490/155/418 545/156/418
+f 530/154/419 528/155/419 565/157/419
+f 506/154/420 504/155/420 552/156/420
+f 482/154/421 480/155/421 540/156/421
+f 520/154/422 518/155/422 560/157/422
+f 476/154/423 474/155/423 537/156/423
+f 496/154/424 494/155/424 547/156/424
+f 534/154/425 532/155/425 567/157/425
+f 510/154/426 508/155/426 555/157/426
+f 486/154/427 484/155/427 542/156/427
+f 475/157/365 473/154/365 476/156/365
+f 477/157/366 475/154/366 478/156/366
+f 479/157/367 477/154/367 480/156/367
+f 481/157/368 479/154/368 482/156/368
+f 483/157/369 481/154/369 484/156/369
+f 485/157/370 483/154/370 486/156/370
+f 487/157/371 485/154/371 488/156/371
+f 489/157/372 487/154/372 490/156/372
+f 491/157/373 489/154/373 492/156/373
+f 493/157/155 491/154/155 494/156/155
+f 495/157/374 493/154/374 496/156/374
+f 497/157/375 495/154/375 498/156/375
+f 499/157/376 497/154/376 500/156/376
+f 501/157/377 499/154/377 502/156/377
+f 503/157/378 501/154/378 504/156/378
+f 505/157/379 503/154/379 506/156/379
+f 506/155/380 508/156/380 507/157/380
+f 508/155/381 510/156/381 509/157/381
+f 510/155/382 512/156/382 511/157/382
+f 512/155/383 514/156/383 513/157/383
+f 514/155/384 516/156/384 515/157/384
+f 516/155/385 518/156/385 517/157/385
+f 518/155/386 520/156/386 519/157/386
+f 520/155/387 522/156/387 521/157/387
+f 522/155/388 524/156/388 523/157/388
+f 524/155/389 526/156/389 525/157/389
+f 526/155/390 528/156/390 527/157/390
+f 528/155/391 530/156/391 529/157/391
+f 530/155/392 532/156/392 531/157/392
+f 532/155/393 534/156/393 533/157/393
+f 522/155/428 561/156/428 562/157/428
+f 536/155/395 474/156/395 473/157/395
+f 534/155/396 536/156/396 535/157/396
+f 475/159/42 477/161/42 535/160/42
+f 477/161/42 479/162/42 535/160/42
+f 479/162/42 481/163/42 535/160/42
+f 481/163/42 483/164/42 535/160/42
+f 483/164/42 485/165/42 535/160/42
+f 485/165/42 487/166/42 535/160/42
+f 487/166/42 489/167/42 535/160/42
+f 489/167/42 491/168/42 535/160/42
+f 491/168/42 493/169/42 535/160/42
+f 493/169/42 495/170/42 535/160/42
+f 495/170/42 497/171/42 535/160/42
+f 497/171/42 499/172/42 535/160/42
+f 499/172/42 501/173/42 535/160/42
+f 501/173/42 503/174/42 535/160/42
+f 503/174/42 505/175/42 535/160/42
+f 505/175/42 507/176/42 535/160/42
+f 507/176/42 509/177/42 535/160/42
+f 509/177/42 511/178/42 535/160/42
+f 511/178/42 513/179/42 535/160/42
+f 513/179/42 515/180/42 535/160/42
+f 515/180/42 517/181/42 535/160/42
+f 517/181/42 519/182/42 535/160/42
+f 519/182/42 521/183/42 535/160/42
+f 521/183/42 523/184/42 535/160/42
+f 523/184/42 525/185/42 535/160/42
+f 525/185/42 527/186/42 535/160/42
+f 527/186/42 529/187/42 535/160/42
+f 529/187/42 531/188/42 533/189/42
+f 535/160/42 529/187/42 533/189/42
+f 537/159/39 568/161/39 539/160/39
+f 568/161/39 567/162/39 539/160/39
+f 567/162/39 566/163/39 539/160/39
+f 566/163/39 565/164/39 539/160/39
+f 565/164/39 564/165/39 539/160/39
+f 564/165/39 563/166/39 539/160/39
+f 563/166/39 562/167/39 539/160/39
+f 562/167/39 561/168/39 539/160/39
+f 561/168/39 560/169/39 539/160/39
+f 560/169/39 559/170/39 539/160/39
+f 559/170/39 558/171/39 539/160/39
+f 558/171/39 557/172/39 539/160/39
+f 557/172/39 556/173/39 539/160/39
+f 556/173/39 555/174/39 539/160/39
+f 555/174/39 554/175/39 539/160/39
+f 554/175/39 553/176/39 539/160/39
+f 553/176/39 552/177/39 539/160/39
+f 552/177/39 551/178/39 539/160/39
+f 551/178/39 550/179/39 539/160/39
+f 550/179/39 549/180/39 539/160/39
+f 549/180/39 548/181/39 539/160/39
+f 548/181/39 547/182/39 539/160/39
+f 547/182/39 546/183/39 539/160/39
+f 546/183/39 545/184/39 539/160/39
+f 545/184/39 544/185/39 539/160/39
+f 544/185/39 543/186/39 539/160/39
+f 543/186/39 542/187/39 539/160/39
+f 542/187/39 541/188/39 539/160/39
+f 541/188/39 540/189/39 539/160/39
+f 550/157/397 500/154/397 549/156/397
+f 536/155/429 568/156/429 537/157/429
+f 512/155/399 556/156/399 557/157/399
+f 545/157/400 490/154/400 544/156/400
+f 526/155/430 563/156/430 564/157/430
+f 552/157/402 504/154/402 551/156/402
+f 540/157/431 480/154/431 539/156/431
+f 516/155/404 558/156/404 559/157/404
+f 547/157/405 494/154/405 546/156/405
+f 530/155/432 565/156/432 566/157/432
+f 506/155/407 553/156/407 554/157/407
+f 542/157/408 484/154/408 541/156/408
+f 520/155/433 560/156/433 561/157/433
+f 549/157/410 498/154/410 548/156/410
+f 534/155/434 567/156/434 568/157/434
+f 510/155/435 555/156/435 556/157/435
+f 544/157/413 488/154/413 543/156/413
+f 524/155/414 562/156/414 563/157/414
+f 551/157/415 502/154/415 550/156/415
+f 539/157/416 478/154/416 538/156/416
+f 514/155/417 557/156/417 558/157/417
+f 546/157/418 492/154/418 545/156/418
+f 528/155/419 564/156/419 565/157/419
+f 553/157/420 506/154/420 552/156/420
+f 541/157/421 482/154/421 540/156/421
+f 518/155/422 559/156/422 560/157/422
+f 538/157/436 476/154/436 537/156/436
+f 548/157/424 496/154/424 547/156/424
+f 532/155/437 566/156/437 567/157/437
+f 508/155/426 554/156/426 555/157/426
+f 543/157/427 486/154/427 542/156/427
+v 0.609274 0.018251 -1.901238
+v 0.609274 0.018251 -0.682690
+v -0.609274 0.018251 -0.682690
+v -0.609274 0.018251 -1.901238
+v 0.609274 1.236799 -1.901237
+v 0.609273 1.236799 -0.682690
+v -0.609274 1.236799 -0.682690
+v -0.609274 1.236799 -1.901238
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vn 1.000000 -0.000000 0.000001
+s off
+f 569/190/42 570/191/42 571/192/42
+f 573/190/39 576/191/39 575/192/39
+f 569/190/438 573/191/438 574/192/438
+f 570/190/49 574/191/49 571/193/49
+f 571/190/46 575/191/46 572/193/46
+f 573/190/47 569/191/47 572/192/47
+f 572/193/42 569/190/42 571/192/42
+f 574/193/39 573/190/39 575/192/39
+f 570/193/48 569/190/48 574/192/48
+f 574/191/49 575/192/49 571/193/49
+f 575/191/46 576/192/46 572/193/46
+f 576/193/47 573/190/47 572/192/47
diff --git a/examples/datavisualization/datavisualization.pro b/examples/datavisualization/datavisualization.pro
index 4330ef4c..1f72820c 100644
--- a/examples/datavisualization/datavisualization.pro
+++ b/examples/datavisualization/datavisualization.pro
@@ -6,7 +6,9 @@ SUBDIRS += qmlbars \
qmllegend \
qmlmultigraph \
qmloscilloscope \
- qmlsurfacelayers
+ qmlsurfacelayers \
+ qmlaxisformatter \
+ qmlaxisdrag
!android:!ios {
SUBDIRS += bars \
@@ -15,7 +17,9 @@ SUBDIRS += qmlbars \
itemmodel \
scatter \
surface \
- rotations
+ rotations \
+ draggableaxes \
+ customitems
}
qtHaveModule(multimedia):!android:!ios: SUBDIRS += audiolevels
diff --git a/examples/datavisualization/draggableaxes/axesinputhandler.cpp b/examples/datavisualization/draggableaxes/axesinputhandler.cpp
new file mode 100644
index 00000000..f79f3d4e
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/axesinputhandler.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** 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 "axesinputhandler.h"
+#include <QtCore/qmath.h>
+
+AxesInputHandler::AxesInputHandler(QAbstract3DGraph *graph, QObject *parent) :
+ Q3DInputHandler(parent),
+ m_mousePressed(false),
+ m_state(StateNormal),
+ m_axisX(0),
+ m_axisZ(0),
+ m_axisY(0),
+ m_speedModifier(15.0f)
+{
+ //! [3]
+ // Connect to the item selection signal from graph
+ connect(graph, &QAbstract3DGraph::selectedElementChanged, this,
+ &AxesInputHandler::handleElementSelected);
+ //! [3]
+}
+
+//! [0]
+void AxesInputHandler::mousePressEvent(QMouseEvent *event, const QPoint &mousePos)
+{
+ Q3DInputHandler::mousePressEvent(event, mousePos);
+ if (Qt::LeftButton == event->button())
+ m_mousePressed = true;
+}
+//! [0]
+
+//! [2]
+void AxesInputHandler::mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos)
+{
+ //! [5]
+ // Check if we're trying to drag axis label
+ if (m_mousePressed && m_state != StateNormal) {
+ //! [5]
+ setPreviousInputPos(inputPosition());
+ setInputPosition(mousePos);
+ handleAxisDragging();
+ } else {
+ Q3DInputHandler::mouseMoveEvent(event, mousePos);
+ }
+}
+//! [2]
+
+//! [1]
+void AxesInputHandler::mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos)
+{
+ Q3DInputHandler::mouseReleaseEvent(event, mousePos);
+ m_mousePressed = false;
+ m_state = StateNormal;
+}
+//! [1]
+
+void AxesInputHandler::handleElementSelected(QAbstract3DGraph::ElementType type)
+{
+ //! [4]
+ switch (type) {
+ case QAbstract3DGraph::ElementAxisXLabel:
+ m_state = StateDraggingX;
+ break;
+ case QAbstract3DGraph::ElementAxisYLabel:
+ m_state = StateDraggingY;
+ break;
+ case QAbstract3DGraph::ElementAxisZLabel:
+ m_state = StateDraggingZ;
+ break;
+ default:
+ m_state = StateNormal;
+ break;
+ }
+ //! [4]
+}
+
+void AxesInputHandler::handleAxisDragging()
+{
+ float distance = 0.0f;
+
+ //! [6]
+ // Get scene orientation from active camera
+ float xRotation = scene()->activeCamera()->xRotation();
+ float yRotation = scene()->activeCamera()->yRotation();
+ //! [6]
+
+ //! [7]
+ // Calculate directional drag multipliers based on rotation
+ float xMulX = qCos(qDegreesToRadians(xRotation));
+ float xMulY = qSin(qDegreesToRadians(xRotation));
+ float zMulX = qSin(qDegreesToRadians(xRotation));
+ float zMulY = qCos(qDegreesToRadians(xRotation));
+ //! [7]
+
+ //! [8]
+ // Get the drag amount
+ QPoint move = inputPosition() - previousInputPos();
+
+ // Flip the effect of y movement if we're viewing from below
+ float yMove = (yRotation < 0) ? -move.y() : move.y();
+ //! [8]
+
+ //! [9]
+ // Adjust axes
+ switch (m_state) {
+ case StateDraggingX:
+ distance = (move.x() * xMulX - yMove * xMulY) / m_speedModifier;
+ m_axisX->setRange(m_axisX->min() - distance, m_axisX->max() - distance);
+ break;
+ case StateDraggingZ:
+ distance = (move.x() * zMulX + yMove * zMulY) / m_speedModifier;
+ m_axisZ->setRange(m_axisZ->min() + distance, m_axisZ->max() + distance);
+ break;
+ case StateDraggingY:
+ distance = move.y() / m_speedModifier; // No need to use adjusted y move here
+ m_axisY->setRange(m_axisY->min() + distance, m_axisY->max() + distance);
+ break;
+ default:
+ break;
+ }
+ //! [9]
+}
diff --git a/examples/datavisualization/draggableaxes/axesinputhandler.h b/examples/datavisualization/draggableaxes/axesinputhandler.h
new file mode 100644
index 00000000..e912ba74
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/axesinputhandler.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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 AXESINPUTHANDLER_H
+#define AXESINPUTHANDLER_H
+
+#include <QtDataVisualization/Q3DInputHandler>
+#include <QtDataVisualization/QAbstract3DGraph>
+#include <QtDataVisualization/QValue3DAxis>
+
+using namespace QtDataVisualization;
+
+//! [0]
+class AxesInputHandler : public Q3DInputHandler
+//! [0]
+{
+ Q_OBJECT
+
+ enum InputState {
+ StateNormal = 0,
+ StateDraggingX,
+ StateDraggingZ,
+ StateDraggingY
+ };
+
+public:
+ explicit AxesInputHandler(QAbstract3DGraph *graph, QObject *parent = 0);
+
+ inline void setAxes(QValue3DAxis *axisX, QValue3DAxis *axisZ, QValue3DAxis *axisY) {
+ m_axisX = axisX;
+ m_axisZ = axisZ;
+ m_axisY = axisY;
+ }
+
+ //! [1]
+ inline void setDragSpeedModifier(float modifier) { m_speedModifier = modifier; }
+ //! [1]
+
+ virtual void mousePressEvent(QMouseEvent *event, const QPoint &mousePos);
+ virtual void mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos);
+ virtual void mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos);
+
+private:
+ void handleElementSelected(QAbstract3DGraph::ElementType type);
+ void handleAxisDragging();
+
+private:
+ bool m_mousePressed;
+ InputState m_state;
+ QValue3DAxis *m_axisX;
+ QValue3DAxis *m_axisZ;
+ QValue3DAxis *m_axisY;
+ float m_speedModifier;
+};
+
+#endif
diff --git a/examples/datavisualization/draggableaxes/data.cpp b/examples/datavisualization/draggableaxes/data.cpp
new file mode 100644
index 00000000..992c9ee8
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/data.cpp
@@ -0,0 +1,160 @@
+/****************************************************************************
+**
+** 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 "data.h"
+
+#include <QtDataVisualization/QScatterDataProxy>
+#include <QtDataVisualization/Q3DScene>
+#include <QtDataVisualization/Q3DCamera>
+#include <QtDataVisualization/QScatter3DSeries>
+#include <QtDataVisualization/Q3DTheme>
+
+using namespace QtDataVisualization;
+
+const int itemCount = 500;
+
+Data::Data(Q3DScatter *scatter)
+ : m_graph(scatter),
+ //! [1]
+ m_inputHandler(new AxesInputHandler(scatter)),
+ //! [1]
+ m_autoAdjust(false)
+{
+ m_graph->activeTheme()->setType(Q3DTheme::ThemeEbony);
+ m_graph->activeTheme()->setLabelBorderEnabled(true);
+ m_graph->activeTheme()->setLabelBackgroundColor(QColor(QRgb(0x151550)));
+ m_graph->activeTheme()->setLabelTextColor(Qt::lightGray);
+ m_graph->activeTheme()->setFont(QFont("Arial Black", 30));
+ m_graph->setShadowQuality(QAbstract3DGraph::ShadowQualityMedium);
+ m_graph->scene()->activeCamera()->setCameraPreset(Q3DCamera::CameraPresetIsometricRight);
+
+ m_graph->axisX()->setRange(-20.0f, 20.0f);
+ m_graph->axisY()->setRange(-10.0f, 10.0f);
+ m_graph->axisZ()->setRange(-20.0f, 20.0f);
+
+ //! [0]
+ // Give ownership of the handler to the graph and make it the active handler
+ m_graph->setActiveInputHandler(m_inputHandler);
+ //! [0]
+
+ //! [2]
+ // Give our axes to the input handler
+ m_inputHandler->setAxes(m_graph->axisX(), m_graph->axisZ(), m_graph->axisY());
+ //! [2]
+
+ addData();
+}
+
+Data::~Data()
+{
+ delete m_graph;
+}
+
+void Data::toggleRanges()
+{
+ if (!m_autoAdjust) {
+ m_graph->axisX()->setAutoAdjustRange(true);
+ m_graph->axisZ()->setAutoAdjustRange(true);
+ m_graph->axisY()->setAutoAdjustRange(true);
+ m_inputHandler->setDragSpeedModifier(1.5f);
+ m_autoAdjust = true;
+ } else {
+ m_graph->axisX()->setRange(-20.0f, 20.0f);
+ m_graph->axisY()->setRange(-10.0f, 10.0f);
+ m_graph->axisZ()->setRange(-20.0f, 20.0f);
+ m_inputHandler->setDragSpeedModifier(15.0f);
+ m_autoAdjust = false;
+ }
+}
+
+void Data::addData()
+{
+ QScatter3DSeries *series = new QScatter3DSeries;
+ series->setMesh(QAbstract3DSeries::MeshCube);
+ series->setMeshSmooth(true);
+ m_graph->addSeries(series);
+
+ QScatter3DSeries *series2 = new QScatter3DSeries;
+ series2->setMesh(QAbstract3DSeries::MeshMinimal);
+ series2->setMeshSmooth(true);
+ m_graph->addSeries(series2);
+
+ QScatter3DSeries *series3 = new QScatter3DSeries;
+ series3->setMesh(QAbstract3DSeries::MeshSphere);
+ series3->setMeshSmooth(true);
+ m_graph->addSeries(series3);
+
+ QScatter3DSeries *series4 = new QScatter3DSeries;
+ series4->setMesh(QAbstract3DSeries::MeshBevelCube);
+ series4->setMeshSmooth(true);
+ m_graph->addSeries(series4);
+
+ QScatter3DSeries *series5 = new QScatter3DSeries;
+ series5->setMesh(QAbstract3DSeries::MeshSphere);
+ m_graph->addSeries(series5);
+
+ QScatterDataArray *dataArray = new QScatterDataArray;
+ dataArray->resize(itemCount);
+ QScatterDataItem *ptrToDataArray = &dataArray->first();
+ for (int i = 0; i < itemCount; i++) {
+ ptrToDataArray->setPosition(randVector());
+ ptrToDataArray++;
+ }
+ QScatterDataArray *dataArray2 = new QScatterDataArray;
+ dataArray2->resize(itemCount);
+ ptrToDataArray = &dataArray2->first();
+ for (int i = 0; i < itemCount; i++) {
+ ptrToDataArray->setPosition(randVector());
+ ptrToDataArray++;
+ }
+ QScatterDataArray *dataArray3 = new QScatterDataArray;
+ dataArray3->resize(itemCount);
+ ptrToDataArray = &dataArray3->first();
+ for (int i = 0; i < itemCount; i++) {
+ ptrToDataArray->setPosition(randVector());
+ ptrToDataArray++;
+ }
+ QScatterDataArray *dataArray4 = new QScatterDataArray;
+ dataArray4->resize(itemCount);
+ ptrToDataArray = &dataArray4->first();
+ for (int i = 0; i < itemCount; i++) {
+ ptrToDataArray->setPosition(randVector());
+ ptrToDataArray++;
+ }
+ QScatterDataArray *dataArray5 = new QScatterDataArray;
+ dataArray5->resize(itemCount);
+ ptrToDataArray = &dataArray5->first();
+ for (int i = 0; i < itemCount; i++) {
+ ptrToDataArray->setPosition(randVector());
+ ptrToDataArray++;
+ }
+
+ m_graph->seriesList().at(0)->dataProxy()->resetArray(dataArray);
+ m_graph->seriesList().at(1)->dataProxy()->resetArray(dataArray2);
+ m_graph->seriesList().at(2)->dataProxy()->resetArray(dataArray3);
+ m_graph->seriesList().at(3)->dataProxy()->resetArray(dataArray4);
+ m_graph->seriesList().at(4)->dataProxy()->resetArray(dataArray5);
+}
+
+QVector3D Data::randVector()
+{
+ return QVector3D(
+ (float)(rand() % 100) / 2.0f - (float)(rand() % 100) / 2.0f,
+ (float)(rand() % 100) / 2.0f - (float)(rand() % 100) / 2.0f,
+ (float)(rand() % 100) / 2.0f - (float)(rand() % 100) / 2.0f);
+}
diff --git a/examples/datavisualization/draggableaxes/data.h b/examples/datavisualization/draggableaxes/data.h
new file mode 100644
index 00000000..40a69497
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/data.h
@@ -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
+**
+****************************************************************************/
+
+#ifndef DATA_H
+#define DATA_H
+
+#include "axesinputhandler.h"
+
+#include <QtDataVisualization/q3dscatter.h>
+#include <QtGui/QVector3D>
+
+using namespace QtDataVisualization;
+
+class Data : public QObject
+{
+ Q_OBJECT
+public:
+ explicit Data(Q3DScatter *scatter);
+ ~Data();
+
+ void toggleRanges();
+
+private:
+ void addData();
+ QVector3D randVector();
+
+private:
+ Q3DScatter *m_graph;
+ AxesInputHandler *m_inputHandler;
+ bool m_autoAdjust;
+};
+
+#endif
diff --git a/examples/datavisualization/draggableaxes/doc/images/draggableaxes-example.png b/examples/datavisualization/draggableaxes/doc/images/draggableaxes-example.png
new file mode 100644
index 00000000..018694b5
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/doc/images/draggableaxes-example.png
Binary files differ
diff --git a/examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc b/examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc
new file mode 100644
index 00000000..124bbbac
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/doc/src/draggableaxes.qdoc
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** 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 draggableaxes
+ \title Axis Range Dragging With Labels Example
+ \ingroup qtdatavisualization_examples
+ \brief Implementing a custom input handler to support axis dragging.
+ \since QtDataVisualization 1.1
+
+ The Axis Range Dragging example shows how to customize the 3D graph controls in a widget
+ application to allow changing axis ranges by clicking on an axis label and dragging. This is
+ done by implementing a custom input handler to react to selection signals emitted from the
+ graph.
+
+ \image draggableaxes-example.png
+
+ \section1 Replacing default input handling
+
+ The default input handling mechanism is replaced by setting the active input handler of
+ Q3DScatter to \c AxesInputHandler that implements the custom behavior:
+
+ \snippet draggableaxes/data.cpp 0
+
+ \c m_inputHandler was initialized in the constructor:
+
+ \snippet draggableaxes/data.cpp 1
+
+ We will also need the pointers to the axes, so we will pass them to our input handler too:
+
+ \snippet draggableaxes/data.cpp 2
+
+ \section1 Extending mouse event handling
+
+ First of all, we inherited our input handler from Q3DInputHandler instead of
+ QAbstract3DInputHandler. The reason for doing this is to keep all the functionality of the
+ default input handling, and to add our own functionality on top of it:
+
+ \snippet draggableaxes/axesinputhandler.h 0
+
+ We start extending the default functionality by re-implementing some of the mouse events.
+ Let's start with \c {mousePressEvent}. We'll just add button pressed flag for left mouse button
+ into it, and keep the rest of the default functionality:
+
+ \snippet draggableaxes/axesinputhandler.cpp 0
+
+ We'll need to modify \c mouseReleaseEvent too to clear the flag and reset the internal state:
+
+ \snippet draggableaxes/axesinputhandler.cpp 1
+
+ Then we'll modify \c {mouseMoveEvent}. Here we check if the \c m_mousePressed is \c true and
+ our internal state is something other than \c StateNormal. If so, we'll set the input positions
+ for mouse move distance calculations and call the axis dragging function (see
+ \l {Implementing axis dragging} for details):
+
+ \snippet draggableaxes/axesinputhandler.cpp 2
+
+ We don't need to change the functionality of mouse wheel, so we will not re-implement that.
+
+ \section1 Implementing axis dragging
+
+ First we need to start listening to the selection signal from the graph. We do that in the
+ constructor, and connect it to \c handleElementSelected method:
+
+ \snippet draggableaxes/axesinputhandler.cpp 3
+
+ In \c handleElementSelected we check the type of the selection and set our internal state based on
+ it:
+
+ \snippet draggableaxes/axesinputhandler.cpp 4
+
+ The actual dragging logic is implemented in \c handleAxisDragging method, which we call from
+ \c mouseMoveEvent in case the required conditions are met:
+
+ \snippet draggableaxes/axesinputhandler.cpp 5
+
+ In \c handleAxisDragging we first get the scene orientation from our active camera:
+
+ \snippet draggableaxes/axesinputhandler.cpp 6
+
+ Then we calculate the modifiers to mouse move direction based on the orientation:
+
+ \snippet draggableaxes/axesinputhandler.cpp 7
+
+ After that, we calculate the mouse movement, and modify it based on the y rotation of the
+ camera:
+
+ \snippet draggableaxes/axesinputhandler.cpp 8
+
+ And finally apply the moved distance to the correct axis:
+
+ \snippet draggableaxes/axesinputhandler.cpp 9
+
+ We also have a function for setting the dragging speed:
+
+ \snippet draggableaxes/axesinputhandler.h 1
+
+ This is needed, as the mouse movement distance is absolute (in screen coordinates) and we
+ need to adjust it to the axis range. The larger the value, the slower the dragging will be.
+ Note that on this example we do not take scene zoom level into account when determining the
+ drag speed, so you'll notice changes in the range adjustment as you change the zoom level.
+
+ The modifier could be adjusted automatically based on the axis range and camera zoom level, but
+ we'll leave implementing that as an excercise for the reader.
+
+ \section1 Example contents
+*/
diff --git a/examples/datavisualization/draggableaxes/draggableaxes.pro b/examples/datavisualization/draggableaxes/draggableaxes.pro
new file mode 100644
index 00000000..34db5133
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/draggableaxes.pro
@@ -0,0 +1,18 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+SOURCES += main.cpp \
+ data.cpp \
+ axesinputhandler.cpp
+HEADERS += data.h \
+ axesinputhandler.h
+
+QT += widgets
+
+OTHER_FILES += doc/src/* \
+ doc/images/*
diff --git a/examples/datavisualization/draggableaxes/main.cpp b/examples/datavisualization/draggableaxes/main.cpp
new file mode 100644
index 00000000..0834313e
--- /dev/null
+++ b/examples/datavisualization/draggableaxes/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** 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 "data.h"
+
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QWidget>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QCommandLinkButton>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ Q3DScatter *graph = new Q3DScatter();
+ QWidget *container = QWidget::createWindowContainer(graph);
+
+ container->setMinimumSize(800, 600);
+ 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);
+
+ QCommandLinkButton *rangeButton = new QCommandLinkButton(widget);
+ rangeButton->setText(QStringLiteral("Toggle axis ranges"));
+ rangeButton->setDescription(QStringLiteral("Switch between automatic axis ranges and preset ranges"));
+ rangeButton->setIconSize(QSize(0, 0));
+
+ vLayout->addWidget(rangeButton, 1, Qt::AlignTop);
+
+ widget->setWindowTitle(QStringLiteral("Input Handling for Axes"));
+
+ Data *graphData = new Data(graph);
+
+ QObject::connect(rangeButton, &QCommandLinkButton::clicked, graphData, &Data::toggleRanges);
+
+ widget->show();
+ return app.exec();
+}
diff --git a/examples/datavisualization/itemmodel/main.cpp b/examples/datavisualization/itemmodel/main.cpp
index ad9f0112..f00702eb 100644
--- a/examples/datavisualization/itemmodel/main.cpp
+++ b/examples/datavisualization/itemmodel/main.cpp
@@ -167,8 +167,11 @@ void GraphDataGenerator::setupModel()
// Add labels
//! [10]
m_graph->rowAxis()->setTitle("Week of year");
+ m_graph->rowAxis()->setTitleVisible(true);
m_graph->columnAxis()->setTitle("Day of week");
+ m_graph->columnAxis()->setTitleVisible(true);
m_graph->valueAxis()->setTitle("Hours spent on the Internet");
+ m_graph->valueAxis()->setTitleVisible(true);
m_graph->valueAxis()->setLabelFormat("%.1f h");
//! [10]
diff --git a/examples/datavisualization/qmlaxisdrag/doc/images/qmlaxisdrag-example.png b/examples/datavisualization/qmlaxisdrag/doc/images/qmlaxisdrag-example.png
new file mode 100644
index 00000000..de33ba66
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/doc/images/qmlaxisdrag-example.png
Binary files differ
diff --git a/examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc b/examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc
new file mode 100644
index 00000000..317f855f
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/doc/src/qmlaxisdrag.qdoc
@@ -0,0 +1,110 @@
+/****************************************************************************
+**
+** 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 qmlaxisdrag
+ \title Qt Quick 2 Axis Dragging Example
+ \ingroup qtdatavisualization_examples
+ \brief Implementing axis dragging in QML
+ \since QtDataVisualization 1.1
+
+ The Qt Quick 2 axis dragging example concentrates on showing how to implement axis range
+ changing by dragging axis labels in QML. It also gives a quick peek to two other new features
+ in Qt Data Visualization 1.1: orthographic projection and dynamic custom item handling.
+
+ \image qmlaxisdrag-example.png
+
+ \section1 Overriding default input handling
+
+ First we deactivate the default input handling mechanism by setting the active input handler
+ of Scatter3D graph to \c{null}:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 0
+ \dots
+
+ Then we add a MouseArea and set it to fill the parent, which is the same \c Item our
+ \c scatterGraph is contained in. We also set it to accept only left mouse button presses,
+ as in this example we are not interested in other buttons:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 1
+ \dots
+
+ Then we need to listen to mouse presses, and when caught, send a selection query to the graph:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 2
+
+ Current mouse position, that will be needed for move distance calculation, is caught in
+ \c{onPositionChanged}:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 3
+ \dots
+
+ At the end of \c{onPositionChanged}, we'll save the previous mouse position for move distance
+ calculation that will be introduced later:
+
+ \dots 0
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 4
+
+ \section1 Translating mouse movement to axis range change
+
+ in \c scatterGraph we will need to listen to \c onSelectedElementChanged signal. The signal
+ is emitted after the selection query has been made in the \c{onPressed} of \c{inputArea}. We
+ set the element type into a property we defined (\c{property int selectedAxisLabel: -1}) in our
+ main component, since it is of a type we are interested in:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 5
+
+ Then, back in the \c onPositionChanged of \c{inputArea}, we check if a mouse button is pressed
+ and if we have a current axis label selection. If the conditions are met, we'll call the
+ function that does the conversion from mouse movement to axis range update:
+
+ \dots 0
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 6
+ \dots 0
+
+ The conversion is easy in this case, as we have a fixed camera rotation. We can use some
+ precalculated values, calculate mouse move distance, and apply the values to the
+ selected axis range:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 7
+
+ For a more sophisticated conversion from mouse movement to axis range update, see
+ \l{Axis Range Dragging With Labels Example}{this example}.
+
+ \section1 Other features
+
+ The example also demonstrates how to use orthographic projection and how to update properties
+ of a custom item on the fly.
+
+ Orthographic projection is very simple. You'll just need to change \c orthoProjection property
+ of \c{scatterGraph}. In this example we have a button for toggling it on and off:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 8
+
+ For custom items, first we'll add one in the \c customItemList of \c{scatterGraph}:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 9
+
+ We have implemented a timer to add, remove, and rotate all the items in the graph,
+ and we'll use the same timer for rotating the custom item:
+
+ \snippet qmlaxisdrag/qml/qmlaxisdrag/main.qml 10
+ \dots
+
+ \section1 Example contents
+*/
diff --git a/examples/datavisualization/qmlaxisdrag/main.cpp b/examples/datavisualization/qmlaxisdrag/main.cpp
new file mode 100644
index 00000000..523d8d16
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/main.cpp
@@ -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
+**
+****************************************************************************/
+
+#include <QtGui/QGuiApplication>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQuickView viewer;
+
+ // 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 Draggable Axes"));
+
+ viewer.setSource(QUrl("qrc:/qml/qmlaxisdrag/main.qml"));
+ viewer.setResizeMode(QQuickView::SizeRootObjectToView);
+ viewer.show();
+
+ return app.exec();
+}
diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/NewButton.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/NewButton.qml
new file mode 100644
index 00000000..ce946ed8
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/NewButton.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** 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
+
+Item {
+ id: newbutton
+
+ property alias text: buttonText.text
+
+ signal clicked
+
+ height: 80
+
+ Button {
+ opacity: 0.5
+ width: parent.width
+ height: parent.height
+ Text {
+ id: buttonText
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ anchors.fill: parent
+ }
+ onClicked: newbutton.clicked()
+ }
+}
diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cube.obj b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cube.obj
new file mode 100644
index 00000000..0197618f
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cube.obj
@@ -0,0 +1,415 @@
+# Blender v2.66 (sub 0) OBJ File: 'beveled_cube.blend'
+# www.blender.org
+v -1.000000 -0.878027 0.878027
+v -0.978771 -0.929277 0.878027
+v -0.950975 -0.932562 0.932562
+v -0.978771 -0.878027 0.929277
+v -0.932562 -0.950975 0.932562
+v -0.929277 -0.978771 0.878027
+v -0.878027 -1.000000 0.878027
+v -0.878027 -0.978771 0.929277
+v -0.932562 -0.932562 0.950975
+v -0.878027 -0.929277 0.978771
+v -0.878027 -0.878027 1.000000
+v -0.929277 -0.878027 0.978771
+v -1.000000 -0.878027 -0.878027
+v -0.978771 -0.878027 -0.929277
+v -0.950975 -0.932562 -0.932562
+v -0.978771 -0.929277 -0.878027
+v -0.932562 -0.932562 -0.950975
+v -0.929277 -0.878027 -0.978771
+v -0.878027 -0.878027 -1.000000
+v -0.878027 -0.929277 -0.978771
+v -0.932562 -0.950975 -0.932562
+v -0.878027 -0.978771 -0.929277
+v -0.878027 -1.000000 -0.878027
+v -0.929277 -0.978771 -0.878027
+v 0.878027 -0.878027 -1.000000
+v 0.929277 -0.878027 -0.978771
+v 0.932562 -0.932562 -0.950975
+v 0.878027 -0.929277 -0.978771
+v 0.950975 -0.932562 -0.932562
+v 0.978771 -0.878027 -0.929277
+v 1.000000 -0.878027 -0.878027
+v 0.978771 -0.929277 -0.878027
+v 0.932562 -0.950975 -0.932562
+v 0.929277 -0.978771 -0.878027
+v 0.878027 -1.000000 -0.878027
+v 0.878027 -0.978771 -0.929277
+v 1.000000 -0.878027 0.878027
+v 0.978771 -0.878027 0.929277
+v 0.950975 -0.932562 0.932562
+v 0.978771 -0.929277 0.878027
+v 0.932562 -0.932562 0.950975
+v 0.929277 -0.878027 0.978771
+v 0.878027 -0.878027 1.000000
+v 0.878027 -0.929277 0.978771
+v 0.932562 -0.950975 0.932562
+v 0.878027 -0.978771 0.929277
+v 0.878027 -1.000000 0.878027
+v 0.929277 -0.978771 0.878027
+v -0.878027 0.878027 1.000000
+v -0.878027 0.929277 0.978771
+v -0.932562 0.932562 0.950975
+v -0.929277 0.878027 0.978771
+v -0.932562 0.950975 0.932562
+v -0.878027 0.978771 0.929277
+v -0.878027 1.000000 0.878027
+v -0.929277 0.978771 0.878027
+v -0.950975 0.932562 0.932562
+v -0.978771 0.929277 0.878027
+v -1.000000 0.878027 0.878027
+v -0.978771 0.878027 0.929277
+v -1.000000 0.878027 -0.878027
+v -0.978771 0.929277 -0.878027
+v -0.950975 0.932562 -0.932562
+v -0.978771 0.878027 -0.929277
+v -0.932562 0.950975 -0.932562
+v -0.929277 0.978771 -0.878027
+v -0.878027 1.000000 -0.878027
+v -0.878027 0.978771 -0.929277
+v -0.932562 0.932562 -0.950975
+v -0.878027 0.929277 -0.978771
+v -0.878027 0.878027 -1.000000
+v -0.929277 0.878027 -0.978771
+v 0.878027 0.878027 -1.000000
+v 0.878027 0.929277 -0.978771
+v 0.932562 0.932562 -0.950975
+v 0.929277 0.878027 -0.978771
+v 0.932562 0.950975 -0.932562
+v 0.878027 0.978771 -0.929277
+v 0.878027 1.000000 -0.878027
+v 0.929277 0.978771 -0.878027
+v 0.950975 0.932562 -0.932562
+v 0.978771 0.929277 -0.878027
+v 1.000000 0.878027 -0.878027
+v 0.978771 0.878027 -0.929277
+v 1.000000 0.878027 0.878027
+v 0.978771 0.929277 0.878027
+v 0.950975 0.932562 0.932562
+v 0.978771 0.878027 0.929277
+v 0.932562 0.950975 0.932562
+v 0.929277 0.978771 0.878027
+v 0.878027 1.000000 0.878027
+v 0.878027 0.978771 0.929277
+v 0.932562 0.932562 0.950975
+v 0.878027 0.929277 0.978771
+v 0.878027 0.878027 1.000000
+v 0.929277 0.878027 0.978771
+vt 0.024513 0.966281
+vt 0.033719 0.975487
+vt 0.033719 0.966281
+vt 0.964639 0.060986
+vt 0.964639 0.939014
+vt 0.989386 0.939014
+vt 0.939014 0.964639
+vt 0.060986 0.964639
+vt 0.939014 0.989386
+vt 0.060986 0.060986
+vt 0.060986 0.939014
+vt 0.939014 0.939014
+vt 0.035361 0.060986
+vt 0.035361 0.939014
+vt 0.010614 0.060986
+vt 0.010614 0.939014
+vt 0.989386 0.060986
+vt 0.939014 0.035361
+vt 0.060986 0.035361
+vt 0.060986 0.010614
+vt 0.060986 0.989386
+vt 0.939014 0.060986
+vt 0.966281 0.975487
+vt 0.966281 0.966281
+vt 0.975487 0.966281
+vt 0.975487 0.033719
+vt 0.966281 0.033719
+vt 0.966281 0.024513
+vt 0.033719 0.024513
+vt 0.033719 0.033719
+vt 0.024513 0.033719
+vt 0.939014 0.010614
+vn -0.713187 -0.495651 -0.495651
+vn -0.495651 -0.495651 -0.713187
+vn -0.495651 -0.713187 -0.495651
+vn 0.539384 -0.823450 0.175909
+vn 0.539384 -0.823450 -0.175909
+vn 0.823450 -0.539384 -0.175909
+vn -0.713187 0.495651 -0.495651
+vn -0.495651 0.713187 -0.495651
+vn -0.495651 0.495651 -0.713187
+vn 0.175909 -0.823450 -0.539384
+vn -0.185644 -0.825892 -0.532365
+vn 0.175909 -0.539384 -0.823450
+vn -0.193426 -0.961852 0.193426
+vn -0.193426 -0.961852 -0.193426
+vn 0.187689 -0.964110 -0.187689
+vn -0.532365 -0.185644 0.825892
+vn -0.532365 0.185644 0.825892
+vn -0.825892 -0.185644 0.532365
+vn -0.532365 0.185644 -0.825892
+vn -0.532365 -0.185644 -0.825892
+vn -0.825892 0.185644 -0.532365
+vn 0.823450 0.175909 -0.539384
+vn 0.823450 -0.175909 -0.539384
+vn 0.539384 -0.175909 -0.823450
+vn 0.539384 0.175909 0.823450
+vn 0.539384 -0.175909 0.823450
+vn 0.823450 -0.175909 0.539384
+vn 0.175909 0.823450 0.539384
+vn -0.185644 0.825892 0.532365
+vn -0.185644 0.532365 0.825892
+vn -0.185644 0.825892 -0.532365
+vn 0.175909 0.823450 -0.539384
+vn -0.185644 0.532365 -0.825892
+vn 0.539384 0.823450 -0.175909
+vn 0.539384 0.823450 0.175909
+vn 0.823450 0.539384 0.175909
+vn 0.187689 0.964110 0.187689
+vn 0.187689 0.964110 -0.187689
+vn -0.193426 0.961852 -0.193426
+vn -0.193426 0.193426 -0.961852
+vn 0.187689 0.187689 -0.964110
+vn -0.193426 -0.193426 -0.961852
+vn -0.961852 0.193426 0.193426
+vn -0.961852 0.193426 -0.193426
+vn -0.961852 -0.193426 0.193426
+vn -0.532365 -0.825892 -0.185644
+vn -0.532365 -0.825892 0.185644
+vn -0.825892 -0.532365 -0.185644
+vn 0.498856 0.498856 -0.708701
+vn 0.498856 0.708701 -0.498856
+vn 0.708701 0.498856 -0.498856
+vn 0.964110 0.187689 -0.187689
+vn 0.964110 0.187689 0.187689
+vn 0.964110 -0.187689 0.187689
+vn 0.498856 -0.498856 -0.708701
+vn 0.708701 -0.498856 -0.498856
+vn 0.498856 -0.708701 -0.498856
+vn 0.708701 0.498856 0.498856
+vn 0.498856 0.708701 0.498856
+vn 0.498856 0.498856 0.708701
+vn -0.495651 0.495651 0.713187
+vn -0.495651 0.713187 0.495651
+vn -0.713187 0.495651 0.495651
+vn 0.708701 -0.498856 0.498856
+vn 0.498856 -0.498856 0.708701
+vn 0.498856 -0.708701 0.498856
+vn -0.532365 0.825892 0.185644
+vn -0.532365 0.825892 -0.185644
+vn -0.825892 0.532365 0.185644
+vn 0.187689 0.187689 0.964110
+vn -0.193426 0.193426 0.961852
+vn -0.193426 -0.193426 0.961852
+vn -0.185644 -0.825892 0.532365
+vn 0.175909 -0.823450 0.539384
+vn 0.175909 -0.539384 0.823450
+vn -0.825892 -0.532365 0.185644
+vn -0.713187 -0.495651 0.495651
+vn -0.495651 -0.713187 0.495651
+vn -0.495651 -0.495651 0.713187
+vn -0.185644 -0.532365 0.825892
+vn -0.961852 -0.193426 -0.193426
+vn -0.825892 -0.185644 -0.532365
+vn 0.187689 -0.187689 -0.964110
+vn 0.823450 -0.539384 0.175909
+vn -0.193426 0.961852 0.193426
+vn -0.825892 0.532365 -0.185644
+vn 0.175909 0.539384 -0.823450
+vn 0.539384 0.175909 -0.823450
+vn 0.823450 0.539384 -0.175909
+vn 0.823450 0.175909 0.539384
+vn 0.175909 0.539384 0.823450
+vn -0.185644 -0.532365 -0.825892
+vn -0.825892 0.185644 0.532365
+vn 0.964110 -0.187689 -0.187689
+vn 0.187689 -0.187689 0.964110
+vn 0.187689 -0.964110 0.187689
+s 1
+f 15/1/1 17/2/2 21/3/3
+f 48/4/4 34/5/5 32/6/6
+f 63/1/7 65/3/8 69/2/9
+f 36/7/10 22/8/11 28/9/12
+f 7/10/13 23/11/14 35/12/15
+f 12/13/16 52/14/17 4/15/18
+f 72/14/19 18/13/20 64/16/21
+f 84/6/22 30/17/23 26/4/24
+f 96/5/25 42/4/26 38/17/27
+f 92/18/28 54/19/29 50/20/30
+f 68/8/31 78/7/32 70/21/33
+f 80/5/34 90/4/35 86/17/36
+f 91/22/37 79/12/38 67/11/39
+f 71/11/40 73/12/41 19/10/42
+f 59/11/43 61/12/44 1/10/45
+f 24/14/46 6/13/47 16/16/48
+f 75/23/49 77/24/50 81/25/51
+f 83/12/52 85/11/53 37/10/54
+f 27/23/55 29/25/56 33/24/57
+f 87/26/58 89/27/59 93/28/60
+f 51/29/61 53/30/62 57/31/63
+f 39/26/64 41/28/65 45/27/66
+f 56/13/67 66/14/68 58/15/69
+f 95/12/70 49/11/71 11/10/72
+f 8/19/73 46/18/74 44/32/75
+f 1/10/45 2/19/76 3/30/77
+f 5/30/78 6/13/47 7/10/13
+f 9/30/79 10/19/80 11/10/72
+f 13/22/81 14/4/82 15/27/1
+f 17/30/2 18/13/20 19/10/42
+f 21/3/3 22/8/11 23/11/14
+f 25/22/83 26/4/24 28/18/12
+f 29/27/56 30/4/23 32/18/6
+f 33/24/57 34/5/5 36/7/10
+f 37/10/54 38/13/27 40/19/84
+f 41/27/65 42/4/26 44/18/75
+f 45/27/66 46/18/74 48/4/4
+f 49/11/71 50/8/30 51/3/61
+f 53/30/62 54/19/29 55/10/85
+f 57/3/63 58/8/69 59/11/43
+f 61/12/44 62/7/86 63/24/7
+f 65/3/8 66/14/68 67/11/39
+f 69/3/9 70/8/33 71/11/40
+f 73/12/41 74/7/87 76/5/88
+f 77/24/50 78/7/32 80/5/34
+f 81/24/51 82/7/89 84/5/22
+f 85/11/53 86/8/36 88/14/90
+f 89/27/59 90/4/35 92/18/28
+f 93/24/60 94/7/91 96/5/25
+f 2/15/76 6/13/47 3/31/77
+f 8/19/73 10/20/80 5/30/78
+f 12/13/16 4/15/18 9/30/79
+f 14/15/82 18/13/20 15/31/1
+f 20/21/92 22/8/11 17/2/2
+f 24/14/46 16/16/48 21/3/3
+f 26/4/24 30/17/23 29/26/56
+f 32/6/6 34/5/5 33/24/57
+f 36/7/10 28/9/12 27/23/55
+f 38/17/27 42/4/26 41/27/65
+f 44/32/75 46/18/74 45/27/66
+f 48/4/4 40/17/84 39/26/64
+f 50/20/30 54/19/29 51/29/61
+f 56/13/67 58/15/69 53/30/62
+f 60/16/93 52/14/17 57/1/63
+f 62/16/86 66/14/68 63/1/7
+f 68/8/31 70/21/33 65/3/8
+f 72/14/19 64/16/21 69/3/9
+f 74/9/87 78/7/32 77/24/50
+f 80/5/34 82/6/89 81/25/51
+f 84/6/22 76/5/88 75/24/49
+f 86/17/36 90/4/35 89/27/59
+f 92/18/28 94/32/91 93/28/60
+f 96/5/25 88/6/90 87/25/58
+f 55/10/85 67/11/39 56/13/67
+f 61/12/44 59/11/43 62/7/86
+f 71/11/40 19/10/42 72/14/19
+f 13/22/81 61/12/44 14/4/82
+f 23/11/14 7/10/13 24/14/46
+f 1/10/45 13/22/81 2/19/76
+f 11/10/72 49/11/71 12/13/16
+f 59/11/43 1/10/45 60/14/93
+f 67/11/39 79/12/38 68/8/31
+f 73/12/41 71/11/40 74/7/87
+f 83/12/52 31/22/94 30/4/23
+f 25/22/83 73/12/41 76/5/88
+f 35/12/15 23/11/14 36/7/10
+f 19/10/42 25/22/83 20/19/92
+f 79/12/38 91/22/37 90/4/35
+f 85/11/53 83/12/52 82/7/89
+f 95/12/70 43/22/95 42/4/26
+f 37/10/54 85/11/53 88/14/90
+f 47/22/96 35/12/15 34/5/5
+f 31/22/94 37/10/54 40/19/84
+f 91/22/37 55/10/85 54/19/29
+f 49/11/71 95/12/70 94/7/91
+f 7/10/13 47/22/96 46/18/74
+f 43/22/95 11/10/72 10/19/80
+f 3/31/77 5/30/78 9/29/79
+f 40/17/84 48/4/4 32/6/6
+f 22/8/11 20/21/92 28/9/12
+f 47/22/96 7/10/13 35/12/15
+f 52/14/17 60/16/93 4/15/18
+f 18/13/20 14/15/82 64/16/21
+f 76/5/88 84/6/22 26/4/24
+f 88/6/90 96/5/25 38/17/27
+f 94/32/91 92/18/28 50/20/30
+f 78/7/32 74/9/87 70/21/33
+f 82/6/89 80/5/34 86/17/36
+f 55/10/85 91/22/37 67/11/39
+f 73/12/41 25/22/83 19/10/42
+f 61/12/44 13/22/81 1/10/45
+f 6/13/47 2/15/76 16/16/48
+f 31/22/94 83/12/52 37/10/54
+f 66/14/68 62/16/86 58/15/69
+f 43/22/95 95/12/70 11/10/72
+f 10/20/80 8/19/73 44/32/75
+f 4/13/18 1/10/45 3/30/77
+f 8/19/73 5/30/78 7/10/13
+f 12/13/16 9/30/79 11/10/72
+f 16/18/48 13/22/81 15/27/1
+f 20/19/92 17/30/2 19/10/42
+f 24/14/46 21/3/3 23/11/14
+f 26/4/24 27/27/55 28/18/12
+f 30/4/23 31/22/94 32/18/6
+f 34/5/5 35/12/15 36/7/10
+f 38/13/27 39/30/64 40/19/84
+f 42/4/26 43/22/95 44/18/75
+f 46/18/74 47/22/96 48/4/4
+f 52/14/17 49/11/71 51/3/61
+f 56/13/67 53/30/62 55/10/85
+f 60/14/93 57/3/63 59/11/43
+f 64/5/21 61/12/44 63/24/7
+f 68/8/31 65/3/8 67/11/39
+f 72/14/19 69/3/9 71/11/40
+f 74/7/87 75/24/49 76/5/88
+f 78/7/32 79/12/38 80/5/34
+f 82/7/89 83/12/52 84/5/22
+f 86/8/36 87/3/58 88/14/90
+f 90/4/35 91/22/37 92/18/28
+f 94/7/91 95/12/70 96/5/25
+f 6/13/47 5/30/78 3/31/77
+f 10/20/80 9/29/79 5/30/78
+f 4/15/18 3/31/77 9/30/79
+f 18/13/20 17/30/2 15/31/1
+f 22/8/11 21/3/3 17/2/2
+f 16/16/48 15/1/1 21/3/3
+f 27/27/55 26/4/24 29/26/56
+f 29/25/56 32/6/6 33/24/57
+f 33/24/57 36/7/10 27/23/55
+f 39/26/64 38/17/27 41/27/65
+f 41/28/65 44/32/75 45/27/66
+f 45/27/66 48/4/4 39/26/64
+f 54/19/29 53/30/62 51/29/61
+f 58/15/69 57/31/63 53/30/62
+f 52/14/17 51/3/61 57/1/63
+f 66/14/68 65/3/8 63/1/7
+f 70/21/33 69/2/9 65/3/8
+f 64/16/21 63/1/7 69/3/9
+f 75/23/49 74/9/87 77/24/50
+f 77/24/50 80/5/34 81/25/51
+f 81/25/51 84/6/22 75/24/49
+f 87/26/58 86/17/36 89/27/59
+f 89/27/59 92/18/28 93/28/60
+f 93/24/60 96/5/25 87/25/58
+f 67/11/39 66/14/68 56/13/67
+f 59/11/43 58/8/69 62/7/86
+f 19/10/42 18/13/20 72/14/19
+f 61/12/44 64/5/21 14/4/82
+f 7/10/13 6/13/47 24/14/46
+f 13/22/81 16/18/48 2/19/76
+f 49/11/71 52/14/17 12/13/16
+f 1/10/45 4/13/18 60/14/93
+f 79/12/38 78/7/32 68/8/31
+f 71/11/40 70/8/33 74/7/87
+f 84/5/22 83/12/52 30/4/23
+f 26/4/24 25/22/83 76/5/88
+f 23/11/14 22/8/11 36/7/10
+f 25/22/83 28/18/12 20/19/92
+f 80/5/34 79/12/38 90/4/35
+f 86/8/36 85/11/53 82/7/89
+f 96/5/25 95/12/70 42/4/26
+f 38/13/27 37/10/54 88/14/90
+f 48/4/4 47/22/96 34/5/5
+f 32/18/6 31/22/94 40/19/84
+f 92/18/28 91/22/37 54/19/29
+f 50/8/30 49/11/71 94/7/91
+f 8/19/73 7/10/13 46/18/74
+f 44/18/75 43/22/95 10/19/80
diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cubetexture.png b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cubetexture.png
new file mode 100644
index 00000000..3cea6863
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/cubetexture.png
Binary files differ
diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml
new file mode 100644
index 00000000..91685297
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml
@@ -0,0 +1,317 @@
+/****************************************************************************
+**
+** 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 QtDataVisualization 1.1
+import "."
+
+Item {
+ id: mainView
+ width: 800
+ height: 600
+ visible: true
+
+ property int selectedAxisLabel: -1
+ property real dragSpeedModifier: 100.0
+ property int currentMouseX: -1
+ property int currentMouseY: -1
+ property int previousMouseX: -1
+ property int previousMouseY: -1
+
+ ListModel {
+ id: graphModel
+ ListElement{ xPos: 0.0; yPos: 0.0; zPos: 0.0; rotation: "@0,0,0,0" }
+ ListElement{ xPos: 1.0; yPos: 1.0; zPos: 1.0; rotation: "@45,1,1,1" }
+ }
+
+ Timer {
+ id: dataTimer
+ interval: 1
+ running: true
+ repeat: true
+ property bool isIncreasing: true
+ property real rotationAngle: 0
+
+ function generateQuaternion() {
+ return "@" + Math.random() * 360 + "," + Math.random() + ","
+ + Math.random() + "," + Math.random()
+ }
+
+ function appendRow() {
+ graphModel.append({"xPos": Math.random(),
+ "yPos": Math.random(),
+ "zPos": Math.random(),
+ "rotation": generateQuaternion()
+ });
+ }
+
+ //! [10]
+ onTriggered: {
+ rotationAngle = rotationAngle + 1
+ qtCube.setRotationAxisAndAngle(Qt.vector3d(1,0,1), rotationAngle)
+ //! [10]
+ scatterSeries.setMeshAxisAndAngle(Qt.vector3d(1,1,1), rotationAngle)
+ if (isIncreasing) {
+ for (var i = 0; i < 10; i++)
+ appendRow()
+ if (graphModel.count > 2002) {
+ scatterGraph.theme = isabelleTheme
+ isIncreasing = false
+ }
+ } else {
+ graphModel.remove(2, 10);
+ if (graphModel.count == 2) {
+ scatterGraph.theme = dynamicColorTheme
+ isIncreasing = true
+ }
+ }
+ }
+ }
+
+ ThemeColor {
+ id: dynamicColor
+ ColorAnimation on color {
+ from: "red"
+ to: "yellow"
+ duration: 2000
+ loops: Animation.Infinite
+ }
+ }
+
+ Theme3D {
+ id: dynamicColorTheme
+ type: Theme3D.ThemeEbony
+ baseColors: [dynamicColor]
+ font.pointSize: 50
+ labelBorderEnabled: true
+ labelBackgroundColor: "gold"
+ labelTextColor: "black"
+ }
+
+ Theme3D {
+ id: isabelleTheme
+ type: Theme3D.ThemeIsabelle
+ font.pointSize: 50
+ labelBorderEnabled: true
+ labelBackgroundColor: "gold"
+ labelTextColor: "black"
+ }
+
+ Item {
+ id: dataView
+ anchors.bottom: parent.bottom
+ width: parent.width
+ height: parent.height
+
+ //! [0]
+ Scatter3D {
+ id: scatterGraph
+ inputHandler: null
+ //! [0]
+ width: dataView.width
+ height: dataView.height
+ theme: dynamicColorTheme
+ shadowQuality: AbstractGraph3D.ShadowQualityLow
+ scene.activeCamera.yRotation: 45.0
+ scene.activeCamera.xRotation: 45.0
+ scene.activeCamera.zoomLevel: 75.0
+
+ Scatter3DSeries {
+ id: scatterSeries
+ itemLabelFormat: "X:@xLabel Y:@yLabel Z:@zLabel"
+ mesh: Abstract3DSeries.MeshCube
+
+ ItemModelScatterDataProxy {
+ itemModel: graphModel
+ xPosRole: "xPos"
+ yPosRole: "yPos"
+ zPosRole: "zPos"
+ rotationRole: "rotation"
+ }
+ }
+ //! [9]
+ customItemList: [
+ Custom3DItem {
+ id: qtCube
+ meshFile: ":/mesh/cube"
+ textureFile: ":/texture/texture"
+ position: Qt.vector3d(0.65,0.35,0.65)
+ scaling: Qt.vector3d(0.3,0.3,0.3)
+ }
+ ]
+ //! [9]
+ //! [5]
+ onSelectedElementChanged: {
+ if (selectedElement >= AbstractGraph3D.ElementAxisXLabel
+ && selectedElement <= AbstractGraph3D.ElementAxisZLabel)
+ selectedAxisLabel = selectedElement
+ else
+ selectedAxisLabel = -1
+ }
+ //! [5]
+ }
+
+ //! [1]
+ MouseArea {
+ anchors.fill: parent
+ hoverEnabled: true
+ acceptedButtons: Qt.LeftButton
+ //! [1]
+
+ //! [3]
+ onPositionChanged: {
+ currentMouseX = mouse.x;
+ currentMouseY = mouse.y;
+ //! [3]
+ //! [6]
+ if (pressed && selectedAxisLabel != -1)
+ dragAxis();
+ //! [6]
+ //! [4]
+ previousMouseX = currentMouseX;
+ previousMouseY = currentMouseY;
+ }
+ //! [4]
+
+ //! [2]
+ onPressed: {
+ scatterGraph.scene.selectionQueryPosition = Qt.point(mouse.x, mouse.y);
+ }
+ //! [2]
+
+ onReleased: {
+ // We need to clear mouse positions and selected axis, because touch devices cannot
+ // track position all the time
+ selectedAxisLabel = -1
+ currentMouseX = -1
+ currentMouseY = -1
+ previousMouseX = -1
+ previousMouseY = -1
+ }
+ }
+ }
+
+ //! [7]
+ function dragAxis() {
+ // Do nothing if previous mouse position is uninitialized
+ if (previousMouseX === -1)
+ return
+
+ // Directional drag multipliers based on rotation. Camera is locked to 45 degrees, so we
+ // can use one precalculated value instead of calculating xx, xy, zx and zy individually
+ var cameraMultiplier = 0.70710678
+
+ // Calculate the mouse move amount
+ var moveX = currentMouseX - previousMouseX
+ var moveY = currentMouseY - previousMouseY
+
+ // Adjust axes
+ switch (selectedAxisLabel) {
+ case AbstractGraph3D.ElementAxisXLabel:
+ var distance = ((moveX - moveY) * cameraMultiplier) / dragSpeedModifier
+ // Check if we need to change min or max first to avoid invalid ranges
+ if (distance > 0) {
+ scatterGraph.axisX.min -= distance
+ scatterGraph.axisX.max -= distance
+ } else {
+ scatterGraph.axisX.max -= distance
+ scatterGraph.axisX.min -= distance
+ }
+ break
+ case AbstractGraph3D.ElementAxisYLabel:
+ distance = moveY / dragSpeedModifier
+ // Check if we need to change min or max first to avoid invalid ranges
+ if (distance > 0) {
+ scatterGraph.axisY.max += distance
+ scatterGraph.axisY.min += distance
+ } else {
+ scatterGraph.axisY.min += distance
+ scatterGraph.axisY.max += distance
+ }
+ break
+ case AbstractGraph3D.ElementAxisZLabel:
+ distance = ((moveX + moveY) * cameraMultiplier) / dragSpeedModifier
+ // Check if we need to change min or max first to avoid invalid ranges
+ if (distance > 0) {
+ scatterGraph.axisZ.max += distance
+ scatterGraph.axisZ.min += distance
+ } else {
+ scatterGraph.axisZ.min += distance
+ scatterGraph.axisZ.max += distance
+ }
+ break
+ }
+ }
+ //! [7]
+
+ NewButton {
+ id: rangeToggle
+ width: parent.width / 3 // We're adding 3 buttons and want to divide them equally
+ text: "Use Preset Range"
+ anchors.left: parent.left
+ property bool autoRange: true
+ onClicked: {
+ if (autoRange) {
+ text = "Use Automatic Range"
+ scatterGraph.axisX.min = 0.3
+ scatterGraph.axisX.max = 0.7
+ scatterGraph.axisY.min = 0.3
+ scatterGraph.axisY.max = 0.7
+ scatterGraph.axisZ.min = 0.3
+ scatterGraph.axisZ.max = 0.7
+ autoRange = false
+ dragSpeedModifier = 200.0
+ } else {
+ text = "Use Preset Range"
+ autoRange = true
+ dragSpeedModifier = 100.0
+ }
+ scatterGraph.axisX.autoAdjustRange = autoRange
+ scatterGraph.axisY.autoAdjustRange = autoRange
+ scatterGraph.axisZ.autoAdjustRange = autoRange
+ }
+ }
+
+ //! [8]
+ NewButton {
+ id: orthoToggle
+ width: parent.width / 3
+ text: "Display Orthographic"
+ anchors.left: rangeToggle.right
+ onClicked: {
+ if (scatterGraph.orthoProjection) {
+ text = "Display Orthographic";
+ scatterGraph.orthoProjection = false
+ // Orthographic projection disables shadows, so we need to switch them back on
+ scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityLow
+ } else {
+ text = "Display Perspective";
+ scatterGraph.orthoProjection = true
+ }
+ }
+ }
+ //! [8]
+
+ NewButton {
+ id: exitButton
+ width: parent.width / 3
+ text: "Quit"
+ anchors.left: orthoToggle.right
+ onClicked: Qt.quit(0);
+ }
+}
diff --git a/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.pro b/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.pro
new file mode 100644
index 00000000..d45525ad
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.pro
@@ -0,0 +1,11 @@
+!include( ../examples.pri ) {
+ error( "Couldn't find the examples.pri file!" )
+}
+
+SOURCES += main.cpp
+
+RESOURCES += qmlaxisdrag.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlaxisdrag/*
diff --git a/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc b/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc
new file mode 100644
index 00000000..c6c45e26
--- /dev/null
+++ b/examples/datavisualization/qmlaxisdrag/qmlaxisdrag.qrc
@@ -0,0 +1,12 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlaxisdrag/main.qml</file>
+ <file>qml/qmlaxisdrag/NewButton.qml</file>
+ </qresource>
+ <qresource prefix="/mesh">
+ <file alias="cube">qml/qmlaxisdrag/cube.obj</file>
+ </qresource>
+ <qresource prefix="/texture">
+ <file alias="texture">qml/qmlaxisdrag/cubetexture.png</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/qmlaxisformatter/customformatter.cpp b/examples/datavisualization/qmlaxisformatter/customformatter.cpp
new file mode 100644
index 00000000..486287ef
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/customformatter.cpp
@@ -0,0 +1,158 @@
+/****************************************************************************
+**
+** 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 "customformatter.h"
+#include <QtDataVisualization/QValue3DAxis>
+#include <QtQml/QQmlExtensionPlugin>
+#include <QtCore/QDebug>
+
+using namespace QtDataVisualization;
+
+Q_DECLARE_METATYPE(QValue3DAxisFormatter *)
+
+static const qreal oneDayMs = 60.0 * 60.0 * 24.0 * 1000.0;
+
+CustomFormatter::CustomFormatter(QObject *parent) :
+ QValue3DAxisFormatter(parent)
+{
+ qRegisterMetaType<QValue3DAxisFormatter *>();
+}
+
+CustomFormatter::~CustomFormatter()
+{
+}
+
+//! [1]
+QValue3DAxisFormatter *CustomFormatter::createNewInstance() const
+{
+ return new CustomFormatter();
+}
+
+void CustomFormatter::populateCopy(QValue3DAxisFormatter &copy) const
+{
+ QValue3DAxisFormatter::populateCopy(copy);
+
+ CustomFormatter *customFormatter = static_cast<CustomFormatter *>(&copy);
+ customFormatter->m_originDate = m_originDate;
+ customFormatter->m_selectionFormat = m_selectionFormat;
+}
+//! [1]
+
+//! [2]
+void CustomFormatter::recalculate()
+{
+ // We want our axis to always have gridlines at date breaks
+
+ // Convert range into QDateTimes
+ QDateTime minTime = valueToDateTime(qreal(axis()->min()));
+ QDateTime maxTime = valueToDateTime(qreal(axis()->max()));
+
+ // Find out the grid counts
+ QTime midnight(0, 0);
+ QDateTime minFullDate(minTime.date(), midnight);
+ int gridCount = 0;
+ if (minFullDate != minTime)
+ minFullDate = minFullDate.addDays(1);
+ QDateTime maxFullDate(maxTime.date(), midnight);
+
+ gridCount += minFullDate.daysTo(maxFullDate) + 1;
+ int subGridCount = axis()->subSegmentCount() - 1;
+
+ // Reserve space for position arrays and label strings
+ gridPositions().resize(gridCount);
+ subGridPositions().resize((gridCount + 1) * subGridCount);
+ labelPositions().resize(gridCount);
+ labelStrings().reserve(gridCount);
+
+ // Calculate positions and format labels
+ qint64 startMs = minTime.toMSecsSinceEpoch();
+ qint64 endMs = maxTime.toMSecsSinceEpoch();
+ qreal dateNormalizer = endMs - startMs;
+ qreal firstLineOffset = (minFullDate.toMSecsSinceEpoch() - startMs) / dateNormalizer;
+ qreal segmentStep = oneDayMs / dateNormalizer;
+ qreal subSegmentStep = 0;
+ if (subGridCount > 0)
+ subSegmentStep = segmentStep / qreal(subGridCount + 1);
+
+ for (int i = 0; i < gridCount; i++) {
+ qreal gridValue = firstLineOffset + (segmentStep * qreal(i));
+ gridPositions()[i] = float(gridValue);
+ labelPositions()[i] = float(gridValue);
+ labelStrings() << minFullDate.addDays(i).toString(axis()->labelFormat());
+ }
+
+ for (int i = 0; i <= gridCount; i++) {
+ if (subGridPositions().size()) {
+ for (int j = 0; j < subGridCount; j++) {
+ float position;
+ if (i)
+ position = gridPositions().at(i - 1) + subSegmentStep * (j + 1);
+ else
+ position = gridPositions().at(0) - segmentStep + subSegmentStep * (j + 1);
+ if (position > 1.0f || position < 0.0f)
+ position = gridPositions().at(0);
+ subGridPositions()[i * subGridCount + j] = position;
+ }
+ }
+ }
+}
+//! [2]
+
+//! [3]
+QString CustomFormatter::stringForValue(qreal value, const QString &format) const
+{
+ Q_UNUSED(format)
+
+ return valueToDateTime(value).toString(m_selectionFormat);
+}
+//! [3]
+
+QDate CustomFormatter::originDate() const
+{
+ return m_originDate;
+}
+
+QString CustomFormatter::selectionFormat() const
+{
+ return m_selectionFormat;
+}
+
+void CustomFormatter::setOriginDate(const QDate &date)
+{
+ if (m_originDate != date) {
+ m_originDate = date;
+ markDirty(true);
+ emit originDateChanged(date);
+ }
+}
+
+void CustomFormatter::setSelectionFormat(const QString &format)
+{
+ if (m_selectionFormat != format) {
+ m_selectionFormat = format;
+ markDirty(true); // Necessary to regenerate already visible selection label
+ emit selectionFormatChanged(format);
+ }
+}
+
+//! [0]
+QDateTime CustomFormatter::valueToDateTime(qreal value) const
+{
+ return QDateTime(m_originDate).addMSecs(qint64(oneDayMs * value));
+}
+//! [0]
diff --git a/examples/datavisualization/qmlaxisformatter/customformatter.h b/examples/datavisualization/qmlaxisformatter/customformatter.h
new file mode 100644
index 00000000..d439e56a
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/customformatter.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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 CUSTOMFORMATTER_H
+#define CUSTOMFORMATTER_H
+
+#include <QtDataVisualization/QValue3DAxisFormatter>
+#include <QtCore/QDateTime>
+#include <QtCore/QVector>
+
+using namespace QtDataVisualization;
+
+//! [2]
+class CustomFormatter : public QValue3DAxisFormatter
+{
+ //! [2]
+ Q_OBJECT
+
+ //! [1]
+ Q_PROPERTY(QDate originDate READ originDate WRITE setOriginDate NOTIFY originDateChanged)
+ //! [1]
+ //! [3]
+ Q_PROPERTY(QString selectionFormat READ selectionFormat WRITE setSelectionFormat NOTIFY selectionFormatChanged)
+ //! [3]
+public:
+ explicit CustomFormatter(QObject *parent = 0);
+ virtual ~CustomFormatter();
+
+ //! [0]
+ virtual QValue3DAxisFormatter *createNewInstance() const;
+ virtual void populateCopy(QValue3DAxisFormatter &copy) const;
+ virtual void recalculate();
+ virtual QString stringForValue(qreal value, const QString &format) const;
+ //! [0]
+
+ QDate originDate() const;
+ QString selectionFormat() const;
+
+public slots:
+ void setOriginDate(const QDate &date);
+ void setSelectionFormat(const QString &format);
+
+signals:
+ void originDateChanged(const QDate &date);
+ void selectionFormatChanged(const QString &format);
+
+private:
+ Q_DISABLE_COPY(CustomFormatter)
+
+ QDateTime valueToDateTime(qreal value) const;
+
+ QDate m_originDate;
+ QString m_selectionFormat;
+};
+
+#endif
diff --git a/examples/datavisualization/qmlaxisformatter/doc/images/qmlaxisformatter-example.png b/examples/datavisualization/qmlaxisformatter/doc/images/qmlaxisformatter-example.png
new file mode 100644
index 00000000..fbfbd833
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/doc/images/qmlaxisformatter-example.png
Binary files differ
diff --git a/examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc b/examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc
new file mode 100644
index 00000000..3568e507
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/doc/src/qmlaxisformatter.qdoc
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** 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 qmlaxisformatter
+ \title Qt Quick 2 Axis Formatter Example
+ \ingroup qtdatavisualization_examples
+ \brief Example of a hybrid C++ and QML application demonstrating different axis formatters.
+ \since QtDataVisualization 1.1
+
+ The Qt Quick axis formatter example shows how to use predefined axis formatters and how to
+ create a custom one.
+
+ \image qmlaxisformatter-example.png
+
+ The interesting thing about this example is axis formatters, 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 Custom axis formatter
+
+ Customizing axis formatters requires subclassing the QValue3DAxisFormatter, which cannot be
+ done in QML code alone. In this example we want an axis that interprets the float values as
+ a timestamp and shows the date in the axis labels. To achieve this, we introduce a new class
+ called \c CustomFormatter, which subclasses the QValue3DAxisFormatter:
+
+ \snippet qmlaxisformatter/customformatter.h 2
+ \dots 0
+
+ Since float values of a QScatter3DSeries cannot be directly cast into QDateTime values due to
+ difference in data width, we need some sort of mapping between the two. We chose to do the
+ mapping by specifying an origin date for the formatter and interpreting the float values
+ from the QScatter3DSeries as date offsets to that origin value. The origin date is given as
+ a property:
+
+ \snippet qmlaxisformatter/customformatter.h 1
+
+ The mapping from value to QDateTime is done using \c valueToDateTime() method:
+
+ \snippet qmlaxisformatter/customformatter.cpp 0
+
+ To function as an axis formatter, our \c CustomFormatter needs to reimplement some virtual
+ methods:
+
+ \snippet qmlaxisformatter/customformatter.h 0
+
+ The first two are simple, we just create a new instance of \c CustomFormatter and copy the
+ necessary data over to it. These two methods are used to create and update a cache of formatter for
+ rendering purposes. It is important to remember to call the superclass implementation
+ of \c populateCopy():
+
+ \snippet qmlaxisformatter/customformatter.cpp 1
+
+ Bulk of the work done by \c CustomFormatter is done in the \c recalculate() method, where
+ our formatter calculates the grid, subgrid, and label positions, as well as formats the label
+ strings.
+ In our custom formatter we ignore the segment count of the axis and draw a grid line always at
+ midnight. Subsegment count and label positioning is handled normally:
+
+ \snippet qmlaxisformatter/customformatter.cpp 2
+
+ The axis labels are formatted to show only the date, but for selection label we want little more
+ resolution for the timestamp, so we specify another property for our custom formatter to allow
+ user to customize it:
+
+ \snippet qmlaxisformatter/customformatter.h 3
+
+ This selection format property is used in the reimplemented \c stringToValue method, where we
+ ignore the submitted format and substitute the custom selection format for it:
+
+ \snippet qmlaxisformatter/customformatter.cpp 3
+
+ To expose our new custom formatter to the QML, we must declare and register it:
+
+ \snippet qmlaxisformatter/main.cpp 0
+ \dots 0
+ \snippet qmlaxisformatter/main.cpp 1
+
+ \section1 QML
+
+ In the QML codes, we define a different axis for each dimension:
+
+ \snippet qmlaxisformatter/qml/qmlaxisformatter/main.qml 3
+
+ Z-axis is just a regular ValueAxis3D:
+
+ \snippet qmlaxisformatter/qml/qmlaxisformatter/main.qml 0
+
+ For the Y-axis we define a logarithmic axis. ValueAxis3D can be made to show logarithmic scale
+ by specifying LogValueAxis3DFormatter for \c formatter property of the axis:
+
+ \snippet qmlaxisformatter/qml/qmlaxisformatter/main.qml 2
+
+ And finally, for the X-axis we use our new \c CustomFormatter:
+
+ \snippet qmlaxisformatter/qml/qmlaxisformatter/main.qml 1
+
+ Rest of the application consists of fairly self-explanatory logic for modifying the axes and
+ showing the graph.
+*/
diff --git a/examples/datavisualization/qmlaxisformatter/main.cpp b/examples/datavisualization/qmlaxisformatter/main.cpp
new file mode 100644
index 00000000..05ed7b37
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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 "customformatter.h"
+
+#include <QtGui/QGuiApplication>
+#include <QtQuick/QQuickView>
+#include <QtQml>
+
+//! [0]
+Q_DECLARE_METATYPE(CustomFormatter *)
+//! [0]
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ //! [1]
+ qmlRegisterType<CustomFormatter>("CustomFormatter", 1, 0, "CustomFormatter");
+ //! [1]
+
+ QQuickView viewer;
+
+ // 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("Axis formatter example"));
+
+ viewer.setSource(QUrl("qrc:/qml/qmlaxisformatter/main.qml"));
+ viewer.setResizeMode(QQuickView::SizeRootObjectToView);
+ viewer.show();
+
+ return app.exec();
+}
diff --git a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml
new file mode 100644
index 00000000..e692c090
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/Data.qml
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** 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 model: dataModel
+
+ ListModel {
+ id: dataModel
+ ListElement{ xPos: 2.456103; yPos: 1.0; zPos: 5.0 }
+ ListElement{ xPos: 5.687549; yPos: 3.0; zPos: 2.5 }
+ ListElement{ xPos: 2.357458; yPos: 4.1; zPos: 1.0 }
+ ListElement{ xPos: 4.567458; yPos: 4.75; zPos: 3.9 }
+ ListElement{ xPos: 6.885439; yPos: 4.9; zPos: 7.2 }
+ ListElement{ xPos: 2.366769; yPos: 13.42; zPos: 3.5 }
+ ListElement{ xPos: 7.546457; yPos: 233.1; zPos: 6.9 }
+ ListElement{ xPos: 2.475867; yPos: 32.91; zPos: 4.1 }
+ ListElement{ xPos: 8.456546; yPos: 153.68; zPos: 9.52 }
+ ListElement{ xPos: 3.456348; yPos: 52.96; zPos: 1.6 }
+ ListElement{ xPos: 1.536446; yPos: 32.4; zPos: 2.92 }
+ ListElement{ xPos: 8.456666; yPos: 114.74; zPos: 8.18 }
+ ListElement{ xPos: 5.468486; yPos: 83.1; zPos: 3.8 }
+ ListElement{ xPos: 6.546586 ; yPos: 63.66; zPos: 3.58 }
+ ListElement{ xPos: 8.567516 ; yPos: 1.82; zPos: 4.64 }
+ ListElement{ xPos: 7.678984 ; yPos: 213.18; zPos: 7.22 }
+ ListElement{ xPos: 7.457569 ; yPos: 63.06; zPos: 4.3 }
+ ListElement{ xPos: 8.456755 ; yPos: 122.64; zPos: 6.44 }
+ ListElement{ xPos: 6.234536 ; yPos: 63.96; zPos: 4.38 }
+ ListElement{ xPos: 9.456718 ; yPos: 243.32; zPos: 4.04 }
+ ListElement{ xPos: 10.789889 ; yPos: 43.4; zPos: 2.78 }
+ ListElement{ xPos: 11.346554 ; yPos: 345.12; zPos: 3.1 }
+ ListElement{ xPos: 12.023454 ; yPos: 500.0; zPos: 3.68 }
+ }
+}
diff --git a/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/NewButton.qml b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/NewButton.qml
new file mode 100644
index 00000000..e4fb99d2
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/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/qmlaxisformatter/qml/qmlaxisformatter/main.qml b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/main.qml
new file mode 100644
index 00000000..7aba08c6
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/qml/qmlaxisformatter/main.qml
@@ -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
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Layouts 1.0
+import QtDataVisualization 1.1
+import CustomFormatter 1.0
+import "."
+
+Rectangle {
+ id: mainView
+ width: 1280
+ height: 1024
+
+ Data {
+ id: seriesData
+ }
+
+ Theme3D {
+ id: themeIsabelle
+ type: Theme3D.ThemePrimaryColors
+ font.family: "Lucida Handwriting"
+ font.pointSize: 40
+ }
+
+ //! [1]
+ ValueAxis3D {
+ id: dateAxis
+ formatter: CustomFormatter {
+ originDate: "2014-01-01"
+ selectionFormat: "yyyy-MM-dd HH:mm:ss"
+ }
+ subSegmentCount: 2
+ labelFormat: "yyyy-MM-dd"
+ min: 0
+ max: 14
+ }
+ //! [1]
+
+ //! [2]
+ ValueAxis3D {
+ id: logAxis
+ formatter: LogValueAxis3DFormatter {
+ id: logAxisFormatter
+ base: 10
+ autoSubGrid: true
+ showEdgeLabels: true
+ }
+ labelFormat: "%.2f"
+ }
+ //! [2]
+
+ ValueAxis3D {
+ id: linearAxis
+ labelFormat: "%.2f"
+ min: 0
+ max: 500
+ }
+
+ //! [0]
+ ValueAxis3D {
+ id: valueAxis
+ segmentCount: 5
+ subSegmentCount: 2
+ labelFormat: "%.2f"
+ min: 0
+ max: 10
+ }
+ //! [0]
+
+ Item {
+ id: dataView
+ anchors.bottom: parent.bottom
+ width: parent.width
+ height: parent.height - buttonLayout.height
+
+ Scatter3D {
+ id: scatterGraph
+ width: dataView.width
+ height: dataView.height
+ theme: themeIsabelle
+ shadowQuality: AbstractGraph3D.ShadowQualitySoftLow
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricRight
+ //! [3]
+ axisZ: valueAxis
+ axisY: logAxis
+ axisX: dateAxis
+ //! [3]
+
+ Scatter3DSeries {
+ id: scatterSeries
+ itemLabelFormat: "@xLabel - (@yLabel, @zLabel)"
+ meshSmooth: true
+ ItemModelScatterDataProxy {
+ itemModel: seriesData.model
+ xPosRole: "xPos"
+ yPosRole: "yPos"
+ zPosRole: "zPos"
+ }
+ }
+ }
+ }
+
+ RowLayout {
+ id: buttonLayout
+ Layout.minimumHeight: exitButton.height
+ width: parent.width
+ anchors.left: parent.left
+ spacing: 0
+
+ NewButton {
+ id: yAxisBaseChange
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ state: "enabled"
+ onClicked: {
+ if (logAxisFormatter.base === 10)
+ logAxisFormatter.base = 0
+ else if (logAxisFormatter.base === 2)
+ logAxisFormatter.base = 10
+ else
+ logAxisFormatter.base = 2
+ }
+ states: [
+ State {
+ name: "enabled"
+ PropertyChanges {
+ target: yAxisBaseChange
+ text: "Y-axis log base: " + logAxisFormatter.base
+ enabled: true
+ }
+ },
+ State {
+ name: "disabled"
+ PropertyChanges {
+ target: yAxisBaseChange
+ text: "Y-axis linear"
+ enabled: false
+ }
+ }
+ ]
+ }
+
+ NewButton {
+ id: yAxisToggle
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Toggle Y-axis"
+ onClicked: {
+ if (scatterGraph.axisY === linearAxis) {
+ scatterGraph.axisY = logAxis
+ yAxisBaseChange.state = "enabled"
+ } else {
+ scatterGraph.axisY = linearAxis
+ yAxisBaseChange.state = "disabled"
+ }
+ }
+ }
+
+ NewButton {
+ id: exitButton
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Quit"
+ onClicked: Qt.quit(0);
+ }
+ }
+}
diff --git a/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.pro b/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.pro
new file mode 100644
index 00000000..0f3b2f80
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.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 \
+ customformatter.cpp
+HEADERS += customformatter.h
+
+RESOURCES += qmlaxisformatter.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlaxisformatter/*
diff --git a/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc b/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc
new file mode 100644
index 00000000..0cd9e927
--- /dev/null
+++ b/examples/datavisualization/qmlaxisformatter/qmlaxisformatter.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlaxisformatter/main.qml</file>
+ <file>qml/qmlaxisformatter/NewButton.qml</file>
+ <file>qml/qmlaxisformatter/Data.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/datavisualization/qmlbars/doc/images/qmlbars-example.png b/examples/datavisualization/qmlbars/doc/images/qmlbars-example.png
index 64ad6b0e..c2ab2459 100644
--- a/examples/datavisualization/qmlbars/doc/images/qmlbars-example.png
+++ b/examples/datavisualization/qmlbars/doc/images/qmlbars-example.png
Binary files differ
diff --git a/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc b/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc
index d3da5e6a..01131388 100644
--- a/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc
+++ b/examples/datavisualization/qmlbars/doc/src/qmlbars.qdoc
@@ -39,9 +39,9 @@
\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
- map to rows and columns of a bar chart, but we can only show either income or expenses as the
- value.
+ Each data item has three roles: timestamp, income, and expenses. The timestamp value is in
+ format: \c{<four digit year>-<two digit month>}. Years and months are natural to map to rows and
+ columns of a bar chart, but we can only show either income or expenses as the value.
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:
@@ -50,23 +50,47 @@
\dots
The data is attached to the \c itemModel property of the ItemModelBarDataProxy inside the
- series.
+ series. For \c valueRole we simply specify the \c income field, as it contains the value we
+ want, but getting the years and months is a bit more complicated, since they are both found
+ in the same field. To extract those values, we specify the \c timestamp field for both
+ \c rowRole and \c columnRole, and additionally specify a search pattern and a replace rule
+ for those roles to extract the correct portion of the field contents for each role.
+ The search pattern is a normal JavaScript regular expression and the replace rule specifies
+ what the field content that matches the regular expression is replaced with.
+ In this case we want to replace the entire field content with just the year or the month,
+ which is the first captured substring for both rows and columns.
+ For more information how the replace using regular expressions works, see
+ QString::replace(const QRegExp &rx, const QString &after) function documentation.
+
+ The \c multiMatchBehavior property specifies what to do in case multiple item model items match
+ the same row/column combination. In this case we want to add their values together.
+ This property has no effect when we are showing values for each month, as there are no
+ duplicate months in our item model, but it becomes relevant later when we want to show
+ the yearly totals.
Then we add another series for the expenses:
\snippet qmlbars/qml/qmlbars/main.qml 4
\dots
+ The model contains expenses as negative values, but we want to show them as positive bars, so
+ that we can easily compare them to income bars. We use \c valueRolePattern to remove the minus
+ sign to achieve this. No replacement string needs to be specified as the default replacement
+ is an empty string.
+
We use the \c visible property of the series to hide the second series for now.
\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 numbers for months, which we don't want
to use for our column labels:
\snippet qmlbars/qml/qmlbars/Axes.qml 0
+ We also set automatic axis label rotation to make axis labels more readable at low camera
+ angles.
+
\section1 Switching series
In the \c main.qml, we set up the graph and various UI elements. There are three interesting
@@ -76,15 +100,23 @@
\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 axis label format and item selection label formats are tweaked to get the negative sign
+ showing properly for expenses, which were actually resolved as positive values.
- The second interesting block is where we filter some of the rows away from the visualized data:
+ The second interesting block is where we change the visualized data by adjusting the proxy
+ propertes:
\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.
+ To show yearly totals, we need to combine the twelve months of each year into a single bar.
+ We achieve this by specifying a \c columnRolePattern that matches all model items. That way
+ the data proxy will only have a single column. The cumulative \c multiMatchBehavior we
+ specified earlier for the proxy becomes relevant now, causing the values of all twelve months
+ of each year to be added up into a single bar.
+
+ To show just a subset of years, we set \c autoRowCategories to false on the
+ ItemModelBarDataProxy item and define the row categories explicitly. This way, only the items
+ in specified row categories are visualized.
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():
diff --git a/examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml b/examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml
index 29979e1b..f316eef5 100644
--- a/examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/Axes.qml
@@ -17,15 +17,13 @@
****************************************************************************/
import QtQuick 2.1
-import QtDataVisualization 1.0
+import QtDataVisualization 1.1
Item {
property alias column: columnAxis
- property alias expenses: expensesAxis
- property alias income: incomeAxis
-
- // For row labels we can use row labels from data proxy, so default axis
- // suffices for rows.
+ property alias row: rowAxis
+ property alias value: valueAxis
+ property alias total: totalAxis
// Custom labels for columns, since the data contains abbreviated month names.
//! [0]
@@ -33,20 +31,26 @@ Item {
id: columnAxis
labels: ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"]
+ labelAutoRotation: 30
}
//! [0]
+ CategoryAxis3D {
+ id: totalAxis
+ labels: ["Yearly total"]
+ labelAutoRotation: 30
+ }
+ CategoryAxis3D {
+ // For row labels we can use row labels from data proxy, no labels defined for rows.
+ id: rowAxis
+ labelAutoRotation: 30
+ }
+
ValueAxis3D {
- id: incomeAxis
+ id: valueAxis
min: 0
max: 35
labelFormat: "%.2f M\u20AC"
title: "Monthly income"
- }
- ValueAxis3D {
- id: expensesAxis
- min: 0
- max: 35
- labelFormat: "-%.2f M\u20AC"
- title: "Monthly expenses"
+ labelAutoRotation: 90
}
}
diff --git a/examples/datavisualization/qmlbars/qml/qmlbars/Data.qml b/examples/datavisualization/qmlbars/qml/qmlbars/Data.qml
index 7e0978c6..dcb89dbf 100644
--- a/examples/datavisualization/qmlbars/qml/qmlbars/Data.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/Data.qml
@@ -24,96 +24,96 @@ Item {
//! [0]
ListModel {
id: dataModel
- ListElement{ year: "2006"; month: "Jan"; expenses: "4"; income: "5" }
- ListElement{ year: "2006"; month: "Feb"; expenses: "5"; income: "6" }
- ListElement{ year: "2006"; month: "Mar"; expenses: "7"; income: "4" }
+ ListElement{ timestamp: "2006-01"; expenses: "-4"; income: "5" }
+ ListElement{ timestamp: "2006-02"; expenses: "-5"; income: "6" }
+ ListElement{ timestamp: "2006-03"; expenses: "-7"; income: "4" }
//! [0]
- ListElement{ year: "2006"; month: "Apr"; expenses: "3"; income: "2" }
- ListElement{ year: "2006"; month: "May"; expenses: "4"; income: "1" }
- ListElement{ year: "2006"; month: "Jun"; expenses: "2"; income: "2" }
- ListElement{ year: "2006"; month: "Jul"; expenses: "1"; income: "3" }
- ListElement{ year: "2006"; month: "Aug"; expenses: "5"; income: "1" }
- ListElement{ year: "2006"; month: "Sep"; expenses: "2"; income: "3" }
- ListElement{ year: "2006"; month: "Oct"; expenses: "5"; income: "2" }
- ListElement{ year: "2006"; month: "Nov"; expenses: "8"; income: "5" }
- ListElement{ year: "2006"; month: "Dec"; expenses: "3"; income: "3" }
+ ListElement{ timestamp: "2006-04"; expenses: "-3"; income: "2" }
+ ListElement{ timestamp: "2006-05"; expenses: "-4"; income: "1" }
+ ListElement{ timestamp: "2006-06"; expenses: "-2"; income: "2" }
+ ListElement{ timestamp: "2006-07"; expenses: "-1"; income: "3" }
+ ListElement{ timestamp: "2006-08"; expenses: "-5"; income: "1" }
+ ListElement{ timestamp: "2006-09"; expenses: "-2"; income: "3" }
+ ListElement{ timestamp: "2006-10"; expenses: "-5"; income: "2" }
+ ListElement{ timestamp: "2006-11"; expenses: "-8"; income: "5" }
+ ListElement{ timestamp: "2006-12"; expenses: "-3"; income: "3" }
- ListElement{ year: "2007"; month: "Jan"; expenses: "3"; income: "1" }
- ListElement{ year: "2007"; month: "Feb"; expenses: "4"; income: "2" }
- ListElement{ year: "2007"; month: "Mar"; expenses: "12"; income: "4" }
- ListElement{ year: "2007"; month: "Apr"; expenses: "13"; income: "6" }
- ListElement{ year: "2007"; month: "May"; expenses: "14"; income: "11" }
- ListElement{ year: "2007"; month: "Jun"; expenses: "7"; income: "7" }
- ListElement{ year: "2007"; month: "Jul"; expenses: "6"; income: "4" }
- ListElement{ year: "2007"; month: "Aug"; expenses: "4"; income: "15" }
- ListElement{ year: "2007"; month: "Sep"; expenses: "2"; income: "18" }
- ListElement{ year: "2007"; month: "Oct"; expenses: "29"; income: "25" }
- ListElement{ year: "2007"; month: "Nov"; expenses: "23"; income: "29" }
- ListElement{ year: "2007"; month: "Dec"; expenses: "5"; income: "9" }
+ ListElement{ timestamp: "2007-01"; expenses: "-3"; income: "1" }
+ ListElement{ timestamp: "2007-02"; expenses: "-4"; income: "2" }
+ ListElement{ timestamp: "2007-03"; expenses: "-12"; income: "4" }
+ ListElement{ timestamp: "2007-04"; expenses: "-13"; income: "6" }
+ ListElement{ timestamp: "2007-05"; expenses: "-14"; income: "11" }
+ ListElement{ timestamp: "2007-06"; expenses: "-7"; income: "7" }
+ ListElement{ timestamp: "2007-07"; expenses: "-6"; income: "4" }
+ ListElement{ timestamp: "2007-08"; expenses: "-4"; income: "15" }
+ ListElement{ timestamp: "2007-09"; expenses: "-2"; income: "18" }
+ ListElement{ timestamp: "2007-10"; expenses: "-29"; income: "25" }
+ ListElement{ timestamp: "2007-11"; expenses: "-23"; income: "29" }
+ ListElement{ timestamp: "2007-12"; expenses: "-5"; income: "9" }
- ListElement{ year: "2008"; month: "Jan"; expenses: "3"; income: "8" }
- ListElement{ year: "2008"; month: "Feb"; expenses: "8"; income: "14" }
- ListElement{ year: "2008"; month: "Mar"; expenses: "10"; income: "20" }
- ListElement{ year: "2008"; month: "Apr"; expenses: "12"; income: "24" }
- ListElement{ year: "2008"; month: "May"; expenses: "10"; income: "19" }
- ListElement{ year: "2008"; month: "Jun"; expenses: "5"; income: "8" }
- ListElement{ year: "2008"; month: "Jul"; expenses: "1"; income: "4" }
- ListElement{ year: "2008"; month: "Aug"; expenses: "7"; income: "12" }
- ListElement{ year: "2008"; month: "Sep"; expenses: "4"; income: "16" }
- ListElement{ year: "2008"; month: "Oct"; expenses: "22"; income: "33" }
- ListElement{ year: "2008"; month: "Nov"; expenses: "16"; income: "25" }
- ListElement{ year: "2008"; month: "Dec"; expenses: "2"; income: "7" }
+ ListElement{ timestamp: "2008-01"; expenses: "-3"; income: "8" }
+ ListElement{ timestamp: "2008-02"; expenses: "-8"; income: "14" }
+ ListElement{ timestamp: "2008-03"; expenses: "-10"; income: "20" }
+ ListElement{ timestamp: "2008-04"; expenses: "-12"; income: "24" }
+ ListElement{ timestamp: "2008-05"; expenses: "-10"; income: "19" }
+ ListElement{ timestamp: "2008-06"; expenses: "-5"; income: "8" }
+ ListElement{ timestamp: "2008-07"; expenses: "-1"; income: "4" }
+ ListElement{ timestamp: "2008-08"; expenses: "-7"; income: "12" }
+ ListElement{ timestamp: "2008-09"; expenses: "-4"; income: "16" }
+ ListElement{ timestamp: "2008-10"; expenses: "-22"; income: "33" }
+ ListElement{ timestamp: "2008-11"; expenses: "-16"; income: "25" }
+ ListElement{ timestamp: "2008-12"; expenses: "-2"; income: "7" }
- ListElement{ year: "2009"; month: "Jan"; expenses: "4"; income: "5" }
- ListElement{ year: "2009"; month: "Feb"; expenses: "4"; income: "7" }
- ListElement{ year: "2009"; month: "Mar"; expenses: "11"; income: "14" }
- ListElement{ year: "2009"; month: "Apr"; expenses: "16"; income: "22" }
- ListElement{ year: "2009"; month: "May"; expenses: "3"; income: "5" }
- ListElement{ year: "2009"; month: "Jun"; expenses: "4"; income: "8" }
- ListElement{ year: "2009"; month: "Jul"; expenses: "7"; income: "9" }
- ListElement{ year: "2009"; month: "Aug"; expenses: "9"; income: "13" }
- ListElement{ year: "2009"; month: "Sep"; expenses: "1"; income: "6" }
- ListElement{ year: "2009"; month: "Oct"; expenses: "14"; income: "25" }
- ListElement{ year: "2009"; month: "Nov"; expenses: "19"; income: "29" }
- ListElement{ year: "2009"; month: "Dec"; expenses: "5"; income: "7" }
+ ListElement{ timestamp: "2009-01"; expenses: "-4"; income: "5" }
+ ListElement{ timestamp: "2009-02"; expenses: "-4"; income: "7" }
+ ListElement{ timestamp: "2009-03"; expenses: "-11"; income: "14" }
+ ListElement{ timestamp: "2009-04"; expenses: "-16"; income: "22" }
+ ListElement{ timestamp: "2009-05"; expenses: "-3"; income: "5" }
+ ListElement{ timestamp: "2009-06"; expenses: "-4"; income: "8" }
+ ListElement{ timestamp: "2009-07"; expenses: "-7"; income: "9" }
+ ListElement{ timestamp: "2009-08"; expenses: "-9"; income: "13" }
+ ListElement{ timestamp: "2009-09"; expenses: "-1"; income: "6" }
+ ListElement{ timestamp: "2009-10"; expenses: "-14"; income: "25" }
+ ListElement{ timestamp: "2009-11"; expenses: "-19"; income: "29" }
+ ListElement{ timestamp: "2009-12"; expenses: "-5"; income: "7" }
- ListElement{ year: "2010"; month: "Jan"; expenses: "14"; income: "22" }
- ListElement{ year: "2010"; month: "Feb"; expenses: "5"; income: "7" }
- ListElement{ year: "2010"; month: "Mar"; expenses: "1"; income: "9" }
- ListElement{ year: "2010"; month: "Apr"; expenses: "1"; income: "12" }
- ListElement{ year: "2010"; month: "May"; expenses: "5"; income: "9" }
- ListElement{ year: "2010"; month: "Jun"; expenses: "5"; income: "8" }
- ListElement{ year: "2010"; month: "Jul"; expenses: "3"; income: "7" }
- ListElement{ year: "2010"; month: "Aug"; expenses: "1"; income: "5" }
- ListElement{ year: "2010"; month: "Sep"; expenses: "2"; income: "4" }
- ListElement{ year: "2010"; month: "Oct"; expenses: "10"; income: "13" }
- ListElement{ year: "2010"; month: "Nov"; expenses: "12"; income: "17" }
- ListElement{ year: "2010"; month: "Dec"; expenses: "6"; income: "9" }
+ ListElement{ timestamp: "2010-01"; expenses: "-14"; income: "22" }
+ ListElement{ timestamp: "2010-02"; expenses: "-5"; income: "7" }
+ ListElement{ timestamp: "2010-03"; expenses: "-1"; income: "9" }
+ ListElement{ timestamp: "2010-04"; expenses: "-1"; income: "12" }
+ ListElement{ timestamp: "2010-05"; expenses: "-5"; income: "9" }
+ ListElement{ timestamp: "2010-06"; expenses: "-5"; income: "8" }
+ ListElement{ timestamp: "2010-07"; expenses: "-3"; income: "7" }
+ ListElement{ timestamp: "2010-08"; expenses: "-1"; income: "5" }
+ ListElement{ timestamp: "2010-09"; expenses: "-2"; income: "4" }
+ ListElement{ timestamp: "2010-10"; expenses: "-10"; income: "13" }
+ ListElement{ timestamp: "2010-11"; expenses: "-12"; income: "17" }
+ ListElement{ timestamp: "2010-12"; expenses: "-6"; income: "9" }
- ListElement{ year: "2011"; month: "Jan"; expenses: "2"; income: "6" }
- ListElement{ year: "2011"; month: "Feb"; expenses: "4"; income: "8" }
- ListElement{ year: "2011"; month: "Mar"; expenses: "7"; income: "12" }
- ListElement{ year: "2011"; month: "Apr"; expenses: "9"; income: "15" }
- ListElement{ year: "2011"; month: "May"; expenses: "7"; income: "19" }
- ListElement{ year: "2011"; month: "Jun"; expenses: "9"; income: "18" }
- ListElement{ year: "2011"; month: "Jul"; expenses: "13"; income: "17" }
- ListElement{ year: "2011"; month: "Aug"; expenses: "5"; income: "9" }
- ListElement{ year: "2011"; month: "Sep"; expenses: "3"; income: "8" }
- ListElement{ year: "2011"; month: "Oct"; expenses: "13"; income: "15" }
- ListElement{ year: "2011"; month: "Nov"; expenses: "8"; income: "17" }
- ListElement{ year: "2011"; month: "Dec"; expenses: "7"; income: "10" }
+ ListElement{ timestamp: "2011-01"; expenses: "-2"; income: "6" }
+ ListElement{ timestamp: "2011-02"; expenses: "-4"; income: "8" }
+ ListElement{ timestamp: "2011-03"; expenses: "-7"; income: "12" }
+ ListElement{ timestamp: "2011-04"; expenses: "-9"; income: "15" }
+ ListElement{ timestamp: "2011-05"; expenses: "-7"; income: "19" }
+ ListElement{ timestamp: "2011-06"; expenses: "-9"; income: "18" }
+ ListElement{ timestamp: "2011-07"; expenses: "-13"; income: "17" }
+ ListElement{ timestamp: "2011-08"; expenses: "-5"; income: "9" }
+ ListElement{ timestamp: "2011-09"; expenses: "-3"; income: "8" }
+ ListElement{ timestamp: "2011-10"; expenses: "-13"; income: "15" }
+ ListElement{ timestamp: "2011-11"; expenses: "-8"; income: "17" }
+ ListElement{ timestamp: "2011-12"; expenses: "-7"; income: "10" }
- ListElement{ year: "2012"; month: "Jan"; expenses: "12"; income: "16" }
- ListElement{ year: "2012"; month: "Feb"; expenses: "24"; income: "28" }
- ListElement{ year: "2012"; month: "Mar"; expenses: "27"; income: "22" }
- ListElement{ year: "2012"; month: "Apr"; expenses: "29"; income: "25" }
- ListElement{ year: "2012"; month: "May"; expenses: "27"; income: "29" }
- ListElement{ year: "2012"; month: "Jun"; expenses: "19"; income: "18" }
- ListElement{ year: "2012"; month: "Jul"; expenses: "13"; income: "17" }
- ListElement{ year: "2012"; month: "Aug"; expenses: "15"; income: "19" }
- ListElement{ year: "2012"; month: "Sep"; expenses: "3"; income: "8" }
- ListElement{ year: "2012"; month: "Oct"; expenses: "3"; income: "6" }
- ListElement{ year: "2012"; month: "Nov"; expenses: "4"; income: "8" }
- ListElement{ year: "2012"; month: "Dec"; expenses: "5"; income: "9" }
+ ListElement{ timestamp: "2012-01"; expenses: "-12"; income: "16" }
+ ListElement{ timestamp: "2012-02"; expenses: "-24"; income: "28" }
+ ListElement{ timestamp: "2012-03"; expenses: "-27"; income: "22" }
+ ListElement{ timestamp: "2012-04"; expenses: "-29"; income: "25" }
+ ListElement{ timestamp: "2012-05"; expenses: "-27"; income: "29" }
+ ListElement{ timestamp: "2012-06"; expenses: "-19"; income: "18" }
+ ListElement{ timestamp: "2012-07"; expenses: "-13"; income: "17" }
+ ListElement{ timestamp: "2012-08"; expenses: "-15"; income: "19" }
+ ListElement{ timestamp: "2012-09"; expenses: "-3"; income: "8" }
+ ListElement{ timestamp: "2012-10"; expenses: "-3"; income: "6" }
+ ListElement{ timestamp: "2012-11"; expenses: "-4"; income: "8" }
+ ListElement{ timestamp: "2012-12"; expenses: "-5"; income: "9" }
}
}
diff --git a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
index 0df8d8ae..5172e27d 100644
--- a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
@@ -19,7 +19,7 @@
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
-import QtDataVisualization 1.0
+import QtDataVisualization 1.1
import QtQuick.Window 2.0
import "."
@@ -49,15 +49,18 @@ Rectangle {
// Set tableView current row to selected bar
var rowRole = series.dataProxy.rowLabels[position.x];
- var colRole = series.dataProxy.columnLabels[position.y];
+ var colRole
+ if (barGraph.columnAxis === graphAxes.total)
+ colRole = "01";
+ else
+ colRole = series.dataProxy.columnLabels[position.y];
+ var checkTimestamp = rowRole + "-" + colRole
var currentRow = tableView.currentRow
- if (currentRow === -1 || rowRole !== graphData.model.get(currentRow).year
- || colRole !== graphData.model.get(currentRow).month) {
+ if (currentRow === -1 || checkTimestamp !== graphData.model.get(currentRow).timestamp) {
var totalRows = tableView.rowCount;
for (var i = 0; i < totalRows; i++) {
- var currentRowRole = graphData.model.get(i).year
- var currentColRole = graphData.model.get(i).month
- if (currentRowRole === rowRole && currentColRole === colRole) {
+ var modelTimestamp = graphData.model.get(i).timestamp
+ if (modelTimestamp === checkTimestamp) {
tableView.currentRow = i
// Workaround to 5.2 row selection issue
if (typeof tableView.selection != "undefined") {
@@ -100,45 +103,28 @@ Rectangle {
barSpacingRelative: false
scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
columnAxis: graphAxes.column
- valueAxis: graphAxes.income
-
- //! [3]
- Bar3DSeries {
- id: barSeries
- itemLabelFormat: "Income for @colLabel, @rowLabel: @valueLabel"
- baseGradient: barGradient
-
- ItemModelBarDataProxy {
- id: modelProxy
- itemModel: graphData.model
- rowRole: "year"
- columnRole: "month"
- valueRole: "income"
- }
- //! [3]
-
- ColorGradient {
- id: barGradient
- ColorGradientStop { position: 1.0; color: "#00FF00" }
- ColorGradientStop { position: 0.0; color: "#006000" }
- }
-
- onSelectedBarChanged: handleSelectionChange(barSeries, position)
- }
+ rowAxis: graphAxes.row
+ valueAxis: graphAxes.value
//! [4]
Bar3DSeries {
id: secondarySeries
visible: false
- itemLabelFormat: "Expenses for @colLabel, @rowLabel: @valueLabel"
+ itemLabelFormat: "Expenses, @colLabel, @rowLabel: -@valueLabel"
baseGradient: secondaryGradient
ItemModelBarDataProxy {
id: secondaryProxy
itemModel: graphData.model
- rowRole: "year"
- columnRole: "month"
+ rowRole: "timestamp"
+ columnRole: "timestamp"
valueRole: "expenses"
+ rowRolePattern: /^(\d\d\d\d).*$/
+ columnRolePattern: /^.*-(\d\d)$/
+ valueRolePattern: /-/
+ rowRoleReplace: "\\1"
+ columnRoleReplace: "\\1"
+ multiMatchBehavior: ItemModelBarDataProxy.MMBCumulative
}
//! [4]
@@ -150,6 +136,35 @@ Rectangle {
onSelectedBarChanged: handleSelectionChange(secondarySeries, position)
}
+
+ //! [3]
+ Bar3DSeries {
+ id: barSeries
+ itemLabelFormat: "Income, @colLabel, @rowLabel: @valueLabel"
+ baseGradient: barGradient
+
+ ItemModelBarDataProxy {
+ id: modelProxy
+ itemModel: graphData.model
+ rowRole: "timestamp"
+ columnRole: "timestamp"
+ valueRole: "income"
+ rowRolePattern: /^(\d\d\d\d).*$/
+ columnRolePattern: /^.*-(\d\d)$/
+ rowRoleReplace: "\\1"
+ columnRoleReplace: "\\1"
+ multiMatchBehavior: ItemModelBarDataProxy.MMBCumulative
+ }
+ //! [3]
+
+ ColorGradient {
+ id: barGradient
+ ColorGradientStop { position: 1.0; color: "#00FF00" }
+ ColorGradientStop { position: 0.0; color: "#006000" }
+ }
+
+ onSelectedBarChanged: handleSelectionChange(barSeries, position)
+ }
}
}
@@ -157,16 +172,53 @@ Rectangle {
id: tableView
anchors.top: parent.top
anchors.left: parent.left
- TableViewColumn{ role: "year" ; title: "Year" ; width: tableView.width / 4 }
- TableViewColumn{ role: "month" ; title: "Month" ; width: tableView.width / 4 }
+ TableViewColumn{ role: "timestamp" ; title: "Month" ; width: tableView.width / 2 }
TableViewColumn{ role: "expenses" ; title: "Expenses" ; width: tableView.width / 4 }
TableViewColumn{ role: "income" ; title: "Income" ; width: tableView.width / 4 }
+ itemDelegate: Item {
+ Text {
+ id: delegateText
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.width
+ anchors.leftMargin: 4
+ anchors.left: parent.left
+ anchors.right: parent.right
+ color: styleData.textColor
+ elide: styleData.elideMode
+ text: customText
+ horizontalAlignment: styleData.textAlignment
+
+ property string originalText: styleData.value
+ property string customText
+
+ onOriginalTextChanged: {
+ if (styleData.column === 0) {
+ if (delegateText.originalText !== "") {
+ var pattern = /(\d\d\d\d)-(\d\d)/
+ var matches = pattern.exec(delegateText.originalText)
+ var colIndex = parseInt(matches[2], 10) - 1
+ delegateText.customText = matches[1] + " - " + graphAxes.column.labels[colIndex]
+ }
+ } else {
+ delegateText.customText = originalText
+ }
+ }
+ }
+ }
+
model: graphData.model
//! [2]
onCurrentRowChanged: {
- var rowIndex = modelProxy.rowCategoryIndex(graphData.model.get(currentRow).year)
- var colIndex = modelProxy.columnCategoryIndex(graphData.model.get(currentRow).month)
+ var timestamp = graphData.model.get(currentRow).timestamp
+ var pattern = /(\d\d\d\d)-(\d\d)/
+ var matches = pattern.exec(timestamp)
+ var rowIndex = modelProxy.rowCategoryIndex(matches[1])
+ var colIndex
+ if (barGraph.columnAxis === graphAxes.total)
+ colIndex = 0 // Just one column when showing yearly totals
+ else
+ colIndex = modelProxy.columnCategoryIndex(matches[2])
if (selectedSeries.visible)
mainview.selectedSeries.selectedBar = Qt.point(rowIndex, colIndex)
else if (barSeries.visible)
@@ -182,25 +234,38 @@ Rectangle {
spacing: 0
Button {
- id: dataToggle
+ id: changeDataButton
Layout.fillWidth: true
Layout.fillHeight: true
text: "Show 2010 - 2012"
clip: true
//! [1]
onClicked: {
- if (barGraph.rowAxis.max !== 6) {
- text = "Show 2010 - 2012"
+ if (text === "Show yearly totals") {
modelProxy.autoRowCategories = true
secondaryProxy.autoRowCategories = true
- } else {
+ modelProxy.columnRolePattern = /^.*$/
+ secondaryProxy.columnRolePattern = /^.*$/
+ graphAxes.value.autoAdjustRange = true
+ barGraph.columnAxis = graphAxes.total
text = "Show all years"
+ } else if (text === "Show all years") {
+ modelProxy.autoRowCategories = true
+ secondaryProxy.autoRowCategories = true
+ modelProxy.columnRolePattern = /^.*-(\d\d)$/
+ secondaryProxy.columnRolePattern = /^.*-(\d\d)$/
+ graphAxes.value.min = 0
+ graphAxes.value.max = 35
+ barGraph.columnAxis = graphAxes.column
+ text = "Show 2010 - 2012"
+ } else { // text === "Show 2010 - 2012"
// Explicitly defining row categories, since we do not want to show data for
// all years in the model, just for the selected ones.
modelProxy.autoRowCategories = false
secondaryProxy.autoRowCategories = false
modelProxy.rowCategories = ["2010", "2011", "2012"]
secondaryProxy.rowCategories = ["2010", "2011", "2012"]
+ text = "Show yearly totals"
}
}
//! [1]
@@ -232,19 +297,20 @@ Rectangle {
clip: true
//! [0]
onClicked: {
- if (!secondarySeries.visible) {
- text = "Show Both"
- barGraph.valueAxis = graphAxes.expenses
+ if (text === "Show Expenses") {
barSeries.visible = false
secondarySeries.visible = true
- } else if (!barSeries.visible){
+ barGraph.valueAxis.labelFormat = "-%.2f M\u20AC"
+ secondarySeries.itemLabelFormat = "Expenses, @colLabel, @rowLabel: @valueLabel"
+ text = "Show Both"
+ } else if (text === "Show Both") {
barSeries.visible = true
+ barGraph.valueAxis.labelFormat = "%.2f M\u20AC"
+ secondarySeries.itemLabelFormat = "Expenses, @colLabel, @rowLabel: -@valueLabel"
text = "Show Income"
- barGraph.valueAxis = graphAxes.income
- } else {
+ } else { // text === "Show Income"
secondarySeries.visible = false
text = "Show Expenses"
- barGraph.valueAxis = graphAxes.income
}
}
//! [0]
diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml
index 50be7a8d..f8c71650 100644
--- a/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml
+++ b/examples/datavisualization/qmllegend/qml/qmllegend/LegendItem.qml
@@ -31,6 +31,12 @@ Rectangle {
id: legendItem
state: "unselected"
+ // Workaround for a layout bug that in some situations causes changing from fully opaque color
+ // to a transparent one to use black background instead of what is actually under the items.
+ // Having the control always slighthly transparent forces the background to be refreshed
+ // properly.
+ opacity: 0.999
+
//! [1]
RowLayout {
anchors.fill: parent
diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/main.qml b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
index f7e2d803..0fe107cb 100644
--- a/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
+++ b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
@@ -121,34 +121,22 @@ Rectangle {
Layout.fillHeight: true
series: station1
theme: barGraph.theme
- onColorChanged: legendPanel.relayout()
}
LegendItem {
Layout.fillWidth: true
Layout.fillHeight: true
series: station2
theme: barGraph.theme
- onColorChanged: legendPanel.relayout()
}
LegendItem {
Layout.fillWidth: true
Layout.fillHeight: true
series: station3
theme: barGraph.theme
- onColorChanged: legendPanel.relayout()
}
}
//! [0]
- function relayout() {
- // Workaround for a layout bug that causes transparent colors to use black background
- // instead of what is actually under the items if just the color changes.
- // Forcing a relayout by adjusting layout's available area fixes the background.
- var originalWidth = border.width
- border.width = originalWidth + 1
- border.width = originalWidth
- }
-
states: [
State {
name: "topleft"
diff --git a/examples/datavisualization/qmloscilloscope/datasource.cpp b/examples/datavisualization/qmloscilloscope/datasource.cpp
index 01d7e73d..f466b2b0 100644
--- a/examples/datavisualization/qmloscilloscope/datasource.cpp
+++ b/examples/datavisualization/qmloscilloscope/datasource.cpp
@@ -23,7 +23,6 @@ using namespace QtDataVisualization;
//! [3]
Q_DECLARE_METATYPE(QSurface3DSeries *)
-Q_DECLARE_METATYPE(QValue3DAxis *)
//! [3]
DataSource::DataSource(QObject *parent) :
@@ -33,7 +32,6 @@ DataSource::DataSource(QObject *parent) :
{
//! [4]
qRegisterMetaType<QSurface3DSeries *>();
- qRegisterMetaType<QValue3DAxis *>();
//! [4]
}
@@ -138,29 +136,6 @@ void DataSource::update(QSurface3DSeries *series)
}
//! [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++) {
diff --git a/examples/datavisualization/qmloscilloscope/datasource.h b/examples/datavisualization/qmloscilloscope/datasource.h
index ef2f7acb..483523e0 100644
--- a/examples/datavisualization/qmloscilloscope/datasource.h
+++ b/examples/datavisualization/qmloscilloscope/datasource.h
@@ -20,9 +20,6 @@
#define DATASOURCE_H
#include <QtDataVisualization/QSurface3DSeries>
-#include <QtDataVisualization/QValue3DAxis>
-
-class QQuickView;
using namespace QtDataVisualization;
@@ -39,9 +36,6 @@ public slots:
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();
diff --git a/examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.png b/examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.png
index a3e1baab..d8a79a36 100644
--- a/examples/datavisualization/qmloscilloscope/doc/images/qmloscilloscope-example.png
+++ 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
index c574950b..e13320c3 100644
--- a/examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc
+++ b/examples/datavisualization/qmloscilloscope/doc/src/qmloscilloscope.qdoc
@@ -59,19 +59,14 @@
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
+ To make it possible to use QSurface3DSeries pointers as parameters on the
\c DataSource class methods on all environments and builds, we need to make sure the meta
- types are registered:
+ type is registered:
\snippet qmloscilloscope/datasource.cpp 3
\dots 0
@@ -86,15 +81,11 @@
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.
+ We also hide the item label with \l{Abstract3DSeries::itemLabelVisible}{itemLabelFormat}, since
+ we want to display the selected item information in a \c Text element instead of a floating
+ 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:
diff --git a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
index 81884154..c2e6b70b 100644
--- a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
+++ b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
@@ -19,7 +19,7 @@
import QtQuick 2.1
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.0
-import QtDataVisualization 1.0
+import QtDataVisualization 1.1
import "."
Item {
@@ -65,6 +65,14 @@ Item {
axisX.segmentCount: 4
axisY.segmentCount: 4
axisZ.segmentCount: 4
+ measureFps: true
+
+ onCurrentFpsChanged: {
+ if (fps > 10)
+ fpsText.text = "FPS: " + Math.round(surfaceGraph.currentFps)
+ else
+ fpsText.text = "FPS: " + Math.round(surfaceGraph.currentFps * 10.0) / 10.0
+ }
//! [0]
Surface3DSeries {
@@ -72,9 +80,15 @@ Item {
drawMode: Surface3DSeries.DrawSurface;
flatShadingEnabled: false;
meshSmooth: true
- itemLabelFormat: ""
-
- onSelectedPointChanged: mainView.updateSelectionLabel()
+ itemLabelFormat: "@xLabel, @zLabel: @yLabel"
+ itemLabelVisible: false
+
+ onItemLabelChanged: {
+ if (surfaceSeries.selectedPoint === surfaceSeries.invalidSelectionPosition)
+ selectionText.text = "No selection"
+ else
+ selectionText.text = surfaceSeries.itemLabel
+ }
}
//! [0]
@@ -90,10 +104,7 @@ Item {
interval: 1000 / frequencySlider.value
running: true
repeat: true
- onTriggered: {
- dataSource.update(surfaceSeries)
- mainView.updateSelectionLabel()
- }
+ onTriggered: dataSource.update(surfaceSeries)
}
//! [3]
@@ -209,6 +220,25 @@ Item {
Rectangle {
Layout.fillHeight: true
Layout.fillWidth: true
+ Layout.minimumWidth: fpsText.implicitWidth + 10
+ Layout.maximumWidth: fpsText.implicitWidth + 10
+ Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ Text {
+ id: fpsText
+ 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
@@ -218,10 +248,10 @@ Item {
Text {
id: selectionText
- text: "No selection"
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
+ text: "No selection"
}
}
}
@@ -285,15 +315,6 @@ Item {
}
- //! [1]
- function updateSelectionLabel() {
- selectionText.text = dataSource.selectionLabel(surfaceSeries,
- surfaceGraph.axisX,
- surfaceGraph.axisY,
- surfaceGraph.axisZ)
- }
- //! [1]
-
//! [4]
function generateData() {
dataSource.generateData(mainView.sampleCache, mainView.sampleRows,
diff --git a/examples/datavisualization/rotations/scatterdatamodifier.cpp b/examples/datavisualization/rotations/scatterdatamodifier.cpp
index c4b439b1..d2c2c52d 100644
--- a/examples/datavisualization/rotations/scatterdatamodifier.cpp
+++ b/examples/datavisualization/rotations/scatterdatamodifier.cpp
@@ -23,6 +23,7 @@
#include <QtDataVisualization/q3dcamera.h>
#include <QtDataVisualization/qscatter3dseries.h>
#include <QtDataVisualization/q3dtheme.h>
+#include <QtDataVisualization/QCustom3DItem>
#include <QtCore/qmath.h>
using namespace QtDataVisualization;
@@ -40,7 +41,7 @@ ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter)
m_fieldLines(12),
m_arrowsPerLine(16),
m_magneticField(new QScatter3DSeries),
- m_sun(new QScatter3DSeries),
+ m_sun(new QCustom3DItem),
m_magneticFieldArray(0),
m_angleOffset(0.0f),
m_angleStep(doublePi / m_arrowsPerLine / animationFrames)
@@ -62,17 +63,15 @@ ScatterDataModifier::ScatterDataModifier(Q3DScatter *scatter)
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()));
+ // For 'sun' we use a custom large sphere
+ m_sun->setScaling(QVector3D(0.07f, 0.07f, 0.07f));
+ m_sun->setMeshFile(QStringLiteral(":/mesh/largesphere.obj"));
+ QImage sunColor = QImage(2, 2, QImage::Format_RGB32);
+ sunColor.fill(QColor(0xff, 0xbb, 0x00));
+ m_sun->setTextureImage(sunColor);
m_graph->addSeries(m_magneticField);
- m_graph->addSeries(m_sun);
+ m_graph->addCustomItem(m_sun);
// Configure the axes according to the data
m_graph->axisX()->setRange(-horizontalRange, horizontalRange);
@@ -171,7 +170,7 @@ void ScatterDataModifier::triggerRotation()
void ScatterDataModifier::toggleSun()
{
- m_sun->setVisible(!m_graph->seriesList().at(1)->isVisible());
+ m_sun->setVisible(!m_sun->isVisible());
}
void ScatterDataModifier::toggleRotation()
diff --git a/examples/datavisualization/rotations/scatterdatamodifier.h b/examples/datavisualization/rotations/scatterdatamodifier.h
index 9df1f26a..c4f7e7a4 100644
--- a/examples/datavisualization/rotations/scatterdatamodifier.h
+++ b/examples/datavisualization/rotations/scatterdatamodifier.h
@@ -47,7 +47,7 @@ private:
int m_fieldLines;
int m_arrowsPerLine;
QScatter3DSeries *m_magneticField;
- QScatter3DSeries *m_sun;
+ QCustom3DItem *m_sun;
QScatterDataArray *m_magneticFieldArray;
float m_angleOffset;
float m_angleStep;
diff --git a/examples/datavisualization/surface/doc/src/surface.qdoc b/examples/datavisualization/surface/doc/src/surface.qdoc
index 31b41c59..af74bd58 100644
--- a/examples/datavisualization/surface/doc/src/surface.qdoc
+++ b/examples/datavisualization/surface/doc/src/surface.qdoc
@@ -85,8 +85,8 @@
\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. Finally we make sure the correct series is added to the
- graph:
+ ranges. Automatic label rotation is set to improve label readability at low camera angles.
+ Finally we make sure the correct series is added to the graph:
\snippet surface/surfacegraph.cpp 3
diff --git a/examples/datavisualization/surface/surfacegraph.cpp b/examples/datavisualization/surface/surfacegraph.cpp
index d7524fbc..172b4daf 100644
--- a/examples/datavisualization/surface/surfacegraph.cpp
+++ b/examples/datavisualization/surface/surfacegraph.cpp
@@ -100,6 +100,9 @@ void SurfaceGraph::enableSqrtSinModel(bool enable)
m_graph->axisX()->setRange(sampleMin, sampleMax);
m_graph->axisY()->setRange(0.0f, 2.0f);
m_graph->axisZ()->setRange(sampleMin, sampleMax);
+ m_graph->axisX()->setLabelAutoRotation(30);
+ m_graph->axisY()->setLabelAutoRotation(90);
+ m_graph->axisZ()->setLabelAutoRotation(30);
m_graph->removeSeries(m_heightMapSeries);
m_graph->addSeries(m_sqrtSinSeries);
diff --git a/src/datavisualization/axis/axis.pri b/src/datavisualization/axis/axis.pri
index 2c8bf70e..0173b597 100644
--- a/src/datavisualization/axis/axis.pri
+++ b/src/datavisualization/axis/axis.pri
@@ -4,9 +4,15 @@ HEADERS += \
$$PWD/qvalue3daxis.h \
$$PWD/qvalue3daxis_p.h \
$$PWD/qcategory3daxis.h \
- $$PWD/qcategory3daxis_p.h
+ $$PWD/qcategory3daxis_p.h \
+ $$PWD/qvalue3daxisformatter.h \
+ $$PWD/qvalue3daxisformatter_p.h \
+ $$PWD/qlogvalue3daxisformatter.h \
+ $$PWD/qlogvalue3daxisformatter_p.h
SOURCES += \
$$PWD/qabstract3daxis.cpp \
$$PWD/qvalue3daxis.cpp \
- $$PWD/qcategory3daxis.cpp
+ $$PWD/qcategory3daxis.cpp \
+ $$PWD/qvalue3daxisformatter.cpp \
+ $$PWD/qlogvalue3daxisformatter.cpp
diff --git a/src/datavisualization/axis/qabstract3daxis.cpp b/src/datavisualization/axis/qabstract3daxis.cpp
index 3a327caa..9fd5a832 100644
--- a/src/datavisualization/axis/qabstract3daxis.cpp
+++ b/src/datavisualization/axis/qabstract3daxis.cpp
@@ -16,7 +16,6 @@
**
****************************************************************************/
-#include "qabstract3daxis.h"
#include "qabstract3daxis_p.h"
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -25,7 +24,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QAbstract3DAxis
* \inmodule QtDataVisualization
* \brief QAbstract3DAxis is base class for axes of a graph.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* You should not need to use this class directly, but one of its subclasses instead.
*
@@ -42,12 +41,15 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* This type is uncreatable, but contains properties that are exposed via subtypes.
*
- * For AbstractAxis3D enums, see \l QAbstract3DAxis::AxisOrientation and \l QAbstract3DAxis::AxisType
+ * For AbstractAxis3D enums, see \l QAbstract3DAxis::AxisOrientation and
+ * \l{QAbstract3DAxis::AxisType}.
*/
/*!
* \qmlproperty string AbstractAxis3D::title
* Defines the title for the axis.
+ *
+ * \sa titleVisible, titleFixed
*/
/*!
@@ -88,6 +90,36 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* If set, the axis will automatically adjust the range so that all data fits in it.
*/
+/*!
+ * \qmlproperty real AbstractAxis3D::labelAutoRotation
+ *
+ * Defines the maximum \a angle the labels can autorotate when the camera angle changes.
+ * The \a angle can be between 0 and 90, inclusive. The default value is 0.
+ * If the value is 0, axis labels do not automatically rotate.
+ * If the value is greater than zero, labels attempt to orient themselves toward the camera, up to
+ * the specified angle.
+ */
+
+/*!
+ * \qmlproperty bool AbstractAxis3D::titleVisible
+ *
+ * Defines if the axis title is visible in the primary graph view. The default value is \c{false}.
+ *
+ * \sa title, titleFixed
+ */
+
+/*!
+ * \qmlproperty bool AbstractAxis3D::titleFixed
+ *
+ * If \c{true}, axis titles in the primary graph view will be rotated towards the camera similarly
+ * to the axis labels.
+ * If \c{false}, axis titles are only rotated around their axis but are not otherwise oriented
+ * towards the camera.
+ * This property doesn't have any effect if labelAutoRotation property value is zero.
+ * Default value is \c{true}.
+ *
+ * \sa labelAutoRotation, title, titleVisible
+ */
/*!
* \enum QAbstract3DAxis::AxisOrientation
@@ -150,6 +182,8 @@ QAbstract3DAxis::AxisType QAbstract3DAxis::type() const
* \property QAbstract3DAxis::title
*
* Defines the title for the axis.
+ *
+ * \sa titleVisible, titleFixed
*/
void QAbstract3DAxis::setTitle(const QString &title)
{
@@ -193,6 +227,77 @@ void QAbstract3DAxis::setRange(float min, float max)
}
/*!
+ * \property QAbstract3DAxis::labelAutoRotation
+ *
+ * Defines the maximum \a angle the labels can autorotate when the camera angle changes.
+ * The \a angle can be between 0 and 90, inclusive. The default value is 0.
+ * If the value is 0, axis labels do not automatically rotate.
+ * If the value is greater than zero, labels attempt to orient themselves toward the camera, up to
+ * the specified angle.
+ */
+void QAbstract3DAxis::setLabelAutoRotation(float angle)
+{
+ if (angle < 0.0f)
+ angle = 0.0f;
+ if (angle > 90.0f)
+ angle = 90.0f;
+ if (d_ptr->m_labelAutoRotation != angle) {
+ d_ptr->m_labelAutoRotation = angle;
+ emit labelAutoRotationChanged(angle);
+ }
+}
+
+float QAbstract3DAxis::labelAutoRotation() const
+{
+ return d_ptr->m_labelAutoRotation;
+}
+
+/*!
+ * \property QAbstract3DAxis::titleVisible
+ *
+ * Defines if the axis title is visible in the primary graph view. The default value is \c{false}.
+ *
+ * \sa title, titleFixed
+ */
+void QAbstract3DAxis::setTitleVisible(bool visible)
+{
+ if (d_ptr->m_titleVisible != visible) {
+ d_ptr->m_titleVisible = visible;
+ emit titleVisibilityChanged(visible);
+ }
+}
+
+bool QAbstract3DAxis::isTitleVisible() const
+{
+ return d_ptr->m_titleVisible;
+}
+
+/*!
+ * \property QAbstract3DAxis::titleFixed
+ *
+ * If \c{true}, axis titles in the primary graph view will be rotated towards the camera similarly
+ * to the axis labels.
+ * If \c{false}, axis titles are only rotated around their axis but are not otherwise oriented
+ * towards the camera.
+ * This property doesn't have any effect if labelAutoRotation property value is zero.
+ * Default value is \c{true}.
+ *
+ * \sa labelAutoRotation, title, titleVisible
+ */
+void QAbstract3DAxis::setTitleFixed(bool fixed)
+{
+ if (d_ptr->m_titleFixed != fixed) {
+ d_ptr->m_titleFixed = fixed;
+ emit titleFixedChanged(fixed);
+ }
+}
+
+bool QAbstract3DAxis::isTitleFixed() const
+{
+ return d_ptr->m_titleFixed;
+}
+
+/*!
* \property QAbstract3DAxis::min
*
* Defines the minimum value on the axis.
@@ -266,8 +371,9 @@ QAbstract3DAxisPrivate::QAbstract3DAxisPrivate(QAbstract3DAxis *q, QAbstract3DAx
m_min(0.0f),
m_max(10.0f),
m_autoAdjust(true),
- m_onlyPositiveValues(false),
- m_allowMinMaxSame(false)
+ m_labelAutoRotation(0.0f),
+ m_titleVisible(false),
+ m_titleFixed(true)
{
}
@@ -290,17 +396,28 @@ void QAbstract3DAxisPrivate::updateLabels()
// Default implementation does nothing
}
-void QAbstract3DAxisPrivate::setRange(float min, float max)
+void QAbstract3DAxisPrivate::setRange(float min, float max, bool suppressWarnings)
{
bool adjusted = false;
- if (m_onlyPositiveValues) {
- if (min < 0.0f) {
- min = 0.0f;
- adjusted = true;
- }
- if (max < 0.0f) {
- max = 0.0f;
- adjusted = true;
+ if (!allowNegatives()) {
+ if (allowZero()) {
+ if (min < 0.0f) {
+ min = 0.0f;
+ adjusted = true;
+ }
+ if (max < 0.0f) {
+ max = 0.0f;
+ adjusted = true;
+ }
+ } else {
+ if (min <= 0.0f) {
+ min = 1.0f;
+ adjusted = true;
+ }
+ if (max <= 0.0f) {
+ max = 1.0f;
+ adjusted = true;
+ }
}
}
// If min >= max, we adjust ranges so that
@@ -312,8 +429,8 @@ void QAbstract3DAxisPrivate::setRange(float min, float max)
m_min = min;
minDirty = true;
}
- if (m_max != max || min > max || (!m_allowMinMaxSame && min == max)) {
- if (min > max || (!m_allowMinMaxSame && min == max)) {
+ if (m_max != max || min > max || (!allowMinMaxSame() && min == max)) {
+ if (min > max || (!allowMinMaxSame() && min == max)) {
m_max = min + 1.0f;
adjusted = true;
} else {
@@ -323,7 +440,7 @@ void QAbstract3DAxisPrivate::setRange(float min, float max)
}
if (minDirty || maxDirty) {
- if (adjusted) {
+ if (adjusted && !suppressWarnings) {
qWarning() << "Warning: Tried to set invalid range for axis."
" Range automatically adjusted to a valid one:"
<< min << "-" << max << "-->" << m_min << "-" << m_max;
@@ -339,17 +456,25 @@ void QAbstract3DAxisPrivate::setRange(float min, float max)
void QAbstract3DAxisPrivate::setMin(float min)
{
- if (m_onlyPositiveValues) {
- if (min < 0.0f) {
- min = 0.0f;
- qWarning() << "Warning: Tried to set negative minimum for an axis that only supports"
- " positive values:" << min;
+ if (!allowNegatives()) {
+ if (allowZero()) {
+ if (min < 0.0f) {
+ min = 0.0f;
+ qWarning() << "Warning: Tried to set negative minimum for an axis that only"
+ "supports positive values and zero:" << min;
+ }
+ } else {
+ if (min <= 0.0f) {
+ min = 1.0f;
+ qWarning() << "Warning: Tried to set negative or zero minimum for an axis that only"
+ "supports positive values:" << min;
+ }
}
}
if (m_min != min) {
bool maxChanged = false;
- if (min > m_max || (!m_allowMinMaxSame && min == m_max)) {
+ if (min > m_max || (!allowMinMaxSame() && min == m_max)) {
float oldMax = m_max;
m_max = min + 1.0f;
qWarning() << "Warning: Tried to set minimum to equal or larger than maximum for"
@@ -368,22 +493,34 @@ void QAbstract3DAxisPrivate::setMin(float min)
void QAbstract3DAxisPrivate::setMax(float max)
{
- if (m_onlyPositiveValues) {
- if (max < 0.0f) {
- max = 0.0f;
- qWarning() << "Warning: Tried to set negative maximum for an axis that only supports"
- " positive values:" << max;
+ if (!allowNegatives()) {
+ if (allowZero()) {
+ if (max < 0.0f) {
+ max = 0.0f;
+ qWarning() << "Warning: Tried to set negative maximum for an axis that only"
+ "supports positive values and zero:" << max;
+ }
+ } else {
+ if (max <= 0.0f) {
+ max = 1.0f;
+ qWarning() << "Warning: Tried to set negative or zero maximum for an axis that only"
+ "supports positive values:" << max;
+ }
}
}
if (m_max != max) {
bool minChanged = false;
- if (m_min > max || (!m_allowMinMaxSame && m_min == max)) {
+ if (m_min > max || (!allowMinMaxSame() && m_min == max)) {
float oldMin = m_min;
m_min = max - 1.0f;
- if (m_onlyPositiveValues && m_min < 0.0f) {
- m_min = 0.0f;
- if (!m_allowMinMaxSame && max == 0.0f) {
+ if (!allowNegatives() && m_min < 0.0f) {
+ if (allowZero())
+ m_min = 0.0f;
+ else
+ m_min = max / 2.0f; // Need some positive value smaller than max
+
+ if (!allowMinMaxSame() && max == 0.0f) {
m_min = oldMin;
qWarning() << "Unable to set maximum value to zero.";
return;
diff --git a/src/datavisualization/axis/qabstract3daxis.h b/src/datavisualization/axis/qabstract3daxis.h
index 2b2be229..a9f75550 100644
--- a/src/datavisualization/axis/qabstract3daxis.h
+++ b/src/datavisualization/axis/qabstract3daxis.h
@@ -40,6 +40,9 @@ class QT_DATAVISUALIZATION_EXPORT QAbstract3DAxis : public QObject
Q_PROPERTY(float min READ min WRITE setMin NOTIFY minChanged)
Q_PROPERTY(float max READ max WRITE setMax NOTIFY maxChanged)
Q_PROPERTY(bool autoAdjustRange READ isAutoAdjustRange WRITE setAutoAdjustRange NOTIFY autoAdjustRangeChanged)
+ Q_PROPERTY(float labelAutoRotation READ labelAutoRotation WRITE setLabelAutoRotation NOTIFY labelAutoRotationChanged REVISION 1)
+ Q_PROPERTY(bool titleVisible READ isTitleVisible WRITE setTitleVisible NOTIFY titleVisibilityChanged REVISION 1)
+ Q_PROPERTY(bool titleFixed READ isTitleFixed WRITE setTitleFixed NOTIFY titleFixedChanged REVISION 1)
public:
enum AxisOrientation {
@@ -81,6 +84,15 @@ public:
void setRange(float min, float max);
+ void setLabelAutoRotation(float angle);
+ float labelAutoRotation() const;
+
+ void setTitleVisible(bool visible);
+ bool isTitleVisible() const;
+
+ void setTitleFixed(bool fixed);
+ bool isTitleFixed() const;
+
signals:
void titleChanged(const QString &newTitle);
void labelsChanged();
@@ -89,6 +101,9 @@ signals:
void maxChanged(float value);
void rangeChanged(float min, float max);
void autoAdjustRangeChanged(bool autoAdjust);
+ Q_REVISION(1) void labelAutoRotationChanged(float angle);
+ Q_REVISION(1) void titleVisibilityChanged(bool visible);
+ Q_REVISION(1) void titleFixedChanged(bool fixed);
protected:
QScopedPointer<QAbstract3DAxisPrivate> d_ptr;
diff --git a/src/datavisualization/axis/qabstract3daxis_p.h b/src/datavisualization/axis/qabstract3daxis_p.h
index 4eb8de68..7181362f 100644
--- a/src/datavisualization/axis/qabstract3daxis_p.h
+++ b/src/datavisualization/axis/qabstract3daxis_p.h
@@ -26,13 +26,12 @@
//
// We mean it.
-#include "datavisualizationglobal_p.h"
-#include "qabstract3daxis.h"
-#include "abstract3dcontroller_p.h"
-
#ifndef QABSTRACT3DAXIS_P_H
#define QABSTRACT3DAXIS_P_H
+#include "datavisualizationglobal_p.h"
+#include "qabstract3daxis.h"
+
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class QAbstract3DAxisPrivate : public QObject
@@ -47,12 +46,15 @@ public:
inline bool isDefaultAxis() { return m_isDefaultAxis; }
inline void setDefaultAxis(bool isDefault) { m_isDefaultAxis = isDefault; }
- virtual void setRange(float min, float max);
+ virtual void setRange(float min, float max, bool suppressWarnings = false);
virtual void setMin(float min);
virtual void setMax (float max);
protected:
virtual void updateLabels();
+ virtual bool allowZero() = 0;
+ virtual bool allowNegatives() = 0;
+ virtual bool allowMinMaxSame() = 0;
QAbstract3DAxis *q_ptr;
@@ -64,8 +66,9 @@ protected:
float m_min;
float m_max;
bool m_autoAdjust;
- bool m_onlyPositiveValues;
- bool m_allowMinMaxSame;
+ float m_labelAutoRotation;
+ bool m_titleVisible;
+ bool m_titleFixed;
friend class QAbstract3DAxis;
friend class QValue3DAxis;
diff --git a/src/datavisualization/axis/qcategory3daxis.cpp b/src/datavisualization/axis/qcategory3daxis.cpp
index c11a65eb..f2cd0a84 100644
--- a/src/datavisualization/axis/qcategory3daxis.cpp
+++ b/src/datavisualization/axis/qcategory3daxis.cpp
@@ -16,10 +16,8 @@
**
****************************************************************************/
-#include "qcategory3daxis.h"
#include "qcategory3daxis_p.h"
#include "bars3dcontroller_p.h"
-#include "qbardataproxy.h"
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -27,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QCategory3DAxis
* \inmodule QtDataVisualization
* \brief The QCategory3DAxis class is used for manipulating an axis of a graph.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* QCategory3DAxis provides an axis that can be given labels. The axis is divided into equal-sized
* categories based on the data window size defined by setting the axis range.
@@ -121,8 +119,6 @@ QCategory3DAxisPrivate::QCategory3DAxisPrivate(QCategory3DAxis *q)
: QAbstract3DAxisPrivate(q, QAbstract3DAxis::AxisTypeCategory),
m_labelsExplicitlySet(false)
{
- m_onlyPositiveValues = true;
- m_allowMinMaxSame = true;
}
QCategory3DAxisPrivate::~QCategory3DAxisPrivate()
@@ -142,6 +138,21 @@ void QCategory3DAxisPrivate::setDataLabels(const QStringList &labels)
}
}
+bool QCategory3DAxisPrivate::allowZero()
+{
+ return true;
+}
+
+bool QCategory3DAxisPrivate::allowNegatives()
+{
+ return false;
+}
+
+bool QCategory3DAxisPrivate::allowMinMaxSame()
+{
+ return true;
+}
+
QCategory3DAxis *QCategory3DAxisPrivate::qptr()
{
return static_cast<QCategory3DAxis *>(q_ptr);
diff --git a/src/datavisualization/axis/qcategory3daxis_p.h b/src/datavisualization/axis/qcategory3daxis_p.h
index 1ba5ccb0..27126620 100644
--- a/src/datavisualization/axis/qcategory3daxis_p.h
+++ b/src/datavisualization/axis/qcategory3daxis_p.h
@@ -26,13 +26,12 @@
//
// We mean it.
-#include "qcategory3daxis.h"
-#include "qabstract3daxis_p.h"
-#include "qbardataitem.h"
-
#ifndef QCATEGORY3DAXIS_P_H
#define QCATEGORY3DAXIS_P_H
+#include "qcategory3daxis.h"
+#include "qabstract3daxis_p.h"
+
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class QCategory3DAxisPrivate : public QAbstract3DAxisPrivate
@@ -45,6 +44,11 @@ public:
void setDataLabels(const QStringList &labels);
+protected:
+ virtual bool allowZero();
+ virtual bool allowNegatives();
+ virtual bool allowMinMaxSame();
+
private:
QCategory3DAxis *qptr();
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter.cpp b/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
new file mode 100644
index 00000000..7367e7c5
--- /dev/null
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
@@ -0,0 +1,432 @@
+/****************************************************************************
+**
+** 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 "qlogvalue3daxisformatter_p.h"
+#include "qvalue3daxis_p.h"
+#include <QtCore/qmath.h>
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+/*!
+ * \class QLogValue3DAxisFormatter
+ * \inmodule QtDataVisualization
+ * \brief QLogValue3DAxisFormatter implements logarithmic value axis formatter.
+ * \since QtDataVisualization 1.1
+ *
+ * This class provides formatting rules for a logarithmic QValue3DAxis.
+ *
+ * When a QLogValue3DAxisFormatter is attached to a QValue3DAxis, the axis range
+ * cannot include negative values or the zero.
+ *
+ * \sa QValue3DAxisFormatter
+ */
+
+/*!
+ * \qmltype LogValueAxis3DFormatter
+ * \inqmlmodule QtDataVisualization
+ * \since QtDataVisualization 1.1
+ * \ingroup datavisualization_qml
+ * \instantiates QLogValue3DAxisFormatter
+ * \brief LogValueAxis3DFormatter implements logarithmic value axis formatter.
+ *
+ * This type provides formatting rules for a logarithmic ValueAxis3D.
+ * When a LogValueAxis3DFormatter is attached to a ValueAxis3D, the axis range
+ * cannot include negative values or the zero.
+ */
+
+/*!
+ * \qmlproperty real LogValueAxis3DFormatter::base
+ *
+ * The \a base of the logarithm used to map axis values. If the base is non-zero, the parent axis
+ * segment count will be ignored when the grid line and label positions are calculated.
+ * If you want the range to be divided into equal segments like normal value axis, set this
+ * property value to zero.
+ *
+ * The \a base has to be zero or positive value and not equal to one.
+ * Defaults to ten.
+ *
+ * \sa ValueAxis3D::segmentCount
+ */
+
+/*!
+ * \qmlproperty bool LogValueAxis3DFormatter::autoSubGrid
+ *
+ * If this property value is set to \c true, the parent axis sub-segment count is ignored
+ * when calculating sub-grid line positions. The sub-grid positions are generated automatically
+ * according to the base property value.
+ * The number of sub-grid lines is set to base value minus one, rounded down.
+ * This property is ignored when base property value is zero.
+ * Defaults to \c true.
+ *
+ * \sa base, ValueAxis3D::subSegmentCount
+ */
+
+/*!
+ * \qmlproperty bool LogValueAxis3DFormatter::showEdgeLabels
+ *
+ * When the base property value is non-zero, the whole axis range is often not equally divided into
+ * segments. The first and last segments are often smaller than the other segments.
+ * In extreme cases this can lead to overlapping labels on the first and last two grid lines.
+ * By setting this property to \c false, you can suppress showing the minimum and maximum labels
+ * for the axis in cases where the segments do not exactly fit the axis.
+ * Defaults to \c true.
+ *
+ * \sa base, AbstractAxis3D::labels
+ */
+
+/*!
+ * \internal
+ */
+QLogValue3DAxisFormatter::QLogValue3DAxisFormatter(QLogValue3DAxisFormatterPrivate *d,
+ QObject *parent) :
+ QValue3DAxisFormatter(d, parent)
+{
+ setAllowNegatives(false);
+ setAllowZero(false);
+}
+
+/*!
+ * Constructs a new QLogValue3DAxisFormatter instance with optional \a parent.
+ */
+QLogValue3DAxisFormatter::QLogValue3DAxisFormatter(QObject *parent) :
+ QValue3DAxisFormatter(new QLogValue3DAxisFormatterPrivate(this), parent)
+{
+ setAllowNegatives(false);
+ setAllowZero(false);
+}
+
+/*!
+ * Destroys QLogValue3DAxisFormatter.
+ */
+QLogValue3DAxisFormatter::~QLogValue3DAxisFormatter()
+{
+}
+
+/*!
+ * \property QLogValue3DAxisFormatter::base
+ *
+ * The \a base of the logarithm used to map axis values. If the base is non-zero, the parent axis
+ * segment count will be ignored when the grid line and label positions are calculated.
+ * If you want the range to be divided into equal segments like normal value axis, set this
+ * property value to zero.
+ *
+ * The \a base has to be zero or positive value and not equal to one.
+ * Defaults to ten.
+ *
+ * \sa QValue3DAxis::segmentCount
+ */
+void QLogValue3DAxisFormatter::setBase(qreal base)
+{
+ if (base < 0.0f || base == 1.0f) {
+ qWarning() << "Warning: The logarithm base must be greater than 0 and not equal to 1,"
+ << "attempted:" << base;
+ return;
+ }
+ if (dptr()->m_base != base) {
+ dptr()->m_base = base;
+ markDirty(true);
+ emit baseChanged(base);
+ }
+}
+
+qreal QLogValue3DAxisFormatter::base() const
+{
+ return dptrc()->m_base;
+}
+
+/*!
+ * \property QLogValue3DAxisFormatter::autoSubGrid
+ *
+ * If this property value is set to \c true, the parent axis sub-segment count is ignored
+ * when calculating sub-grid line positions. The sub-grid positions are generated automatically
+ * according to the base property value.
+ * The number of sub-grid lines is set to base value minus one, rounded down.
+ * This property is ignored when base property value is zero.
+ * Defaults to \c true.
+ *
+ * \sa base, QValue3DAxis::subSegmentCount
+ */
+void QLogValue3DAxisFormatter::setAutoSubGrid(bool enabled)
+{
+ if (dptr()->m_autoSubGrid != enabled) {
+ dptr()->m_autoSubGrid = enabled;
+ markDirty(false);
+ emit autoSubGridChanged(enabled);
+ }
+}
+
+bool QLogValue3DAxisFormatter::autoSubGrid() const
+{
+ return dptrc()->m_autoSubGrid;
+}
+
+/*!
+ * \property QLogValue3DAxisFormatter::showEdgeLabels
+ *
+ * When the base property value is non-zero, the whole axis range is often not equally divided into
+ * segments. The first and last segments are often smaller than the other segments.
+ * In extreme cases this can lead to overlapping labels on the first and last two grid lines.
+ * By setting this property to \c false, you can suppress showing the minimum and maximum labels
+ * for the axis in cases where the segments do not exactly fit the axis.
+ * Defaults to \c true.
+ *
+ * \sa base, QAbstract3DAxis::labels
+ */
+void QLogValue3DAxisFormatter::setShowEdgeLabels(bool enabled)
+{
+ if (dptr()->m_showEdgeLabels != enabled) {
+ dptr()->m_showEdgeLabels = enabled;
+ markDirty(true);
+ emit showEdgeLabelsChanged(enabled);
+ }
+}
+
+bool QLogValue3DAxisFormatter::showEdgeLabels() const
+{
+ return dptrc()->m_showEdgeLabels;
+}
+
+/*!
+ * \internal
+ */
+QValue3DAxisFormatter *QLogValue3DAxisFormatter::createNewInstance() const
+{
+ return new QLogValue3DAxisFormatter();
+}
+
+/*!
+ * \internal
+ */
+void QLogValue3DAxisFormatter::recalculate()
+{
+ dptr()->recalculate();
+}
+
+/*!
+ * \internal
+ */
+float QLogValue3DAxisFormatter::positionAt(float value) const
+{
+ return dptrc()->positionAt(value);
+}
+
+/*!
+ * \internal
+ */
+float QLogValue3DAxisFormatter::valueAt(float position) const
+{
+ return dptrc()->valueAt(position);
+}
+
+/*!
+ * \internal
+ */
+void QLogValue3DAxisFormatter::populateCopy(QValue3DAxisFormatter &copy) const
+{
+ QValue3DAxisFormatter::populateCopy(copy);
+ dptrc()->populateCopy(copy);
+}
+
+/*!
+ * \internal
+ */
+QLogValue3DAxisFormatterPrivate *QLogValue3DAxisFormatter::dptr()
+{
+ return static_cast<QLogValue3DAxisFormatterPrivate *>(d_ptr.data());
+}
+
+/*!
+ * \internal
+ */
+const QLogValue3DAxisFormatterPrivate *QLogValue3DAxisFormatter::dptrc() const
+{
+ return static_cast<const QLogValue3DAxisFormatterPrivate *>(d_ptr.data());
+}
+
+// QLogValue3DAxisFormatterPrivate
+QLogValue3DAxisFormatterPrivate::QLogValue3DAxisFormatterPrivate(QLogValue3DAxisFormatter *q)
+ : QValue3DAxisFormatterPrivate(q),
+ m_base(10.0),
+ m_logMin(0.0),
+ m_logMax(0.0),
+ m_logRangeNormalizer(0.0),
+ m_autoSubGrid(true),
+ m_showEdgeLabels(true),
+ m_evenMinSegment(true),
+ m_evenMaxSegment(true)
+{
+}
+
+QLogValue3DAxisFormatterPrivate::~QLogValue3DAxisFormatterPrivate()
+{
+}
+
+void QLogValue3DAxisFormatterPrivate::recalculate()
+{
+ // When doing position/value mappings, base doesn't matter, so just use natural logarithm
+ m_logMin = qLn(qreal(m_min));
+ m_logMax = qLn(qreal(m_max));
+ m_logRangeNormalizer = m_logMax - m_logMin;
+
+ int subGridCount = m_axis->subSegmentCount() - 1;
+ int segmentCount = m_axis->segmentCount();
+ QString labelFormat = m_axis->labelFormat();
+ qreal segmentStep;
+ if (m_base > 0.0) {
+ // Update parent axis segment counts
+ qreal logMin = qLn(qreal(m_min)) / qLn(m_base);
+ qreal logMax = qLn(qreal(m_max)) / qLn(m_base);
+ qreal logRangeNormalizer = logMax - logMin;
+
+ qreal minDiff = qCeil(logMin) - logMin;
+ qreal maxDiff = logMax - qFloor(logMax);
+
+ m_evenMinSegment = qFuzzyCompare(0.0, minDiff);
+ m_evenMaxSegment = qFuzzyCompare(0.0, maxDiff);
+
+ segmentCount = qRound(logRangeNormalizer - minDiff - maxDiff);
+
+ if (!m_evenMinSegment)
+ segmentCount++;
+ if (!m_evenMaxSegment)
+ segmentCount++;
+
+ segmentStep = 1.0 / logRangeNormalizer;
+
+ if (m_autoSubGrid) {
+ subGridCount = qCeil(m_base) - 2; // -2 for subgrid because subsegment count is base - 1
+ if (subGridCount < 0)
+ subGridCount = 0;
+ }
+
+ m_gridPositions.resize(segmentCount + 1);
+ m_subGridPositions.resize(segmentCount * subGridCount);
+ m_labelPositions.resize(segmentCount + 1);
+ m_labelStrings.clear();
+ m_labelStrings.reserve(segmentCount + 1);
+
+ // Calculate segment positions
+ int index = 0;
+ if (!m_evenMinSegment) {
+ m_gridPositions[0] = 0.0f;
+ m_labelPositions[0] = 0.0f;
+ if (m_showEdgeLabels)
+ m_labelStrings << qptr()->stringForValue(qreal(m_min), labelFormat);
+ else
+ m_labelStrings << QString();
+ index++;
+ }
+ for (int i = 0; i < segmentCount; i++) {
+ float gridValue = float((minDiff + qreal(i)) / qreal(logRangeNormalizer));
+ m_gridPositions[index] = gridValue;
+ m_labelPositions[index] = gridValue;
+ m_labelStrings << qptr()->stringForValue(qPow(m_base, minDiff + qreal(i) + logMin),
+ labelFormat);
+ index++;
+ }
+ // Ensure max value doesn't suffer from any rounding errors
+ m_gridPositions[segmentCount] = 1.0f;
+ m_labelPositions[segmentCount] = 1.0f;
+ QString finalLabel;
+ if (m_showEdgeLabels || m_evenMaxSegment)
+ finalLabel = qptr()->stringForValue(qreal(m_max), labelFormat);
+
+ if (m_labelStrings.size() > segmentCount)
+ m_labelStrings.replace(segmentCount, finalLabel);
+ else
+ m_labelStrings << finalLabel;
+ } else {
+ // Grid lines and label positions are the same as the parent class, so call parent impl
+ // first to populate those
+ QValue3DAxisFormatterPrivate::doRecalculate();
+
+ // Label string list needs to be repopulated
+ segmentStep = 1.0 / qreal(segmentCount);
+
+ m_labelStrings << qptr()->stringForValue(qreal(m_min), labelFormat);
+ for (int i = 1; i < m_labelPositions.size() - 1; i++)
+ m_labelStrings[i] = qptr()->stringForValue(qExp(segmentStep * qreal(i)
+ * m_logRangeNormalizer + m_logMin),
+ labelFormat);
+ m_labelStrings << qptr()->stringForValue(qreal(m_max), labelFormat);
+
+ m_evenMaxSegment = true;
+ m_evenMinSegment = true;
+ }
+
+ // Subgrid line positions are logarithmically spaced
+ if (subGridCount > 0) {
+ float oneSegmentRange = valueAt(float(segmentStep)) - m_min;
+ float subSegmentStep = oneSegmentRange / float(subGridCount + 1);
+
+ // Since the logarithm has the same curvature across whole axis range, we can just calculate
+ // subgrid positions for the first segment and replicate them to other segments.
+ QVector<float> actualSubSegmentSteps(subGridCount);
+
+ for (int i = 0; i < subGridCount; i++) {
+ float currentSubPosition = positionAt(m_min + ((i + 1) * subSegmentStep));
+ actualSubSegmentSteps[i] = currentSubPosition;
+ }
+
+ float firstPartialSegmentAdjustment = float(segmentStep) - m_gridPositions.at(1);
+ for (int i = 0; i < segmentCount; i++) {
+ for (int j = 0; j < subGridCount; j++) {
+ float position = m_gridPositions.at(i) + actualSubSegmentSteps.at(j);
+ if (!m_evenMinSegment && i == 0)
+ position -= firstPartialSegmentAdjustment;
+ if (position > 1.0f)
+ position = 1.0f;
+ if (position < 0.0f)
+ position = 0.0f;
+ m_subGridPositions[i * subGridCount + j] = position;
+ }
+ }
+ }
+}
+
+void QLogValue3DAxisFormatterPrivate::populateCopy(QValue3DAxisFormatter &copy) const
+{
+ QLogValue3DAxisFormatter *logFormatter = static_cast<QLogValue3DAxisFormatter *>(&copy);
+ QLogValue3DAxisFormatterPrivate *priv = logFormatter->dptr();
+
+ priv->m_base = m_base;
+ priv->m_logMin = m_logMin;
+ priv->m_logMax = m_logMax;
+ priv->m_logRangeNormalizer = m_logRangeNormalizer;
+}
+
+float QLogValue3DAxisFormatterPrivate::positionAt(float value) const
+{
+ qreal logValue = qLn(qreal(value));
+ float retval = float((logValue - m_logMin) / m_logRangeNormalizer);
+
+ return retval;
+}
+
+float QLogValue3DAxisFormatterPrivate::valueAt(float position) const
+{
+ qreal logValue = (qreal(position) * m_logRangeNormalizer) + m_logMin;
+ return float(qExp(logValue));
+}
+
+QLogValue3DAxisFormatter *QLogValue3DAxisFormatterPrivate::qptr()
+{
+ return static_cast<QLogValue3DAxisFormatter *>(q_ptr);
+}
+
+QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter.h b/src/datavisualization/axis/qlogvalue3daxisformatter.h
new file mode 100644
index 00000000..62714a7d
--- /dev/null
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter.h
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** 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 QLOGVALUE3DAXISFORMATTER_H
+#define QLOGVALUE3DAXISFORMATTER_H
+
+#include <QtDataVisualization/qvalue3daxisformatter.h>
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QLogValue3DAxisFormatterPrivate;
+
+class QT_DATAVISUALIZATION_EXPORT QLogValue3DAxisFormatter : public QValue3DAxisFormatter
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal base READ base WRITE setBase NOTIFY baseChanged)
+ Q_PROPERTY(bool autoSubGrid READ autoSubGrid WRITE setAutoSubGrid NOTIFY autoSubGridChanged)
+ Q_PROPERTY(bool showEdgeLabels READ showEdgeLabels WRITE setShowEdgeLabels NOTIFY showEdgeLabelsChanged)
+
+protected:
+ explicit QLogValue3DAxisFormatter(QLogValue3DAxisFormatterPrivate *d, QObject *parent = 0);
+public:
+ explicit QLogValue3DAxisFormatter(QObject *parent = 0);
+ virtual ~QLogValue3DAxisFormatter();
+
+ void setBase(qreal base);
+ qreal base() const;
+ void setAutoSubGrid(bool enabled);
+ bool autoSubGrid() const;
+ void setShowEdgeLabels(bool enabled);
+ bool showEdgeLabels() const;
+
+signals:
+ void baseChanged(qreal base);
+ void autoSubGridChanged(bool enabled);
+ void showEdgeLabelsChanged(bool enabled);
+
+protected:
+ virtual QValue3DAxisFormatter *createNewInstance() const;
+ virtual void recalculate();
+ virtual float positionAt(float value) const;
+ virtual float valueAt(float position) const;
+ virtual void populateCopy(QValue3DAxisFormatter &copy) const;
+
+ QLogValue3DAxisFormatterPrivate *dptr();
+ const QLogValue3DAxisFormatterPrivate *dptrc() const;
+
+private:
+ Q_DISABLE_COPY(QLogValue3DAxisFormatter)
+
+ friend class QLogValue3DAxisFormatterPrivate;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter_p.h b/src/datavisualization/axis/qlogvalue3daxisformatter_p.h
new file mode 100644
index 00000000..df2d41d1
--- /dev/null
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter_p.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QtDataVisualization API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef QLOGVALUE3DAXISFORMATTER_P_H
+#define QLOGVALUE3DAXISFORMATTER_P_H
+
+#include "datavisualizationglobal_p.h"
+#include "qlogvalue3daxisformatter.h"
+#include "qvalue3daxisformatter_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QLogValue3DAxisFormatterPrivate : public QValue3DAxisFormatterPrivate
+{
+ Q_OBJECT
+
+public:
+ QLogValue3DAxisFormatterPrivate(QLogValue3DAxisFormatter *q);
+ virtual ~QLogValue3DAxisFormatterPrivate();
+
+ void recalculate();
+ void populateCopy(QValue3DAxisFormatter &copy) const;
+
+ float positionAt(float value) const;
+ float valueAt(float position) const;
+
+protected:
+ QLogValue3DAxisFormatter *qptr();
+
+ qreal m_base;
+ qreal m_logMin;
+ qreal m_logMax;
+ qreal m_logRangeNormalizer;
+ bool m_autoSubGrid;
+ bool m_showEdgeLabels;
+
+private:
+ bool m_evenMinSegment;
+ bool m_evenMaxSegment;
+
+ friend class QLogValue3DAxisFormatter;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/axis/qvalue3daxis.cpp b/src/datavisualization/axis/qvalue3daxis.cpp
index 0d53291d..8207174f 100644
--- a/src/datavisualization/axis/qvalue3daxis.cpp
+++ b/src/datavisualization/axis/qvalue3daxis.cpp
@@ -16,9 +16,8 @@
**
****************************************************************************/
-#include "qvalue3daxis.h"
#include "qvalue3daxis_p.h"
-#include "utils_p.h"
+#include "qvalue3daxisformatter_p.h"
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -26,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QValue3DAxis
* \inmodule QtDataVisualization
* \brief The QValue3DAxis class is used for manipulating an axis of a graph.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* QValue3DAxis provides an axis that can be given a range of values and segment and subsegment
* counts to divide the range into.
@@ -74,11 +73,30 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
+ * \qmlproperty ValueAxis3DFormatter ValueAxis3D::formatter
+ * \since QtDataVisualization 1.1
+ *
+ * Defines the axis \a formatter to be used. Any existing formatter is deleted when a new formatter
+ * is set.
+ *
+ */
+
+/*!
+ * \qmlproperty bool ValueAxis3D::reversed
+ * \since QtDataVisualization 1.1
+ *
+ * If \c{true}, the axis will be rendered in reverse, i.e. the positions of minimum and maximum
+ * values are swapped when the graph is rendered. This property doesn't affect the actual
+ * minimum and maximum values of the axis.
+ */
+
+/*!
* Constructs QValue3DAxis with the given \a parent.
*/
QValue3DAxis::QValue3DAxis(QObject *parent) :
QAbstract3DAxis(new QValue3DAxisPrivate(this), parent)
{
+ setFormatter(new QValue3DAxisFormatter);
}
/*!
@@ -88,7 +106,6 @@ QValue3DAxis::~QValue3DAxis()
{
}
-
/*!
* \property QValue3DAxis::segmentCount
*
@@ -105,7 +122,7 @@ void QValue3DAxis::setSegmentCount(int count)
<< count << "-> 1";
count = 1;
}
- if (dptr()->m_segmentCount != count){
+ if (dptr()->m_segmentCount != count) {
dptr()->m_segmentCount = count;
dptr()->emitLabelsChanged();
emit segmentCountChanged(count);
@@ -169,6 +186,53 @@ QString QValue3DAxis::labelFormat() const
}
/*!
+ * \property QValue3DAxis::formatter
+ * \since QtDataVisualization 1.1
+ *
+ * Defines the axis \a formatter to be used. Any existing formatter is deleted when a new formatter
+ * is set.
+ */
+void QValue3DAxis::setFormatter(QValue3DAxisFormatter *formatter)
+{
+ Q_ASSERT(formatter);
+
+ if (formatter != dptr()->m_formatter) {
+ delete dptr()->m_formatter;
+ dptr()->m_formatter = formatter;
+ formatter->setParent(this);
+ formatter->d_ptr->setAxis(this);
+ emit formatterChanged(formatter);
+ emit dptr()->formatterDirty();
+ }
+}
+
+QValue3DAxisFormatter *QValue3DAxis::formatter() const
+{
+ return dptrc()->m_formatter;
+}
+
+/*!
+ * \property QValue3DAxis::reversed
+ * \since QtDataVisualization 1.1
+ *
+ * If \c{true}, the axis will be rendered in reverse, i.e. the positions of minimum and maximum
+ * values are swapped when the graph is rendered. This property doesn't affect the actual
+ * minimum and maximum values of the axis.
+ */
+void QValue3DAxis::setReversed(bool enable)
+{
+ if (dptr()->m_reversed != enable) {
+ dptr()->m_reversed = enable;
+ emit reversedChanged(enable);
+ }
+}
+
+bool QValue3DAxis::reversed() const
+{
+ return dptrc()->m_reversed;
+}
+
+/*!
* \internal
*/
QValue3DAxisPrivate *QValue3DAxis::dptr()
@@ -189,7 +253,9 @@ QValue3DAxisPrivate::QValue3DAxisPrivate(QValue3DAxis *q)
m_segmentCount(5),
m_subSegmentCount(1),
m_labelFormat(Utils::defaultLabelFormat()),
- m_labelsDirty(true)
+ m_labelsDirty(true),
+ m_formatter(0),
+ m_reversed(false)
{
}
@@ -197,11 +263,11 @@ QValue3DAxisPrivate::~QValue3DAxisPrivate()
{
}
-void QValue3DAxisPrivate::setRange(float min, float max)
+void QValue3DAxisPrivate::setRange(float min, float max, bool suppressWarnings)
{
bool dirty = (min != m_min || max != m_max);
- QAbstract3DAxisPrivate::setRange(min, max);
+ QAbstract3DAxisPrivate::setRange(min, max, suppressWarnings);
if (dirty)
emitLabelsChanged();
@@ -240,26 +306,24 @@ void QValue3DAxisPrivate::updateLabels()
m_labelsDirty = false;
- QStringList newLabels;
- newLabels.reserve(m_segmentCount + 1);
-
- // First label is at axis min, which is an extra segment
- float segmentStep = (m_max - m_min) / m_segmentCount;
+ m_formatter->d_ptr->recalculate();
- QString formatString(m_labelFormat);
- Utils::ParamType paramType = Utils::findFormatParamType(formatString);
- QByteArray formatArray = formatString.toUtf8();
+ m_labels = m_formatter->labelStrings();
+}
- for (int i = 0; i < m_segmentCount; i++) {
- float value = m_min + (segmentStep * i);
- newLabels.append(Utils::formatLabel(formatArray, paramType, value));
- }
+bool QValue3DAxisPrivate::allowZero()
+{
+ return m_formatter->allowZero();
+}
- // Ensure max label doesn't suffer from any rounding errors
- newLabels.append(Utils::formatLabel(formatArray, paramType, m_max));
+bool QValue3DAxisPrivate::allowNegatives()
+{
+ return m_formatter->allowNegatives();
+}
- if (m_labels != newLabels)
- m_labels = newLabels;
+bool QValue3DAxisPrivate::allowMinMaxSame()
+{
+ return false;
}
QValue3DAxis *QValue3DAxisPrivate::qptr()
diff --git a/src/datavisualization/axis/qvalue3daxis.h b/src/datavisualization/axis/qvalue3daxis.h
index f0af759b..f552269c 100644
--- a/src/datavisualization/axis/qvalue3daxis.h
+++ b/src/datavisualization/axis/qvalue3daxis.h
@@ -20,6 +20,7 @@
#define QVALUE3DAXIS_H
#include <QtDataVisualization/qabstract3daxis.h>
+#include <QtDataVisualization/qvalue3daxisformatter.h>
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -31,6 +32,8 @@ class QT_DATAVISUALIZATION_EXPORT QValue3DAxis : public QAbstract3DAxis
Q_PROPERTY(int segmentCount READ segmentCount WRITE setSegmentCount NOTIFY segmentCountChanged)
Q_PROPERTY(int subSegmentCount READ subSegmentCount WRITE setSubSegmentCount NOTIFY subSegmentCountChanged)
Q_PROPERTY(QString labelFormat READ labelFormat WRITE setLabelFormat NOTIFY labelFormatChanged)
+ Q_PROPERTY(QValue3DAxisFormatter* formatter READ formatter WRITE setFormatter NOTIFY formatterChanged REVISION 1)
+ Q_PROPERTY(bool reversed READ reversed WRITE setReversed NOTIFY reversedChanged REVISION 1)
public:
explicit QValue3DAxis(QObject *parent = 0);
@@ -45,10 +48,18 @@ public:
void setLabelFormat(const QString &format);
QString labelFormat() const;
+ void setFormatter(QValue3DAxisFormatter *formatter);
+ QValue3DAxisFormatter *formatter() const;
+
+ void setReversed(bool enable);
+ bool reversed() const;
+
signals:
void segmentCountChanged(int count);
void subSegmentCountChanged(int count);
void labelFormatChanged(const QString &format);
+ Q_REVISION(1) void formatterChanged(QValue3DAxisFormatter *formatter);
+ Q_REVISION(1) void reversedChanged(bool enable);
protected:
QValue3DAxisPrivate *dptr();
@@ -56,9 +67,11 @@ protected:
private:
Q_DISABLE_COPY(QValue3DAxis)
+ friend class Abstract3DController;
friend class Bars3DController;
friend class Scatter3DController;
friend class Surface3DController;
+ friend class QValue3DAxisFormatterPrivate;
};
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/axis/qvalue3daxis_p.h b/src/datavisualization/axis/qvalue3daxis_p.h
index 21fd78ab..b7394c0a 100644
--- a/src/datavisualization/axis/qvalue3daxis_p.h
+++ b/src/datavisualization/axis/qvalue3daxis_p.h
@@ -26,12 +26,12 @@
//
// We mean it.
-#include "qvalue3daxis.h"
-#include "qabstract3daxis_p.h"
-
#ifndef QVALUE3DAXIS_P_H
#define QVALUE3DAXIS_P_H
+#include "qvalue3daxis.h"
+#include "qabstract3daxis_p.h"
+
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class QValue3DAxisPrivate : public QAbstract3DAxisPrivate
@@ -42,23 +42,34 @@ public:
QValue3DAxisPrivate(QValue3DAxis *q);
virtual ~QValue3DAxisPrivate();
- virtual void setRange(float min, float max);
+ virtual void setRange(float min, float max, bool suppressWarnings = false);
virtual void setMin(float min);
virtual void setMax (float max);
-protected:
void emitLabelsChanged();
+
+signals:
+ void formatterDirty();
+
+protected:
virtual void updateLabels();
+ virtual bool allowZero();
+ virtual bool allowNegatives();
+ virtual bool allowMinMaxSame();
+
int m_segmentCount;
int m_subSegmentCount;
QString m_labelFormat;
bool m_labelsDirty;
+ QValue3DAxisFormatter *m_formatter;
+ bool m_reversed;
private:
QValue3DAxis *qptr();
friend class QValue3DAxis;
+ friend class Abstract3DController;
};
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/axis/qvalue3daxisformatter.cpp b/src/datavisualization/axis/qvalue3daxisformatter.cpp
new file mode 100644
index 00000000..56ca3b0f
--- /dev/null
+++ b/src/datavisualization/axis/qvalue3daxisformatter.cpp
@@ -0,0 +1,419 @@
+/****************************************************************************
+**
+** 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 "qvalue3daxisformatter_p.h"
+#include "qvalue3daxis_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+/*!
+ * \class QValue3DAxisFormatter
+ * \inmodule QtDataVisualization
+ * \brief QValue3DAxisFormatter is base class for value axis formatters.
+ * \since QtDataVisualization 1.1
+ *
+ * This class provides formatting rules for a linear QValue3DAxis. Subclass it if you
+ * want to implement custom value axes.
+ *
+ * The base class has no public API beyond constructors and destructors. It is meant to be only
+ * used internally. However, subclasses may implement public properties as needed.
+ *
+ * \sa QLogValue3DAxisFormatter
+ */
+
+/*!
+ * \qmltype ValueAxis3DFormatter
+ * \inqmlmodule QtDataVisualization
+ * \since QtDataVisualization 1.1
+ * \ingroup datavisualization_qml
+ * \instantiates QValue3DAxisFormatter
+ * \brief ValueAxis3DFormatter is base type for value axis formatters.
+ *
+ * This type provides formatting rules for a linear ValueAxis3D.
+ * This type is the default type for ValueAxis3D and thus never needs to be explicitly created.
+ * This type has not public functionality.
+ */
+
+/*!
+ * \internal
+ */
+QValue3DAxisFormatter::QValue3DAxisFormatter(QValue3DAxisFormatterPrivate *d, QObject *parent) :
+ QObject(parent),
+ d_ptr(d)
+{
+}
+
+/*!
+ * Constructs a new QValue3DAxisFormatter instance with an optional \a parent.
+ */
+QValue3DAxisFormatter::QValue3DAxisFormatter(QObject *parent) :
+ QObject(parent),
+ d_ptr(new QValue3DAxisFormatterPrivate(this))
+{
+}
+
+/*!
+ * Destroys QValue3DAxisFormatter.
+ */
+QValue3DAxisFormatter::~QValue3DAxisFormatter()
+{
+}
+
+/*!
+ * Allow the parent axis to have negative values if \a allow is true.
+ */
+void QValue3DAxisFormatter::setAllowNegatives(bool allow)
+{
+ d_ptr->m_allowNegatives = allow;
+}
+
+/*!
+ * \return \c true if negative values are valid values for parent axis.
+ * The default implementation always returns true.
+ */
+bool QValue3DAxisFormatter::allowNegatives() const
+{
+ return d_ptr->m_allowNegatives;
+}
+
+/*!
+ * Allow the parent axis to have zero value if \a allow is true.
+ */
+void QValue3DAxisFormatter::setAllowZero(bool allow)
+{
+ d_ptr->m_allowZero = allow;
+}
+
+/*!
+ * \return \c true if zero is a valid value for parent axis.
+ * The default implementation always returns true.
+ */
+bool QValue3DAxisFormatter::allowZero() const
+{
+ return d_ptr->m_allowZero;
+}
+
+/*!
+ * Creates a new empty instance of this formatter. Must be reimplemented in a subclass.
+ *
+ * \return the new instance. The renderer uses this method to cache a copy of the
+ * the formatter. The ownership of the new copy transfers to the caller.
+ */
+QValue3DAxisFormatter *QValue3DAxisFormatter::createNewInstance() const
+{
+ return new QValue3DAxisFormatter();
+}
+
+/*!
+ * This method resizes and populates the label and grid line position arrays and the label strings
+ * array, as well as calculates any values needed for mapping between value and position.
+ * It is allowed to access the parent axis from inside this function.
+ *
+ * This method must be reimplemented in a subclass if the default array contents are not suitable.
+ *
+ * See gridPositions(), subGridPositions(), labelPositions(), and labelStrings() methods for
+ * documentation about the arrays that need to be resized and populated.
+ *
+ * \sa gridPositions(), subGridPositions(), labelPositions(), labelStrings(), axis()
+ */
+void QValue3DAxisFormatter::recalculate()
+{
+ d_ptr->doRecalculate();
+}
+
+/*!
+ * This method is used to format a string using the specified value and the specified format.
+ * Reimplement this method in a subclass to resolve the formatted string for a given \a value
+ * if the default formatting rules specified for QValue3DAxis::labelFormat property are not
+ * sufficient.
+ *
+ * \return the formatted label string using a \a value and a \a format.
+ *
+ * \sa recalculate(), labelStrings(), QValue3DAxis::labelFormat
+ */
+QString QValue3DAxisFormatter::stringForValue(qreal value, const QString &format) const
+{
+ return d_ptr->stringForValue(value, format);
+}
+
+/*!
+ * Reimplement this method if the position cannot be resolved by linear interpolation
+ * between the parent axis minimum and maximum values.
+ *
+ * \return the normalized position along the axis for the given \a value.
+ * The returned value should be between 0.0 (for minimum value) and 1.0 (for maximum value),
+ * inclusive, if the value is within the parent axis range.
+ *
+ * \sa recalculate(), valueAt()
+ */
+float QValue3DAxisFormatter::positionAt(float value) const
+{
+ return d_ptr->positionAt(value);
+}
+
+/*!
+ * Reimplement this method if the value cannot be resolved by linear interpolation
+ * between the parent axis minimum and maximum values.
+ *
+ * \return the value at the normalized \a position along the axis.
+ * The \a position value should be between 0.0 (for minimum value) and 1.0 (for maximum value),
+ * inclusive to obtain values within the parent axis range.
+ *
+ * \sa recalculate(), positionAt()
+ */
+float QValue3DAxisFormatter::valueAt(float position) const
+{
+ return d_ptr->valueAt(position);
+}
+
+/*!
+ * Copies all necessary values for resolving positions, values, and strings with this formatter
+ * from this formatter to the \a copy.
+ * When reimplementing this method in a subclass, call the the superclass version at some point.
+ * The renderer uses this method to cache a copy of the the formatter.
+ *
+ * \return the new copy. The ownership of the new copy transfers to the caller.
+ */
+void QValue3DAxisFormatter::populateCopy(QValue3DAxisFormatter &copy) const
+{
+ d_ptr->doPopulateCopy(*(copy.d_ptr.data()));
+}
+
+/*!
+ * Marks this formatter dirty, prompting the renderer to make a new copy of its cache on the next
+ * renderer synchronization. This method should be called by a subclass whenever the formatter
+ * is changed in a way that affects the resolved values. Specify \c true for \a labelsChange
+ * parameter if the change was such that it requires regenerating the parent axis label strings.
+ */
+void QValue3DAxisFormatter::markDirty(bool labelsChange)
+{
+ d_ptr->markDirty(labelsChange);
+}
+
+/*!
+ * \return the parent axis. The parent axis must only be accessed in recalculate()
+ * method to maintain thread safety in environments using a threaded renderer.
+ *
+ * \sa recalculate()
+ */
+QValue3DAxis *QValue3DAxisFormatter::axis() const
+{
+ return d_ptr->m_axis;
+}
+
+/*!
+ * \return a reference to the array of normalized grid line positions.
+ * The default array size is equal to the segment count of the parent axis plus one, but
+ * a subclassed implementation of recalculate method may resize the array differently.
+ * The values should be between 0.0 (for minimum value) and 1.0 (for maximum value), inclusive.
+ *
+ * \sa QValue3DAxis::segmentCount, recalculate()
+ */
+QVector<float> &QValue3DAxisFormatter::gridPositions() const
+{
+ return d_ptr->m_gridPositions;
+}
+
+/*!
+ * \return a reference to the array of normalized subgrid line positions.
+ * The default array size is equal to segment count of the parent axis times sub-segment count
+ * of the parent axis minus one, but a subclassed implementation of recalculate method may resize
+ * the array differently.
+ * The values should be between 0.0 (for minimum value) and 1.0 (for maximum value), inclusive.
+ *
+ * \sa QValue3DAxis::segmentCount, QValue3DAxis::subSegmentCount, recalculate()
+ */
+QVector<float> &QValue3DAxisFormatter::subGridPositions() const
+{
+ return d_ptr->m_subGridPositions;
+}
+
+/*!
+ * \return a reference to the array of normalized label positions.
+ * The default array size is equal to the segment count of the parent axis plus one, but
+ * a subclassed implementation of recalculate method may resize the array differently.
+ * The values should be between 0.0 (for minimum value) and 1.0 (for maximum value), inclusive.
+ * The default behavior is that the label at the index zero corresponds to the minimum value
+ * of the axis.
+ *
+ * \sa QValue3DAxis::segmentCount, QAbstract3DAxis::labels, recalculate()
+ */
+QVector<float> &QValue3DAxisFormatter::labelPositions() const
+{
+ return d_ptr->m_labelPositions;
+}
+
+/*!
+ * \return a reference to the string list containing formatter label strings.
+ * The array size must be equal to the size of the label positions array and
+ * the indexes correspond to that array as well.
+ *
+ * \sa labelPositions()
+ */
+QStringList &QValue3DAxisFormatter::labelStrings() const
+{
+ return d_ptr->m_labelStrings;
+}
+
+// QValue3DAxisFormatterPrivate
+QValue3DAxisFormatterPrivate::QValue3DAxisFormatterPrivate(QValue3DAxisFormatter *q)
+ : QObject(0),
+ q_ptr(q),
+ m_needsRecalculate(true),
+ m_min(0.0f),
+ m_max(0.0f),
+ m_rangeNormalizer(0.0f),
+ m_axis(0),
+ m_preparsedParamType(Utils::ParamTypeUnknown),
+ m_allowNegatives(true),
+ m_allowZero(true)
+{
+}
+
+QValue3DAxisFormatterPrivate::~QValue3DAxisFormatterPrivate()
+{
+}
+
+void QValue3DAxisFormatterPrivate::recalculate()
+{
+ // Only recalculate if we need to and have m_axis pointer. If we do not have
+ // m_axis, either we are not attached to an axis or this is a renderer cache.
+ if (m_axis && m_needsRecalculate) {
+ m_min = m_axis->min();
+ m_max = m_axis->max();
+ m_rangeNormalizer = (m_max - m_min);
+
+ q_ptr->recalculate();
+ m_needsRecalculate = false;
+ }
+}
+
+void QValue3DAxisFormatterPrivate::doRecalculate()
+{
+ int segmentCount = m_axis->segmentCount();
+ int subGridCount = m_axis->subSegmentCount() - 1;
+ QString labelFormat = m_axis->labelFormat();
+
+ m_gridPositions.resize(segmentCount + 1);
+ m_subGridPositions.resize(segmentCount * subGridCount);
+
+ m_labelPositions.resize(segmentCount + 1);
+ m_labelStrings.clear();
+ m_labelStrings.reserve(segmentCount + 1);
+
+ // Use qreals for intermediate calculations for better accuracy on label values
+ qreal segmentStep = 1.0 / qreal(segmentCount);
+ qreal subSegmentStep = 0;
+ if (subGridCount > 0)
+ subSegmentStep = segmentStep / qreal(subGridCount + 1);
+
+ // Calculate positions
+ qreal rangeNormalizer = qreal(m_max - m_min);
+ for (int i = 0; i < segmentCount; i++) {
+ qreal gridValue = segmentStep * qreal(i);
+ m_gridPositions[i] = float(gridValue);
+ m_labelPositions[i] = float(gridValue);
+ m_labelStrings << q_ptr->stringForValue(gridValue * rangeNormalizer + qreal(m_min),
+ labelFormat);
+ if (m_subGridPositions.size()) {
+ for (int j = 0; j < subGridCount; j++)
+ m_subGridPositions[i * subGridCount + j] = gridValue + subSegmentStep * (j + 1);
+ }
+ }
+
+ // Ensure max value doesn't suffer from any rounding errors
+ m_gridPositions[segmentCount] = 1.0f;
+ m_labelPositions[segmentCount] = 1.0f;
+ m_labelStrings << q_ptr->stringForValue(qreal(m_max), labelFormat);
+}
+
+void QValue3DAxisFormatterPrivate::populateCopy(QValue3DAxisFormatter &copy)
+{
+ recalculate();
+ q_ptr->populateCopy(copy);
+}
+
+void QValue3DAxisFormatterPrivate::doPopulateCopy(QValue3DAxisFormatterPrivate &copy)
+{
+ copy.m_min = m_min;
+ copy.m_max = m_max;
+ copy.m_rangeNormalizer = m_rangeNormalizer;
+
+ copy.m_gridPositions = m_gridPositions;
+ copy.m_labelPositions = m_labelPositions;
+ copy.m_subGridPositions = m_subGridPositions;
+}
+
+QString QValue3DAxisFormatterPrivate::stringForValue(qreal value, const QString &format)
+{
+ if (m_previousLabelFormat.compare(format)) {
+ // Format string different than the previous one used, reparse it
+ m_previousLabelFormat = format;
+ m_preparsedParamType = Utils::findFormatParamType(format);
+ m_labelFormatArray = format.toUtf8();
+ }
+
+ return Utils::formatLabel(m_labelFormatArray, m_preparsedParamType, value);
+}
+
+float QValue3DAxisFormatterPrivate::positionAt(float value) const
+{
+ return ((value - m_min) / m_rangeNormalizer);
+}
+
+float QValue3DAxisFormatterPrivate::valueAt(float position) const
+{
+ return ((position * m_rangeNormalizer) + m_min);
+}
+
+void QValue3DAxisFormatterPrivate::setAxis(QValue3DAxis *axis)
+{
+ Q_ASSERT(axis);
+
+ // These signals are all connected to markDirtyNoLabelChange slot, even though most of them
+ // do require labels to be regenerated. This is because the label regeneration is triggered
+ // elsewhere in these cases.
+ connect(axis, &QValue3DAxis::segmentCountChanged,
+ this, &QValue3DAxisFormatterPrivate::markDirtyNoLabelChange);
+ connect(axis, &QValue3DAxis::subSegmentCountChanged,
+ this, &QValue3DAxisFormatterPrivate::markDirtyNoLabelChange);
+ connect(axis, &QValue3DAxis::labelFormatChanged,
+ this, &QValue3DAxisFormatterPrivate::markDirtyNoLabelChange);
+ connect(axis, &QAbstract3DAxis::rangeChanged,
+ this, &QValue3DAxisFormatterPrivate::markDirtyNoLabelChange);
+
+ m_axis = axis;
+}
+
+void QValue3DAxisFormatterPrivate::markDirty(bool labelsChange)
+{
+ m_needsRecalculate = true;
+ if (m_axis) {
+ if (labelsChange)
+ m_axis->dptr()->emitLabelsChanged();
+ if (m_axis && m_axis->orientation() != QAbstract3DAxis::AxisOrientationNone)
+ emit m_axis->dptr()->formatterDirty();
+ }
+}
+
+void QValue3DAxisFormatterPrivate::markDirtyNoLabelChange()
+{
+ markDirty(false);
+}
+
+QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/axis/qvalue3daxisformatter.h b/src/datavisualization/axis/qvalue3daxisformatter.h
new file mode 100644
index 00000000..c7b0bac5
--- /dev/null
+++ b/src/datavisualization/axis/qvalue3daxisformatter.h
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** 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 QVALUE3DAXISFORMATTER_H
+#define QVALUE3DAXISFORMATTER_H
+
+#include <QtDataVisualization/qdatavisualizationglobal.h>
+#include <QtCore/QObject>
+#include <QtCore/QScopedPointer>
+#include <QtCore/QVector>
+#include <QtCore/QStringList>
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QValue3DAxisFormatterPrivate;
+class QValue3DAxis;
+
+class QT_DATAVISUALIZATION_EXPORT QValue3DAxisFormatter : public QObject
+{
+ Q_OBJECT
+protected:
+ explicit QValue3DAxisFormatter(QValue3DAxisFormatterPrivate *d, QObject *parent = 0);
+public:
+ explicit QValue3DAxisFormatter(QObject *parent = 0);
+ virtual ~QValue3DAxisFormatter();
+
+protected:
+ void setAllowNegatives(bool allow);
+ bool allowNegatives() const;
+ void setAllowZero(bool allow);
+ bool allowZero() const;
+
+ virtual QValue3DAxisFormatter *createNewInstance() const;
+ virtual void recalculate();
+ virtual QString stringForValue(qreal value, const QString &format) const;
+ virtual float positionAt(float value) const;
+ virtual float valueAt(float position) const;
+ virtual void populateCopy(QValue3DAxisFormatter &copy) const;
+
+ void markDirty(bool labelsChange = false);
+ QValue3DAxis *axis() const;
+
+ QVector<float> &gridPositions() const;
+ QVector<float> &subGridPositions() const;
+ QVector<float> &labelPositions() const;
+ QStringList &labelStrings() const;
+
+ QScopedPointer<QValue3DAxisFormatterPrivate> d_ptr;
+
+private:
+ Q_DISABLE_COPY(QValue3DAxisFormatter)
+
+ friend class Abstract3DController;
+ friend class Abstract3DRenderer;
+ friend class Bars3DRenderer;
+ friend class Scatter3DRenderer;
+ friend class Surface3DRenderer;
+ friend class SurfaceObject;
+ friend class QValue3DAxisFormatterPrivate;
+ friend class QLogValue3DAxisFormatter;
+ friend class QValue3DAxis;
+ friend class QValue3DAxisPrivate;
+ friend class AxisRenderCache;
+ friend class QBar3DSeriesPrivate;
+ friend class QScatter3DSeriesPrivate;
+ friend class QSurface3DSeriesPrivate;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/axis/qvalue3daxisformatter_p.h b/src/datavisualization/axis/qvalue3daxisformatter_p.h
new file mode 100644
index 00000000..2d1dc920
--- /dev/null
+++ b/src/datavisualization/axis/qvalue3daxisformatter_p.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QtDataVisualization API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef QVALUE3DAXISFORMATTER_P_H
+#define QVALUE3DAXISFORMATTER_P_H
+
+#include "datavisualizationglobal_p.h"
+#include "qvalue3daxisformatter.h"
+#include "utils_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QValue3DAxis;
+
+class QValue3DAxisFormatterPrivate : public QObject
+{
+ Q_OBJECT
+
+public:
+ QValue3DAxisFormatterPrivate(QValue3DAxisFormatter *q);
+ virtual ~QValue3DAxisFormatterPrivate();
+
+ void recalculate();
+ void doRecalculate();
+ void populateCopy(QValue3DAxisFormatter &copy);
+ void doPopulateCopy(QValue3DAxisFormatterPrivate &copy);
+
+ QString stringForValue(qreal value, const QString &format);
+ float positionAt(float value) const;
+ float valueAt(float position) const;
+
+ void setAxis(QValue3DAxis *axis);
+ void markDirty(bool labelsChange);
+
+public slots:
+ void markDirtyNoLabelChange();
+
+protected:
+ QValue3DAxisFormatter *q_ptr;
+
+ bool m_needsRecalculate;
+
+ float m_min;
+ float m_max;
+ float m_rangeNormalizer;
+
+ QVector<float> m_gridPositions;
+ QVector<float> m_subGridPositions;
+ QVector<float> m_labelPositions;
+ QStringList m_labelStrings;
+
+ QValue3DAxis *m_axis;
+
+ QString m_previousLabelFormat;
+ QByteArray m_labelFormatArray;
+ Utils::ParamType m_preparsedParamType;
+
+ bool m_allowNegatives;
+ bool m_allowZero;
+
+ friend class QValue3DAxisFormatter;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/common.pri b/src/datavisualization/common.pri
index 4ffa5646..9a497c2c 100644
--- a/src/datavisualization/common.pri
+++ b/src/datavisualization/common.pri
@@ -1,6 +1,3 @@
-# This qmake file is included by all Patternist projects and contains common Qt defines,
-# compiler warnings, and include paths.
-
INCLUDEPATH += $$PWD/engine \
$$PWD/global \
$$PWD/utils \
diff --git a/src/datavisualization/data/abstractitemmodelhandler.cpp b/src/datavisualization/data/abstractitemmodelhandler.cpp
index 9f2ccd86..f8ddf7b7 100644
--- a/src/datavisualization/data/abstractitemmodelhandler.cpp
+++ b/src/datavisualization/data/abstractitemmodelhandler.cpp
@@ -34,7 +34,7 @@ AbstractItemModelHandler::~AbstractItemModelHandler()
{
}
-void AbstractItemModelHandler::setItemModel(const QAbstractItemModel *itemModel)
+void AbstractItemModelHandler::setItemModel(QAbstractItemModel *itemModel)
{
if (itemModel != m_itemModel.data()) {
if (!m_itemModel.isNull())
@@ -69,7 +69,7 @@ void AbstractItemModelHandler::setItemModel(const QAbstractItemModel *itemModel)
}
}
-const QAbstractItemModel *AbstractItemModelHandler::itemModel() const
+QAbstractItemModel *AbstractItemModelHandler::itemModel() const
{
return m_itemModel.data();
}
diff --git a/src/datavisualization/data/abstractitemmodelhandler_p.h b/src/datavisualization/data/abstractitemmodelhandler_p.h
index ecbfe61c..e11d229a 100644
--- a/src/datavisualization/data/abstractitemmodelhandler_p.h
+++ b/src/datavisualization/data/abstractitemmodelhandler_p.h
@@ -43,8 +43,8 @@ public:
AbstractItemModelHandler(QObject *parent = 0);
virtual ~AbstractItemModelHandler();
- virtual void setItemModel(const QAbstractItemModel *itemModel);
- virtual const QAbstractItemModel *itemModel() const;
+ virtual void setItemModel(QAbstractItemModel *itemModel);
+ virtual QAbstractItemModel *itemModel() const;
public slots:
virtual void handleColumnsInserted(const QModelIndex &parent, int start, int end);
@@ -71,7 +71,7 @@ signals:
protected:
virtual void resolveModel() = 0;
- QPointer<const QAbstractItemModel> m_itemModel; // Not owned
+ QPointer<QAbstractItemModel> m_itemModel; // Not owned
bool resolvePending;
QTimer m_resolveTimer;
bool m_fullReset;
diff --git a/src/datavisualization/data/abstractrenderitem_p.h b/src/datavisualization/data/abstractrenderitem_p.h
index 912a09f3..57977a3c 100644
--- a/src/datavisualization/data/abstractrenderitem_p.h
+++ b/src/datavisualization/data/abstractrenderitem_p.h
@@ -32,8 +32,6 @@
#include "datavisualizationglobal_p.h"
#include "labelitem_p.h"
-#include <QtCore/QString>
-#include <QtGui/QOpenGLFunctions>
#include <QtGui/QVector3D>
#include <QtGui/QQuaternion>
diff --git a/src/datavisualization/data/baritemmodelhandler.cpp b/src/datavisualization/data/baritemmodelhandler.cpp
index 4f44fe1d..62e6390d 100644
--- a/src/datavisualization/data/baritemmodelhandler.cpp
+++ b/src/datavisualization/data/baritemmodelhandler.cpp
@@ -26,7 +26,11 @@ BarItemModelHandler::BarItemModelHandler(QItemModelBarDataProxy *proxy, QObject
: AbstractItemModelHandler(parent),
m_proxy(proxy),
m_proxyArray(0),
- m_columnCount(0)
+ m_columnCount(0),
+ m_valueRole(noRoleIndex),
+ m_rotationRole(noRoleIndex),
+ m_haveValuePattern(false),
+ m_haveRotationPattern(false)
{
}
@@ -34,6 +38,50 @@ BarItemModelHandler::~BarItemModelHandler()
{
}
+void BarItemModelHandler::handleDataChanged(const QModelIndex &topLeft,
+ const QModelIndex &bottomRight,
+ const QVector<int> &roles)
+{
+ // Do nothing if full reset already pending
+ if (!m_fullReset) {
+ if (!m_proxy->useModelCategories()) {
+ // If the data model doesn't directly map rows and columns, we cannot optimize
+ AbstractItemModelHandler::handleDataChanged(topLeft, bottomRight, roles);
+ } else {
+ int startRow = qMin(topLeft.row(), bottomRight.row());
+ int endRow = qMax(topLeft.row(), bottomRight.row());
+ int startCol = qMin(topLeft.column(), bottomRight.column());
+ int endCol = qMax(topLeft.column(), bottomRight.column());
+
+ for (int i = startRow; i <= endRow; i++) {
+ for (int j = startCol; j <= endCol; j++) {
+ QModelIndex index = m_itemModel->index(i, j);
+ QBarDataItem item;
+ QVariant valueVar = index.data(m_valueRole);
+ float value;
+ if (m_haveValuePattern)
+ value = valueVar.toString().replace(m_valuePattern, m_valueReplace).toFloat();
+ else
+ value = valueVar.toFloat();
+ item.setValue(value);
+ if (m_rotationRole != noRoleIndex) {
+ QVariant rotationVar = index.data(m_rotationRole);
+ float rotation;
+ if (m_haveRotationPattern) {
+ rotation = rotationVar.toString().replace(m_rotationPattern,
+ m_rotationReplace).toFloat();
+ } else {
+ rotation = rotationVar.toFloat();
+ }
+ item.setRotation(rotation);
+ }
+ m_proxy->setItem(i, j, item);
+ }
+ }
+ }
+ }
+}
+
// Resolve entire item model into QBarDataArray.
void BarItemModelHandler::resolveModel()
{
@@ -48,14 +96,29 @@ void BarItemModelHandler::resolveModel()
return;
}
+ // Value and rotation patterns can be reused on single item changes,
+ // so store them to member variables.
+ QRegExp rowPattern(m_proxy->rowRolePattern());
+ QRegExp colPattern(m_proxy->columnRolePattern());
+ m_valuePattern = m_proxy->valueRolePattern();
+ m_rotationPattern = m_proxy->rotationRolePattern();
+ QString rowReplace = m_proxy->rowRoleReplace();
+ QString colReplace = m_proxy->columnRoleReplace();
+ m_valueReplace = m_proxy->valueRoleReplace();
+ m_rotationReplace = m_proxy->rotationRoleReplace();
+ bool haveRowPattern = !rowPattern.isEmpty() && rowPattern.isValid();
+ bool haveColPattern = !colPattern.isEmpty() && colPattern.isValid();
+ m_haveValuePattern = !m_valuePattern.isEmpty() && m_valuePattern.isValid();
+ m_haveRotationPattern = !m_rotationPattern.isEmpty() && m_rotationPattern.isValid();
+
QStringList rowLabels;
QStringList columnLabels;
QHash<int, QByteArray> roleHash = m_itemModel->roleNames();
// Default value role to display role if no mapping
- int valueRole = roleHash.key(m_proxy->valueRole().toLatin1(), Qt::DisplayRole);
- int rotationRole = roleHash.key(m_proxy->rotationRole().toLatin1(), noRoleIndex);
+ m_valueRole = roleHash.key(m_proxy->valueRole().toLatin1(), Qt::DisplayRole);
+ m_rotationRole = roleHash.key(m_proxy->rotationRole().toLatin1(), noRoleIndex);
int rowCount = m_itemModel->rowCount();
int columnCount = m_itemModel->columnCount();
@@ -71,9 +134,25 @@ void BarItemModelHandler::resolveModel()
for (int i = 0; i < rowCount; i++) {
QBarDataRow &newProxyRow = *m_proxyArray->at(i);
for (int j = 0; j < columnCount; j++) {
- newProxyRow[j].setValue(m_itemModel->index(i, j).data(valueRole).toReal());
- if (rotationRole != noRoleIndex)
- newProxyRow[j].setRotation(m_itemModel->index(i, j).data(rotationRole).toReal());
+ QModelIndex index = m_itemModel->index(i, j);
+ QVariant valueVar = index.data(m_valueRole);
+ float value;
+ if (m_haveValuePattern)
+ value = valueVar.toString().replace(m_valuePattern, m_valueReplace).toFloat();
+ else
+ value = valueVar.toFloat();
+ newProxyRow[j].setValue(value);
+ if (m_rotationRole != noRoleIndex) {
+ QVariant rotationVar = index.data(m_rotationRole);
+ float rotation;
+ if (m_haveRotationPattern) {
+ rotation = rotationVar.toString().replace(m_rotationPattern,
+ m_rotationReplace).toFloat();
+ } else {
+ rotation = rotationVar.toFloat();
+ }
+ newProxyRow[j].setRotation(rotation);
+ }
}
}
// Generate labels from headers if using model rows/columns
@@ -97,16 +176,62 @@ void BarItemModelHandler::resolveModel()
// Sort values into rows and columns
typedef QHash<QString, float> ColumnValueMap;
- QHash <QString, ColumnValueMap> itemValueMap;
- QHash <QString, ColumnValueMap> itemRotationMap;
+ QHash<QString, ColumnValueMap> itemValueMap;
+ QHash<QString, ColumnValueMap> itemRotationMap;
+
+ bool cumulative = m_proxy->multiMatchBehavior() == QItemModelBarDataProxy::MMBAverage
+ || m_proxy->multiMatchBehavior() == QItemModelBarDataProxy::MMBCumulative;
+ bool countMatches = m_proxy->multiMatchBehavior() == QItemModelBarDataProxy::MMBAverage;
+ bool takeFirst = m_proxy->multiMatchBehavior() == QItemModelBarDataProxy::MMBFirst;
+ QHash<QString, QHash<QString, int> > *matchCountMap = 0;
+ if (countMatches)
+ matchCountMap = new QHash<QString, QHash<QString, int> >;
+
for (int i = 0; i < rowCount; i++) {
for (int j = 0; j < columnCount; j++) {
QModelIndex index = m_itemModel->index(i, j);
QString rowRoleStr = index.data(rowRole).toString();
+ if (haveRowPattern)
+ rowRoleStr.replace(rowPattern, rowReplace);
QString columnRoleStr = index.data(columnRole).toString();
- itemValueMap[rowRoleStr][columnRoleStr] = index.data(valueRole).toReal();
- if (rotationRole != noRoleIndex)
- itemRotationMap[rowRoleStr][columnRoleStr] = index.data(rotationRole).toReal();
+ if (haveColPattern)
+ columnRoleStr.replace(colPattern, colReplace);
+ QVariant valueVar = index.data(m_valueRole);
+ float value;
+ if (m_haveValuePattern)
+ value = valueVar.toString().replace(m_valuePattern, m_valueReplace).toFloat();
+ else
+ value = valueVar.toFloat();
+ if (countMatches)
+ (*matchCountMap)[rowRoleStr][columnRoleStr]++;
+
+ if (cumulative) {
+ itemValueMap[rowRoleStr][columnRoleStr] += value;
+ } else {
+ if (takeFirst && itemValueMap.contains(rowRoleStr)) {
+ if (itemValueMap.value(rowRoleStr).contains(columnRoleStr))
+ continue; // We already have a value for this row/column combo
+ }
+ itemValueMap[rowRoleStr][columnRoleStr] = value;
+ }
+
+ if (m_rotationRole != noRoleIndex) {
+ QVariant rotationVar = index.data(m_rotationRole);
+ float rotation;
+ if (m_haveRotationPattern) {
+ rotation = rotationVar.toString().replace(m_rotationPattern,
+ m_rotationReplace).toFloat();
+ } else {
+ rotation = rotationVar.toFloat();
+ }
+ if (cumulative) {
+ itemRotationMap[rowRoleStr][columnRoleStr] += rotation;
+ } else {
+ // We know we are in take last mode if we get here,
+ // as take first mode skips to next loop already earlier
+ itemRotationMap[rowRoleStr][columnRoleStr] = rotation;
+ }
+ }
if (generateRows && !rowListHash.value(rowRoleStr, false)) {
rowListHash.insert(rowRoleStr, true);
rowList << rowRoleStr;
@@ -141,15 +266,24 @@ void BarItemModelHandler::resolveModel()
QString rowKey = rowList.at(i);
QBarDataRow &newProxyRow = *m_proxyArray->at(i);
for (int j = 0; j < columnList.size(); j++) {
- newProxyRow[j].setValue(itemValueMap[rowKey][columnList.at(j)]);
- if (rotationRole != noRoleIndex)
- newProxyRow[j].setRotation(itemRotationMap[rowKey][columnList.at(j)]);
+ float value = itemValueMap[rowKey][columnList.at(j)];
+ if (countMatches)
+ value /= float((*matchCountMap)[rowKey][columnList.at(j)]);
+ newProxyRow[j].setValue(value);
+ if (m_rotationRole != noRoleIndex) {
+ float angle = itemRotationMap[rowKey][columnList.at(j)];
+ if (countMatches)
+ angle /= float((*matchCountMap)[rowKey][columnList.at(j)]);
+ newProxyRow[j].setRotation(angle);
+ }
}
}
rowLabels = rowList;
columnLabels = columnList;
m_columnCount = columnList.size();
+
+ delete matchCountMap;
}
m_proxy->resetArray(m_proxyArray, rowLabels, columnLabels);
diff --git a/src/datavisualization/data/baritemmodelhandler_p.h b/src/datavisualization/data/baritemmodelhandler_p.h
index 7bf7b0a1..6dea906e 100644
--- a/src/datavisualization/data/baritemmodelhandler_p.h
+++ b/src/datavisualization/data/baritemmodelhandler_p.h
@@ -41,12 +41,24 @@ public:
BarItemModelHandler(QItemModelBarDataProxy *proxy, QObject *parent = 0);
virtual ~BarItemModelHandler();
+public slots:
+ virtual void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
+ const QVector<int> &roles = QVector<int> ());
+
protected:
void virtual resolveModel();
QItemModelBarDataProxy *m_proxy; // Not owned
QBarDataArray *m_proxyArray; // Not owned
int m_columnCount;
+ int m_valueRole;
+ int m_rotationRole;
+ QRegExp m_valuePattern;
+ QRegExp m_rotationPattern;
+ QString m_valueReplace;
+ QString m_rotationReplace;
+ bool m_haveValuePattern;
+ bool m_haveRotationPattern;
};
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/barrenderitem.cpp b/src/datavisualization/data/barrenderitem.cpp
index 50d2a4b4..eab5178b 100644
--- a/src/datavisualization/data/barrenderitem.cpp
+++ b/src/datavisualization/data/barrenderitem.cpp
@@ -17,15 +17,13 @@
****************************************************************************/
#include "barrenderitem_p.h"
-#include "bars3drenderer_p.h"
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
BarRenderItem::BarRenderItem()
: AbstractRenderItem(),
m_value(0),
- m_height(0.0f),
- m_seriesIndex(0)
+ m_height(0.0f)
{
}
@@ -35,7 +33,6 @@ BarRenderItem::BarRenderItem(const BarRenderItem &other)
m_value = other.m_value;
m_position = other.m_position;
m_height = other.m_height;
- m_seriesIndex = other.m_seriesIndex;
}
BarRenderItem::~BarRenderItem()
@@ -67,8 +64,8 @@ void BarRenderSliceItem::setItem(const BarRenderItem &renderItem)
m_value = renderItem.value();
m_position = renderItem.position();
m_height = renderItem.height();
- m_seriesIndex = renderItem.seriesIndex();
m_sliceLabel = QString();
+ delete m_sliceLabelItem;
m_sliceLabelItem = 0;
}
diff --git a/src/datavisualization/data/barrenderitem_p.h b/src/datavisualization/data/barrenderitem_p.h
index 1122053d..72c5abc1 100644
--- a/src/datavisualization/data/barrenderitem_p.h
+++ b/src/datavisualization/data/barrenderitem_p.h
@@ -33,8 +33,6 @@
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-class Bars3DRenderer;
-
class BarRenderItem : public AbstractRenderItem
{
public:
@@ -54,16 +52,10 @@ public:
inline void setHeight(GLfloat height) { m_height = height; }
inline GLfloat height() const { return m_height; }
- // Series index in visual series that this item belongs to.
- // This is only utilized by slicing, so it may not be up to date on all items.
- inline void setSeriesIndex(int seriesIndex) { m_seriesIndex = seriesIndex; }
- inline int seriesIndex() const { return m_seriesIndex; }
-
protected:
float m_value;
QPoint m_position; // x = row, y = column
GLfloat m_height;
- int m_seriesIndex;
friend class QBarDataItem;
};
diff --git a/src/datavisualization/data/customrenderitem.cpp b/src/datavisualization/data/customrenderitem.cpp
new file mode 100644
index 00000000..a1c70057
--- /dev/null
+++ b/src/datavisualization/data/customrenderitem.cpp
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** 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 "customrenderitem_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+CustomRenderItem::CustomRenderItem()
+ : AbstractRenderItem(),
+ m_texture(0),
+ m_object(0),
+ m_visible(true),
+ m_renderer(0)
+{
+}
+
+CustomRenderItem::~CustomRenderItem()
+{
+ ObjectHelper::releaseObjectHelper(m_renderer, m_object);
+}
+
+void CustomRenderItem::setMesh(const QString &meshFile)
+{
+ ObjectHelper::resetObjectHelper(m_renderer, m_object, meshFile);
+}
+
+QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/customrenderitem_p.h b/src/datavisualization/data/customrenderitem_p.h
new file mode 100644
index 00000000..4fb94276
--- /dev/null
+++ b/src/datavisualization/data/customrenderitem_p.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QtDataVisualization API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef CUSTOMRENDERITEM_P_H
+#define CUSTOMRENDERITEM_P_H
+
+#include "abstractrenderitem_p.h"
+#include "objecthelper_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QCustom3DItem;
+class Abstract3DRenderer;
+
+class CustomRenderItem : public AbstractRenderItem
+{
+public:
+ CustomRenderItem();
+ virtual ~CustomRenderItem();
+
+ inline void setTexture(GLuint texture) { m_texture = texture; }
+ inline GLuint texture() const { return m_texture; }
+ void setMesh(const QString &meshFile);
+ inline ObjectHelper *mesh() const { return m_object; }
+ inline void setScaling(const QVector3D &scaling) { m_scaling = scaling; }
+ inline QVector3D scaling() const { return m_scaling; }
+ inline void setPosition(const QVector3D &position) { m_position = position; }
+ inline QVector3D position() const { return m_position; }
+ inline void setPositionAbsolute(bool absolute) { m_absolute = absolute; }
+ inline bool isPositionAbsolute() const { return m_absolute; }
+ inline void setBlendNeeded(bool blend) { m_needBlend = blend; }
+ inline bool isBlendNeeded() const { return m_needBlend; }
+ inline void setVisible(bool visible) { m_visible = visible; }
+ inline bool isVisible() const { return m_visible; }
+ inline void setItemPointer(QCustom3DItem *item) { m_item = item; }
+ inline QCustom3DItem *itemPointer() const { return m_item; }
+ inline void setValid(bool valid) { m_valid = valid; }
+ inline bool isValid() const { return m_valid; }
+ inline void setIndex(int index) { m_index = index; }
+ inline int index() const { return m_index; }
+ inline void setShadowCasting(bool shadowCasting) { m_shadowCasting = shadowCasting; }
+ inline bool isShadowCasting() const { return m_shadowCasting; }
+ inline void setFacingCamera(bool facing) { m_isFacingCamera = facing; }
+ inline bool isFacingCamera() const { return m_isFacingCamera; }
+ inline void setRenderer(Abstract3DRenderer *renderer) { m_renderer = renderer; }
+
+private:
+ Q_DISABLE_COPY(CustomRenderItem)
+
+ GLuint m_texture;
+ QVector3D m_scaling;
+ QVector3D m_position;
+ bool m_absolute;
+ ObjectHelper *m_object; // shared reference
+ bool m_needBlend;
+ bool m_visible;
+ bool m_valid;
+ int m_index;
+ bool m_shadowCasting;
+ bool m_isFacingCamera;
+ QCustom3DItem *m_item;
+ Abstract3DRenderer *m_renderer;
+};
+typedef QHash<QCustom3DItem *, CustomRenderItem *> CustomRenderItemArray;
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/data/data.pri b/src/datavisualization/data/data.pri
index 6ebfed6b..73f398bf 100644
--- a/src/datavisualization/data/data.pri
+++ b/src/datavisualization/data/data.pri
@@ -36,7 +36,12 @@ HEADERS += \
$$PWD/qscatter3dseries.h \
$$PWD/qscatter3dseries_p.h \
$$PWD/qsurface3dseries.h \
- $$PWD/qsurface3dseries_p.h
+ $$PWD/qsurface3dseries_p.h \
+ $$PWD/customrenderitem_p.h \
+ $$PWD/qcustom3ditem.h \
+ $$PWD/qcustom3ditem_p.h \
+ $$PWD/qcustom3dlabel.h \
+ $$PWD/qcustom3dlabel_p.h
SOURCES += \
$$PWD/labelitem.cpp \
@@ -61,4 +66,7 @@ SOURCES += \
$$PWD/qabstract3dseries.cpp \
$$PWD/qbar3dseries.cpp \
$$PWD/qscatter3dseries.cpp \
- $$PWD/qsurface3dseries.cpp
+ $$PWD/qsurface3dseries.cpp \
+ $$PWD/customrenderitem.cpp \
+ $$PWD/qcustom3ditem.cpp \
+ $$PWD/qcustom3dlabel.cpp
diff --git a/src/datavisualization/data/labelitem_p.h b/src/datavisualization/data/labelitem_p.h
index 3a2c1eb1..89b6cc56 100644
--- a/src/datavisualization/data/labelitem_p.h
+++ b/src/datavisualization/data/labelitem_p.h
@@ -30,7 +30,6 @@
#define LABELITEM_P_H
#include "datavisualizationglobal_p.h"
-#include <QtGui/QOpenGLFunctions>
#include <QtCore/QSize>
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qabstract3dseries.cpp b/src/datavisualization/data/qabstract3dseries.cpp
index e593a1d9..f8fe6b4f 100644
--- a/src/datavisualization/data/qabstract3dseries.cpp
+++ b/src/datavisualization/data/qabstract3dseries.cpp
@@ -16,7 +16,6 @@
**
****************************************************************************/
-#include "qabstract3dseries.h"
#include "qabstract3dseries_p.h"
#include "qabstractdataproxy_p.h"
#include "abstract3dcontroller_p.h"
@@ -27,7 +26,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QAbstract3DSeries
* \inmodule QtDataVisualization
* \brief Base class for all QtDataVisualization series.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* You use the visualization type specific inherited classes instead of the base class.
* \sa QBar3DSeries, QScatter3DSeries, QSurface3DSeries, {Qt Data Visualization Data Handling}
@@ -53,7 +52,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* This type is uncreatable, but contains properties that are exposed via subtypes.
*
- * For Abstract3DSeries enums, see \l QAbstract3DSeries::SeriesType and \l QAbstract3DSeries::Mesh
+ * For Abstract3DSeries enums, see \l QAbstract3DSeries::SeriesType and \l{QAbstract3DSeries::Mesh}.
*
* \sa Bar3DSeries, Scatter3DSeries, Surface3DSeries, {Qt Data Visualization Data Handling}
*/
@@ -102,7 +101,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* Arrow pointing upwards.
* \value MeshPoint
* 2D point. Usable only with Q3DScatter.
- * \b Note: Shadows and color gradients do not affect this style.
+ * \b Note: Shadows do not affect this style. Color style Q3DTheme::ColorStyleObjectGradient
+ * is not supported by this style.
*/
/*!
@@ -240,6 +240,27 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
+ * \qmlproperty string Abstract3DSeries::itemLabel
+ * \since QtDataVisualization 1.1
+ *
+ * Contains the formatted item label. If there is no selected item or the selected item is not
+ * visible, returns an empty string.
+ *
+ * \sa itemLabelFormat
+ */
+
+/*!
+ * \qmlproperty bool Abstract3DSeries::itemLabelVisible
+ * \since QtDataVisualization 1.1
+ *
+ * If \c true, item labels are drawn as floating labels in the graph. Otherwise item labels are not
+ * drawn. If you prefer to show the item label in an external control, set this property to
+ * \c false. Defaults to \c true.
+ *
+ * \sa itemLabelFormat, itemLabel
+ */
+
+/*!
* \qmlmethod void Abstract3DSeries::setMeshAxisAndAngle(vector3d axis, real angle)
*
* A convenience function to construct mesh rotation quaternion from axis and angle.
@@ -586,9 +607,47 @@ QString QAbstract3DSeries::name() const
return d_ptr->m_name;
}
+/*!
+ * \property QAbstract3DSeries::itemLabel
+ * \since QtDataVisualization 1.1
+ *
+ * Contains the formatted item label. If there is no selected item or the selected item is not
+ * visible, returns an empty string.
+ *
+ * \sa itemLabelFormat
+ */
+QString QAbstract3DSeries::itemLabel() const
+{
+ return d_ptr->itemLabel();
+}
+
+/*!
+ * \property QAbstract3DSeries::itemLabelVisible
+ * \since QtDataVisualization 1.1
+ *
+ * If \c true, item labels are drawn as floating labels in the graph. Otherwise item labels are not
+ * drawn. If you prefer to show the item label in an external control, set this property to
+ * \c false. Defaults to \c true.
+ *
+ * \sa itemLabelFormat, itemLabel
+ */
+void QAbstract3DSeries::setItemLabelVisible(bool visible)
+{
+ if (d_ptr->m_itemLabelVisible != visible) {
+ d_ptr->setItemLabelVisible(visible);
+ emit itemLabelVisibilityChanged(visible);
+ }
+}
+
+bool QAbstract3DSeries::isItemLabelVisible() const
+{
+ return d_ptr->m_itemLabelVisible;
+}
+
// QAbstract3DSeriesPrivate
-QAbstract3DSeriesPrivate::QAbstract3DSeriesPrivate(QAbstract3DSeries *q, QAbstract3DSeries::SeriesType type)
+QAbstract3DSeriesPrivate::QAbstract3DSeriesPrivate(QAbstract3DSeries *q,
+ QAbstract3DSeries::SeriesType type)
: QObject(0),
q_ptr(q),
m_type(type),
@@ -597,7 +656,9 @@ QAbstract3DSeriesPrivate::QAbstract3DSeriesPrivate(QAbstract3DSeries *q, QAbstra
m_controller(0),
m_mesh(QAbstract3DSeries::MeshCube),
m_meshSmooth(false),
- m_colorStyle(Q3DTheme::ColorStyleUniform)
+ m_colorStyle(Q3DTheme::ColorStyleUniform),
+ m_itemLabelDirty(true),
+ m_itemLabelVisible(true)
{
}
@@ -630,53 +691,67 @@ void QAbstract3DSeriesPrivate::setController(Abstract3DController *controller)
connectControllerAndProxy(controller);
m_controller = controller;
q_ptr->setParent(controller);
+ markItemLabelDirty();
}
void QAbstract3DSeriesPrivate::setItemLabelFormat(const QString &format)
{
m_itemLabelFormat = format;
- m_changeTracker.itemLabelFormatChanged = true;
- if (m_controller)
- m_controller->markSeriesVisualsDirty();
+ markItemLabelDirty();
}
void QAbstract3DSeriesPrivate::setVisible(bool visible)
{
m_visible = visible;
- if (m_controller)
- m_controller->markSeriesVisualsDirty();
+ markItemLabelDirty();
}
void QAbstract3DSeriesPrivate::setMesh(QAbstract3DSeries::Mesh mesh)
{
m_mesh = mesh;
m_changeTracker.meshChanged = true;
- if (m_controller)
+ if (m_controller) {
m_controller->markSeriesVisualsDirty();
+
+ if (m_controller->optimizationHints().testFlag(QAbstract3DGraph::OptimizationStatic))
+ m_controller->markDataDirty();
+ }
}
void QAbstract3DSeriesPrivate::setMeshSmooth(bool enable)
{
m_meshSmooth = enable;
m_changeTracker.meshSmoothChanged = true;
- if (m_controller)
+ if (m_controller) {
m_controller->markSeriesVisualsDirty();
+
+ if (m_controller->optimizationHints().testFlag(QAbstract3DGraph::OptimizationStatic))
+ m_controller->markDataDirty();
+ }
}
void QAbstract3DSeriesPrivate::setMeshRotation(const QQuaternion &rotation)
{
m_meshRotation = rotation;
m_changeTracker.meshRotationChanged = true;
- if (m_controller)
+ if (m_controller) {
m_controller->markSeriesVisualsDirty();
+
+ if (m_controller->optimizationHints().testFlag(QAbstract3DGraph::OptimizationStatic))
+ m_controller->markDataDirty();
+ }
}
void QAbstract3DSeriesPrivate::setUserDefinedMesh(const QString &meshFile)
{
m_userDefinedMesh = meshFile;
m_changeTracker.userDefinedMeshChanged = true;
- if (m_controller)
+ if (m_controller) {
m_controller->markSeriesVisualsDirty();
+
+ if (m_controller->optimizationHints().testFlag(QAbstract3DGraph::OptimizationStatic))
+ m_controller->markDataDirty();
+ }
}
void QAbstract3DSeriesPrivate::setColorStyle(Q3DTheme::ColorStyle style)
@@ -738,9 +813,8 @@ void QAbstract3DSeriesPrivate::setMultiHighlightGradient(const QLinearGradient &
void QAbstract3DSeriesPrivate::setName(const QString &name)
{
m_name = name;
+ markItemLabelDirty();
m_changeTracker.nameChanged = true;
- if (m_controller)
- m_controller->markSeriesVisualsDirty();
}
void QAbstract3DSeriesPrivate::resetToTheme(const Q3DTheme &theme, int seriesIndex, bool force)
@@ -780,4 +854,36 @@ void QAbstract3DSeriesPrivate::resetToTheme(const Q3DTheme &theme, int seriesInd
}
}
+QString QAbstract3DSeriesPrivate::itemLabel()
+{
+ if (m_itemLabelDirty) {
+ QString oldLabel = m_itemLabel;
+ if (m_controller && m_visible)
+ createItemLabel();
+ else
+ m_itemLabel = QString();
+ m_itemLabelDirty = false;
+
+ if (oldLabel != m_itemLabel)
+ emit q_ptr->itemLabelChanged(m_itemLabel);
+ }
+
+ return m_itemLabel;
+}
+
+void QAbstract3DSeriesPrivate::markItemLabelDirty()
+{
+ m_itemLabelDirty = true;
+ m_changeTracker.itemLabelChanged = true;
+ if (m_controller)
+ m_controller->markSeriesVisualsDirty();
+}
+
+void QAbstract3DSeriesPrivate::setItemLabelVisible(bool visible)
+{
+ m_itemLabelVisible = visible;
+ markItemLabelDirty();
+ m_changeTracker.itemLabelVisibilityChanged = true;
+}
+
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qabstract3dseries.h b/src/datavisualization/data/qabstract3dseries.h
index bf56422f..87c4f3c1 100644
--- a/src/datavisualization/data/qabstract3dseries.h
+++ b/src/datavisualization/data/qabstract3dseries.h
@@ -50,6 +50,8 @@ class QT_DATAVISUALIZATION_EXPORT QAbstract3DSeries : public QObject
Q_PROPERTY(QColor multiHighlightColor READ multiHighlightColor WRITE setMultiHighlightColor NOTIFY multiHighlightColorChanged)
Q_PROPERTY(QLinearGradient multiHighlightGradient READ multiHighlightGradient WRITE setMultiHighlightGradient NOTIFY multiHighlightGradientChanged)
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(QString itemLabel READ itemLabel NOTIFY itemLabelChanged REVISION 1)
+ Q_PROPERTY(bool itemLabelVisible READ isItemLabelVisible WRITE setItemLabelVisible NOTIFY itemLabelVisibilityChanged REVISION 1)
public:
enum SeriesType {
@@ -119,6 +121,10 @@ public:
void setName(const QString &name);
QString name() const;
+ QString itemLabel() const;
+ void setItemLabelVisible(bool visible);
+ bool isItemLabelVisible() const;
+
signals:
void itemLabelFormatChanged(const QString &format);
void visibilityChanged(bool visible);
@@ -134,6 +140,8 @@ signals:
void multiHighlightColorChanged(const QColor &color);
void multiHighlightGradientChanged(const QLinearGradient &gradient);
void nameChanged(const QString &name);
+ Q_REVISION(1) void itemLabelChanged(const QString &label);
+ Q_REVISION(1) void itemLabelVisibilityChanged(bool visible);
protected:
QScopedPointer<QAbstract3DSeriesPrivate> d_ptr;
diff --git a/src/datavisualization/data/qabstract3dseries_p.h b/src/datavisualization/data/qabstract3dseries_p.h
index a803e99b..dd574e03 100644
--- a/src/datavisualization/data/qabstract3dseries_p.h
+++ b/src/datavisualization/data/qabstract3dseries_p.h
@@ -26,19 +26,18 @@
//
// We mean it.
-#include "datavisualizationglobal_p.h"
-#include "qabstract3dseries.h"
-
#ifndef QABSTRACT3DSERIES_P_H
#define QABSTRACT3DSERIES_P_H
+#include "datavisualizationglobal_p.h"
+#include "qabstract3dseries.h"
+
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class QAbstractDataProxy;
class Abstract3DController;
struct QAbstract3DSeriesChangeBitField {
- bool itemLabelFormatChanged : 1;
bool meshChanged : 1;
bool meshSmoothChanged : 1;
bool meshRotationChanged : 1;
@@ -51,10 +50,12 @@ struct QAbstract3DSeriesChangeBitField {
bool multiHighlightColorChanged : 1;
bool multiHighlightGradientChanged : 1;
bool nameChanged : 1;
+ bool itemLabelChanged : 1;
+ bool itemLabelVisibilityChanged : 1;
+ bool visibilityChanged : 1;
QAbstract3DSeriesChangeBitField()
- : itemLabelFormatChanged(true),
- meshChanged(true),
+ : meshChanged(true),
meshSmoothChanged(true),
meshRotationChanged(true),
userDefinedMeshChanged(true),
@@ -65,7 +66,10 @@ struct QAbstract3DSeriesChangeBitField {
singleHighlightGradientChanged(true),
multiHighlightColorChanged(true),
multiHighlightGradientChanged(true),
- nameChanged(true)
+ nameChanged(true),
+ itemLabelChanged(true),
+ itemLabelVisibilityChanged(true),
+ visibilityChanged(true)
{
}
};
@@ -102,6 +106,7 @@ public:
virtual void setDataProxy(QAbstractDataProxy *proxy);
virtual void setController(Abstract3DController *controller);
virtual void connectControllerAndProxy(Abstract3DController *newController) = 0;
+ virtual void createItemLabel() = 0;
void setItemLabelFormat(const QString &format);
void setVisible(bool visible);
@@ -120,6 +125,10 @@ public:
void setName(const QString &name);
void resetToTheme(const Q3DTheme &theme, int seriesIndex, bool force);
+ QString itemLabel();
+ void markItemLabelDirty();
+ inline bool itemLabelDirty() const { return m_itemLabelDirty; }
+ void setItemLabelVisible(bool visible);
QAbstract3DSeriesChangeBitField m_changeTracker;
QAbstract3DSeriesThemeOverrideBitField m_themeTracker;
@@ -143,6 +152,9 @@ public:
QLinearGradient m_multiHighlightGradient;
QString m_name;
+ QString m_itemLabel;
+ bool m_itemLabelDirty;
+ bool m_itemLabelVisible;
};
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qabstractdataproxy.cpp b/src/datavisualization/data/qabstractdataproxy.cpp
index 18d88971..eb15cec8 100644
--- a/src/datavisualization/data/qabstractdataproxy.cpp
+++ b/src/datavisualization/data/qabstractdataproxy.cpp
@@ -16,7 +16,6 @@
**
****************************************************************************/
-#include "qabstractdataproxy.h"
#include "qabstractdataproxy_p.h"
#include "qabstract3dseries_p.h"
@@ -26,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QAbstractDataProxy
* \inmodule QtDataVisualization
* \brief Base class for all QtDataVisualization data proxies.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* You use the visualization type specific inherited classes instead of the base class.
* \sa QBarDataProxy, QScatterDataProxy, QSurfaceDataProxy, {Qt Data Visualization Data Handling}
@@ -42,7 +41,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* This type is uncreatable, but contains properties that are exposed via subtypes.
*
- * For AbstractDataProxy enums, see \l QAbstractDataProxy::DataType
+ * For AbstractDataProxy enums, see \l{QAbstractDataProxy::DataType}.
*
* \sa BarDataProxy, ScatterDataProxy, SurfaceDataProxy, {Qt Data Visualization Data Handling}
*/
diff --git a/src/datavisualization/data/qabstractdataproxy_p.h b/src/datavisualization/data/qabstractdataproxy_p.h
index eb901f4c..c2f53369 100644
--- a/src/datavisualization/data/qabstractdataproxy_p.h
+++ b/src/datavisualization/data/qabstractdataproxy_p.h
@@ -26,12 +26,12 @@
//
// We mean it.
-#include "datavisualizationglobal_p.h"
-#include "qabstractdataproxy.h"
-
#ifndef QABSTRACTDATAPROXY_P_H
#define QABSTRACTDATAPROXY_P_H
+#include "datavisualizationglobal_p.h"
+#include "qabstractdataproxy.h"
+
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
class QAbstract3DSeries;
diff --git a/src/datavisualization/data/qbar3dseries.cpp b/src/datavisualization/data/qbar3dseries.cpp
index ed4ffaba..3440a3db 100644
--- a/src/datavisualization/data/qbar3dseries.cpp
+++ b/src/datavisualization/data/qbar3dseries.cpp
@@ -26,7 +26,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QBar3DSeries
* \inmodule QtDataVisualization
* \brief Base series class for Q3DBars.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* QBar3DSeries manages the series specific visual elements, as well as series data
* (via data proxy).
@@ -317,6 +317,56 @@ void QBar3DSeriesPrivate::connectControllerAndProxy(Abstract3DController *newCon
}
}
+void QBar3DSeriesPrivate::createItemLabel()
+{
+ static const QString rowIndexTag(QStringLiteral("@rowIdx"));
+ static const QString rowLabelTag(QStringLiteral("@rowLabel"));
+ static const QString rowTitleTag(QStringLiteral("@rowTitle"));
+ static const QString colIndexTag(QStringLiteral("@colIdx"));
+ static const QString colLabelTag(QStringLiteral("@colLabel"));
+ static const QString colTitleTag(QStringLiteral("@colTitle"));
+ static const QString valueTitleTag(QStringLiteral("@valueTitle"));
+ static const QString valueLabelTag(QStringLiteral("@valueLabel"));
+ static const QString seriesNameTag(QStringLiteral("@seriesName"));
+
+ if (m_selectedBar == QBar3DSeries::invalidSelectionPosition()) {
+ m_itemLabel = QString();
+ return;
+ }
+
+ QCategory3DAxis *categoryAxisZ = static_cast<QCategory3DAxis *>(m_controller->axisZ());
+ QCategory3DAxis *categoryAxisX = static_cast<QCategory3DAxis *>(m_controller->axisX());
+ QValue3DAxis *valueAxis = static_cast<QValue3DAxis *>(m_controller->axisY());
+ qreal selectedBarValue = qreal(qptr()->dataProxy()->itemAt(m_selectedBar)->value());
+
+ // Custom format expects printf format specifier. There is no tag for it.
+ m_itemLabel = valueAxis->formatter()->stringForValue(selectedBarValue, m_itemLabelFormat);
+
+ int selBarPosRow = m_selectedBar.x();
+ int selBarPosCol = m_selectedBar.y();
+ m_itemLabel.replace(rowIndexTag, QString::number(selBarPosRow));
+ if (categoryAxisZ->labels().size() > selBarPosRow)
+ m_itemLabel.replace(rowLabelTag, categoryAxisZ->labels().at(selBarPosRow));
+ else
+ m_itemLabel.replace(rowLabelTag, QString());
+ m_itemLabel.replace(rowTitleTag, categoryAxisZ->title());
+ m_itemLabel.replace(colIndexTag, QString::number(selBarPosCol));
+ if (categoryAxisX->labels().size() > selBarPosCol)
+ m_itemLabel.replace(colLabelTag, categoryAxisX->labels().at(selBarPosCol));
+ else
+ m_itemLabel.replace(colLabelTag, QString());
+ m_itemLabel.replace(colTitleTag, categoryAxisX->title());
+ m_itemLabel.replace(valueTitleTag, valueAxis->title());
+
+ if (m_itemLabel.contains(valueLabelTag)) {
+ QString valueLabelText = valueAxis->formatter()->stringForValue(selectedBarValue,
+ valueAxis->labelFormat());
+ m_itemLabel.replace(valueLabelTag, valueLabelText);
+ }
+
+ m_itemLabel.replace(seriesNameTag, m_name);
+}
+
void QBar3DSeriesPrivate::handleMeshRotationChanged(const QQuaternion &rotation)
{
emit qptr()->meshAngleChanged(quaternionAngle(rotation));
@@ -325,6 +375,7 @@ void QBar3DSeriesPrivate::handleMeshRotationChanged(const QQuaternion &rotation)
void QBar3DSeriesPrivate::setSelectedBar(const QPoint &position)
{
if (position != m_selectedBar) {
+ markItemLabelDirty();
m_selectedBar = position;
emit qptr()->selectedBarChanged(m_selectedBar);
}
diff --git a/src/datavisualization/data/qbar3dseries_p.h b/src/datavisualization/data/qbar3dseries_p.h
index 718f1237..c5b51108 100644
--- a/src/datavisualization/data/qbar3dseries_p.h
+++ b/src/datavisualization/data/qbar3dseries_p.h
@@ -43,6 +43,7 @@ public:
virtual void setDataProxy(QAbstractDataProxy *proxy);
virtual void connectControllerAndProxy(Abstract3DController *newController);
+ virtual void createItemLabel();
void handleMeshRotationChanged(const QQuaternion &rotation);
diff --git a/src/datavisualization/data/qbardataitem.cpp b/src/datavisualization/data/qbardataitem.cpp
index 37c2033f..8f370e24 100644
--- a/src/datavisualization/data/qbardataitem.cpp
+++ b/src/datavisualization/data/qbardataitem.cpp
@@ -24,7 +24,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QBarDataItem
* \inmodule QtDataVisualization
* \brief The QBarDataItem class provides a container for resolved data to be added to bar graphs.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* A QBarDataItem holds data for a single rendered bar in a graph.
* Bar data proxies parse data into QBarDataItem instances for visualizing.
diff --git a/src/datavisualization/data/qbardataitem_p.h b/src/datavisualization/data/qbardataitem_p.h
index c06ddea9..623c4012 100644
--- a/src/datavisualization/data/qbardataitem_p.h
+++ b/src/datavisualization/data/qbardataitem_p.h
@@ -39,9 +39,6 @@ class QBarDataItemPrivate
public:
QBarDataItemPrivate();
virtual ~QBarDataItemPrivate();
-
-protected:
- friend class QBarDataItem;
};
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qbardataproxy.cpp b/src/datavisualization/data/qbardataproxy.cpp
index 1c1170ff..8e4f25de 100644
--- a/src/datavisualization/data/qbardataproxy.cpp
+++ b/src/datavisualization/data/qbardataproxy.cpp
@@ -16,7 +16,6 @@
**
****************************************************************************/
-#include "qbardataproxy.h"
#include "qbardataproxy_p.h"
#include "qbar3dseries_p.h"
@@ -26,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QBarDataProxy
* \inmodule QtDataVisualization
* \brief Base proxy class for Q3DBars.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* QBarDataProxy handles adding, inserting, changing and removing rows of data.
*
@@ -554,7 +553,8 @@ void QBarDataProxyPrivate::setRow(int rowIndex, QBarDataRow *row, const QString
}
}
-void QBarDataProxyPrivate::setRows(int rowIndex, const QBarDataArray &rows, const QStringList *labels)
+void QBarDataProxyPrivate::setRows(int rowIndex, const QBarDataArray &rows,
+ const QStringList *labels)
{
QBarDataArray &dataArray = *m_dataArray;
Q_ASSERT(rowIndex >= 0 && (rowIndex + rows.size()) <= dataArray.size());
@@ -604,7 +604,8 @@ void QBarDataProxyPrivate::insertRow(int rowIndex, QBarDataRow *row, const QStri
m_dataArray->insert(rowIndex, row);
}
-void QBarDataProxyPrivate::insertRows(int rowIndex, const QBarDataArray &rows, const QStringList *labels)
+void QBarDataProxyPrivate::insertRows(int rowIndex, const QBarDataArray &rows,
+ const QStringList *labels)
{
Q_ASSERT(rowIndex >= 0 && rowIndex <= m_dataArray->size());
if (labels)
@@ -656,7 +657,8 @@ void QBarDataProxyPrivate::clearArray()
* \internal
* Fixes the row label array to include specified labels.
*/
-void QBarDataProxyPrivate::fixRowLabels(int startIndex, int count, const QStringList &newLabels, bool isInsert)
+void QBarDataProxyPrivate::fixRowLabels(int startIndex, int count, const QStringList &newLabels,
+ bool isInsert)
{
bool changed = false;
int currentSize = m_rowLabels.size();
diff --git a/src/datavisualization/data/qbardataproxy_p.h b/src/datavisualization/data/qbardataproxy_p.h
index eb0a0873..4d1489d9 100644
--- a/src/datavisualization/data/qbardataproxy_p.h
+++ b/src/datavisualization/data/qbardataproxy_p.h
@@ -31,7 +31,6 @@
#include "qbardataproxy.h"
#include "qabstractdataproxy_p.h"
-#include "qbardataitem.h"
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qcustom3ditem.cpp b/src/datavisualization/data/qcustom3ditem.cpp
new file mode 100644
index 00000000..f5d8470f
--- /dev/null
+++ b/src/datavisualization/data/qcustom3ditem.cpp
@@ -0,0 +1,422 @@
+/****************************************************************************
+**
+** 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 "qcustom3ditem_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+/*!
+ * \class QCustom3DItem
+ * \inmodule QtDataVisualization
+ * \brief The QCustom3DItem class is for creating custom items to be added to a graph.
+ * \since QtDataVisualization 1.1
+ *
+ * This class is for creating custom items to be added to a graph. The item has a custom mesh,
+ * position, scaling, rotation, and an optional texture.
+ *
+ * \sa QAbstract3DGraph::addCustomItem()
+ */
+
+/*!
+ * \qmltype Custom3DItem
+ * \inqmlmodule QtDataVisualization
+ * \since QtDataVisualization 1.1
+ * \ingroup datavisualization_qml
+ * \instantiates QCustom3DItem
+ * \brief The Custom3DItem type is for creating custom items to be added to a graph.
+ *
+ * This type is for creating custom items to be added to a graph. The item has a custom mesh,
+ * position, scaling, rotation, and an optional texture.
+ */
+
+/*! \qmlproperty string Custom3DItem::meshFile
+ *
+ * Holds item mesh file name. Item in the file must be in Wavefront obj format and include
+ * vertices, normals, and UVs. It also needs to be in triangles.
+ */
+
+/*! \qmlproperty string Custom3DItem::textureFile
+ *
+ * Holds the texture file name for the item. If left unset, a solid gray texture will be
+ * used.
+ *
+ * \note To conserve memory the Image loaded from the file is cleared after a texture is created.
+ */
+
+/*! \qmlproperty vector3d Custom3DItem::position
+ *
+ * Holds the item \a position as a vector3d. Defaults to \c {vector3d(0.0, 0.0, 0.0)}.
+ *
+ * Item position is either in data coordinates or in absolute coordinates, depending on
+ * positionAbsolute property. When using absolute coordinates, values between \c{-1.0...1.0} are
+ * within axis ranges.
+ *
+ * \note Items positioned outside any axis range are not rendered if positionAbsolute is \c{false}.
+ *
+ * \sa positionAbsolute
+ */
+
+/*! \qmlproperty bool Custom3DItem::positionAbsolute
+ *
+ * This property dictates if item position is to be handled in data coordinates or in absolute
+ * coordinates. Defaults to \c{false}. Items with absolute coordinates will always be rendered,
+ * whereas items with data coordinates are only rendered if they are within axis ranges.
+ *
+ * \sa position
+ */
+
+/*! \qmlproperty vector3d Custom3DItem::scaling
+ *
+ * Holds the item \a scaling as a vector3d. Defaults to \c {vector3d(0.1, 0.1, 0.1)}.
+ * The default value sets the item to 10% of the height of the graph, provided the item size is
+ * normalized.
+ */
+
+/*! \qmlproperty quaternion Custom3DItem::rotation
+ *
+ * Holds the item \a rotation as a quaternion. Defaults to \c {quaternion(0.0, 0.0, 0.0, 0.0)}.
+ */
+
+/*! \qmlproperty bool Custom3DItem::visible
+ *
+ * Sets the item \a visible. Defaults to \c{true}.
+ */
+
+/*! \qmlproperty bool Custom3DItem::shadowCasting
+ *
+ * Sets shadow casting for the item to \a enabled. Defaults to \c{true}.
+ * If set \c{false}, the item does not cast shadows regardless of
+ * \l{QAbstract3DGraph::ShadowQuality}{ShadowQuality}.
+ */
+
+/*!
+ * \qmlmethod void Custom3DItem::setRotationAxisAndAngle(vector3d axis, real angle)
+ *
+ * A convenience function to construct rotation quaternion from \a axis and \a angle.
+ *
+ * \sa rotation
+ */
+
+/*!
+ * Constructs QCustom3DItem with given \a parent.
+ */
+QCustom3DItem::QCustom3DItem(QObject *parent) :
+ QObject(parent),
+ d_ptr(new QCustom3DItemPrivate(this))
+{
+ setTextureImage(QImage());
+}
+
+/*!
+ * \internal
+ */
+QCustom3DItem::QCustom3DItem(QCustom3DItemPrivate *d, QObject *parent) :
+ QObject(parent),
+ d_ptr(d)
+{
+ setTextureImage(QImage());
+}
+
+/*!
+ * Constructs QCustom3DItem with given \a meshFile, \a position, \a scaling,
+ * \a rotation, \a texture image, and optional \a parent.
+ */
+QCustom3DItem::QCustom3DItem(const QString &meshFile, const QVector3D &position,
+ const QVector3D &scaling, const QQuaternion &rotation,
+ const QImage &texture, QObject *parent) :
+ QObject(parent),
+ d_ptr(new QCustom3DItemPrivate(this, meshFile, position, scaling, rotation))
+{
+ setTextureImage(texture);
+}
+
+/*!
+ * Destroys QCustom3DItem.
+ */
+QCustom3DItem::~QCustom3DItem()
+{
+}
+
+/*! \property QCustom3DItem::meshFile
+ *
+ * Holds item mesh file name. Item in the file must be in Wavefront obj format and include
+ * vertices, normals, and UVs. It also needs to be in triangles.
+ */
+void QCustom3DItem::setMeshFile(const QString &meshFile)
+{
+ if (d_ptr->m_meshFile != meshFile) {
+ d_ptr->m_meshFile = meshFile;
+ d_ptr->m_dirtyBits.meshDirty = true;
+ emit meshFileChanged(meshFile);
+ emit d_ptr->needUpdate();
+ }
+}
+
+QString QCustom3DItem::meshFile() const
+{
+ return d_ptr->m_meshFile;
+}
+
+/*! \property QCustom3DItem::position
+ *
+ * Holds the item \a position as a QVector3D. Defaults to \c {QVector3D(0.0, 0.0, 0.0)}.
+ *
+ * Item position is either in data coordinates or in absolute coordinates, depending on
+ * positionAbsolute property. When using absolute coordinates, values between \c{-1.0...1.0} are
+ * within axis ranges.
+ *
+ * \note Items positioned outside any axis range are not rendered if positionAbsolute is \c{false}.
+ *
+ * \sa positionAbsolute
+ */
+void QCustom3DItem::setPosition(const QVector3D &position)
+{
+ if (d_ptr->m_position != position) {
+ d_ptr->m_position = position;
+ d_ptr->m_dirtyBits.positionDirty = true;
+ emit positionChanged(position);
+ emit d_ptr->needUpdate();
+ }
+}
+
+QVector3D QCustom3DItem::position() const
+{
+ return d_ptr->m_position;
+}
+
+/*! \property QCustom3DItem::positionAbsolute
+ *
+ * This property dictates if item position is to be handled in data coordinates or in absolute
+ * coordinates. Defaults to \c{false}. Items with absolute coordinates will always be rendered,
+ * whereas items with data coordinates are only rendered if they are within axis ranges.
+ *
+ * \sa position
+ */
+void QCustom3DItem::setPositionAbsolute(bool positionAbsolute)
+{
+ if (d_ptr->m_positionAbsolute != positionAbsolute) {
+ d_ptr->m_positionAbsolute = positionAbsolute;
+ d_ptr->m_dirtyBits.positionAbsoluteDirty = true;
+ emit positionAbsoluteChanged(positionAbsolute);
+ emit d_ptr->needUpdate();
+ }
+}
+
+bool QCustom3DItem::isPositionAbsolute() const
+{
+ return d_ptr->m_positionAbsolute;
+}
+
+/*! \property QCustom3DItem::scaling
+ *
+ * Holds the item \a scaling as a QVector3D. Defaults to \c {QVector3D(0.1, 0.1, 0.1)}.
+ * The default value sets the item to 10% of the height of the graph, provided the item size is
+ * normalized.
+ */
+void QCustom3DItem::setScaling(const QVector3D &scaling)
+{
+ if (d_ptr->m_scaling != scaling) {
+ d_ptr->m_scaling = scaling;
+ d_ptr->m_dirtyBits.scalingDirty = true;
+ emit scalingChanged(scaling);
+ emit d_ptr->needUpdate();
+ }
+}
+
+QVector3D QCustom3DItem::scaling() const
+{
+ return d_ptr->m_scaling;
+}
+
+/*! \property QCustom3DItem::rotation
+ *
+ * Holds the item \a rotation as a QQuaternion. Defaults to \c {QQuaternion(0.0, 0.0, 0.0, 0.0)}.
+ */
+void QCustom3DItem::setRotation(const QQuaternion &rotation)
+{
+ if (d_ptr->m_rotation != rotation) {
+ d_ptr->m_rotation = rotation;
+ d_ptr->m_dirtyBits.rotationDirty = true;
+ emit rotationChanged(rotation);
+ emit d_ptr->needUpdate();
+ }
+}
+
+QQuaternion QCustom3DItem::rotation()
+{
+ return d_ptr->m_rotation;
+}
+
+/*! \property QCustom3DItem::visible
+ *
+ * Sets the item \a visible. Defaults to \c{true}.
+ */
+void QCustom3DItem::setVisible(bool visible)
+{
+ if (d_ptr->m_visible != visible) {
+ d_ptr->m_visible = visible;
+ d_ptr->m_dirtyBits.visibleDirty = true;
+ emit visibleChanged(visible);
+ emit d_ptr->needUpdate();
+ }
+}
+
+bool QCustom3DItem::isVisible() const
+{
+ return d_ptr->m_visible;
+}
+
+
+/*! \property QCustom3DItem::shadowCasting
+ *
+ * Sets shadow casting for the item to \a enabled. Defaults to \c{true}.
+ * If set \c{false}, the item does not cast shadows regardless of QAbstract3DGraph::ShadowQuality.
+ */
+void QCustom3DItem::setShadowCasting(bool enabled)
+{
+ if (d_ptr->m_shadowCasting != enabled) {
+ d_ptr->m_shadowCasting = enabled;
+ d_ptr->m_dirtyBits.shadowCastingDirty = true;
+ emit shadowCastingChanged(enabled);
+ emit d_ptr->needUpdate();
+ }
+}
+
+bool QCustom3DItem::isShadowCasting() const
+{
+ return d_ptr->m_shadowCasting;
+}
+
+/*!
+ * A convenience function to construct rotation quaternion from \a axis and \a angle.
+ *
+ * \sa rotation
+ */
+void QCustom3DItem::setRotationAxisAndAngle(const QVector3D &axis, float angle)
+{
+ setRotation(QQuaternion::fromAxisAndAngle(axis, angle));
+}
+
+/*!
+ * Set the \a textureImage as a QImage for the item. Texture defaults to solid gray.
+ *
+ * \note To conserve memory the given QImage is cleared after a texture is created.
+ */
+void QCustom3DItem::setTextureImage(const QImage &textureImage)
+{
+ if (textureImage != d_ptr->m_textureImage) {
+ if (textureImage.isNull()) {
+ // Make a solid gray texture
+ d_ptr->m_textureImage = QImage(2, 2, QImage::Format_RGB32);
+ d_ptr->m_textureImage.fill(Qt::gray);
+ } else {
+ d_ptr->m_textureImage = textureImage;
+ }
+
+ if (!d_ptr->m_textureFile.isEmpty()) {
+ d_ptr->m_textureFile.clear();
+ emit textureFileChanged(d_ptr->m_textureFile);
+ }
+ d_ptr->m_dirtyBits.textureDirty = true;
+ emit d_ptr->needUpdate();
+ }
+}
+
+/*! \property QCustom3DItem::textureFile
+ *
+ * Holds the texture file name for the item. If both this and texture image are unset, a solid
+ * gray texture will be used.
+ *
+ * \note To conserve memory the QImage loaded from the file is cleared after a texture is created.
+ */
+void QCustom3DItem::setTextureFile(const QString &textureFile)
+{
+ if (d_ptr->m_textureFile != textureFile) {
+ d_ptr->m_textureFile = textureFile;
+ if (!textureFile.isEmpty()) {
+ d_ptr->m_textureImage = QImage(textureFile);
+ } else {
+ d_ptr->m_textureImage = QImage(2, 2, QImage::Format_RGB32);
+ d_ptr->m_textureImage.fill(Qt::gray);
+ }
+ emit textureFileChanged(textureFile);
+ d_ptr->m_dirtyBits.textureDirty = true;
+ emit d_ptr->needUpdate();
+ }
+}
+
+QString QCustom3DItem::textureFile() const
+{
+ return d_ptr->m_textureFile;
+}
+
+QCustom3DItemPrivate::QCustom3DItemPrivate(QCustom3DItem *q) :
+ q_ptr(q),
+ m_position(QVector3D(0.0f, 0.0f, 0.0f)),
+ m_positionAbsolute(false),
+ m_scaling(QVector3D(0.1f, 0.1f, 0.1f)),
+ m_rotation(QQuaternion(0.0f, 0.0f, 0.0f, 0.0f)),
+ m_visible(true),
+ m_shadowCasting(true),
+ m_isLabelItem(false)
+{
+}
+
+QCustom3DItemPrivate::QCustom3DItemPrivate(QCustom3DItem *q, const QString &meshFile,
+ const QVector3D &position, const QVector3D &scaling,
+ const QQuaternion &rotation) :
+ q_ptr(q),
+ m_meshFile(meshFile),
+ m_position(position),
+ m_positionAbsolute(false),
+ m_scaling(scaling),
+ m_rotation(rotation),
+ m_visible(true),
+ m_shadowCasting(true),
+ m_isLabelItem(false)
+{
+}
+
+QCustom3DItemPrivate::~QCustom3DItemPrivate()
+{
+}
+
+QImage QCustom3DItemPrivate::textureImage()
+{
+ return m_textureImage;
+}
+
+void QCustom3DItemPrivate::clearTextureImage()
+{
+ m_textureImage = QImage();
+ m_textureFile.clear();
+}
+
+void QCustom3DItemPrivate::resetDirtyBits()
+{
+ m_dirtyBits.textureDirty = false;
+ m_dirtyBits.meshDirty = false;
+ m_dirtyBits.positionDirty = false;
+ m_dirtyBits.positionAbsoluteDirty = false;
+ m_dirtyBits.scalingDirty = false;
+ m_dirtyBits.rotationDirty = false;
+ m_dirtyBits.visibleDirty = false;
+ m_dirtyBits.shadowCastingDirty = false;
+}
+
+QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qcustom3ditem.h b/src/datavisualization/data/qcustom3ditem.h
new file mode 100644
index 00000000..2f7f37cf
--- /dev/null
+++ b/src/datavisualization/data/qcustom3ditem.h
@@ -0,0 +1,102 @@
+/****************************************************************************
+**
+** 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 QCUSTOM3DITEM_H
+#define QCUSTOM3DITEM_H
+
+#include <QtDataVisualization/qdatavisualizationglobal.h>
+#include <QtGui/QImage>
+#include <QtGui/QVector3D>
+#include <QtGui/QQuaternion>
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QCustom3DItemPrivate;
+
+class QT_DATAVISUALIZATION_EXPORT QCustom3DItem : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString meshFile READ meshFile WRITE setMeshFile NOTIFY meshFileChanged)
+ Q_PROPERTY(QString textureFile READ textureFile WRITE setTextureFile NOTIFY textureFileChanged)
+ Q_PROPERTY(QVector3D position READ position WRITE setPosition NOTIFY positionChanged)
+ Q_PROPERTY(bool positionAbsolute READ isPositionAbsolute WRITE setPositionAbsolute NOTIFY positionAbsoluteChanged)
+ Q_PROPERTY(QVector3D scaling READ scaling WRITE setScaling NOTIFY scalingChanged)
+ Q_PROPERTY(QQuaternion rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
+ Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
+ Q_PROPERTY(bool shadowCasting READ isShadowCasting WRITE setShadowCasting NOTIFY shadowCastingChanged)
+
+public:
+ explicit QCustom3DItem(QObject *parent = 0);
+ explicit QCustom3DItem(const QString &meshFile, const QVector3D &position,
+ const QVector3D &scaling, const QQuaternion &rotation,
+ const QImage &texture, QObject *parent = 0);
+ virtual ~QCustom3DItem();
+
+ void setMeshFile(const QString &meshFile);
+ QString meshFile() const;
+
+ void setTextureFile(const QString &textureFile);
+ QString textureFile() const;
+
+ void setPosition(const QVector3D &position);
+ QVector3D position() const;
+
+ void setPositionAbsolute(bool positionAbsolute);
+ bool isPositionAbsolute() const;
+
+ void setScaling(const QVector3D &scaling);
+ QVector3D scaling() const;
+
+ void setRotation(const QQuaternion &rotation);
+ QQuaternion rotation();
+
+ void setVisible(bool visible);
+ bool isVisible() const;
+
+ void setShadowCasting(bool enabled);
+ bool isShadowCasting() const;
+
+ Q_INVOKABLE void setRotationAxisAndAngle(const QVector3D &axis, float angle);
+
+ void setTextureImage(const QImage &textureImage);
+
+signals:
+ void meshFileChanged(const QString &meshFile);
+ void textureFileChanged(const QString &textureFile);
+ void positionChanged(const QVector3D &position);
+ void positionAbsoluteChanged(bool positionAbsolute);
+ void scalingChanged(const QVector3D &scaling);
+ void rotationChanged(const QQuaternion &rotation);
+ void visibleChanged(bool visible);
+ void shadowCastingChanged(bool shadowCasting);
+
+protected:
+ QCustom3DItem(QCustom3DItemPrivate *d, QObject *parent = 0);
+
+ QScopedPointer<QCustom3DItemPrivate> d_ptr;
+
+private:
+ Q_DISABLE_COPY(QCustom3DItem)
+
+ friend class Abstract3DRenderer;
+ friend class Abstract3DController;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/data/qcustom3ditem_p.h b/src/datavisualization/data/qcustom3ditem_p.h
new file mode 100644
index 00000000..c1ce5996
--- /dev/null
+++ b/src/datavisualization/data/qcustom3ditem_p.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QtDataVisualization API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef QCUSTOM3DITEM_P_H
+#define QCUSTOM3DITEM_P_H
+
+#include "qcustom3ditem.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+struct QCustomItemDirtyBitField {
+ bool textureDirty : 1;
+ bool meshDirty : 1;
+ bool positionDirty : 1;
+ bool positionAbsoluteDirty : 1;
+ bool scalingDirty : 1;
+ bool rotationDirty : 1;
+ bool visibleDirty : 1;
+ bool shadowCastingDirty : 1;
+
+ QCustomItemDirtyBitField()
+ : textureDirty(false),
+ meshDirty(false),
+ positionDirty(false),
+ positionAbsoluteDirty(false),
+ scalingDirty(false),
+ rotationDirty(false),
+ visibleDirty(false),
+ shadowCastingDirty(false)
+ {
+ }
+};
+
+class QCustom3DItemPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ QCustom3DItemPrivate(QCustom3DItem *q);
+ QCustom3DItemPrivate(QCustom3DItem *q, const QString &meshFile, const QVector3D &position,
+ const QVector3D &scaling, const QQuaternion &rotation);
+ virtual ~QCustom3DItemPrivate();
+
+ QImage textureImage();
+ void clearTextureImage();
+ void resetDirtyBits();
+
+public:
+ QCustom3DItem *q_ptr;
+ QImage m_textureImage;
+ QString m_textureFile;
+ QString m_meshFile;
+ QVector3D m_position;
+ bool m_positionAbsolute;
+ QVector3D m_scaling;
+ QQuaternion m_rotation;
+ bool m_visible;
+ bool m_shadowCasting;
+
+ bool m_isLabelItem;
+
+ QCustomItemDirtyBitField m_dirtyBits;
+
+signals:
+ void needUpdate();
+
+private:
+ QCustom3DItemPrivate(QCustom3DItemPrivate *d);
+
+ friend class QCustom3DItem;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/data/qcustom3dlabel.cpp b/src/datavisualization/data/qcustom3dlabel.cpp
new file mode 100644
index 00000000..85a37e2d
--- /dev/null
+++ b/src/datavisualization/data/qcustom3dlabel.cpp
@@ -0,0 +1,358 @@
+/****************************************************************************
+**
+** 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 "qcustom3dlabel_p.h"
+#include "utils_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+/*!
+ * \class QCustom3DLabel
+ * \inmodule QtDataVisualization
+ * \brief The QCustom3DLabel class is for creating custom labels to be added to a graph.
+ * \since QtDataVisualization 1.1
+ *
+ * This class is for creating custom labels to be added to a graph. You can set text, font,
+ * position, scaling, rotation, and colors. You can also toggle borders and background for the
+ * label. Colors, borders and background are used from active theme unless any of them is set
+ * explicitly.
+ *
+ * \note In scaling, z has no effect. Setting the same x and y retains the original
+ * font dimensions.
+ *
+ * \sa QAbstract3DGraph::addCustomItem()
+ */
+
+/*!
+ * \qmltype Custom3DLabel
+ * \inqmlmodule QtDataVisualization
+ * \since QtDataVisualization 1.1
+ * \ingroup datavisualization_qml
+ * \instantiates QCustom3DLabel
+ * \brief The Custom3DLabel type is for creating custom labels to be added to a graph.
+ *
+ * This type is for creating custom labels to be added to a graph. You can set text, font,
+ * position, scaling, rotation, and colors. You can also toggle borders and background for the
+ * label. Colors, borders and background are used from active theme unless any of them is set
+ * explicitly.
+ *
+ * \note In scaling, z has no effect. Setting the same x and y retains the original
+ * font dimensions.
+ */
+
+/*! \qmlproperty string Custom3DLabel::text
+ *
+ * The text for the label. Rich text is not supported.
+ */
+
+/*! \qmlproperty font Custom3DLabel::font
+ *
+ * The font to be used for the label. Defaults to \c{Font {family: "Arial"; pointSize: 20}}.
+ * Special formatting (for example outlined) is not supported.
+ */
+
+/*! \qmlproperty color Custom3DLabel::textColor
+ *
+ * Color for the label text. Also affects label border, if enabled. Defaults to \c{"white"}.
+ *
+ * \sa borderEnabled
+ */
+
+/*! \qmlproperty color Custom3DLabel::backgroundColor
+ *
+ * Color for the label background, if enabled. Defaults to \c{"gray"}.
+ *
+ * \sa backgroundEnabled
+ */
+
+/*! \qmlproperty bool Custom3DLabel::backgroundEnabled
+ *
+ * Enable label background. If set to \c{false}, backgroundColor has no effect. Defaults
+ * to \c{true}.
+ */
+
+/*! \qmlproperty bool Custom3DLabel::borderEnabled
+ *
+ * Enable label borders. Defaults to \c{true}.
+ */
+
+/*! \qmlproperty bool Custom3DLabel::facingCamera
+ *
+ * Forces the label to face camera always. Defaults to \c{false}. If set to \c{true}, rotation()
+ * has no effect.
+ */
+
+/*!
+ * Constructs QCustom3DLabel with given \a parent.
+ */
+QCustom3DLabel::QCustom3DLabel(QObject *parent) :
+ QCustom3DItem(new QCustom3DLabelPrivate(this), parent)
+{
+}
+
+/*!
+ * Constructs QCustom3DLabel with given \a text, \a font, \a position, \a scaling,
+ * \a rotation, and optional \a parent.
+ *
+ * \note Setting the same x and y for \a scaling retains the original font dimensions.
+ */
+QCustom3DLabel::QCustom3DLabel(const QString &text, const QFont &font,
+ const QVector3D &position, const QVector3D &scaling,
+ const QQuaternion &rotation, QObject *parent) :
+ QCustom3DItem(new QCustom3DLabelPrivate(this, text, font, position, scaling, rotation),
+ parent)
+{
+}
+
+/*!
+ * Destroys QCustom3DLabel.
+ */
+QCustom3DLabel::~QCustom3DLabel()
+{
+}
+
+/*! \property QCustom3DLabel::text
+ *
+ * The text for the label. Rich text is not supported.
+ */
+void QCustom3DLabel::setText(const QString &text)
+{
+ if (dptr()->m_text != text) {
+ dptr()->m_text = text;
+ dptr()->handleTextureChange();
+ emit textChanged(text);
+ emit dptr()->needUpdate();
+ }
+}
+
+QString QCustom3DLabel::text() const
+{
+ return dptrc()->m_text;
+}
+
+/*! \property QCustom3DLabel::font
+ *
+ * The font to be used for the label. Defaults to \c{QFont("Arial", 20)}. Special formatting
+ * (for example outlined) is not supported.
+ */
+void QCustom3DLabel::setFont(const QFont &font)
+{
+ if (dptr()->m_font != font) {
+ dptr()->m_font = font;
+ dptr()->handleTextureChange();
+ emit fontChanged(font);
+ emit dptr()->needUpdate();
+ }
+}
+
+QFont QCustom3DLabel::font() const
+{
+ return dptrc()->m_font;
+}
+
+/*! \property QCustom3DLabel::textColor
+ *
+ * Color for the label text. Also affects label border, if enabled. Defaults to \c{Qt::white}.
+ *
+ * \sa borderEnabled
+ */
+void QCustom3DLabel::setTextColor(const QColor &color)
+{
+ if (dptr()->m_txtColor != color) {
+ dptr()->m_txtColor = color;
+ dptr()->m_customVisuals = true;
+ dptr()->handleTextureChange();
+ emit textColorChanged(color);
+ emit dptr()->needUpdate();
+ }
+}
+
+QColor QCustom3DLabel::textColor() const
+{
+ return dptrc()->m_txtColor;
+}
+
+/*! \property QCustom3DLabel::backgroundColor
+ *
+ * Color for the label background, if enabled. Defaults to \c{Qt::gray}.
+ *
+ * \sa backgroundEnabled
+ */
+void QCustom3DLabel::setBackgroundColor(const QColor &color)
+{
+ if (dptr()->m_bgrColor != color) {
+ dptr()->m_bgrColor = color;
+ dptr()->m_customVisuals = true;
+ dptr()->handleTextureChange();
+ emit backgroundColorChanged(color);
+ emit dptr()->needUpdate();
+ }
+}
+
+QColor QCustom3DLabel::backgroundColor() const
+{
+ return dptrc()->m_bgrColor;
+}
+
+/*! \property QCustom3DLabel::borderEnabled
+ *
+ * Enable label borders. Defaults to \c{true}.
+ */
+void QCustom3DLabel::setBorderEnabled(bool enabled)
+{
+ if (dptr()->m_borders != enabled) {
+ dptr()->m_borders = enabled;
+ dptr()->m_customVisuals = true;
+ dptr()->handleTextureChange();
+ emit borderEnabledChanged(enabled);
+ emit dptr()->needUpdate();
+ }
+}
+
+bool QCustom3DLabel::isBorderEnabled() const
+{
+ return dptrc()->m_borders;
+}
+
+/*! \property QCustom3DLabel::backgroundEnabled
+ *
+ * Enable label background. If set to \c{false}, backgroundColor() has no effect. Defaults
+ * to \c{true}.
+ */
+void QCustom3DLabel::setBackgroundEnabled(bool enabled)
+{
+ if (dptr()->m_background != enabled) {
+ dptr()->m_background = enabled;
+ dptr()->m_customVisuals = true;
+ dptr()->handleTextureChange();
+ emit backgroundEnabledChanged(enabled);
+ emit dptr()->needUpdate();
+ }
+}
+
+bool QCustom3DLabel::isBackgroundEnabled() const
+{
+ return dptrc()->m_background;
+}
+
+/*! \property QCustom3DLabel::facingCamera
+ *
+ * Forces the label to face camera always. Defaults to \c{false}. If set to \c{true}, rotation()
+ * has no effect.
+ */
+void QCustom3DLabel::setFacingCamera(bool enabled)
+{
+ if (dptr()->m_facingCamera != enabled) {
+ dptr()->m_facingCamera = enabled;
+ dptr()->m_facingCameraDirty = true;
+ emit facingCameraChanged(enabled);
+ emit dptr()->needUpdate();
+ }
+}
+
+bool QCustom3DLabel::isFacingCamera() const
+{
+ return dptrc()->m_facingCamera;
+}
+
+/*!
+ * \internal
+ */
+QCustom3DLabelPrivate *QCustom3DLabel::dptr()
+{
+ return static_cast<QCustom3DLabelPrivate *>(d_ptr.data());
+}
+
+/*!
+ * \internal
+ */
+const QCustom3DLabelPrivate *QCustom3DLabel::dptrc() const
+{
+ return static_cast<const QCustom3DLabelPrivate *>(d_ptr.data());
+}
+
+QCustom3DLabelPrivate::QCustom3DLabelPrivate(QCustom3DLabel *q) :
+ QCustom3DItemPrivate(q),
+ m_font(QFont(QStringLiteral("Arial"), 20)),
+ m_bgrColor(Qt::gray),
+ m_txtColor(Qt::white),
+ m_background(true),
+ m_borders(true),
+ m_facingCamera(false),
+ m_customVisuals(false),
+ m_facingCameraDirty(false)
+{
+ m_isLabelItem = true;
+ m_shadowCasting = false;
+ m_meshFile = QStringLiteral(":/defaultMeshes/plane");
+ createTextureImage();
+}
+
+QCustom3DLabelPrivate::QCustom3DLabelPrivate(QCustom3DLabel *q, const QString &text,
+ const QFont &font, const QVector3D &position,
+ const QVector3D &scaling,
+ const QQuaternion &rotation) :
+ QCustom3DItemPrivate(q, QStringLiteral(":/defaultMeshes/plane"), position, scaling, rotation),
+ m_text(text),
+ m_font(font),
+ m_bgrColor(Qt::gray),
+ m_txtColor(Qt::white),
+ m_background(true),
+ m_borders(true),
+ m_facingCamera(false),
+ m_customVisuals(false),
+ m_facingCameraDirty(false)
+{
+ m_isLabelItem = true;
+ m_shadowCasting = false;
+ createTextureImage();
+}
+
+QCustom3DLabelPrivate::~QCustom3DLabelPrivate()
+{
+}
+
+void QCustom3DLabelPrivate::resetDirtyBits()
+{
+ QCustom3DItemPrivate::resetDirtyBits();
+ m_facingCameraDirty = false;
+}
+
+void QCustom3DLabelPrivate::createTextureImage()
+{
+ createTextureImage(m_bgrColor, m_txtColor, m_background, m_borders);
+}
+
+void QCustom3DLabelPrivate::createTextureImage(const QColor &bgrColor, const QColor &txtColor,
+ bool background, bool borders)
+{
+ m_textureImage = Utils::printTextToImage(m_font, m_text, bgrColor, txtColor, background,
+ borders, 0);
+}
+
+void QCustom3DLabelPrivate::handleTextureChange()
+{
+ createTextureImage();
+ m_dirtyBits.textureDirty = true;
+ if (!m_textureFile.isEmpty()) {
+ m_textureFile.clear();
+ emit q_ptr->textureFileChanged(m_textureFile);
+ }
+}
+
+QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qcustom3dlabel.h b/src/datavisualization/data/qcustom3dlabel.h
new file mode 100644
index 00000000..f42ee378
--- /dev/null
+++ b/src/datavisualization/data/qcustom3dlabel.h
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** 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 QCUSTOMLABELITEM_H
+#define QCUSTOMLABELITEM_H
+
+#include <QtDataVisualization/qdatavisualizationglobal.h>
+#include <QtDataVisualization/QCustom3DItem>
+#include <QtGui/QVector3D>
+#include <QtGui/QQuaternion>
+#include <QtGui/QFont>
+#include <QtGui/QColor>
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QCustom3DLabelPrivate;
+
+class QT_DATAVISUALIZATION_EXPORT QCustom3DLabel : public QCustom3DItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
+ Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
+ Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor NOTIFY textColorChanged)
+ Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged)
+ Q_PROPERTY(bool borderEnabled READ isBorderEnabled WRITE setBorderEnabled NOTIFY borderEnabledChanged)
+ Q_PROPERTY(bool backgroundEnabled READ isBackgroundEnabled WRITE setBackgroundEnabled NOTIFY backgroundEnabledChanged)
+ Q_PROPERTY(bool facingCamera READ isFacingCamera WRITE setFacingCamera NOTIFY facingCameraChanged)
+
+public:
+ explicit QCustom3DLabel(QObject *parent = 0);
+ explicit QCustom3DLabel(const QString &text, const QFont &font, const QVector3D &position,
+ const QVector3D &scaling, const QQuaternion &rotation,
+ QObject *parent = 0);
+ virtual ~QCustom3DLabel();
+
+ void setText(const QString &text);
+ QString text() const;
+
+ void setFont(const QFont &font);
+ QFont font() const;
+
+ void setTextColor(const QColor &color);
+ QColor textColor() const;
+
+ void setBackgroundColor(const QColor &color);
+ QColor backgroundColor() const;
+
+ void setBorderEnabled(bool enabled);
+ bool isBorderEnabled() const;
+
+ void setBackgroundEnabled(bool enabled);
+ bool isBackgroundEnabled() const;
+
+ void setFacingCamera(bool enabled);
+ bool isFacingCamera() const;
+
+signals:
+ void textChanged(const QString &text);
+ void fontChanged(const QFont &font);
+ void textColorChanged(const QColor &color);
+ void backgroundColorChanged(const QColor &color);
+ void borderEnabledChanged(bool enabled);
+ void backgroundEnabledChanged(bool enabled);
+ void facingCameraChanged(bool enabled);
+
+protected:
+ QCustom3DLabelPrivate *dptr();
+ const QCustom3DLabelPrivate *dptrc() const;
+
+private:
+ Q_DISABLE_COPY(QCustom3DLabel)
+
+ friend class Abstract3DRenderer;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/data/qcustom3dlabel_p.h b/src/datavisualization/data/qcustom3dlabel_p.h
new file mode 100644
index 00000000..0bb0e017
--- /dev/null
+++ b/src/datavisualization/data/qcustom3dlabel_p.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** 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
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QtDataVisualization API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef QCUSTOMLABELITEM_P_H
+#define QCUSTOMLABELITEM_P_H
+
+#include "qcustom3dlabel.h"
+#include "qcustom3ditem_p.h"
+
+QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+
+class QCustom3DLabelPrivate : public QCustom3DItemPrivate
+{
+ Q_OBJECT
+
+public:
+ QCustom3DLabelPrivate(QCustom3DLabel *q);
+ QCustom3DLabelPrivate(QCustom3DLabel *q, const QString &text, const QFont &font,
+ const QVector3D &position, const QVector3D &scaling,
+ const QQuaternion &rotation);
+ virtual ~QCustom3DLabelPrivate();
+
+ void resetDirtyBits();
+ void createTextureImage();
+ void createTextureImage(const QColor &bgrColor, const QColor &txtColor, bool background,
+ bool borders);
+ void handleTextureChange();
+
+public:
+ QString m_text;
+ QFont m_font;
+ QColor m_bgrColor;
+ QColor m_txtColor;
+ bool m_background;
+ bool m_borders;
+ bool m_facingCamera;
+
+ bool m_customVisuals;
+
+ bool m_facingCameraDirty;
+
+private:
+ friend class QCustom3DLabel;
+};
+
+QT_END_NAMESPACE_DATAVISUALIZATION
+
+#endif
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
index 56fcf5d1..d64046be 100644
--- a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
@@ -28,7 +28,7 @@ const float defaultMaxValue = 10.0f;
* \class QHeightMapSurfaceDataProxy
* \inmodule QtDataVisualization
* \brief Base proxy class for Q3DSurface.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* QHeightMapSurfaceDataProxy takes care of surface related height map data handling. It provides a
* way to give a height map to be visualized as a surface plot.
diff --git a/src/datavisualization/data/qitemmodelbardataproxy.cpp b/src/datavisualization/data/qitemmodelbardataproxy.cpp
index 2281e33f..3d4a980a 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelbardataproxy.cpp
@@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QItemModelBarDataProxy
* \inmodule QtDataVisualization
* \brief Proxy class for presenting data in item models with Q3DBars.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* QItemModelBarDataProxy allows you to use QAbstractItemModel derived models as a data source
* for Q3DBars. It uses the defined mappings to map data from the model to rows, columns, and
@@ -33,6 +33,9 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* The data is resolved asynchronously whenever mappings or the model changes.
* QBarDataProxy::arrayReset() is emitted when the data has been resolved.
+ * However, when useModelCategories property is set to true, single item changes are resolved
+ * synchronously, unless the same frame also contains a change that causes the whole model to be
+ * resolved.
*
* There are three ways to use mappings:
*
@@ -50,12 +53,22 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* and in which order by defining an explicit list of categories for either or both of rows and
* columns.
*
- * For example, assume that you have a custom QAbstractItemModel for storing various monthly values
- * related to a business.
- * Each item in the model has the roles "year", "month", "income", and "expenses".
- * You could do the following to display the data in a bar graph:
+ * For example, assume that you have a custom QAbstractItemModel for storing various monthly values
+ * related to a business.
+ * Each item in the model has the roles "year", "month", "income", and "expenses".
+ * You could do the following to display the data in a bar graph:
+ *
+ * \snippet doc_src_qtdatavisualization.cpp 3
+ *
+ * If the fields of the model do not contain the data in the exact format you need, you can specify
+ * a search pattern regular expression and a replace rule for each role to get the value in a
+ * format you need. For more information how the replace using regular expressions works, see
+ * QString::replace(const QRegExp &rx, const QString &after) function documentation. Note that
+ * using regular expressions has an impact on the performance, so it's more efficient to utilize
+ * item models where doing search and replace is not necessary to get the desired values.
*
- * \snippet doc_src_qtdatavisualization.cpp 3
+ * For example about using the search patterns in conjunction with the roles, see
+ * \l{Qt Quick 2 Bars Example}.
*
* \sa {Qt Data Visualization Data Handling}
*/
@@ -74,6 +87,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* Data is resolved asynchronously whenever the mapping or the model changes.
* QBarDataProxy::arrayReset() is emitted when the data has been resolved.
*
+ * For ItemModelBarDataProxy enums, see \l{QItemModelBarDataProxy::MultiMatchBehavior}.
+ *
* For more details, see QItemModelBarDataProxy documentation.
*
* Usage example:
@@ -90,35 +105,36 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty string ItemModelBarDataProxy::rowRole
- * The row role of the mapping.
+ * Defines the item model role to map into row category.
*/
/*!
* \qmlproperty string ItemModelBarDataProxy::columnRole
- * The column role of the mapping.
+ * Defines the item model role to map into column category.
*/
/*!
* \qmlproperty string ItemModelBarDataProxy::valueRole
- * The value role of the mapping.
+ * Defines the item model role to map into bar value.
*/
/*!
* \qmlproperty string ItemModelBarDataProxy::rotationRole
- *
- * Defines the rotation role for the mapping.
+ * Defines the item model role to map into bar rotation angle.
*/
/*!
* \qmlproperty list<String> ItemModelBarDataProxy::rowCategories
- * The row categories of the mapping. Only items with row roles that are found in this list are
- * included when the data is resolved. The rows are ordered in the same order as they are in this list.
+ * The row categories of the mapping. Only items with row role values that are found in this list
+ * are included when the data is resolved. The rows are ordered in the same order as they are in
+ * this list.
*/
/*!
* \qmlproperty list<String> ItemModelBarDataProxy::columnCategories
- * The column categories of the mapping. Only items with column roles that are found in this list are
- * included when the data is resolved. The columns are ordered in the same order as they are in this list.
+ * The column categories of the mapping. Only items with column role values that are found in this
+ * list are included when the data is resolved. The columns are ordered in the same order as they
+ * are in this list.
*/
/*!
@@ -143,6 +159,117 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
+ * \qmlproperty regExp ItemModelBarDataProxy::rowRolePattern
+ * When set, a search and replace is done on the value mapped by row role before it is used as
+ * a row category. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and rowRoleReplace property contains the replacement string.
+ * This is useful for example in parsing row and column categories from a single
+ * timestamp field in the item model.
+ *
+ * \sa rowRole, rowRoleReplace
+ */
+
+/*!
+ * \qmlproperty regExp ItemModelBarDataProxy::columnRolePattern
+ * When set, a search and replace is done on the value mapped by column role before it is used
+ * as a column category. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and columnRoleReplace property contains the replacement string.
+ * This is useful for example in parsing row and column categories from
+ * a single timestamp field in the item model.
+ *
+ * \sa columnRole, columnRoleReplace
+ */
+
+/*!
+ * \qmlproperty regExp ItemModelBarDataProxy::valueRolePattern
+ * When set, a search and replace is done on the value mapped by value role before it is used as
+ * a bar value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and valueRoleReplace property contains the replacement string.
+ *
+ * \sa valueRole, valueRoleReplace
+ */
+
+/*!
+ * \qmlproperty regExp ItemModelBarDataProxy::rotationRolePattern
+ * When set, a search and replace is done on the value mapped by rotation role before it is used
+ * as a bar rotation angle. This property specifies the regular expression to find the portion
+ * of the mapped value to replace and rotationRoleReplace property contains the replacement string.
+ *
+ * \sa rotationRole, rotationRoleReplace
+ */
+
+/*!
+ * \qmlproperty string ItemModelBarDataProxy::rowRoleReplace
+ * This property defines the replace content to be used in conjunction with rowRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa rowRole, rowRolePattern
+ */
+
+/*!
+ * \qmlproperty string ItemModelBarDataProxy::columnRoleReplace
+ * This property defines the replace content to be used in conjunction with columnRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa columnRole, columnRolePattern
+ */
+
+/*!
+ * \qmlproperty string ItemModelBarDataProxy::valueRoleReplace
+ * This property defines the replace content to be used in conjunction with valueRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa valueRole, valueRolePattern
+ */
+
+/*!
+ * \qmlproperty string ItemModelBarDataProxy::rotationRoleReplace
+ * This property defines the replace content to be used in conjunction with rotationRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa rotationRole, rotationRolePattern
+ */
+
+/*!
+ * \qmlproperty ItemModelBarDataProxy.MultiMatchBehavior ItemModelBarDataProxy::multiMatchBehavior
+ * This property defines how multiple matches for each row/column combination are handled.
+ * Defaults to ItemModelBarDataProxy.MMBLast. The chosen behavior affects both bar value
+ * and rotation.
+ *
+ * For example, you might have an item model with timestamped data taken at irregular intervals
+ * and you want to visualize total value of data items on each day with a bar graph.
+ * This can be done by specifying row and column categories so that each bar represents a day,
+ * and setting multiMatchBehavior to ItemModelBarDataProxy.MMBCumulative.
+ */
+
+/*!
+ * \enum QItemModelBarDataProxy::MultiMatchBehavior
+ *
+ * Behavior types for QItemModelBarDataProxy::multiMatchBehavior property.
+ *
+ * \value MMBFirst
+ * The value is taken from the first item in the item model that matches
+ * each row/column combination.
+ * \value MMBLast
+ * The value is taken from the last item in the item model that matches
+ * each row/column combination.
+ * \value MMBAverage
+ * The values from all items matching each row/column combination are
+ * averaged together and the average is used as the bar value.
+ * \value MMBCumulative
+ * The values from all items matching each row/column combination are
+ * added together and the total is used as the bar value.
+ */
+
+/*!
* Constructs QItemModelBarDataProxy with optional \a parent.
*/
QItemModelBarDataProxy::QItemModelBarDataProxy(QObject *parent)
@@ -155,7 +282,7 @@ QItemModelBarDataProxy::QItemModelBarDataProxy(QObject *parent)
* Constructs QItemModelBarDataProxy with \a itemModel and optional \a parent. Proxy doesn't take
* ownership of the \a itemModel, as typically item models are owned by other controls.
*/
-QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemModel, QObject *parent)
+QItemModelBarDataProxy::QItemModelBarDataProxy(QAbstractItemModel *itemModel, QObject *parent)
: QBarDataProxy(new QItemModelBarDataProxyPrivate(this), parent)
{
setItemModel(itemModel);
@@ -169,7 +296,7 @@ QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemMod
* This constructor is meant to be used with models that have data properly sorted
* in rows and columns already, so it also sets useModelCategories property to true.
*/
-QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemModel,
+QItemModelBarDataProxy::QItemModelBarDataProxy(QAbstractItemModel *itemModel,
const QString &valueRole, QObject *parent)
: QBarDataProxy(new QItemModelBarDataProxyPrivate(this), parent)
{
@@ -184,7 +311,7 @@ QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemMod
* ownership of the \a itemModel, as typically item models are owned by other controls.
* The role mappings are set with \a rowRole, \a columnRole, and \a valueRole.
*/
-QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemModel,
+QItemModelBarDataProxy::QItemModelBarDataProxy(QAbstractItemModel *itemModel,
const QString &rowRole,
const QString &columnRole,
const QString &valueRole, QObject *parent)
@@ -202,7 +329,7 @@ QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemMod
* ownership of the \a itemModel, as typically item models are owned by other controls.
* The role mappings are set with \a rowRole, \a columnRole, \a valueRole, and \a rotationRole.
*/
-QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemModel,
+QItemModelBarDataProxy::QItemModelBarDataProxy(QAbstractItemModel *itemModel,
const QString &rowRole,
const QString &columnRole,
const QString &valueRole,
@@ -225,7 +352,7 @@ QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemMod
* Row and column categories are set with \a rowCategories and \a columnCategories.
* This constructor also sets autoRowCategories and autoColumnCategories to false.
*/
-QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemModel,
+QItemModelBarDataProxy::QItemModelBarDataProxy(QAbstractItemModel *itemModel,
const QString &rowRole,
const QString &columnRole,
const QString &valueRole,
@@ -252,7 +379,7 @@ QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemMod
* Row and column categories are set with \a rowCategories and \a columnCategories.
* This constructor also sets autoRowCategories and autoColumnCategories to false.
*/
-QItemModelBarDataProxy::QItemModelBarDataProxy(const QAbstractItemModel *itemModel,
+QItemModelBarDataProxy::QItemModelBarDataProxy(QAbstractItemModel *itemModel,
const QString &rowRole,
const QString &columnRole,
const QString &valueRole,
@@ -287,12 +414,12 @@ QItemModelBarDataProxy::~QItemModelBarDataProxy()
* Defines item model. Does not take ownership of the model, but does connect to it to listen for
* changes.
*/
-void QItemModelBarDataProxy::setItemModel(const QAbstractItemModel *itemModel)
+void QItemModelBarDataProxy::setItemModel(QAbstractItemModel *itemModel)
{
dptr()->m_itemModelHandler->setItemModel(itemModel);
}
-const QAbstractItemModel *QItemModelBarDataProxy::itemModel() const
+QAbstractItemModel *QItemModelBarDataProxy::itemModel() const
{
return dptrc()->m_itemModelHandler->itemModel();
}
@@ -506,6 +633,215 @@ int QItemModelBarDataProxy::columnCategoryIndex(const QString &category)
}
/*!
+ * \property QItemModelBarDataProxy::rowRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by row role before it is used as
+ * a row category. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and rowRoleReplace property contains the replacement string.
+ * This is useful for example in parsing row and column categories from a single
+ * timestamp field in the item model.
+ *
+ * \sa rowRole, rowRoleReplace
+ */
+void QItemModelBarDataProxy::setRowRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_rowRolePattern != pattern) {
+ dptr()->m_rowRolePattern = pattern;
+ emit rowRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelBarDataProxy::rowRolePattern() const
+{
+ return dptrc()->m_rowRolePattern;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::columnRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by column role before it is used
+ * as a column category. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and columnRoleReplace property contains the replacement string.
+ * This is useful for example in parsing row and column categories from
+ * a single timestamp field in the item model.
+ *
+ * \sa columnRole, columnRoleReplace
+ */
+void QItemModelBarDataProxy::setColumnRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_columnRolePattern != pattern) {
+ dptr()->m_columnRolePattern = pattern;
+ emit columnRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelBarDataProxy::columnRolePattern() const
+{
+ return dptrc()->m_columnRolePattern;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::valueRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by value role before it is used as
+ * a bar value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and valueRoleReplace property contains the replacement string.
+ *
+ * \sa valueRole, valueRoleReplace
+ */
+void QItemModelBarDataProxy::setValueRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_valueRolePattern != pattern) {
+ dptr()->m_valueRolePattern = pattern;
+ emit valueRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelBarDataProxy::valueRolePattern() const
+{
+ return dptrc()->m_valueRolePattern;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::rotationRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by rotation role before it is used
+ * as a bar rotation angle. This property specifies the regular expression to find the portion
+ * of the mapped value to replace and rotationRoleReplace property contains the replacement string.
+ *
+ * \sa rotationRole, rotationRoleReplace
+ */
+void QItemModelBarDataProxy::setRotationRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_rotationRolePattern != pattern) {
+ dptr()->m_rotationRolePattern = pattern;
+ emit rotationRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelBarDataProxy::rotationRolePattern() const
+{
+ return dptrc()->m_rotationRolePattern;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::rowRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with rowRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa rowRole, rowRolePattern
+ */
+void QItemModelBarDataProxy::setRowRoleReplace(const QString &replace)
+{
+ if (dptr()->m_rowRoleReplace != replace) {
+ dptr()->m_rowRoleReplace = replace;
+ emit rowRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelBarDataProxy::rowRoleReplace() const
+{
+ return dptrc()->m_rowRoleReplace;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::columnRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with columnRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa columnRole, columnRolePattern
+ */
+void QItemModelBarDataProxy::setColumnRoleReplace(const QString &replace)
+{
+ if (dptr()->m_columnRoleReplace != replace) {
+ dptr()->m_columnRoleReplace = replace;
+ emit columnRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelBarDataProxy::columnRoleReplace() const
+{
+ return dptrc()->m_columnRoleReplace;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::valueRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with valueRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa valueRole, valueRolePattern
+ */
+void QItemModelBarDataProxy::setValueRoleReplace(const QString &replace)
+{
+ if (dptr()->m_valueRoleReplace != replace) {
+ dptr()->m_valueRoleReplace = replace;
+ emit valueRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelBarDataProxy::valueRoleReplace() const
+{
+ return dptrc()->m_valueRoleReplace;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::rotationRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with rotationRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa rotationRole, rotationRolePattern
+ */
+void QItemModelBarDataProxy::setRotationRoleReplace(const QString &replace)
+{
+ if (dptr()->m_rotationRoleReplace != replace) {
+ dptr()->m_rotationRoleReplace = replace;
+ emit rotationRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelBarDataProxy::rotationRoleReplace() const
+{
+ return dptrc()->m_rotationRoleReplace;
+}
+
+/*!
+ * \property QItemModelBarDataProxy::multiMatchBehavior
+ *
+ * This property defines how multiple matches for each row/column combination are handled.
+ * Defaults to QItemModelBarDataProxy::MMBLast. The chosen behavior affects both bar value
+ * and rotation.
+ *
+ * For example, you might have an item model with timestamped data taken at irregular intervals
+ * and you want to visualize total value of data items on each day with a bar graph.
+ * This can be done by specifying row and column categories so that each bar represents a day,
+ * and setting multiMatchBehavior to QItemModelBarDataProxy::MMBCumulative.
+ */
+void QItemModelBarDataProxy::setMultiMatchBehavior(QItemModelBarDataProxy::MultiMatchBehavior behavior)
+{
+ if (dptr()->m_multiMatchBehavior != behavior) {
+ dptr()->m_multiMatchBehavior = behavior;
+ emit multiMatchBehaviorChanged(behavior);
+ }
+}
+
+QItemModelBarDataProxy::MultiMatchBehavior QItemModelBarDataProxy::multiMatchBehavior() const
+{
+ return dptrc()->m_multiMatchBehavior;
+}
+
+/*!
* \internal
*/
QItemModelBarDataProxyPrivate *QItemModelBarDataProxy::dptr()
@@ -528,7 +864,8 @@ QItemModelBarDataProxyPrivate::QItemModelBarDataProxyPrivate(QItemModelBarDataPr
m_itemModelHandler(new BarItemModelHandler(q)),
m_useModelCategories(false),
m_autoRowCategories(true),
- m_autoColumnCategories(true)
+ m_autoColumnCategories(true),
+ m_multiMatchBehavior(QItemModelBarDataProxy::MMBLast)
{
}
@@ -564,6 +901,24 @@ void QItemModelBarDataProxyPrivate::connectItemModelHandler()
m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
QObject::connect(qptr(), &QItemModelBarDataProxy::autoColumnCategoriesChanged,
m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::rowRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::columnRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::valueRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::rotationRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::rowRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::columnRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::valueRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::rotationRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelBarDataProxy::multiMatchBehaviorChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
}
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qitemmodelbardataproxy.h b/src/datavisualization/data/qitemmodelbardataproxy.h
index f19b4445..d7394dcf 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy.h
+++ b/src/datavisualization/data/qitemmodelbardataproxy.h
@@ -21,6 +21,7 @@
#include <QtDataVisualization/qbardataproxy.h>
#include <QtCore/QAbstractItemModel>
+#include <QtCore/QRegExp>
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -29,7 +30,8 @@ class QItemModelBarDataProxyPrivate;
class QT_DATAVISUALIZATION_EXPORT QItemModelBarDataProxy : public QBarDataProxy
{
Q_OBJECT
- Q_PROPERTY(const QAbstractItemModel* itemModel READ itemModel WRITE setItemModel NOTIFY itemModelChanged)
+ Q_ENUMS(MultiMatchBehavior)
+ Q_PROPERTY(QAbstractItemModel* itemModel READ itemModel WRITE setItemModel NOTIFY itemModelChanged)
Q_PROPERTY(QString rowRole READ rowRole WRITE setRowRole NOTIFY rowRoleChanged)
Q_PROPERTY(QString columnRole READ columnRole WRITE setColumnRole NOTIFY columnRoleChanged)
Q_PROPERTY(QString valueRole READ valueRole WRITE setValueRole NOTIFY valueRoleChanged)
@@ -39,30 +41,46 @@ class QT_DATAVISUALIZATION_EXPORT QItemModelBarDataProxy : public QBarDataProxy
Q_PROPERTY(bool useModelCategories READ useModelCategories WRITE setUseModelCategories NOTIFY useModelCategoriesChanged)
Q_PROPERTY(bool autoRowCategories READ autoRowCategories WRITE setAutoRowCategories NOTIFY autoRowCategoriesChanged)
Q_PROPERTY(bool autoColumnCategories READ autoColumnCategories WRITE setAutoColumnCategories NOTIFY autoColumnCategoriesChanged)
+ Q_PROPERTY(QRegExp rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION 1)
+ Q_PROPERTY(QRegExp columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION 1)
+ Q_PROPERTY(QRegExp valueRolePattern READ valueRolePattern WRITE setValueRolePattern NOTIFY valueRolePatternChanged REVISION 1)
+ Q_PROPERTY(QRegExp rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION 1)
+ Q_PROPERTY(QString rowRoleReplace READ rowRoleReplace WRITE setRowRoleReplace NOTIFY rowRoleReplaceChanged REVISION 1)
+ Q_PROPERTY(QString columnRoleReplace READ columnRoleReplace WRITE setColumnRoleReplace NOTIFY columnRoleReplaceChanged REVISION 1)
+ Q_PROPERTY(QString valueRoleReplace READ valueRoleReplace WRITE setValueRoleReplace NOTIFY valueRoleReplaceChanged REVISION 1)
+ Q_PROPERTY(QString rotationRoleReplace READ rotationRoleReplace WRITE setRotationRoleReplace NOTIFY rotationRoleReplaceChanged REVISION 1)
+ Q_PROPERTY(MultiMatchBehavior multiMatchBehavior READ multiMatchBehavior WRITE setMultiMatchBehavior NOTIFY multiMatchBehaviorChanged REVISION 1)
public:
+ enum MultiMatchBehavior {
+ MMBFirst = 0,
+ MMBLast = 1,
+ MMBAverage = 2,
+ MMBCumulative = 3
+ };
+
explicit QItemModelBarDataProxy(QObject *parent = 0);
- QItemModelBarDataProxy(const QAbstractItemModel *itemModel, QObject *parent = 0);
- QItemModelBarDataProxy(const QAbstractItemModel *itemModel, const QString &valueRole,
+ QItemModelBarDataProxy(QAbstractItemModel *itemModel, QObject *parent = 0);
+ QItemModelBarDataProxy(QAbstractItemModel *itemModel, const QString &valueRole,
QObject *parent = 0);
- QItemModelBarDataProxy(const QAbstractItemModel *itemModel, const QString &rowRole,
+ QItemModelBarDataProxy(QAbstractItemModel *itemModel, const QString &rowRole,
const QString &columnRole, const QString &valueRole,
QObject *parent = 0);
- QItemModelBarDataProxy(const QAbstractItemModel *itemModel, const QString &rowRole,
+ QItemModelBarDataProxy(QAbstractItemModel *itemModel, const QString &rowRole,
const QString &columnRole, const QString &valueRole,
const QString &rotationRole, QObject *parent = 0);
- QItemModelBarDataProxy(const QAbstractItemModel *itemModel, const QString &rowRole,
+ QItemModelBarDataProxy(QAbstractItemModel *itemModel, const QString &rowRole,
const QString &columnRole, const QString &valueRole,
const QStringList &rowCategories, const QStringList &columnCategories,
QObject *parent = 0);
- QItemModelBarDataProxy(const QAbstractItemModel *itemModel, const QString &rowRole,
+ QItemModelBarDataProxy(QAbstractItemModel *itemModel, const QString &rowRole,
const QString &columnRole, const QString &valueRole,
const QString &rotationRole, const QStringList &rowCategories,
const QStringList &columnCategories, QObject *parent = 0);
virtual ~QItemModelBarDataProxy();
- void setItemModel(const QAbstractItemModel *itemModel);
- const QAbstractItemModel *itemModel() const;
+ void setItemModel(QAbstractItemModel *itemModel);
+ QAbstractItemModel *itemModel() const;
void setRowRole(const QString &role);
QString rowRole() const;
@@ -93,6 +111,27 @@ public:
Q_INVOKABLE int rowCategoryIndex(const QString& category);
Q_INVOKABLE int columnCategoryIndex(const QString& category);
+ void setRowRolePattern(const QRegExp &pattern);
+ QRegExp rowRolePattern() const;
+ void setColumnRolePattern(const QRegExp &pattern);
+ QRegExp columnRolePattern() const;
+ void setValueRolePattern(const QRegExp &pattern);
+ QRegExp valueRolePattern() const;
+ void setRotationRolePattern(const QRegExp &pattern);
+ QRegExp rotationRolePattern() const;
+
+ void setRowRoleReplace(const QString &replace);
+ QString rowRoleReplace() const;
+ void setColumnRoleReplace(const QString &replace);
+ QString columnRoleReplace() const;
+ void setValueRoleReplace(const QString &replace);
+ QString valueRoleReplace() const;
+ void setRotationRoleReplace(const QString &replace);
+ QString rotationRoleReplace() const;
+
+ void setMultiMatchBehavior(MultiMatchBehavior behavior);
+ MultiMatchBehavior multiMatchBehavior() const;
+
signals:
void itemModelChanged(const QAbstractItemModel* itemModel);
void rowRoleChanged(const QString &role);
@@ -104,6 +143,15 @@ signals:
void useModelCategoriesChanged(bool enable);
void autoRowCategoriesChanged(bool enable);
void autoColumnCategoriesChanged(bool enable);
+ Q_REVISION(1) void rowRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void columnRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void valueRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void rotationRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void rowRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1) void columnRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1) void valueRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1) void rotationRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1) void multiMatchBehaviorChanged(MultiMatchBehavior behavior);
protected:
QItemModelBarDataProxyPrivate *dptr();
diff --git a/src/datavisualization/data/qitemmodelbardataproxy_p.h b/src/datavisualization/data/qitemmodelbardataproxy_p.h
index 2fd74bb2..84564d02 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy_p.h
+++ b/src/datavisualization/data/qitemmodelbardataproxy_p.h
@@ -63,6 +63,18 @@ private:
bool m_autoRowCategories;
bool m_autoColumnCategories;
+ QRegExp m_rowRolePattern;
+ QRegExp m_columnRolePattern;
+ QRegExp m_valueRolePattern;
+ QRegExp m_rotationRolePattern;
+
+ QString m_rowRoleReplace;
+ QString m_columnRoleReplace;
+ QString m_valueRoleReplace;
+ QString m_rotationRoleReplace;
+
+ QItemModelBarDataProxy::MultiMatchBehavior m_multiMatchBehavior;
+
friend class BarItemModelHandler;
friend class QItemModelBarDataProxy;
};
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
index 16a7b8b5..4e6464ea 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
@@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \class QItemModelScatterDataProxy
* \inmodule QtDataVisualization
* \brief Proxy class for presenting data in item models with Q3DScatter.
- * \since Qt Data Visualization 1.0
+ * \since QtDataVisualization 1.0
*
* QItemModelScatterDataProxy allows you to use QAbstractItemModel derived models as a data source
* for Q3DScatter. It maps roles of QAbstractItemModel to the XYZ-values of Q3DScatter points.
@@ -36,7 +36,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* unless the same frame also contains a change that causes the whole model to be resolved.
*
* Mapping ignores rows and columns of the QAbstractItemModel and treats
- * all items equally. It requires the model to provide at least three roles for the data items
+ * all items equally. It requires the model to provide roles for the data items
* that can be mapped to X, Y, and Z-values for the scatter points.
*
* For example, assume that you have a custom QAbstractItemModel for storing various measurements
@@ -45,6 +45,16 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* \snippet doc_src_qtdatavisualization.cpp 4
*
+ * If the fields of the model do not contain the data in the exact format you need, you can specify
+ * a search pattern regular expression and a replace rule for each role to get the value in a
+ * format you need. For more information how the replace using regular expressions works, see
+ * QString::replace(const QRegExp &rx, const QString &after) function documentation. Note that
+ * using regular expressions has an impact on the performance, so it's more efficient to utilize
+ * item models where doing search and replace is not necessary to get the desired values.
+ *
+ * For example about using the search patterns in conjunction with the roles, see
+ * ItemModelBarDataProxy usage in \l{Qt Quick 2 Bars Example}.
+ *
* \sa {Qt Data Visualization Data Handling}
*/
@@ -78,27 +88,109 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty string ItemModelScatterDataProxy::xPosRole
- * The X position role of the mapping.
+ * Defines the item model role to map into X position.
*/
/*!
* \qmlproperty string ItemModelScatterDataProxy::yPosRole
- * The Y position role of the mapping.
+ * Defines the item model role to map into Y position.
*/
/*!
* \qmlproperty string ItemModelScatterDataProxy::zPosRole
- * The Z position role of the mapping.
+ * Defines the item model role to map into Z position.
*/
/*!
* \qmlproperty string ItemModelScatterDataProxy::rotationRole
*
- * Defines the rotation role for the mapping.
+ * Defines the item model role to map into item rotation.
* The model may supply the value for rotation as either variant that is directly convertible
- * to QQuaternion, or as one of the string representations: \c{"scalar,x,y,z"} or \c{"@angle,x,y,z"}. The first
- * will construct the quaternion directly with given values, and the second one will construct
- * the quaternion using QQuaternion::fromAxisAndAngle() method.
+ * to QQuaternion, or as one of the string representations: \c{"scalar,x,y,z"} or
+ * \c{"@angle,x,y,z"}. The first format will construct the quaternion directly with given values,
+ * and the second one will construct the quaternion using QQuaternion::fromAxisAndAngle() method.
+ */
+
+/*!
+ * \qmlproperty regExp ItemModelScatterDataProxy::xPosRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by xPos role before it is used as
+ * a item position value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and xPosRoleReplace property contains the replacement string.
+ *
+ * \sa xPosRole, xPosRoleReplace
+ */
+
+/*!
+ * \qmlproperty regExp ItemModelScatterDataProxy::yPosRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by yPos role before it is used as
+ * a item position value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and yPosRoleReplace property contains the replacement string.
+ *
+ * \sa yPosRole, yPosRoleReplace
+ */
+
+/*!
+ * \qmlproperty regExp ItemModelScatterDataProxy::zPosRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by zPos role before it is used as
+ * a item position value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and zPosRoleReplace property contains the replacement string.
+ *
+ * \sa zPosRole, zPosRoleReplace
+ */
+
+/*!
+ * \qmlproperty regExp ItemModelScatterDataProxy::rotationRolePattern
+ * When set, a search and replace is done on the value mapped by rotation role before it is used
+ * as a item rotation. This property specifies the regular expression to find the portion
+ * of the mapped value to replace and rotationRoleReplace property contains the replacement string.
+ *
+ * \sa rotationRole, rotationRoleReplace
+ */
+
+/*!
+ * \qmlproperty string ItemModelScatterDataProxy::xPosRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with xPosRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa xPosRole, xPosRolePattern
+ */
+
+/*!
+ * \qmlproperty string ItemModelScatterDataProxy::yPosRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with yPosRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa yPosRole, yPosRolePattern
+ */
+
+/*!
+ * \qmlproperty string ItemModelScatterDataProxy::zPosRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with zPosRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa zPosRole, zPosRolePattern
+ */
+
+/*!
+ * \qmlproperty string ItemModelScatterDataProxy::rotationRoleReplace
+ * This property defines the replace content to be used in conjunction with rotationRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa rotationRole, rotationRolePattern
*/
/*!
@@ -114,7 +206,7 @@ QItemModelScatterDataProxy::QItemModelScatterDataProxy(QObject *parent)
* Constructs QItemModelScatterDataProxy with \a itemModel and optional \a parent. Proxy doesn't take
* ownership of the \a itemModel, as typically item models are owned by other controls.
*/
-QItemModelScatterDataProxy::QItemModelScatterDataProxy(const QAbstractItemModel *itemModel,
+QItemModelScatterDataProxy::QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
QObject *parent)
: QScatterDataProxy(new QItemModelScatterDataProxyPrivate(this), parent)
{
@@ -128,7 +220,7 @@ QItemModelScatterDataProxy::QItemModelScatterDataProxy(const QAbstractItemModel
* The xPosRole property is set to \a xPosRole, yPosRole property to \a yPosRole, and zPosRole property
* to \a zPosRole.
*/
-QItemModelScatterDataProxy::QItemModelScatterDataProxy(const QAbstractItemModel *itemModel,
+QItemModelScatterDataProxy::QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
const QString &xPosRole,
const QString &yPosRole,
const QString &zPosRole,
@@ -148,7 +240,7 @@ QItemModelScatterDataProxy::QItemModelScatterDataProxy(const QAbstractItemModel
* The xPosRole property is set to \a xPosRole, yPosRole property to \a yPosRole, zPosRole property
* to \a zPosRole, and rotationRole property to \a rotationRole.
*/
-QItemModelScatterDataProxy::QItemModelScatterDataProxy(const QAbstractItemModel *itemModel,
+QItemModelScatterDataProxy::QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
const QString &xPosRole,
const QString &yPosRole,
const QString &zPosRole,
@@ -177,12 +269,12 @@ QItemModelScatterDataProxy::~QItemModelScatterDataProxy()
* Defines the item model. Does not take ownership of the model, but does connect to it to listen for
* changes.
*/
-void QItemModelScatterDataProxy::setItemModel(const QAbstractItemModel *itemModel)
+void QItemModelScatterDataProxy::setItemModel(QAbstractItemModel *itemModel)
{
dptr()->m_itemModelHandler->setItemModel(itemModel);
}
-const QAbstractItemModel *QItemModelScatterDataProxy::itemModel() const
+QAbstractItemModel *QItemModelScatterDataProxy::itemModel() const
{
return dptrc()->m_itemModelHandler->itemModel();
}
@@ -190,7 +282,7 @@ const QAbstractItemModel *QItemModelScatterDataProxy::itemModel() const
/*!
* \property QItemModelScatterDataProxy::xPosRole
*
- * Defines the X position \a role for the mapping.
+ * Defines the item model role to map into X position.
*/
void QItemModelScatterDataProxy::setXPosRole(const QString &role)
{
@@ -208,7 +300,7 @@ QString QItemModelScatterDataProxy::xPosRole() const
/*!
* \property QItemModelScatterDataProxy::yPosRole
*
- * Defines the Y position \a role for the mapping.
+ * Defines the item model role to map into Y position.
*/
void QItemModelScatterDataProxy::setYPosRole(const QString &role)
{
@@ -226,7 +318,7 @@ QString QItemModelScatterDataProxy::yPosRole() const
/*!
* \property QItemModelScatterDataProxy::zPosRole
*
- * Defines the Z position \a role for the mapping.
+ * Defines the item model role to map into Z position.
*/
void QItemModelScatterDataProxy::setZPosRole(const QString &role)
{
@@ -244,7 +336,7 @@ QString QItemModelScatterDataProxy::zPosRole() const
/*!
* \property QItemModelScatterDataProxy::rotationRole
*
- * Defines the rotation \a role for the mapping.
+ * Defines the item model role to map into item rotation.
*
* The model may supply the value for rotation as either variant that is directly convertible
* to QQuaternion, or as one of the string representations: \c{"scalar,x,y,z"} or \c{"@angle,x,y,z"}.
@@ -265,6 +357,186 @@ QString QItemModelScatterDataProxy::rotationRole() const
}
/*!
+ * \property QItemModelScatterDataProxy::xPosRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by xPos role before it is used as
+ * a item position value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and xPosRoleReplace property contains the replacement string.
+ *
+ * \sa xPosRole, xPosRoleReplace
+ */
+void QItemModelScatterDataProxy::setXPosRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_xPosRolePattern != pattern) {
+ dptr()->m_xPosRolePattern = pattern;
+ emit xPosRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelScatterDataProxy::xPosRolePattern() const
+{
+ return dptrc()->m_xPosRolePattern;
+}
+
+/*!
+ * \property QItemModelScatterDataProxy::yPosRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by yPos role before it is used as
+ * a item position value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and yPosRoleReplace property contains the replacement string.
+ *
+ * \sa yPosRole, yPosRoleReplace
+ */
+void QItemModelScatterDataProxy::setYPosRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_yPosRolePattern != pattern) {
+ dptr()->m_yPosRolePattern = pattern;
+ emit yPosRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelScatterDataProxy::yPosRolePattern() const
+{
+ return dptrc()->m_yPosRolePattern;
+}
+
+/*!
+ * \property QItemModelScatterDataProxy::zPosRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by zPos role before it is used as
+ * a item position value. This property specifies the regular expression to find the portion of the
+ * mapped value to replace and zPosRoleReplace property contains the replacement string.
+ *
+ * \sa zPosRole, zPosRoleReplace
+ */
+void QItemModelScatterDataProxy::setZPosRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_zPosRolePattern != pattern) {
+ dptr()->m_zPosRolePattern = pattern;
+ emit zPosRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelScatterDataProxy::zPosRolePattern() const
+{
+ return dptrc()->m_zPosRolePattern;
+}
+
+/*!
+ * \property QItemModelScatterDataProxy::rotationRolePattern
+ *
+ * When set, a search and replace is done on the value mapped by rotation role before it is used
+ * as a item rotation. This property specifies the regular expression to find the portion
+ * of the mapped value to replace and rotationRoleReplace property contains the replacement string.
+ *
+ * \sa rotationRole, rotationRoleReplace
+ */
+void QItemModelScatterDataProxy::setRotationRolePattern(const QRegExp &pattern)
+{
+ if (dptr()->m_rotationRolePattern != pattern) {
+ dptr()->m_rotationRolePattern = pattern;
+ emit rotationRolePatternChanged(pattern);
+ }
+}
+
+QRegExp QItemModelScatterDataProxy::rotationRolePattern() const
+{
+ return dptrc()->m_rotationRolePattern;
+}
+
+/*!
+ * \property QItemModelScatterDataProxy::xPosRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with xPosRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa xPosRole, xPosRolePattern
+ */
+void QItemModelScatterDataProxy::setXPosRoleReplace(const QString &replace)
+{
+ if (dptr()->m_xPosRoleReplace != replace) {
+ dptr()->m_xPosRoleReplace = replace;
+ emit xPosRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelScatterDataProxy::xPosRoleReplace() const
+{
+ return dptrc()->m_xPosRoleReplace;
+}
+
+/*!
+ * \property QItemModelScatterDataProxy::yPosRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with yPosRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa yPosRole, yPosRolePattern
+ */
+void QItemModelScatterDataProxy::setYPosRoleReplace(const QString &replace)
+{
+ if (dptr()->m_yPosRoleReplace != replace) {
+ dptr()->m_yPosRoleReplace = replace;
+ emit yPosRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelScatterDataProxy::yPosRoleReplace() const
+{
+ return dptrc()->m_yPosRoleReplace;
+}
+
+/*!
+ * \property QItemModelScatterDataProxy::zPosRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with zPosRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa zPosRole, zPosRolePattern
+ */
+void QItemModelScatterDataProxy::setZPosRoleReplace(const QString &replace)
+{
+ if (dptr()->m_zPosRoleReplace != replace) {
+ dptr()->m_zPosRoleReplace = replace;
+ emit zPosRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelScatterDataProxy::zPosRoleReplace() const
+{
+ return dptrc()->m_zPosRoleReplace;
+}
+
+/*!
+ * \property QItemModelScatterDataProxy::rotationRoleReplace
+ *
+ * This property defines the replace content to be used in conjunction with rotationRolePattern.
+ * Defaults to empty string. For more information on how the search and replace using regular
+ * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * function documentation.
+ *
+ * \sa rotationRole, rotationRolePattern
+ */
+void QItemModelScatterDataProxy::setRotationRoleReplace(const QString &replace)
+{
+ if (dptr()->m_rotationRoleReplace != replace) {
+ dptr()->m_rotationRoleReplace = replace;
+ emit rotationRoleReplaceChanged(replace);
+ }
+}
+
+QString QItemModelScatterDataProxy::rotationRoleReplace() const
+{
+ return dptrc()->m_rotationRoleReplace;
+}
+
+/*!
* Changes \a xPosRole, \a yPosRole, \a zPosRole, and \a rotationRole mapping.
*/
void QItemModelScatterDataProxy::remap(const QString &xPosRole, const QString &yPosRole,
@@ -320,6 +592,24 @@ void QItemModelScatterDataProxyPrivate::connectItemModelHandler()
m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
QObject::connect(qptr(), &QItemModelScatterDataProxy::zPosRoleChanged,
m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::rotationRoleChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::xPosRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::yPosRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::zPosRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::rotationRolePatternChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::xPosRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::yPosRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::zPosRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
+ QObject::connect(qptr(), &QItemModelScatterDataProxy::rotationRoleReplaceChanged,
+ m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
}
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.h b/src/datavisualization/data/qitemmodelscatterdataproxy.h
index c6d2245d..3215c688 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy.h
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy.h
@@ -22,6 +22,7 @@
#include <QtDataVisualization/qscatterdataproxy.h>
#include <QtCore/QAbstractItemModel>
#include <QtCore/QString>
+#include <QtCore/QRegExp>
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -30,26 +31,34 @@ class QItemModelScatterDataProxyPrivate;
class QT_DATAVISUALIZATION_EXPORT QItemModelScatterDataProxy : public QScatterDataProxy
{
Q_OBJECT
- Q_PROPERTY(const QAbstractItemModel* itemModel READ itemModel WRITE setItemModel NOTIFY itemModelChanged)
+ Q_PROPERTY(QAbstractItemModel* itemModel READ itemModel WRITE setItemModel NOTIFY itemModelChanged)
Q_PROPERTY(QString xPosRole READ xPosRole WRITE setXPosRole NOTIFY xPosRoleChanged)
Q_PROPERTY(QString yPosRole READ yPosRole WRITE setYPosRole NOTIFY yPosRoleChanged)
Q_PROPERTY(QString zPosRole READ zPosRole WRITE setZPosRole NOTIFY zPosRoleChanged)
Q_PROPERTY(QString rotationRole READ rotationRole WRITE setRotationRole NOTIFY rotationRoleChanged)
+ Q_PROPERTY(QRegExp xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION 1)
+ Q_PROPERTY(QRegExp yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION 1)
+ Q_PROPERTY(QRegExp zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION 1)
+ Q_PROPERTY(QRegExp rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION 1)
+ Q_PROPERTY(QString xPosRoleReplace READ xPosRoleReplace WRITE setXPosRoleReplace NOTIFY xPosRoleReplaceChanged REVISION 1)
+ Q_PROPERTY(QString yPosRoleReplace READ yPosRoleReplace WRITE setYPosRoleReplace NOTIFY yPosRoleReplaceChanged REVISION 1)
+ Q_PROPERTY(QString zPosRoleReplace READ zPosRoleReplace WRITE setZPosRoleReplace NOTIFY zPosRoleReplaceChanged REVISION 1)
+ Q_PROPERTY(QString rotationRoleReplace READ rotationRoleReplace WRITE setRotationRoleReplace NOTIFY rotationRoleReplaceChanged REVISION 1)
public:
explicit QItemModelScatterDataProxy(QObject *parent = 0);
- QItemModelScatterDataProxy(const QAbstractItemModel *itemModel, QObject *parent = 0);
- QItemModelScatterDataProxy(const QAbstractItemModel *itemModel,
+ QItemModelScatterDataProxy(QAbstractItemModel *itemModel, QObject *parent = 0);
+ QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
const QString &xPosRole, const QString &yPosRole,
const QString &zPosRole, QObject *parent = 0);
- QItemModelScatterDataProxy(const QAbstractItemModel *itemModel,
+ QItemModelScatterDataProxy(QAbstractItemModel *itemModel,
const QString &xPosRole, const QString &yPosRole,
const QString &zPosRole, const QString &rotationRole,
QObject *parent = 0);
virtual ~QItemModelScatterDataProxy();
- void setItemModel(const QAbstractItemModel *itemModel);
- const QAbstractItemModel *itemModel() const;
+ void setItemModel(QAbstractItemModel *itemModel);
+ QAbstractItemModel *itemModel() const;
void setXPosRole(const QString &role);
QString xPosRole() const;
@@ -63,12 +72,38 @@ public:
void remap(const QString &xPosRole, const QString &yPosRole, const QString &zPosRole,
const QString &rotationRole);
+ void setXPosRolePattern(const QRegExp &pattern);
+ QRegExp xPosRolePattern() const;
+ void setYPosRolePattern(const QRegExp &pattern);
+ QRegExp yPosRolePattern() const;
+ void setZPosRolePattern(const QRegExp &pattern);
+ QRegExp zPosRolePattern() const;
+ void setRotationRolePattern(const QRegExp &pattern);
+ QRegExp rotationRolePattern() const;
+
+ void setXPosRoleReplace(const QString &replace);
+ QString xPosRoleReplace() const;
+ void setYPosRoleReplace(const QString &replace);
+ QString yPosRoleReplace() const;
+ void setZPosRoleReplace(const QString &replace);
+ QString zPosRoleReplace() const;
+ void setRotationRoleReplace(const QString &replace);
+ QString rotationRoleReplace() const;
+
signals:
void itemModelChanged(const QAbstractItemModel* itemModel);
void xPosRoleChanged(const QString &role);
void yPosRoleChanged(const QString &role);
void zPosRoleChanged(const QString &role);
void rotationRoleChanged(const QString &role);
+ Q_REVISION(1) void xPosRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void yPosRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void zPosRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void rotationRolePatternChanged(const QRegExp &pattern);
+ Q_REVISION(1) void rotationRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1) void xPosRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1) void yPosRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1) void zPosRoleReplaceChanged(const QString &replace);
protected:
QItemModelScatterDataProxyPrivate *dptr();
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy_p.h b/src/datavisualization/data/qitemmodelscatterdataproxy_p.h
index 4e1f321f..733cbb1e 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy_p.h
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy_p.h
@@ -54,6 +54,16 @@ private:
QString m_zPosRole;
QString m_rotationRole;
+ QRegExp m_xPosRolePattern;
+ QRegExp m_yPosRolePattern;
+ QRegExp m_zPosRolePattern;
+ QRegExp m_rotationRolePattern;
+
+ QString m_xPosRoleReplace;
+ QString m_yPosRoleReplace;
+ QString m_zPosRoleReplace;
+ QString m_rotationRoleReplace;
+
friend class ScatterItemModelHandler;
friend class QItemModelScatterDataProxy;
};
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
index 440ce2d6..5117d386 100644
--- a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
+++ b/