summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/datavisualization/CMakeLists.txt430
-rw-r--r--src/datavisualization/axis/axis.pri20
-rw-r--r--src/datavisualization/axis/qabstract3daxis.cpp34
-rw-r--r--src/datavisualization/axis/qabstract3daxis.h48
-rw-r--r--src/datavisualization/axis/qabstract3daxis_p.h34
-rw-r--r--src/datavisualization/axis/qcategory3daxis.cpp34
-rw-r--r--src/datavisualization/axis/qcategory3daxis.h36
-rw-r--r--src/datavisualization/axis/qcategory3daxis_p.h40
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter.cpp34
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter.h46
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter_p.h34
-rw-r--r--src/datavisualization/axis/qvalue3daxis.cpp34
-rw-r--r--src/datavisualization/axis/qvalue3daxis.h44
-rw-r--r--src/datavisualization/axis/qvalue3daxis_p.h48
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter.cpp34
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter.h36
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter_p.h34
-rw-r--r--src/datavisualization/configure.cmake7
-rw-r--r--src/datavisualization/data/abstractitemmodelhandler.cpp34
-rw-r--r--src/datavisualization/data/abstractitemmodelhandler_p.h36
-rw-r--r--src/datavisualization/data/abstractrenderitem.cpp34
-rw-r--r--src/datavisualization/data/abstractrenderitem_p.h39
-rw-r--r--src/datavisualization/data/baritemmodelhandler.cpp48
-rw-r--r--src/datavisualization/data/baritemmodelhandler_p.h44
-rw-r--r--src/datavisualization/data/barrenderitem.cpp34
-rw-r--r--src/datavisualization/data/barrenderitem_p.h36
-rw-r--r--src/datavisualization/data/customrenderitem.cpp37
-rw-r--r--src/datavisualization/data/customrenderitem_p.h36
-rw-r--r--src/datavisualization/data/data.pri77
-rw-r--r--src/datavisualization/data/labelitem.cpp34
-rw-r--r--src/datavisualization/data/labelitem_p.h36
-rw-r--r--src/datavisualization/data/qabstract3dseries.cpp34
-rw-r--r--src/datavisualization/data/qabstract3dseries.h46
-rw-r--r--src/datavisualization/data/qabstract3dseries_p.h34
-rw-r--r--src/datavisualization/data/qabstractdataproxy.cpp34
-rw-r--r--src/datavisualization/data/qabstractdataproxy.h36
-rw-r--r--src/datavisualization/data/qabstractdataproxy_p.h34
-rw-r--r--src/datavisualization/data/qbar3dseries.cpp77
-rw-r--r--src/datavisualization/data/qbar3dseries.h41
-rw-r--r--src/datavisualization/data/qbar3dseries_p.h44
-rw-r--r--src/datavisualization/data/qbardataitem.cpp34
-rw-r--r--src/datavisualization/data/qbardataitem.h36
-rw-r--r--src/datavisualization/data/qbardataitem_p.h34
-rw-r--r--src/datavisualization/data/qbardataproxy.cpp34
-rw-r--r--src/datavisualization/data/qbardataproxy.h36
-rw-r--r--src/datavisualization/data/qbardataproxy_p.h36
-rw-r--r--src/datavisualization/data/qcustom3ditem.cpp41
-rw-r--r--src/datavisualization/data/qcustom3ditem.h41
-rw-r--r--src/datavisualization/data/qcustom3ditem_p.h34
-rw-r--r--src/datavisualization/data/qcustom3dlabel.cpp34
-rw-r--r--src/datavisualization/data/qcustom3dlabel.h36
-rw-r--r--src/datavisualization/data/qcustom3dlabel_p.h34
-rw-r--r--src/datavisualization/data/qcustom3dvolume.cpp34
-rw-r--r--src/datavisualization/data/qcustom3dvolume.h36
-rw-r--r--src/datavisualization/data/qcustom3dvolume_p.h34
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy.cpp260
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy.h48
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy_p.h40
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy.cpp70
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy.h90
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy_p.h42
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy.cpp70
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy.h86
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy_p.h42
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy.cpp78
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy.h102
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy_p.h44
-rw-r--r--src/datavisualization/data/qscatter3dseries.cpp34
-rw-r--r--src/datavisualization/data/qscatter3dseries.h36
-rw-r--r--src/datavisualization/data/qscatter3dseries_p.h40
-rw-r--r--src/datavisualization/data/qscatterdataitem.cpp34
-rw-r--r--src/datavisualization/data/qscatterdataitem.h36
-rw-r--r--src/datavisualization/data/qscatterdataitem_p.h34
-rw-r--r--src/datavisualization/data/qscatterdataproxy.cpp34
-rw-r--r--src/datavisualization/data/qscatterdataproxy.h36
-rw-r--r--src/datavisualization/data/qscatterdataproxy_p.h36
-rw-r--r--src/datavisualization/data/qsurface3dseries.cpp68
-rw-r--r--src/datavisualization/data/qsurface3dseries.h44
-rw-r--r--src/datavisualization/data/qsurface3dseries_p.h42
-rw-r--r--src/datavisualization/data/qsurfacedataitem.cpp34
-rw-r--r--src/datavisualization/data/qsurfacedataitem.h36
-rw-r--r--src/datavisualization/data/qsurfacedataitem_p.h34
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.cpp126
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.h36
-rw-r--r--src/datavisualization/data/qsurfacedataproxy_p.h36
-rw-r--r--src/datavisualization/data/scatteritemmodelhandler.cpp44
-rw-r--r--src/datavisualization/data/scatteritemmodelhandler_p.h52
-rw-r--r--src/datavisualization/data/scatterrenderitem.cpp34
-rw-r--r--src/datavisualization/data/scatterrenderitem_p.h35
-rw-r--r--src/datavisualization/data/surfaceitemmodelhandler.cpp64
-rw-r--r--src/datavisualization/data/surfaceitemmodelhandler_p.h46
-rw-r--r--src/datavisualization/datavisualization.pro25
-rw-r--r--src/datavisualization/doc/qtdatavis3d.qdocconf70
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp33
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp33
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp33
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp32
-rw-r--r--src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp30
-rw-r--r--src/datavisualization/doc/snippets/doc_src_qtdatavisualization.cpp32
-rw-r--r--src/datavisualization/doc/snippets/doc_src_qtdatavisualization.pro30
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-index.qdoc79
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-overview.qdoc48
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc57
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-bars3d.qdoc45
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-color.qdoc30
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-colorgradient.qdoc32
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc36
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-surface3d.qdoc36
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization.qdoc72
-rw-r--r--src/datavisualization/engine/abstract3dcontroller.cpp62
-rw-r--r--src/datavisualization/engine/abstract3dcontroller_p.h43
-rw-r--r--src/datavisualization/engine/abstract3drenderer.cpp83
-rw-r--r--src/datavisualization/engine/abstract3drenderer_p.h44
-rw-r--r--src/datavisualization/engine/abstractdeclarativeinterface.cpp11
-rw-r--r--src/datavisualization/engine/abstractdeclarativeinterface_p.h31
-rw-r--r--src/datavisualization/engine/axisrendercache.cpp36
-rw-r--r--src/datavisualization/engine/axisrendercache_p.h34
-rw-r--r--src/datavisualization/engine/bars3dcontroller.cpp59
-rw-r--r--src/datavisualization/engine/bars3dcontroller_p.h81
-rw-r--r--src/datavisualization/engine/bars3drenderer.cpp92
-rw-r--r--src/datavisualization/engine/bars3drenderer_p.h87
-rw-r--r--src/datavisualization/engine/barseriesrendercache.cpp34
-rw-r--r--src/datavisualization/engine/barseriesrendercache_p.h36
-rw-r--r--src/datavisualization/engine/drawer.cpp47
-rw-r--r--src/datavisualization/engine/drawer_p.h45
-rw-r--r--src/datavisualization/engine/engine.pri61
-rw-r--r--src/datavisualization/engine/engine.qrc74
-rw-r--r--src/datavisualization/engine/q3dbars.cpp71
-rw-r--r--src/datavisualization/engine/q3dbars.h41
-rw-r--r--src/datavisualization/engine/q3dbars_p.h40
-rw-r--r--src/datavisualization/engine/q3dcamera.cpp34
-rw-r--r--src/datavisualization/engine/q3dcamera.h50
-rw-r--r--src/datavisualization/engine/q3dcamera_p.h36
-rw-r--r--src/datavisualization/engine/q3dlight.cpp34
-rw-r--r--src/datavisualization/engine/q3dlight.h40
-rw-r--r--src/datavisualization/engine/q3dlight_p.h34
-rw-r--r--src/datavisualization/engine/q3dobject.cpp34
-rw-r--r--src/datavisualization/engine/q3dobject.h36
-rw-r--r--src/datavisualization/engine/q3dobject_p.h34
-rw-r--r--src/datavisualization/engine/q3dscatter.cpp44
-rw-r--r--src/datavisualization/engine/q3dscatter.h36
-rw-r--r--src/datavisualization/engine/q3dscatter_p.h40
-rw-r--r--src/datavisualization/engine/q3dscene.cpp34
-rw-r--r--src/datavisualization/engine/q3dscene.h40
-rw-r--r--src/datavisualization/engine/q3dscene_p.h40
-rw-r--r--src/datavisualization/engine/q3dsurface.cpp44
-rw-r--r--src/datavisualization/engine/q3dsurface.h36
-rw-r--r--src/datavisualization/engine/q3dsurface_p.h40
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.cpp61
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.h65
-rw-r--r--src/datavisualization/engine/qabstract3dgraph_p.h34
-rw-r--r--src/datavisualization/engine/scatter3dcontroller.cpp36
-rw-r--r--src/datavisualization/engine/scatter3dcontroller_p.h64
-rw-r--r--src/datavisualization/engine/scatter3drenderer.cpp46
-rw-r--r--src/datavisualization/engine/scatter3drenderer_p.h88
-rw-r--r--src/datavisualization/engine/scatterseriesrendercache.cpp34
-rw-r--r--src/datavisualization/engine/scatterseriesrendercache_p.h36
-rw-r--r--src/datavisualization/engine/selectionpointer.cpp40
-rw-r--r--src/datavisualization/engine/selectionpointer_p.h34
-rw-r--r--src/datavisualization/engine/seriesrendercache.cpp34
-rw-r--r--src/datavisualization/engine/seriesrendercache_p.h34
-rw-r--r--src/datavisualization/engine/surface3dcontroller.cpp36
-rw-r--r--src/datavisualization/engine/surface3dcontroller_p.h64
-rw-r--r--src/datavisualization/engine/surface3drenderer.cpp36
-rw-r--r--src/datavisualization/engine/surface3drenderer_p.h78
-rw-r--r--src/datavisualization/engine/surfaceseriesrendercache.cpp38
-rw-r--r--src/datavisualization/engine/surfaceseriesrendercache_p.h38
-rw-r--r--src/datavisualization/global/datavisualizationglobal_p.h35
-rw-r--r--src/datavisualization/global/global.pri5
-rw-r--r--src/datavisualization/global/qdatavisualizationglobal.h51
-rw-r--r--src/datavisualization/input/input.pri14
-rw-r--r--src/datavisualization/input/q3dinputhandler.cpp36
-rw-r--r--src/datavisualization/input/q3dinputhandler.h44
-rw-r--r--src/datavisualization/input/q3dinputhandler_p.h34
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler.cpp34
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler.h36
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler_p.h34
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler.cpp52
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler.h38
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler_p.h34
-rw-r--r--src/datavisualization/theme/q3dtheme.cpp58
-rw-r--r--src/datavisualization/theme/q3dtheme.h38
-rw-r--r--src/datavisualization/theme/q3dtheme_p.h38
-rw-r--r--src/datavisualization/theme/theme.pri10
-rw-r--r--src/datavisualization/theme/thememanager.cpp37
-rw-r--r--src/datavisualization/theme/thememanager_p.h34
-rw-r--r--src/datavisualization/utils/abstractobjecthelper.cpp34
-rw-r--r--src/datavisualization/utils/abstractobjecthelper_p.h34
-rw-r--r--src/datavisualization/utils/camerahelper.cpp34
-rw-r--r--src/datavisualization/utils/camerahelper_p.h34
-rw-r--r--src/datavisualization/utils/meshloader.cpp38
-rw-r--r--src/datavisualization/utils/meshloader_p.h34
-rw-r--r--src/datavisualization/utils/objecthelper.cpp120
-rw-r--r--src/datavisualization/utils/objecthelper_p.h34
-rw-r--r--src/datavisualization/utils/qutils.h40
-rw-r--r--src/datavisualization/utils/scatterobjectbufferhelper.cpp70
-rw-r--r--src/datavisualization/utils/scatterobjectbufferhelper_p.h35
-rw-r--r--src/datavisualization/utils/scatterpointbufferhelper.cpp35
-rw-r--r--src/datavisualization/utils/scatterpointbufferhelper_p.h34
-rw-r--r--src/datavisualization/utils/shaderhelper.cpp41
-rw-r--r--src/datavisualization/utils/shaderhelper_p.h34
-rw-r--r--src/datavisualization/utils/surfaceobject.cpp37
-rw-r--r--src/datavisualization/utils/surfaceobject_p.h41
-rw-r--r--src/datavisualization/utils/texturehelper.cpp54
-rw-r--r--src/datavisualization/utils/texturehelper_p.h42
-rw-r--r--src/datavisualization/utils/utils.cpp62
-rw-r--r--src/datavisualization/utils/utils.pri26
-rw-r--r--src/datavisualization/utils/utils_p.h34
-rw-r--r--src/datavisualization/utils/vertexindexer.cpp35
-rw-r--r--src/datavisualization/utils/vertexindexer_p.h34
-rw-r--r--src/datavisualizationqml/CMakeLists.txt66
-rw-r--r--src/datavisualizationqml/abstractdeclarative.cpp (renamed from src/datavisualizationqml2/abstractdeclarative.cpp)112
-rw-r--r--src/datavisualizationqml/abstractdeclarative_p.h (renamed from src/datavisualizationqml2/abstractdeclarative_p.h)161
-rw-r--r--src/datavisualizationqml/colorgradient.cpp62
-rw-r--r--src/datavisualizationqml/colorgradient_p.h79
-rw-r--r--src/datavisualizationqml/declarativebars.cpp (renamed from src/datavisualizationqml2/declarativebars.cpp)53
-rw-r--r--src/datavisualizationqml/declarativebars_p.h (renamed from src/datavisualizationqml2/declarativebars_p.h)66
-rw-r--r--src/datavisualizationqml/declarativecolor.cpp26
-rw-r--r--src/datavisualizationqml/declarativecolor_p.h46
-rw-r--r--src/datavisualizationqml/declarativerendernode.cpp (renamed from src/datavisualizationqml2/declarativerendernode.cpp)38
-rw-r--r--src/datavisualizationqml/declarativerendernode_p.h (renamed from src/datavisualizationqml2/declarativerendernode_p.h)38
-rw-r--r--src/datavisualizationqml/declarativescatter.cpp (renamed from src/datavisualizationqml2/declarativescatter.cpp)39
-rw-r--r--src/datavisualizationqml/declarativescatter_p.h (renamed from src/datavisualizationqml2/declarativescatter_p.h)52
-rw-r--r--src/datavisualizationqml/declarativescene.cpp34
-rw-r--r--src/datavisualizationqml/declarativescene_p.h50
-rw-r--r--src/datavisualizationqml/declarativeseries.cpp (renamed from src/datavisualizationqml2/declarativeseries.cpp)135
-rw-r--r--src/datavisualizationqml/declarativeseries_p.h (renamed from src/datavisualizationqml2/declarativeseries_p.h)71
-rw-r--r--src/datavisualizationqml/declarativesurface.cpp (renamed from src/datavisualizationqml2/declarativesurface.cpp)39
-rw-r--r--src/datavisualizationqml/declarativesurface_p.h (renamed from src/datavisualizationqml2/declarativesurface_p.h)56
-rw-r--r--src/datavisualizationqml/declarativetheme.cpp (renamed from src/datavisualizationqml2/declarativetheme.cpp)44
-rw-r--r--src/datavisualizationqml/declarativetheme_p.h (renamed from src/datavisualizationqml2/declarativetheme_p.h)58
-rw-r--r--src/datavisualizationqml/designer/Bars3DSpecifics.qml (renamed from src/datavisualizationqml2/designer/Bars3DSpecifics.qml)30
-rw-r--r--src/datavisualizationqml/designer/Scatter3DSpecifics.qml (renamed from src/datavisualizationqml2/designer/Scatter3DSpecifics.qml)30
-rw-r--r--src/datavisualizationqml/designer/Surface3DSpecifics.qml (renamed from src/datavisualizationqml2/designer/Surface3DSpecifics.qml)30
-rw-r--r--src/datavisualizationqml/designer/default/Bars3D.qml23
-rw-r--r--src/datavisualizationqml/designer/default/Scatter3D.qml23
-rw-r--r--src/datavisualizationqml/designer/default/Surface3D.qml24
-rw-r--r--src/datavisualizationqml/designer/images/bars3d-icon.png (renamed from src/datavisualizationqml2/designer/images/bars3d-icon.png)bin1352 -> 1352 bytes
-rw-r--r--src/datavisualizationqml/designer/images/bars3d-icon16.png (renamed from src/datavisualizationqml2/designer/images/bars3d-icon16.png)bin1232 -> 1232 bytes
-rw-r--r--src/datavisualizationqml/designer/images/scatter3d-icon.png (renamed from src/datavisualizationqml2/designer/images/scatter3d-icon.png)bin1271 -> 1271 bytes
-rw-r--r--src/datavisualizationqml/designer/images/scatter3d-icon16.png (renamed from src/datavisualizationqml2/designer/images/scatter3d-icon16.png)bin1146 -> 1146 bytes
-rw-r--r--src/datavisualizationqml/designer/images/surface3d-icon.png (renamed from src/datavisualizationqml2/designer/images/surface3d-icon.png)bin1413 -> 1413 bytes
-rw-r--r--src/datavisualizationqml/designer/images/surface3d-icon16.png (renamed from src/datavisualizationqml2/designer/images/surface3d-icon16.png)bin1231 -> 1231 bytes
-rw-r--r--src/datavisualizationqml/designer/qtdatavisualization.metainfo (renamed from src/datavisualizationqml2/designer/qtdatavisualization.metainfo)0
-rw-r--r--src/datavisualizationqml/enumtostringmap.cpp (renamed from src/datavisualizationqml2/enumtostringmap.cpp)32
-rw-r--r--src/datavisualizationqml/enumtostringmap_p.h39
-rw-r--r--src/datavisualizationqml/foreigntypes_p.h122
-rw-r--r--src/datavisualizationqml/glstatestore.cpp (renamed from src/datavisualizationqml2/glstatestore.cpp)42
-rw-r--r--src/datavisualizationqml/glstatestore_p.h (renamed from src/datavisualizationqml2/glstatestore_p.h)32
-rw-r--r--src/datavisualizationqml2/colorgradient.cpp88
-rw-r--r--src/datavisualizationqml2/colorgradient_p.h99
-rw-r--r--src/datavisualizationqml2/datavisualizationqml2.pro55
-rw-r--r--src/datavisualizationqml2/datavisualizationqml2_plugin.cpp153
-rw-r--r--src/datavisualizationqml2/datavisualizationqml2_plugin.h135
-rw-r--r--src/datavisualizationqml2/declarativecolor.cpp52
-rw-r--r--src/datavisualizationqml2/declarativecolor_p.h68
-rw-r--r--src/datavisualizationqml2/declarativescene.cpp60
-rw-r--r--src/datavisualizationqml2/declarativescene_p.h71
-rw-r--r--src/datavisualizationqml2/designer/default/Bars3D.qml49
-rw-r--r--src/datavisualizationqml2/designer/default/Scatter3D.qml49
-rw-r--r--src/datavisualizationqml2/designer/default/Surface3D.qml50
-rw-r--r--src/datavisualizationqml2/designer/designer.pri19
-rw-r--r--src/datavisualizationqml2/enumtostringmap_p.h64
-rw-r--r--src/datavisualizationqml2/plugins.qmltypes2375
-rw-r--r--src/datavisualizationqml2/qmldir4
-rw-r--r--src/src.pro5
267 files changed, 3644 insertions, 11125 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 00000000..0bd4f3cb
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+add_subdirectory(datavisualization)
+if(TARGET Qt::Quick)
+ add_subdirectory(datavisualizationqml)
+endif()
diff --git a/src/datavisualization/CMakeLists.txt b/src/datavisualization/CMakeLists.txt
new file mode 100644
index 00000000..27f82340
--- /dev/null
+++ b/src/datavisualization/CMakeLists.txt
@@ -0,0 +1,430 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+qt_internal_add_module(DataVisualization
+ TARGET_PRODUCT "Qt Data Visualization (Qt $$QT_VERSION)"
+ TARGET_DESCRIPTION "3D Data Visualization component for Qt."
+ SOURCES
+ axis/qabstract3daxis.cpp axis/qabstract3daxis.h axis/qabstract3daxis_p.h
+ axis/qcategory3daxis.cpp axis/qcategory3daxis.h axis/qcategory3daxis_p.h
+ axis/qlogvalue3daxisformatter.cpp axis/qlogvalue3daxisformatter.h axis/qlogvalue3daxisformatter_p.h
+ axis/qvalue3daxis.cpp axis/qvalue3daxis.h axis/qvalue3daxis_p.h
+ axis/qvalue3daxisformatter.cpp axis/qvalue3daxisformatter.h axis/qvalue3daxisformatter_p.h
+ data/abstractitemmodelhandler.cpp data/abstractitemmodelhandler_p.h
+ data/abstractrenderitem.cpp data/abstractrenderitem_p.h
+ data/baritemmodelhandler.cpp data/baritemmodelhandler_p.h
+ data/barrenderitem.cpp data/barrenderitem_p.h
+ data/customrenderitem.cpp data/customrenderitem_p.h
+ data/labelitem.cpp data/labelitem_p.h
+ data/qabstract3dseries.cpp data/qabstract3dseries.h data/qabstract3dseries_p.h
+ data/qabstractdataproxy.cpp data/qabstractdataproxy.h data/qabstractdataproxy_p.h
+ data/qbar3dseries.cpp data/qbar3dseries.h data/qbar3dseries_p.h
+ data/qbardataitem.cpp data/qbardataitem.h data/qbardataitem_p.h
+ data/qbardataproxy.cpp data/qbardataproxy.h data/qbardataproxy_p.h
+ data/qcustom3ditem.cpp data/qcustom3ditem.h data/qcustom3ditem_p.h
+ data/qcustom3dlabel.cpp data/qcustom3dlabel.h data/qcustom3dlabel_p.h
+ data/qcustom3dvolume.cpp data/qcustom3dvolume.h data/qcustom3dvolume_p.h
+ data/qheightmapsurfacedataproxy.cpp data/qheightmapsurfacedataproxy.h data/qheightmapsurfacedataproxy_p.h
+ data/qitemmodelbardataproxy.cpp data/qitemmodelbardataproxy.h data/qitemmodelbardataproxy_p.h
+ data/qitemmodelscatterdataproxy.cpp data/qitemmodelscatterdataproxy.h data/qitemmodelscatterdataproxy_p.h
+ data/qitemmodelsurfacedataproxy.cpp data/qitemmodelsurfacedataproxy.h data/qitemmodelsurfacedataproxy_p.h
+ data/qscatter3dseries.cpp data/qscatter3dseries.h data/qscatter3dseries_p.h
+ data/qscatterdataitem.cpp data/qscatterdataitem.h data/qscatterdataitem_p.h
+ data/qscatterdataproxy.cpp data/qscatterdataproxy.h data/qscatterdataproxy_p.h
+ data/qsurface3dseries.cpp data/qsurface3dseries.h data/qsurface3dseries_p.h
+ data/qsurfacedataitem.cpp data/qsurfacedataitem.h data/qsurfacedataitem_p.h
+ data/qsurfacedataproxy.cpp data/qsurfacedataproxy.h data/qsurfacedataproxy_p.h
+ data/scatteritemmodelhandler.cpp data/scatteritemmodelhandler_p.h
+ data/scatterrenderitem.cpp data/scatterrenderitem_p.h
+ data/surfaceitemmodelhandler.cpp data/surfaceitemmodelhandler_p.h
+ engine/abstractdeclarativeinterface.cpp engine/abstractdeclarativeinterface_p.h
+ engine/abstract3dcontroller.cpp engine/abstract3dcontroller_p.h
+ engine/abstract3drenderer.cpp engine/abstract3drenderer_p.h
+ engine/axisrendercache.cpp engine/axisrendercache_p.h
+ engine/bars3dcontroller.cpp engine/bars3dcontroller_p.h
+ engine/bars3drenderer.cpp engine/bars3drenderer_p.h
+ engine/barseriesrendercache.cpp engine/barseriesrendercache_p.h
+ engine/drawer.cpp engine/drawer_p.h
+ engine/q3dbars.cpp engine/q3dbars.h engine/q3dbars_p.h
+ engine/q3dcamera.cpp engine/q3dcamera.h engine/q3dcamera_p.h
+ engine/q3dlight.cpp engine/q3dlight.h engine/q3dlight_p.h
+ engine/q3dobject.cpp engine/q3dobject.h engine/q3dobject_p.h
+ engine/q3dscatter.cpp engine/q3dscatter.h engine/q3dscatter_p.h
+ engine/q3dscene.cpp engine/q3dscene.h engine/q3dscene_p.h
+ engine/q3dsurface.cpp engine/q3dsurface.h engine/q3dsurface_p.h
+ engine/qabstract3dgraph.cpp engine/qabstract3dgraph.h engine/qabstract3dgraph_p.h
+ engine/scatter3dcontroller.cpp engine/scatter3dcontroller_p.h
+ engine/scatter3drenderer.cpp engine/scatter3drenderer_p.h
+ engine/scatterseriesrendercache.cpp engine/scatterseriesrendercache_p.h
+ engine/selectionpointer.cpp engine/selectionpointer_p.h
+ engine/seriesrendercache.cpp engine/seriesrendercache_p.h
+ engine/surface3dcontroller.cpp engine/surface3dcontroller_p.h
+ engine/surface3drenderer.cpp engine/surface3drenderer_p.h
+ engine/surfaceseriesrendercache.cpp engine/surfaceseriesrendercache_p.h
+ global/datavisualizationglobal_p.h
+ global/qdatavisualizationglobal.h
+ input/q3dinputhandler.cpp input/q3dinputhandler.h input/q3dinputhandler_p.h
+ input/qabstract3dinputhandler.cpp input/qabstract3dinputhandler.h input/qabstract3dinputhandler_p.h
+ input/qtouch3dinputhandler.cpp input/qtouch3dinputhandler.h input/qtouch3dinputhandler_p.h
+ theme/q3dtheme.cpp theme/q3dtheme.h theme/q3dtheme_p.h
+ theme/thememanager.cpp theme/thememanager_p.h
+ utils/abstractobjecthelper.cpp utils/abstractobjecthelper_p.h
+ utils/camerahelper.cpp utils/camerahelper_p.h
+ utils/meshloader.cpp utils/meshloader_p.h
+ utils/objecthelper.cpp utils/objecthelper_p.h
+ utils/qutils.h
+ utils/scatterobjectbufferhelper.cpp utils/scatterobjectbufferhelper_p.h
+ utils/scatterpointbufferhelper.cpp utils/scatterpointbufferhelper_p.h
+ utils/shaderhelper.cpp utils/shaderhelper_p.h
+ utils/surfaceobject.cpp utils/surfaceobject_p.h
+ utils/texturehelper.cpp utils/texturehelper_p.h
+ utils/utils.cpp utils/utils_p.h
+ utils/vertexindexer.cpp utils/vertexindexer_p.h
+ NO_PCH_SOURCES
+ # undef QT_NO_FOREACH:
+ engine/abstract3dcontroller.cpp
+ engine/abstract3drenderer.cpp
+ engine/axisrendercache.cpp
+ engine/bars3dcontroller.cpp
+ engine/bars3drenderer.cpp
+ engine/q3dscatter.cpp
+ engine/q3dsurface.cpp
+ engine/scatter3dcontroller.cpp
+ engine/scatter3drenderer.cpp
+ engine/surface3dcontroller.cpp
+ engine/surface3drenderer.cpp
+ # end undef QT_NO_FOREACH
+ INCLUDE_DIRECTORIES
+ axis
+ data
+ engine
+ global
+ input
+ theme
+ utils
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::OpenGL
+ GENERATE_CPP_EXPORTS
+)
+
+set_source_files_properties("engine/meshes/arrowFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "arrow"
+)
+set_source_files_properties("engine/meshes/arrowSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "arrowSmooth"
+)
+set_source_files_properties("engine/meshes/background.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "background"
+)
+set_source_files_properties("engine/meshes/backgroundNoFloor.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "backgroundNoFloor"
+)
+set_source_files_properties("engine/meshes/barFilledFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "bevelbarFull"
+)
+set_source_files_properties("engine/meshes/barFilledSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "bevelbarSmoothFull"
+)
+set_source_files_properties("engine/meshes/barFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "bevelbar"
+)
+set_source_files_properties("engine/meshes/barSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "bevelbarSmooth"
+)
+set_source_files_properties("engine/meshes/coneFilledFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "coneFull"
+)
+set_source_files_properties("engine/meshes/coneFilledSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "coneSmoothFull"
+)
+set_source_files_properties("engine/meshes/coneFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "cone"
+)
+set_source_files_properties("engine/meshes/coneSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "coneSmooth"
+)
+set_source_files_properties("engine/meshes/cubeFilledFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "barFull"
+)
+set_source_files_properties("engine/meshes/cubeFilledSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "barSmoothFull"
+)
+set_source_files_properties("engine/meshes/cubeFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "bar"
+)
+set_source_files_properties("engine/meshes/cubeSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "barSmooth"
+)
+set_source_files_properties("engine/meshes/cylinderFilledFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "cylinderFull"
+)
+set_source_files_properties("engine/meshes/cylinderFilledSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "cylinderSmoothFull"
+)
+set_source_files_properties("engine/meshes/cylinderFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "cylinder"
+)
+set_source_files_properties("engine/meshes/cylinderSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "cylinderSmooth"
+)
+set_source_files_properties("engine/meshes/minimalFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "minimal"
+)
+set_source_files_properties("engine/meshes/minimalSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "minimalSmooth"
+)
+set_source_files_properties("engine/meshes/plane.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "plane"
+)
+set_source_files_properties("engine/meshes/pyramidFilledFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "pyramidFull"
+)
+set_source_files_properties("engine/meshes/pyramidFilledSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "pyramidSmoothFull"
+)
+set_source_files_properties("engine/meshes/pyramidFlat.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "pyramid"
+)
+set_source_files_properties("engine/meshes/pyramidSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "pyramidSmooth"
+)
+set_source_files_properties("engine/meshes/sphere.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "sphere"
+)
+set_source_files_properties("engine/meshes/sphereSmooth.obj"
+ PROPERTIES QT_RESOURCE_ALIAS "sphereSmooth"
+)
+set(mesh_resource_files
+ "engine/meshes/arrowFlat.obj"
+ "engine/meshes/arrowSmooth.obj"
+ "engine/meshes/background.obj"
+ "engine/meshes/backgroundNoFloor.obj"
+ "engine/meshes/barFilledFlat.obj"
+ "engine/meshes/barFilledSmooth.obj"
+ "engine/meshes/barFlat.obj"
+ "engine/meshes/barSmooth.obj"
+ "engine/meshes/coneFilledFlat.obj"
+ "engine/meshes/coneFilledSmooth.obj"
+ "engine/meshes/coneFlat.obj"
+ "engine/meshes/coneSmooth.obj"
+ "engine/meshes/cubeFilledFlat.obj"
+ "engine/meshes/cubeFilledSmooth.obj"
+ "engine/meshes/cubeFlat.obj"
+ "engine/meshes/cubeSmooth.obj"
+ "engine/meshes/cylinderFilledFlat.obj"
+ "engine/meshes/cylinderFilledSmooth.obj"
+ "engine/meshes/cylinderFlat.obj"
+ "engine/meshes/cylinderSmooth.obj"
+ "engine/meshes/minimalFlat.obj"
+ "engine/meshes/minimalSmooth.obj"
+ "engine/meshes/plane.obj"
+ "engine/meshes/pyramidFilledFlat.obj"
+ "engine/meshes/pyramidFilledSmooth.obj"
+ "engine/meshes/pyramidFlat.obj"
+ "engine/meshes/pyramidSmooth.obj"
+ "engine/meshes/sphere.obj"
+ "engine/meshes/sphereSmooth.obj"
+)
+
+set_source_files_properties("engine/shaders/3dsliceframes.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragment3DSliceFrames"
+)
+set_source_files_properties("engine/shaders/colorOnY.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentColorOnY"
+)
+set_source_files_properties("engine/shaders/colorOnY_ES2.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentColorOnYES2"
+)
+set_source_files_properties("engine/shaders/default.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragment"
+)
+set_source_files_properties("engine/shaders/default.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertex"
+)
+set_source_files_properties("engine/shaders/defaultNoMatrices.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexNoMatrices"
+)
+set_source_files_properties("engine/shaders/default_ES2.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentES2"
+)
+set_source_files_properties("engine/shaders/depth.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentDepth"
+)
+set_source_files_properties("engine/shaders/depth.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexDepth"
+)
+set_source_files_properties("engine/shaders/label.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentLabel"
+)
+set_source_files_properties("engine/shaders/label.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexLabel"
+)
+set_source_files_properties("engine/shaders/plainColor.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentPlainColor"
+)
+set_source_files_properties("engine/shaders/plainColor.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexPlainColor"
+)
+set_source_files_properties("engine/shaders/point_ES2.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexPointES2"
+)
+set_source_files_properties("engine/shaders/point_ES2_UV.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexPointES2_UV"
+)
+set_source_files_properties("engine/shaders/position.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexPosition"
+)
+set_source_files_properties("engine/shaders/positionmap.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentPositionMap"
+)
+set_source_files_properties("engine/shaders/shadow.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentShadow"
+)
+set_source_files_properties("engine/shaders/shadow.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexShadow"
+)
+set_source_files_properties("engine/shaders/shadowNoMatrices.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexShadowNoMatrices"
+)
+set_source_files_properties("engine/shaders/shadowNoTex.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentShadowNoTex"
+)
+set_source_files_properties("engine/shaders/shadowNoTexColorOnY.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentShadowNoTexColorOnY"
+)
+set_source_files_properties("engine/shaders/surface.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentSurface"
+)
+set_source_files_properties("engine/shaders/surfaceFlat.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentSurfaceFlat"
+)
+set_source_files_properties("engine/shaders/surfaceFlat.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexSurfaceFlat"
+)
+set_source_files_properties("engine/shaders/surfaceShadowFlat.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentSurfaceShadowFlat"
+)
+set_source_files_properties("engine/shaders/surfaceShadowFlat.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexSurfaceShadowFlat"
+)
+set_source_files_properties("engine/shaders/surfaceShadowNoTex.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentSurfaceShadowNoTex"
+)
+set_source_files_properties("engine/shaders/surfaceTexturedFlat.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentSurfaceTexturedFlat"
+)
+set_source_files_properties("engine/shaders/surfaceTexturedShadow.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentTexturedSurfaceShadow"
+)
+set_source_files_properties("engine/shaders/surfaceTexturedShadowFlat.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentTexturedSurfaceShadowFlat"
+)
+set_source_files_properties("engine/shaders/surface_ES2.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentSurfaceES2"
+)
+set_source_files_properties("engine/shaders/texture.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentTexture"
+)
+set_source_files_properties("engine/shaders/texture.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexTexture"
+)
+set_source_files_properties("engine/shaders/texture3d.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentTexture3D"
+)
+set_source_files_properties("engine/shaders/texture3d.vert"
+ PROPERTIES QT_RESOURCE_ALIAS "vertexTexture3D"
+)
+set_source_files_properties("engine/shaders/texture3dlowdef.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentTexture3DLowDef"
+)
+set_source_files_properties("engine/shaders/texture3dslice.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentTexture3DSlice"
+)
+set_source_files_properties("engine/shaders/texture_ES2.frag"
+ PROPERTIES QT_RESOURCE_ALIAS "fragmentTextureES2"
+)
+set(shader_resource_files
+ "engine/shaders/3dsliceframes.frag"
+ "engine/shaders/colorOnY.frag"
+ "engine/shaders/colorOnY_ES2.frag"
+ "engine/shaders/default.frag"
+ "engine/shaders/default.vert"
+ "engine/shaders/defaultNoMatrices.vert"
+ "engine/shaders/default_ES2.frag"
+ "engine/shaders/depth.frag"
+ "engine/shaders/depth.vert"
+ "engine/shaders/label.frag"
+ "engine/shaders/label.vert"
+ "engine/shaders/plainColor.frag"
+ "engine/shaders/plainColor.vert"
+ "engine/shaders/point_ES2.vert"
+ "engine/shaders/point_ES2_UV.vert"
+ "engine/shaders/position.vert"
+ "engine/shaders/positionmap.frag"
+ "engine/shaders/shadow.frag"
+ "engine/shaders/shadow.vert"
+ "engine/shaders/shadowNoMatrices.vert"
+ "engine/shaders/shadowNoTex.frag"
+ "engine/shaders/shadowNoTexColorOnY.frag"
+ "engine/shaders/surface.frag"
+ "engine/shaders/surfaceFlat.frag"
+ "engine/shaders/surfaceFlat.vert"
+ "engine/shaders/surfaceShadowFlat.frag"
+ "engine/shaders/surfaceShadowFlat.vert"
+ "engine/shaders/surfaceShadowNoTex.frag"
+ "engine/shaders/surfaceTexturedFlat.frag"
+ "engine/shaders/surfaceTexturedShadow.frag"
+ "engine/shaders/surfaceTexturedShadowFlat.frag"
+ "engine/shaders/surface_ES2.frag"
+ "engine/shaders/texture.frag"
+ "engine/shaders/texture.vert"
+ "engine/shaders/texture3d.frag"
+ "engine/shaders/texture3d.vert"
+ "engine/shaders/texture3dlowdef.frag"
+ "engine/shaders/texture3dslice.frag"
+ "engine/shaders/texture_ES2.frag"
+)
+
+qt_internal_add_resource(DataVisualization "datavisualizationshaders"
+ PREFIX
+ "/shaders"
+ BASE
+ "engine/shaders"
+ FILES
+ ${shader_resource_files}
+)
+
+qt_internal_add_resource(DataVisualization "datavisualizationmeshes"
+ PREFIX
+ "/defaultMeshes"
+ BASE
+ "engine/meshes"
+ FILES
+ ${mesh_resource_files}
+)
+
+qt_internal_extend_target(DataVisualization CONDITION MACOS
+ LIBRARIES
+ Qt::GuiPrivate
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ PRIVATE_MODULE_INTERFACE
+ Qt::GuiPrivate
+)
+
+qt_internal_extend_target(DataVisualization CONDITION MINGW
+ NO_UNITY_BUILD_SOURCES
+ data/qbardataitem.cpp
+ data/qscatterdataitem.cpp
+ data/qsurfacedataitem.cpp
+ # MinGW triggers `-Werror=maybe-uninitialized` on d_ptr while
+ # proper checks are in place and d_ptr is initialized in
+ # operator=()
+)
+
+qt_internal_add_docs(DataVisualization
+ doc/qtdatavis3d.qdocconf
+)
+
diff --git a/src/datavisualization/axis/axis.pri b/src/datavisualization/axis/axis.pri
deleted file mode 100644
index 4c142c91..00000000
--- a/src/datavisualization/axis/axis.pri
+++ /dev/null
@@ -1,20 +0,0 @@
-HEADERS += \
- $$PWD/qabstract3daxis.h \
- $$PWD/qabstract3daxis_p.h \
- $$PWD/qvalue3daxis.h \
- $$PWD/qvalue3daxis_p.h \
- $$PWD/qcategory3daxis.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/qvalue3daxisformatter.cpp \
- $$PWD/qlogvalue3daxisformatter.cpp
-
-INCLUDEPATH += $$PWD
diff --git a/src/datavisualization/axis/qabstract3daxis.cpp b/src/datavisualization/axis/qabstract3daxis.cpp
index 56b87c98..62bbb2a3 100644
--- a/src/datavisualization/axis/qabstract3daxis.cpp
+++ b/src/datavisualization/axis/qabstract3daxis.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qabstract3daxis_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QAbstract3DAxis
@@ -574,4 +548,4 @@ void QAbstract3DAxisPrivate::setMax(float max)
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/axis/qabstract3daxis.h b/src/datavisualization/axis/qabstract3daxis.h
index fca8810e..3449397f 100644
--- a/src/datavisualization/axis/qabstract3daxis.h
+++ b/src/datavisualization/axis/qabstract3daxis.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QABSTRACT3DAXIS_H
#define QABSTRACT3DAXIS_H
@@ -35,11 +9,11 @@
#include <QtCore/QScopedPointer>
#include <QtCore/QStringList>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DAxisPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstract3DAxis : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstract3DAxis : public QObject
{
Q_OBJECT
Q_ENUMS(AxisOrientation)
@@ -51,9 +25,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)
+ Q_PROPERTY(float labelAutoRotation READ labelAutoRotation WRITE setLabelAutoRotation NOTIFY labelAutoRotationChanged REVISION(1, 1))
+ Q_PROPERTY(bool titleVisible READ isTitleVisible WRITE setTitleVisible NOTIFY titleVisibilityChanged REVISION(1, 1))
+ Q_PROPERTY(bool titleFixed READ isTitleFixed WRITE setTitleFixed NOTIFY titleFixedChanged REVISION(1, 1))
public:
enum AxisOrientation {
@@ -112,9 +86,9 @@ Q_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);
+ Q_REVISION(1, 1) void labelAutoRotationChanged(float angle);
+ Q_REVISION(1, 1) void titleVisibilityChanged(bool visible);
+ Q_REVISION(1, 1) void titleFixedChanged(bool fixed);
protected:
QScopedPointer<QAbstract3DAxisPrivate> d_ptr;
@@ -128,6 +102,6 @@ private:
friend class QSurfaceDataProxyPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qabstract3daxis_p.h b/src/datavisualization/axis/qabstract3daxis_p.h
index 418fa449..4b258edf 100644
--- a/src/datavisualization/axis/qabstract3daxis_p.h
+++ b/src/datavisualization/axis/qabstract3daxis_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qabstract3daxis.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DAxisPrivate : public QObject
{
@@ -88,6 +62,6 @@ protected:
friend class QSurfaceDataProxyPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qcategory3daxis.cpp b/src/datavisualization/axis/qcategory3daxis.cpp
index 17bfe490..a8cdec4d 100644
--- a/src/datavisualization/axis/qcategory3daxis.cpp
+++ b/src/datavisualization/axis/qcategory3daxis.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qcategory3daxis_p.h"
#include "bars3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QCategory3DAxis
@@ -171,4 +145,4 @@ QCategory3DAxis *QCategory3DAxisPrivate::qptr()
return static_cast<QCategory3DAxis *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/axis/qcategory3daxis.h b/src/datavisualization/axis/qcategory3daxis.h
index f1bffa17..5497c39b 100644
--- a/src/datavisualization/axis/qcategory3daxis.h
+++ b/src/datavisualization/axis/qcategory3daxis.h
@@ -1,42 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QCATEGORY3DAXIS_H
#define QCATEGORY3DAXIS_H
#include <QtDataVisualization/qabstract3daxis.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QCategory3DAxisPrivate;
-class QT_DATAVISUALIZATION_EXPORT QCategory3DAxis : public QAbstract3DAxis
+class Q_DATAVISUALIZATION_EXPORT QCategory3DAxis : public QAbstract3DAxis
{
Q_OBJECT
Q_PROPERTY(QStringList labels READ labels WRITE setLabels NOTIFY labelsChanged)
@@ -59,6 +33,6 @@ private:
friend class Bars3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qcategory3daxis_p.h b/src/datavisualization/axis/qcategory3daxis_p.h
index 2b2f2bd9..c717af96 100644
--- a/src/datavisualization/axis/qcategory3daxis_p.h
+++ b/src/datavisualization/axis/qcategory3daxis_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qcategory3daxis.h"
#include "qabstract3daxis_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QCategory3DAxisPrivate : public QAbstract3DAxisPrivate
{
@@ -56,9 +30,9 @@ public:
void setDataLabels(const QStringList &labels);
protected:
- virtual bool allowZero();
- virtual bool allowNegatives();
- virtual bool allowMinMaxSame();
+ bool allowZero() override;
+ bool allowNegatives() override;
+ bool allowMinMaxSame() override;
private:
QCategory3DAxis *qptr();
@@ -67,6 +41,6 @@ private:
friend class QCategory3DAxis;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter.cpp b/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
index 77ea37c1..adb485ce 100644
--- a/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qlogvalue3daxisformatter_p.h"
#include "qvalue3daxis_p.h"
#include <QtCore/qmath.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QLogValue3DAxisFormatter
@@ -452,4 +426,4 @@ QLogValue3DAxisFormatter *QLogValue3DAxisFormatterPrivate::qptr()
return static_cast<QLogValue3DAxisFormatter *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter.h b/src/datavisualization/axis/qlogvalue3daxisformatter.h
index b8b5a6a7..1f4fc70a 100644
--- a/src/datavisualization/axis/qlogvalue3daxisformatter.h
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter.h
@@ -1,42 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QLOGVALUE3DAXISFORMATTER_H
#define QLOGVALUE3DAXISFORMATTER_H
#include <QtDataVisualization/qvalue3daxisformatter.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QLogValue3DAxisFormatterPrivate;
-class QT_DATAVISUALIZATION_EXPORT QLogValue3DAxisFormatter : public QValue3DAxisFormatter
+class Q_DATAVISUALIZATION_EXPORT QLogValue3DAxisFormatter : public QValue3DAxisFormatter
{
Q_OBJECT
@@ -63,11 +37,11 @@ Q_SIGNALS:
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;
+ QValue3DAxisFormatter *createNewInstance() const override;
+ void recalculate() override;
+ float positionAt(float value) const override;
+ float valueAt(float position) const override;
+ void populateCopy(QValue3DAxisFormatter &copy) const override;
QLogValue3DAxisFormatterPrivate *dptr();
const QLogValue3DAxisFormatterPrivate *dptrc() const;
@@ -78,6 +52,6 @@ private:
friend class QLogValue3DAxisFormatterPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter_p.h b/src/datavisualization/axis/qlogvalue3daxisformatter_p.h
index 65b7844c..b1a28be5 100644
--- a/src/datavisualization/axis/qlogvalue3daxisformatter_p.h
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "qlogvalue3daxisformatter.h"
#include "qvalue3daxisformatter_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QLogValue3DAxisFormatterPrivate : public QValue3DAxisFormatterPrivate
{
@@ -77,6 +51,6 @@ private:
friend class QLogValue3DAxisFormatter;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qvalue3daxis.cpp b/src/datavisualization/axis/qvalue3daxis.cpp
index f0a72ed4..1358c92b 100644
--- a/src/datavisualization/axis/qvalue3daxis.cpp
+++ b/src/datavisualization/axis/qvalue3daxis.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qvalue3daxis_p.h"
#include "qvalue3daxisformatter_p.h"
#include "abstract3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QValue3DAxis
@@ -375,4 +349,4 @@ QValue3DAxis *QValue3DAxisPrivate::qptr()
return static_cast<QValue3DAxis *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/axis/qvalue3daxis.h b/src/datavisualization/axis/qvalue3daxis.h
index 9cb28f70..87662847 100644
--- a/src/datavisualization/axis/qvalue3daxis.h
+++ b/src/datavisualization/axis/qvalue3daxis.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QVALUE3DAXIS_H
#define QVALUE3DAXIS_H
@@ -33,18 +7,18 @@
#include <QtDataVisualization/qabstract3daxis.h>
#include <QtDataVisualization/qvalue3daxisformatter.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QValue3DAxisPrivate;
-class QT_DATAVISUALIZATION_EXPORT QValue3DAxis : public QAbstract3DAxis
+class Q_DATAVISUALIZATION_EXPORT QValue3DAxis : public QAbstract3DAxis
{
Q_OBJECT
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)
+ Q_PROPERTY(QValue3DAxisFormatter* formatter READ formatter WRITE setFormatter NOTIFY formatterChanged REVISION(1, 1))
+ Q_PROPERTY(bool reversed READ reversed WRITE setReversed NOTIFY reversedChanged REVISION(1, 1))
public:
explicit QValue3DAxis(QObject *parent = nullptr);
@@ -69,8 +43,8 @@ Q_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);
+ Q_REVISION(1, 1) void formatterChanged(QValue3DAxisFormatter *formatter);
+ Q_REVISION(1, 1) void reversedChanged(bool enable);
protected:
QValue3DAxisPrivate *dptr();
@@ -85,6 +59,6 @@ private:
friend class QValue3DAxisFormatterPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qvalue3daxis_p.h b/src/datavisualization/axis/qvalue3daxis_p.h
index 277ffef4..ab9095e3 100644
--- a/src/datavisualization/axis/qvalue3daxis_p.h
+++ b/src/datavisualization/axis/qvalue3daxis_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qvalue3daxis.h"
#include "qabstract3daxis_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QValue3DAxisPrivate : public QAbstract3DAxisPrivate
{
@@ -53,9 +27,9 @@ public:
QValue3DAxisPrivate(QValue3DAxis *q);
virtual ~QValue3DAxisPrivate();
- virtual void setRange(float min, float max, bool suppressWarnings = false);
- virtual void setMin(float min);
- virtual void setMax (float max);
+ void setRange(float min, float max, bool suppressWarnings = false) override;
+ void setMin(float min) override;
+ void setMax (float max) override;
void emitLabelsChanged();
@@ -63,11 +37,11 @@ Q_SIGNALS:
void formatterDirty();
protected:
- virtual void updateLabels();
+ void updateLabels() override;
- virtual bool allowZero();
- virtual bool allowNegatives();
- virtual bool allowMinMaxSame();
+ bool allowZero() override;
+ bool allowNegatives() override;
+ bool allowMinMaxSame() override;
int m_segmentCount;
int m_subSegmentCount;
@@ -83,6 +57,6 @@ private:
friend class Abstract3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qvalue3daxisformatter.cpp b/src/datavisualization/axis/qvalue3daxisformatter.cpp
index 68a73a1d..db210059 100644
--- a/src/datavisualization/axis/qvalue3daxisformatter.cpp
+++ b/src/datavisualization/axis/qvalue3daxisformatter.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qvalue3daxisformatter_p.h"
#include "qvalue3daxis_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QValue3DAxisFormatter
@@ -468,4 +442,4 @@ void QValue3DAxisFormatterPrivate::markDirtyNoLabelChange()
markDirty(false);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/axis/qvalue3daxisformatter.h b/src/datavisualization/axis/qvalue3daxisformatter.h
index e4efd14e..e55483ce 100644
--- a/src/datavisualization/axis/qvalue3daxisformatter.h
+++ b/src/datavisualization/axis/qvalue3daxisformatter.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QVALUE3DAXISFORMATTER_H
#define QVALUE3DAXISFORMATTER_H
@@ -37,12 +11,12 @@
#include <QtCore/QScopedPointer>
#include <QtCore/QStringList>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QValue3DAxisFormatterPrivate;
class QValue3DAxis;
-class QT_DATAVISUALIZATION_EXPORT QValue3DAxisFormatter : public QObject
+class Q_DATAVISUALIZATION_EXPORT QValue3DAxisFormatter : public QObject
{
Q_OBJECT
protected:
@@ -96,6 +70,6 @@ private:
friend class QSurface3DSeriesPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/axis/qvalue3daxisformatter_p.h b/src/datavisualization/axis/qvalue3daxisformatter_p.h
index d6abdb1b..301d6014 100644
--- a/src/datavisualization/axis/qvalue3daxisformatter_p.h
+++ b/src/datavisualization/axis/qvalue3daxisformatter_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -45,7 +19,7 @@
#include "utils_p.h"
#include <QtCore/QLocale>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QValue3DAxis;
@@ -105,6 +79,6 @@ protected:
friend class QValue3DAxisFormatter;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/configure.cmake b/src/datavisualization/configure.cmake
new file mode 100644
index 00000000..a7d05099
--- /dev/null
+++ b/src/datavisualization/configure.cmake
@@ -0,0 +1,7 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+qt_extra_definition("QT_VERSION_STR" "\"${PROJECT_VERSION}\"" PUBLIC)
+qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC)
+qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC)
+qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC)
diff --git a/src/datavisualization/data/abstractitemmodelhandler.cpp b/src/datavisualization/data/abstractitemmodelhandler.cpp
index 703a337f..99d983be 100644
--- a/src/datavisualization/data/abstractitemmodelhandler.cpp
+++ b/src/datavisualization/data/abstractitemmodelhandler.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "abstractitemmodelhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
AbstractItemModelHandler::AbstractItemModelHandler(QObject *parent)
: QObject(parent),
@@ -237,4 +211,4 @@ void AbstractItemModelHandler::handlePendingResolve()
m_fullReset = false;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/abstractitemmodelhandler_p.h b/src/datavisualization/data/abstractitemmodelhandler_p.h
index 62a78103..64e61838 100644
--- a/src/datavisualization/data/abstractitemmodelhandler_p.h
+++ b/src/datavisualization/data/abstractitemmodelhandler_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -45,7 +19,7 @@
#include <QtCore/QPointer>
#include <QtCore/QTimer>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class AbstractItemModelHandler : public QObject
{
@@ -91,6 +65,8 @@ private:
Q_DISABLE_COPY(AbstractItemModelHandler)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+static constexpr int noRoleIndex = -1;
+
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/abstractrenderitem.cpp b/src/datavisualization/data/abstractrenderitem.cpp
index 8a932e3f..e3811fd1 100644
--- a/src/datavisualization/data/abstractrenderitem.cpp
+++ b/src/datavisualization/data/abstractrenderitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "abstractrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
AbstractRenderItem::AbstractRenderItem()
{
@@ -45,4 +19,4 @@ AbstractRenderItem::~AbstractRenderItem()
{
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/abstractrenderitem_p.h b/src/datavisualization/data/abstractrenderitem_p.h
index 28755d61..765e0ba7 100644
--- a/src/datavisualization/data/abstractrenderitem_p.h
+++ b/src/datavisualization/data/abstractrenderitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,19 +14,20 @@
#ifndef ABSTRACTRENDERITEM_P_H
#define ABSTRACTRENDERITEM_P_H
-#include "datavisualizationglobal_p.h"
-#include "labelitem_p.h"
+#include <private/datavisualizationglobal_p.h>
+#include <private/labelitem_p.h>
#include <QtGui/QVector3D>
#include <QtGui/QQuaternion>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class AbstractRenderItem
{
public:
AbstractRenderItem();
AbstractRenderItem(const AbstractRenderItem &other);
+ AbstractRenderItem &operator=(const AbstractRenderItem &other) = default;
virtual ~AbstractRenderItem();
// Position in 3D scene
@@ -75,6 +50,6 @@ protected:
friend class QAbstractDataItem;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/baritemmodelhandler.cpp b/src/datavisualization/data/baritemmodelhandler.cpp
index 5a2d92cd..4a8c8faa 100644
--- a/src/datavisualization/data/baritemmodelhandler.cpp
+++ b/src/datavisualization/data/baritemmodelhandler.cpp
@@ -1,37 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "baritemmodelhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-static const int noRoleIndex = -1;
+QT_BEGIN_NAMESPACE
BarItemModelHandler::BarItemModelHandler(QItemModelBarDataProxy *proxy, QObject *parent)
: AbstractItemModelHandler(parent),
@@ -108,18 +80,18 @@ void BarItemModelHandler::resolveModel()
// 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());
+ QRegularExpression rowPattern(m_proxy->rowRolePattern());
+ QRegularExpression 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();
+ bool haveRowPattern = !rowPattern.namedCaptureGroups().isEmpty() && rowPattern.isValid();
+ bool haveColPattern = !colPattern.namedCaptureGroups().isEmpty() && colPattern.isValid();
+ m_haveValuePattern = !m_valuePattern.namedCaptureGroups().isEmpty() && m_valuePattern.isValid();
+ m_haveRotationPattern = !m_rotationPattern.namedCaptureGroups().isEmpty() && m_rotationPattern.isValid();
QStringList rowLabels;
QStringList columnLabels;
@@ -299,4 +271,4 @@ void BarItemModelHandler::resolveModel()
m_proxy->resetArray(m_proxyArray, rowLabels, columnLabels);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/baritemmodelhandler_p.h b/src/datavisualization/data/baritemmodelhandler_p.h
index 20126bcc..98e0d51b 100644
--- a/src/datavisualization/data/baritemmodelhandler_p.h
+++ b/src/datavisualization/data/baritemmodelhandler_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "abstractitemmodelhandler_p.h"
#include "qitemmodelbardataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class BarItemModelHandler : public AbstractItemModelHandler
{
@@ -53,25 +27,25 @@ public:
virtual ~BarItemModelHandler();
public Q_SLOTS:
- virtual void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
- const QList<int> &roles = QList<int>());
+ void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
+ const QList<int> &roles = QList<int>()) override;
protected:
- void virtual resolveModel();
+ void resolveModel() override;
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;
+ QRegularExpression m_valuePattern;
+ QRegularExpression m_rotationPattern;
QString m_valueReplace;
QString m_rotationReplace;
bool m_haveValuePattern;
bool m_haveRotationPattern;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/barrenderitem.cpp b/src/datavisualization/data/barrenderitem.cpp
index 23e3f13c..43d2de5a 100644
--- a/src/datavisualization/data/barrenderitem.cpp
+++ b/src/datavisualization/data/barrenderitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "barrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
BarRenderItem::BarRenderItem()
: AbstractRenderItem(),
@@ -99,4 +73,4 @@ const QString &BarRenderSliceItem::sliceLabel() const
return m_sliceLabel;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/barrenderitem_p.h b/src/datavisualization/data/barrenderitem_p.h
index 29147722..a83d07e6 100644
--- a/src/datavisualization/data/barrenderitem_p.h
+++ b/src/datavisualization/data/barrenderitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -42,13 +16,14 @@
#include "abstractrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class BarRenderItem : public AbstractRenderItem
{
public:
BarRenderItem();
BarRenderItem(const BarRenderItem &other);
+ BarRenderItem &operator=(const BarRenderItem &) = default;
virtual ~BarRenderItem();
// Position relative to data window (for bar label generation)
@@ -76,6 +51,7 @@ class BarRenderSliceItem : public BarRenderItem
public:
BarRenderSliceItem();
BarRenderSliceItem(const BarRenderSliceItem &other);
+ BarRenderSliceItem &operator=(const BarRenderSliceItem &other) = default;
virtual ~BarRenderSliceItem();
void setItem(const BarRenderItem &renderItem);
@@ -96,6 +72,6 @@ protected:
typedef QList<BarRenderItem> BarRenderItemRow;
typedef QList<BarRenderItemRow> BarRenderItemArray;
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/customrenderitem.cpp b/src/datavisualization/data/customrenderitem.cpp
index ac998fba..9873bcf5 100644
--- a/src/datavisualization/data/customrenderitem.cpp
+++ b/src/datavisualization/data/customrenderitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "customrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
CustomRenderItem::CustomRenderItem()
: AbstractRenderItem(),
@@ -68,9 +42,10 @@ CustomRenderItem::~CustomRenderItem()
ObjectHelper::releaseObjectHelper(m_renderer, m_object);
}
-void CustomRenderItem::setMesh(const QString &meshFile)
+bool CustomRenderItem::setMesh(const QString &meshFile)
{
ObjectHelper::resetObjectHelper(m_renderer, m_object, meshFile);
+ return m_object ? true : false;
}
void CustomRenderItem::setColorTable(const QList<QRgb> &colors)
@@ -116,4 +91,4 @@ void CustomRenderItem::setSliceFrameColor(const QColor &color)
float(1.0f)); // Alpha not supported for frames
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/customrenderitem_p.h b/src/datavisualization/data/customrenderitem_p.h
index 3ee423cb..abc62247 100644
--- a/src/datavisualization/data/customrenderitem_p.h
+++ b/src/datavisualization/data/customrenderitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -46,7 +20,7 @@
#include <QtGui/QImage>
#include <QtGui/QColor>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QCustom3DItem;
class Abstract3DRenderer;
@@ -59,7 +33,7 @@ public:
inline void setTexture(GLuint texture) { m_texture = texture; }
inline GLuint texture() const { return m_texture; }
- void setMesh(const QString &meshFile);
+ bool setMesh(const QString &meshFile);
inline ObjectHelper *mesh() const { return m_object; }
inline void setScaling(const QVector3D &scaling) { m_scaling = scaling; }
inline const QVector3D &scaling() const { return m_scaling; }
@@ -198,6 +172,6 @@ private:
};
typedef QHash<QCustom3DItem *, CustomRenderItem *> CustomRenderItemArray;
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/data.pri b/src/datavisualization/data/data.pri
deleted file mode 100644
index e2bbd6eb..00000000
--- a/src/datavisualization/data/data.pri
+++ /dev/null
@@ -1,77 +0,0 @@
-HEADERS += \
- $$PWD/labelitem_p.h \
- $$PWD/qabstractdataproxy.h \
- $$PWD/qabstractdataproxy_p.h \
- $$PWD/qbardataproxy.h \
- $$PWD/qbardataproxy_p.h \
- $$PWD/abstractrenderitem_p.h \
- $$PWD/barrenderitem_p.h \
- $$PWD/qbardataitem.h \
- $$PWD/qbardataitem_p.h \
- $$PWD/qitemmodelbardataproxy_p.h \
- $$PWD/qitemmodelbardataproxy.h \
- $$PWD/scatterrenderitem_p.h \
- $$PWD/qscatterdataitem.h \
- $$PWD/qscatterdataitem_p.h \
- $$PWD/qscatterdataproxy.h \
- $$PWD/qscatterdataproxy_p.h \
- $$PWD/qitemmodelscatterdataproxy.h \
- $$PWD/qitemmodelscatterdataproxy_p.h \
- $$PWD/abstractitemmodelhandler_p.h \
- $$PWD/baritemmodelhandler_p.h \
- $$PWD/scatteritemmodelhandler_p.h \
- $$PWD/qsurfacedataproxy.h \
- $$PWD/qsurfacedataproxy_p.h \
- $$PWD/qheightmapsurfacedataproxy.h \
- $$PWD/qheightmapsurfacedataproxy_p.h \
- $$PWD/qitemmodelsurfacedataproxy.h \
- $$PWD/qitemmodelsurfacedataproxy_p.h \
- $$PWD/surfaceitemmodelhandler_p.h \
- $$PWD/qsurfacedataitem.h \
- $$PWD/qsurfacedataitem_p.h \
- $$PWD/qabstract3dseries.h \
- $$PWD/qabstract3dseries_p.h \
- $$PWD/qbar3dseries.h \
- $$PWD/qbar3dseries_p.h \
- $$PWD/qscatter3dseries.h \
- $$PWD/qscatter3dseries_p.h \
- $$PWD/qsurface3dseries.h \
- $$PWD/qsurface3dseries_p.h \
- $$PWD/customrenderitem_p.h \
- $$PWD/qcustom3ditem.h \
- $$PWD/qcustom3ditem_p.h \
- $$PWD/qcustom3dlabel.h \
- $$PWD/qcustom3dlabel_p.h \
- $$PWD/qcustom3dvolume.h \
- $$PWD/qcustom3dvolume_p.h
-
-SOURCES += \
- $$PWD/labelitem.cpp \
- $$PWD/qabstractdataproxy.cpp \
- $$PWD/qbardataproxy.cpp \
- $$PWD/abstractrenderitem.cpp \
- $$PWD/barrenderitem.cpp \
- $$PWD/qbardataitem.cpp \
- $$PWD/qitemmodelbardataproxy.cpp \
- $$PWD/scatterrenderitem.cpp \
- $$PWD/qscatterdataitem.cpp \
- $$PWD/qscatterdataproxy.cpp \
- $$PWD/qitemmodelscatterdataproxy.cpp \
- $$PWD/abstractitemmodelhandler.cpp \
- $$PWD/baritemmodelhandler.cpp \
- $$PWD/scatteritemmodelhandler.cpp \
- $$PWD/qsurfacedataproxy.cpp \
- $$PWD/qheightmapsurfacedataproxy.cpp \
- $$PWD/qitemmodelsurfacedataproxy.cpp \
- $$PWD/surfaceitemmodelhandler.cpp \
- $$PWD/qsurfacedataitem.cpp \
- $$PWD/qabstract3dseries.cpp \
- $$PWD/qbar3dseries.cpp \
- $$PWD/qscatter3dseries.cpp \
- $$PWD/qsurface3dseries.cpp \
- $$PWD/customrenderitem.cpp \
- $$PWD/qcustom3ditem.cpp \
- $$PWD/qcustom3dlabel.cpp \
- $$PWD/qcustom3dvolume.cpp
-
-INCLUDEPATH += $$PWD
diff --git a/src/datavisualization/data/labelitem.cpp b/src/datavisualization/data/labelitem.cpp
index 9fa2e6b5..f8e1600b 100644
--- a/src/datavisualization/data/labelitem.cpp
+++ b/src/datavisualization/data/labelitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "labelitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
LabelItem::LabelItem()
: m_size(QSize(0, 0)),
@@ -71,4 +45,4 @@ void LabelItem::clear()
m_size = QSize(0, 0);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/labelitem_p.h b/src/datavisualization/data/labelitem_p.h
index 788dffde..760cdbfa 100644
--- a/src/datavisualization/data/labelitem_p.h
+++ b/src/datavisualization/data/labelitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,10 +14,10 @@
#ifndef LABELITEM_P_H
#define LABELITEM_P_H
-#include "datavisualizationglobal_p.h"
+#include <private/datavisualizationglobal_p.h>
#include <QtCore/QSize>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class LabelItem
{
@@ -64,6 +38,6 @@ private:
GLuint m_textureId;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qabstract3dseries.cpp b/src/datavisualization/data/qabstract3dseries.cpp
index 42579f62..0a8613c0 100644
--- a/src/datavisualization/data/qabstract3dseries.cpp
+++ b/src/datavisualization/data/qabstract3dseries.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qabstract3dseries_p.h"
#include "qabstractdataproxy_p.h"
#include "abstract3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QAbstract3DSeries
@@ -903,4 +877,4 @@ void QAbstract3DSeriesPrivate::setItemLabelVisible(bool visible)
m_changeTracker.itemLabelVisibilityChanged = true;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qabstract3dseries.h b/src/datavisualization/data/qabstract3dseries.h
index 80cb52c3..781eabc5 100644
--- a/src/datavisualization/data/qabstract3dseries.h
+++ b/src/datavisualization/data/qabstract3dseries.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QABSTRACT3DSERIES_H
#define QABSTRACT3DSERIES_H
@@ -37,11 +11,11 @@
#include <QtGui/QLinearGradient>
#include <QtGui/QQuaternion>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DSeriesPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstract3DSeries : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstract3DSeries : public QObject
{
Q_OBJECT
Q_ENUMS(SeriesType)
@@ -53,7 +27,7 @@ class QT_DATAVISUALIZATION_EXPORT QAbstract3DSeries : public QObject
Q_PROPERTY(bool meshSmooth READ isMeshSmooth WRITE setMeshSmooth NOTIFY meshSmoothChanged)
Q_PROPERTY(QQuaternion meshRotation READ meshRotation WRITE setMeshRotation NOTIFY meshRotationChanged)
Q_PROPERTY(QString userDefinedMesh READ userDefinedMesh WRITE setUserDefinedMesh NOTIFY userDefinedMeshChanged)
- Q_PROPERTY(QtDataVisualization::Q3DTheme::ColorStyle colorStyle READ colorStyle WRITE setColorStyle NOTIFY colorStyleChanged)
+ Q_PROPERTY(Q3DTheme::ColorStyle colorStyle READ colorStyle WRITE setColorStyle NOTIFY colorStyleChanged)
Q_PROPERTY(QColor baseColor READ baseColor WRITE setBaseColor NOTIFY baseColorChanged)
Q_PROPERTY(QLinearGradient baseGradient READ baseGradient WRITE setBaseGradient NOTIFY baseGradientChanged)
Q_PROPERTY(QColor singleHighlightColor READ singleHighlightColor WRITE setSingleHighlightColor NOTIFY singleHighlightColorChanged)
@@ -61,8 +35,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)
+ Q_PROPERTY(QString itemLabel READ itemLabel NOTIFY itemLabelChanged REVISION(1, 1))
+ Q_PROPERTY(bool itemLabelVisible READ isItemLabelVisible WRITE setItemLabelVisible NOTIFY itemLabelVisibilityChanged REVISION(1, 1))
public:
enum SeriesType {
@@ -151,8 +125,8 @@ Q_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);
+ Q_REVISION(1, 1) void itemLabelChanged(const QString &label);
+ Q_REVISION(1, 1) void itemLabelVisibilityChanged(bool visible);
protected:
QScopedPointer<QAbstract3DSeriesPrivate> d_ptr;
@@ -171,6 +145,6 @@ private:
friend class Abstract3DRenderer;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qabstract3dseries_p.h b/src/datavisualization/data/qabstract3dseries_p.h
index 0762386f..f5c2a95f 100644
--- a/src/datavisualization/data/qabstract3dseries_p.h
+++ b/src/datavisualization/data/qabstract3dseries_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qabstract3dseries.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstractDataProxy;
class Abstract3DController;
@@ -168,6 +142,6 @@ public:
bool m_itemLabelVisible;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qabstractdataproxy.cpp b/src/datavisualization/data/qabstractdataproxy.cpp
index a9703e02..3d80f101 100644
--- a/src/datavisualization/data/qabstractdataproxy.cpp
+++ b/src/datavisualization/data/qabstractdataproxy.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qabstractdataproxy_p.h"
#include "qabstract3dseries_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QAbstractDataProxy
@@ -126,4 +100,4 @@ void QAbstractDataProxyPrivate::setSeries(QAbstract3DSeries *series)
m_series = series;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qabstractdataproxy.h b/src/datavisualization/data/qabstractdataproxy.h
index d0260684..4cf68ea1 100644
--- a/src/datavisualization/data/qabstractdataproxy.h
+++ b/src/datavisualization/data/qabstractdataproxy.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QABSTRACTDATAPROXY_H
#define QABSTRACTDATAPROXY_H
@@ -34,11 +8,11 @@
#include <QtCore/QObject>
#include <QtCore/QScopedPointer>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstractDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstractDataProxy : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstractDataProxy : public QObject
{
Q_OBJECT
Q_ENUMS(DataType)
@@ -69,6 +43,6 @@ private:
friend class QAbstract3DSeriesPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qabstractdataproxy_p.h b/src/datavisualization/data/qabstractdataproxy_p.h
index abe1f4ce..ceb3c30c 100644
--- a/src/datavisualization/data/qabstractdataproxy_p.h
+++ b/src/datavisualization/data/qabstractdataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qabstractdataproxy.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DSeries;
@@ -66,6 +40,6 @@ private:
friend class QAbstractDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qbar3dseries.cpp b/src/datavisualization/data/qbar3dseries.cpp
index 54b973e8..770bf831 100644
--- a/src/datavisualization/data/qbar3dseries.cpp
+++ b/src/datavisualization/data/qbar3dseries.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qbar3dseries_p.h"
#include "bars3dcontroller_p.h"
#include <QtCore/qmath.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QBar3DSeries
@@ -147,6 +121,18 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
+ * \qmlproperty list<ThemeColor> Bar3DSeries::rowColors
+ * \since 6.3
+ * This property can be used to draw the rows of the series in different colors.
+ * The \l{Theme3D::colorStyle}{Theme3D.colorStyle} must be set to
+ * \c ColorStyleUniform to use this property.
+ * \note If the property is set and the theme is changed,
+ * the rowColors list is not cleared automatically.
+ *
+ * \sa Q3DTheme::ColorStyleUniform
+ */
+
+/*!
* Constructsa bar 3D series with the parent \a parent.
*/
QBar3DSeries::QBar3DSeries(QObject *parent) :
@@ -282,6 +268,27 @@ float QBar3DSeries::meshAngle() const
}
/*!
+ * \property QBar3DSeries::rowColors
+ * \since 6.3
+ *
+ * \brief The list of row colors in the series.
+ *
+ * This property can be used to color
+ * the rows of the series in different colors.
+ * The Q3DTheme::ColorStyle must be set to
+ * Q3DTheme::ColorStyleUniform to use this property.
+ *
+ * \sa Q3DTheme::ColorStyleUniform
+ */
+void QBar3DSeries::setRowColors(const QList<QColor> &colors)
+{
+ dptr()->setRowColors(colors);
+}
+QList<QColor> QBar3DSeries::rowColors() const
+{
+ return dptrc()->m_rowColors;
+}
+/*!
* \internal
*/
QBar3DSeriesPrivate *QBar3DSeries::dptr()
@@ -355,6 +362,8 @@ void QBar3DSeriesPrivate::connectControllerAndProxy(Abstract3DController *newCon
&Bars3DController::handleDataColumnLabelsChanged);
QObject::connect(qptr(), &QBar3DSeries::dataProxyChanged, controller,
&Bars3DController::handleArrayReset);
+ QObject::connect(qptr(), &QBar3DSeries::rowColorsChanged, controller,
+ &Bars3DController::handleRowColorsChanged);
}
}
@@ -432,4 +441,12 @@ void QBar3DSeriesPrivate::connectSignals()
&QBar3DSeriesPrivate::handleMeshRotationChanged);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+void QBar3DSeriesPrivate::setRowColors(const QList<QColor> &colors)
+{
+ if (m_rowColors != colors) {
+ m_rowColors = colors;
+ emit qptr()->rowColorsChanged(m_rowColors);
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qbar3dseries.h b/src/datavisualization/data/qbar3dseries.h
index 07a98ad5..0ca508e7 100644
--- a/src/datavisualization/data/qbar3dseries.h
+++ b/src/datavisualization/data/qbar3dseries.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QBAR3DSERIES_H
#define QBAR3DSERIES_H
@@ -34,16 +8,17 @@
#include <QtDataVisualization/qbardataproxy.h>
#include <QtCore/QPoint>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QBar3DSeriesPrivate;
-class QT_DATAVISUALIZATION_EXPORT QBar3DSeries : public QAbstract3DSeries
+class Q_DATAVISUALIZATION_EXPORT QBar3DSeries : public QAbstract3DSeries
{
Q_OBJECT
Q_PROPERTY(QBarDataProxy *dataProxy READ dataProxy WRITE setDataProxy NOTIFY dataProxyChanged)
Q_PROPERTY(QPoint selectedBar READ selectedBar WRITE setSelectedBar NOTIFY selectedBarChanged)
Q_PROPERTY(float meshAngle READ meshAngle WRITE setMeshAngle NOTIFY meshAngleChanged)
+ Q_PROPERTY(QList<QColor> rowColors READ rowColors WRITE setRowColors NOTIFY rowColorsChanged REVISION(6, 3))
public:
explicit QBar3DSeries(QObject *parent = nullptr);
@@ -60,10 +35,14 @@ public:
void setMeshAngle(float angle);
float meshAngle() const;
+ QList<QColor> rowColors() const;
+ void setRowColors(const QList<QColor> &colors);
+
Q_SIGNALS:
void dataProxyChanged(QBarDataProxy *proxy);
void selectedBarChanged(const QPoint &position);
void meshAngleChanged(float angle);
+ Q_REVISION(6, 3) void rowColorsChanged(const QList<QColor> &rowcolors);
protected:
QBar3DSeriesPrivate *dptr();
@@ -75,6 +54,6 @@ private:
friend class Bars3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qbar3dseries_p.h b/src/datavisualization/data/qbar3dseries_p.h
index ba11a739..acf31c25 100644
--- a/src/datavisualization/data/qbar3dseries_p.h
+++ b/src/datavisualization/data/qbar3dseries_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qbar3dseries.h"
#include "qabstract3dseries_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QBar3DSeriesPrivate : public QAbstract3DSeriesPrivate
{
@@ -52,9 +26,9 @@ public:
QBar3DSeriesPrivate(QBar3DSeries *q);
virtual ~QBar3DSeriesPrivate();
- virtual void setDataProxy(QAbstractDataProxy *proxy);
- virtual void connectControllerAndProxy(Abstract3DController *newController);
- virtual void createItemLabel();
+ void setDataProxy(QAbstractDataProxy *proxy) override;
+ void connectControllerAndProxy(Abstract3DController *newController) override;
+ void createItemLabel() override;
void handleMeshRotationChanged(const QQuaternion &rotation);
@@ -62,15 +36,19 @@ public:
void connectSignals();
+ void setRowColors(const QList<QColor> &colors);
+
private:
QBar3DSeries *qptr();
QPoint m_selectedBar;
+ QList<QColor> m_rowColors;
+
private:
friend class QBar3DSeries;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qbardataitem.cpp b/src/datavisualization/data/qbardataitem.cpp
index 5827cf42..7406a6b8 100644
--- a/src/datavisualization/data/qbardataitem.cpp
+++ b/src/datavisualization/data/qbardataitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qbardataitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QBarDataItem
@@ -140,4 +114,4 @@ QBarDataItemPrivate::~QBarDataItemPrivate()
{
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qbardataitem.h b/src/datavisualization/data/qbardataitem.h
index a8eef517..0e1a271e 100644
--- a/src/datavisualization/data/qbardataitem.h
+++ b/src/datavisualization/data/qbardataitem.h
@@ -1,42 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QBARDATAITEM_H
#define QBARDATAITEM_H
#include <QtDataVisualization/qdatavisualizationglobal.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QBarDataItemPrivate;
-class QT_DATAVISUALIZATION_EXPORT QBarDataItem
+class Q_DATAVISUALIZATION_EXPORT QBarDataItem
{
public:
QBarDataItem();
@@ -62,6 +36,6 @@ private:
float m_angle;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qbardataitem_p.h b/src/datavisualization/data/qbardataitem_p.h
index 11dad9bf..45d1a3eb 100644
--- a/src/datavisualization/data/qbardataitem_p.h
+++ b/src/datavisualization/data/qbardataitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qbardataitem.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QBarDataItemPrivate
{
@@ -52,6 +26,6 @@ public:
virtual ~QBarDataItemPrivate();
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qbardataproxy.cpp b/src/datavisualization/data/qbardataproxy.cpp
index c5d33535..49cda8cd 100644
--- a/src/datavisualization/data/qbardataproxy.cpp
+++ b/src/datavisualization/data/qbardataproxy.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qbardataproxy_p.h"
#include "qbar3dseries_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QBarDataProxy
@@ -787,4 +761,4 @@ void QBarDataProxyPrivate::setSeries(QAbstract3DSeries *series)
emit qptr()->seriesChanged(barSeries);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qbardataproxy.h b/src/datavisualization/data/qbardataproxy.h
index 155e5794..34a540b0 100644
--- a/src/datavisualization/data/qbardataproxy.h
+++ b/src/datavisualization/data/qbardataproxy.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QBARDATAPROXY_H
#define QBARDATAPROXY_H
@@ -37,7 +11,7 @@
Q_MOC_INCLUDE(<QtDataVisualization/qbar3dseries.h>)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QBarDataProxyPrivate;
class QBar3DSeries;
@@ -45,7 +19,7 @@ class QBar3DSeries;
typedef QList<QBarDataItem> QBarDataRow;
typedef QList<QBarDataRow *> QBarDataArray;
-class QT_DATAVISUALIZATION_EXPORT QBarDataProxy : public QAbstractDataProxy
+class Q_DATAVISUALIZATION_EXPORT QBarDataProxy : public QAbstractDataProxy
{
Q_OBJECT
@@ -119,6 +93,6 @@ private:
friend class Bars3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qbardataproxy_p.h b/src/datavisualization/data/qbardataproxy_p.h
index 04d9dc1d..08898c42 100644
--- a/src/datavisualization/data/qbardataproxy_p.h
+++ b/src/datavisualization/data/qbardataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qbardataproxy.h"
#include "qabstractdataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QBarDataProxyPrivate : public QAbstractDataProxyPrivate
{
@@ -66,7 +40,7 @@ public:
QPair<GLfloat, GLfloat> limitValues(int startRow, int startColumn, int rowCount,
int columnCount) const;
- virtual void setSeries(QAbstract3DSeries *series);
+ void setSeries(QAbstract3DSeries *series) override;
private:
QBarDataProxy *qptr();
@@ -82,6 +56,6 @@ private:
friend class QBarDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qcustom3ditem.cpp b/src/datavisualization/data/qcustom3ditem.cpp
index 11df7750..a657823c 100644
--- a/src/datavisualization/data/qcustom3ditem.cpp
+++ b/src/datavisualization/data/qcustom3ditem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qcustom3ditem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QCustom3DItem
@@ -58,7 +32,9 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*! \qmlproperty string Custom3DItem::meshFile
*
* The item mesh file name. The item in the file must be in Wavefront OBJ format and include
- * vertices, normals, and UVs. It also needs to be in triangles.
+ * vertices, normals, and UVs. It also needs to be in triangles. If the file is missing either
+ * normals or UVs, loading will fail with an error message to the console output and the item will
+ * not be rendered.
*/
/*! \qmlproperty string Custom3DItem::textureFile
@@ -203,6 +179,9 @@ QCustom3DItem::~QCustom3DItem()
*
* The item in the file must be in Wavefront OBJ format and include
* vertices, normals, and UVs. It also needs to be in triangles.
+ * If the file is missing either normals or UVs, loading will fail
+ * with an error message to the console output and the item will
+ * not be rendered.
*/
void QCustom3DItem::setMeshFile(const QString &meshFile)
{
@@ -537,4 +516,4 @@ void QCustom3DItemPrivate::resetDirtyBits()
m_dirtyBits.shadowCastingDirty = false;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qcustom3ditem.h b/src/datavisualization/data/qcustom3ditem.h
index 0fbc1926..52eb3899 100644
--- a/src/datavisualization/data/qcustom3ditem.h
+++ b/src/datavisualization/data/qcustom3ditem.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QCUSTOM3DITEM_H
#define QCUSTOM3DITEM_H
@@ -34,12 +8,13 @@
#include <QtGui/QImage>
#include <QtGui/QVector3D>
#include <QtGui/QQuaternion>
+#include <QtCore/QObject>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QCustom3DItemPrivate;
-class QT_DATAVISUALIZATION_EXPORT QCustom3DItem : public QObject
+class Q_DATAVISUALIZATION_EXPORT QCustom3DItem : public QObject
{
Q_OBJECT
Q_PROPERTY(QString meshFile READ meshFile WRITE setMeshFile NOTIFY meshFileChanged)
@@ -50,7 +25,7 @@ class QT_DATAVISUALIZATION_EXPORT QCustom3DItem : public QObject
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)
- Q_PROPERTY(bool scalingAbsolute READ isScalingAbsolute WRITE setScalingAbsolute NOTIFY scalingAbsoluteChanged REVISION 1)
+ Q_PROPERTY(bool scalingAbsolute READ isScalingAbsolute WRITE setScalingAbsolute NOTIFY scalingAbsoluteChanged REVISION(1, 2))
public:
explicit QCustom3DItem(QObject *parent = nullptr);
@@ -99,7 +74,7 @@ Q_SIGNALS:
void rotationChanged(const QQuaternion &rotation);
void visibleChanged(bool visible);
void shadowCastingChanged(bool shadowCasting);
- Q_REVISION(1) void scalingAbsoluteChanged(bool scalingAbsolute);
+ Q_REVISION(1, 2) void scalingAbsoluteChanged(bool scalingAbsolute);
protected:
QCustom3DItem(QCustom3DItemPrivate *d, QObject *parent = nullptr);
@@ -113,6 +88,6 @@ private:
friend class Abstract3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qcustom3ditem_p.h b/src/datavisualization/data/qcustom3ditem_p.h
index d99db35a..75d0f5d3 100644
--- a/src/datavisualization/data/qcustom3ditem_p.h
+++ b/src/datavisualization/data/qcustom3ditem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qcustom3ditem.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
struct QCustomItemDirtyBitField {
bool textureDirty : 1;
@@ -106,6 +80,6 @@ private:
friend class QCustom3DItem;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qcustom3dlabel.cpp b/src/datavisualization/data/qcustom3dlabel.cpp
index 5cc0a0e4..4a440ab9 100644
--- a/src/datavisualization/data/qcustom3dlabel.cpp
+++ b/src/datavisualization/data/qcustom3dlabel.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qcustom3dlabel_p.h"
#include "utils_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QCustom3DLabel
@@ -382,4 +356,4 @@ void QCustom3DLabelPrivate::handleTextureChange()
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qcustom3dlabel.h b/src/datavisualization/data/qcustom3dlabel.h
index fdfcb9f9..3ee72e04 100644
--- a/src/datavisualization/data/qcustom3dlabel.h
+++ b/src/datavisualization/data/qcustom3dlabel.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QCUSTOMLABELITEM_H
#define QCUSTOMLABELITEM_H
@@ -37,11 +11,11 @@
#include <QtGui/QFont>
#include <QtGui/QColor>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QCustom3DLabelPrivate;
-class QT_DATAVISUALIZATION_EXPORT QCustom3DLabel : public QCustom3DItem
+class Q_DATAVISUALIZATION_EXPORT QCustom3DLabel : public QCustom3DItem
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
@@ -99,6 +73,6 @@ private:
friend class Abstract3DRenderer;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qcustom3dlabel_p.h b/src/datavisualization/data/qcustom3dlabel_p.h
index c0608ec4..7637974c 100644
--- a/src/datavisualization/data/qcustom3dlabel_p.h
+++ b/src/datavisualization/data/qcustom3dlabel_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qcustom3dlabel.h"
#include "qcustom3ditem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QCustom3DLabelPrivate : public QCustom3DItemPrivate
{
@@ -79,6 +53,6 @@ private:
friend class QCustom3DLabel;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qcustom3dvolume.cpp b/src/datavisualization/data/qcustom3dvolume.cpp
index 8f524c2b..3357bf43 100644
--- a/src/datavisualization/data/qcustom3dvolume.cpp
+++ b/src/datavisualization/data/qcustom3dvolume.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qcustom3dvolume_p.h"
#include "utils_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QCustom3DVolume
@@ -1338,4 +1312,4 @@ QCustom3DVolume *QCustom3DVolumePrivate::qptr()
return static_cast<QCustom3DVolume *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qcustom3dvolume.h b/src/datavisualization/data/qcustom3dvolume.h
index 6967c608..764cebac 100644
--- a/src/datavisualization/data/qcustom3dvolume.h
+++ b/src/datavisualization/data/qcustom3dvolume.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QCUSTOM3DVOLUME_H
#define QCUSTOM3DVOLUME_H
@@ -35,11 +9,11 @@
#include <QtGui/QColor>
#include <QtGui/QImage>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QCustom3DVolumePrivate;
-class QT_DATAVISUALIZATION_EXPORT QCustom3DVolume : public QCustom3DItem
+class Q_DATAVISUALIZATION_EXPORT QCustom3DVolume : public QCustom3DItem
{
Q_OBJECT
Q_PROPERTY(int textureWidth READ textureWidth WRITE setTextureWidth NOTIFY textureWidthChanged)
@@ -154,6 +128,6 @@ private:
friend class Abstract3DRenderer;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qcustom3dvolume_p.h b/src/datavisualization/data/qcustom3dvolume_p.h
index e12b706d..0cd785fb 100644
--- a/src/datavisualization/data/qcustom3dvolume_p.h
+++ b/src/datavisualization/data/qcustom3dvolume_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qcustom3dvolume.h"
#include "qcustom3ditem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
struct QCustomVolumeDirtyBitField {
bool textureDimensionsDirty : 1;
@@ -114,6 +88,6 @@ private:
friend class QCustom3DVolume;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
index 1d762f88..4dee6d23 100644
--- a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qheightmapsurfacedataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
// Default ranges correspond value axis defaults
const float defaultMinValue = 0.0f;
@@ -127,6 +101,32 @@ const float defaultMaxValue = 10.0f;
*/
/*!
+ * \qmlproperty real HeightMapSurfaceDataProxy::minYValue
+ * \since 6.3
+ *
+ * The minimum Y value for the generated surface points. Defaults to \c{0.0}.
+ * When setting this property the corresponding maximum value is adjusted if necessary,
+ * to ensure that the range remains valid.
+ */
+
+/*!
+ * \qmlproperty real HeightMapSurfaceDataProxy::maxYValue
+ * \since 6.3
+ *
+ * The maximum Y value for the generated surface points. Defaults to \c{10.0}.
+ * When setting this property the corresponding minimum value is adjusted if necessary,
+ * to ensure that the range remains valid.
+ */
+
+/*!
+ * \qmlproperty real HeightMapSurfaceDataProxy::autoScaleY
+ * \since 6.3
+ *
+ * Scale height values to Y-axis. Defaults to \c{false}. When this property is set to \c{true},
+ * the height values are scaled to fit on the Y-axis between \c{minYValue} and \c{maxYValue}.
+ */
+
+/*!
* Constructs QHeightMapSurfaceDataProxy with the given \a parent.
*/
QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(QObject *parent) :
@@ -328,6 +328,75 @@ float QHeightMapSurfaceDataProxy::maxZValue() const
}
/*!
+ * \property QHeightMapSurfaceDataProxy::minYValue
+ * \since 6.3
+ *
+ * \brief The minimum Y value for the generated surface points.
+ *
+ * Defaults to \c{0.0}.
+ *
+ * When setting this property the corresponding maximum value is adjusted if necessary,
+ * to ensure that the range remains valid.
+ *
+ * \sa autoScaleY
+ */
+void QHeightMapSurfaceDataProxy::setMinYValue(float min)
+{
+ dptr()->setMinYValue(min);
+}
+
+float QHeightMapSurfaceDataProxy::minYValue() const
+{
+ return dptrc()->m_minYValue;
+}
+
+/*!
+ * \property QHeightMapSurfaceDataProxy::maxYValue
+ * \since 6.3
+ *
+ * \brief The maximum Y value for the generated surface points.
+ *
+ * Defaults to \c{10.0}.
+ *
+ * When setting this property the corresponding minimum value is adjusted if necessary,
+ * to ensure that the range remains valid.
+ *
+ * \sa autoScaleY
+ */
+void QHeightMapSurfaceDataProxy::setMaxYValue(float max)
+{
+ dptr()->setMaxYValue(max);
+}
+
+float QHeightMapSurfaceDataProxy::maxYValue() const
+{
+ return dptrc()->m_maxYValue;
+}
+
+/*!
+ * \property QHeightMapSurfaceDataProxy::autoScaleY
+ * \since 6.3
+ *
+ * \brief Scale height values to Y-axis.
+ *
+ * Defaults to \c{false}.
+ *
+ * When this property is set to \c{true},
+ * the height values are scaled to fit on the Y-axis between minYValue and maxYValue.
+ *
+ * \sa minYValue, maxYValue
+ */
+void QHeightMapSurfaceDataProxy::setAutoScaleY(bool enabled)
+{
+ dptr()->setAutoScaleY(enabled);
+}
+
+bool QHeightMapSurfaceDataProxy::autoScaleY() const
+{
+ return dptrc()->m_autoScaleY;
+}
+
+/*!
* \internal
*/
QHeightMapSurfaceDataProxyPrivate *QHeightMapSurfaceDataProxy::dptr()
@@ -350,7 +419,10 @@ QHeightMapSurfaceDataProxyPrivate::QHeightMapSurfaceDataProxyPrivate(QHeightMapS
m_minXValue(defaultMinValue),
m_maxXValue(defaultMaxValue),
m_minZValue(defaultMinValue),
- m_maxZValue(defaultMaxValue)
+ m_maxZValue(defaultMaxValue),
+ m_minYValue(defaultMinValue),
+ m_maxYValue(defaultMaxValue),
+ m_autoScaleY(false)
{
m_resolveTimer.setSingleShot(true);
QObject::connect(&m_resolveTimer, &QTimer::timeout,
@@ -505,20 +577,89 @@ void QHeightMapSurfaceDataProxyPrivate::setMaxZValue(float max)
}
}
+void QHeightMapSurfaceDataProxyPrivate::setMinYValue(float min)
+{
+ if (m_minYValue != min) {
+ bool maxChanged = false;
+ if (min >= m_maxYValue) {
+ float oldMax = m_maxYValue;
+ m_maxYValue = min + 1.0f;
+ qWarning() << "Warning: Tried to set minimum Y to equal or larger than maximum Y for"
+ " value range. Maximum automatically adjusted to a valid one:"
+ << oldMax << "-->" << m_maxYValue;
+ maxChanged = true;
+ }
+ m_minYValue = min;
+ emit qptr()->minYValueChanged(m_minYValue);
+ if (maxChanged)
+ emit qptr()->maxYValueChanged(m_maxYValue);
+
+ if (!m_resolveTimer.isActive())
+ m_resolveTimer.start(0);
+ }
+}
+
+void QHeightMapSurfaceDataProxyPrivate::setMaxYValue(float max)
+{
+ if (m_maxYValue != max) {
+ bool minChanged = false;
+ if (max <= m_minYValue) {
+ float oldMin = m_minYValue;
+ m_minYValue = max - 1.0f;
+ qWarning() << "Warning: Tried to set maximum Y to equal or smaller than minimum Y for"
+ " value range. Minimum automatically adjusted to a valid one:"
+ << oldMin << "-->" << m_minYValue;
+ minChanged = true;
+ }
+ m_maxYValue = max;
+ emit qptr()->maxYValueChanged(m_maxYValue);
+ if (minChanged)
+ emit qptr()->minYValueChanged(m_minYValue);
+
+ if (!m_resolveTimer.isActive())
+ m_resolveTimer.start(0);
+ }
+}
+
+void QHeightMapSurfaceDataProxyPrivate::setAutoScaleY(bool enabled)
+{
+ if (enabled != m_autoScaleY) {
+ m_autoScaleY = enabled;
+ emit qptr()->autoScaleYChanged(m_autoScaleY);
+
+ if (!m_resolveTimer.isActive())
+ m_resolveTimer.start(0);
+ }
+}
+
void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve()
{
QImage heightImage = m_heightMap;
+ int bytesInChannel = 1;
+ float yMul = 1.0f / UINT8_MAX;
+
+ bool is16bit = (heightImage.format() == QImage::Format_RGBX64
+ || heightImage.format() == QImage::Format_RGBA64
+ || heightImage.format() == QImage::Format_RGBA64_Premultiplied
+ || heightImage.format() == QImage::Format_Grayscale16);
// Convert to RGB32 to be sure we're reading the right bytes
- if (heightImage.format() != QImage::Format_RGB32)
+ if (is16bit) {
+ if (heightImage.format() != QImage::Format_RGBX64)
+ heightImage = heightImage.convertToFormat(QImage::Format_RGBX64);
+
+ bytesInChannel = 2;
+ yMul = 1.0f / UINT16_MAX;
+ } else if (heightImage.format() != QImage::Format_RGB32) {
heightImage = heightImage.convertToFormat(QImage::Format_RGB32);
+ }
uchar *bits = heightImage.bits();
int imageHeight = heightImage.height();
int imageWidth = heightImage.width();
- int bitCount = imageWidth * 4 * (imageHeight - 1);
- int widthBits = imageWidth * 4;
+ int bitCount = imageWidth * 4 * (imageHeight - 1) * bytesInChannel;
+ int widthBits = imageWidth * 4 * bytesInChannel;
float height = 0;
// Do not recreate array if dimensions have not changed
@@ -531,7 +672,7 @@ void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve()
dataArray->append(newProxyRow);
}
}
-
+ yMul *= m_maxYValue - m_minYValue;
float xMul = (m_maxXValue - m_minXValue) / float(imageWidth - 1);
float zMul = (m_maxZValue - m_minZValue) / float(imageHeight - 1);
@@ -541,7 +682,6 @@ void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve()
// getting rendered.
int lastRow = imageHeight - 1;
int lastCol = imageWidth - 1;
-
if (heightImage.isGrayscale()) {
// Grayscale, it's enough to read Red byte
for (int i = 0; i < imageHeight; i++, bitCount -= widthBits) {
@@ -552,13 +692,21 @@ void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve()
else
zVal = (float(i) * zMul) + m_minZValue;
int j = 0;
- for (; j < lastCol; j++)
+ float yVal = 0;
+ uchar *pixelptr;
+ for (; j < lastCol; j++) {
+ pixelptr = (uchar *)(bits + bitCount + (j * 4 * bytesInChannel));
+ if (!m_autoScaleY)
+ yVal = *pixelptr;
+ else
+ yVal = float(*pixelptr) * yMul + m_minYValue;
newRow[j].setPosition(QVector3D((float(j) * xMul) + m_minXValue,
- float(bits[bitCount + (j * 4)]),
- zVal));
+ yVal,
+ zVal));
+ }
newRow[j].setPosition(QVector3D(m_maxXValue,
- float(bits[bitCount + (j * 4)]),
- zVal));
+ yVal,
+ zVal));
}
} else {
// Not grayscale, we'll need to calculate height from RGB
@@ -570,22 +718,30 @@ void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve()
else
zVal = (float(i) * zMul) + m_minZValue;
int j = 0;
- int nextpixel = 0;
+ float yVal = 0;
for (; j < lastCol; j++) {
- nextpixel = j * 4;
- height = (float(bits[bitCount + nextpixel])
- + float(bits[1 + bitCount + nextpixel])
- + float(bits[2 + bitCount + nextpixel]));
+ int nextpixel = j * 4 * bytesInChannel;
+ uchar *pixelptr = (uchar *)(bits + bitCount + nextpixel);
+ if (is16bit) {
+ height = float(*((ushort *)pixelptr))
+ + float(*(((ushort *)pixelptr) + 1))
+ + float(*(((ushort *)pixelptr) + 2));
+ } else {
+ height = (float(*pixelptr)
+ + float(*(pixelptr + 1))
+ + float(*(pixelptr + 2)));
+ }
+ if (!m_autoScaleY)
+ yVal = height / 3.0f;
+ else
+ yVal = (height / 3.0f * yMul) + m_minYValue;
+
newRow[j].setPosition(QVector3D((float(j) * xMul) + m_minXValue,
- height / 3.0f,
+ yVal,
zVal));
}
- nextpixel = j * 4;
- height = (float(bits[bitCount + nextpixel])
- + float(bits[1 + bitCount + nextpixel])
- + float(bits[2 + bitCount + nextpixel]));
newRow[j].setPosition(QVector3D(m_maxXValue,
- height / 3.0f,
+ yVal,
zVal));
}
}
@@ -594,4 +750,4 @@ void QHeightMapSurfaceDataProxyPrivate::handlePendingResolve()
emit qptr()->heightMapChanged(m_heightMap);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.h b/src/datavisualization/data/qheightmapsurfacedataproxy.h
index 4d815851..c11304f6 100644
--- a/src/datavisualization/data/qheightmapsurfacedataproxy.h
+++ b/src/datavisualization/data/qheightmapsurfacedataproxy.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QHEIGHTMAPSURFACEDATAPROXY_H
#define QHEIGHTMAPSURFACEDATAPROXY_H
@@ -34,11 +8,11 @@
#include <QtGui/QImage>
#include <QtCore/QString>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QHeightMapSurfaceDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QHeightMapSurfaceDataProxy : public QSurfaceDataProxy
+class Q_DATAVISUALIZATION_EXPORT QHeightMapSurfaceDataProxy : public QSurfaceDataProxy
{
Q_OBJECT
@@ -48,6 +22,9 @@ class QT_DATAVISUALIZATION_EXPORT QHeightMapSurfaceDataProxy : public QSurfaceDa
Q_PROPERTY(float maxXValue READ maxXValue WRITE setMaxXValue NOTIFY maxXValueChanged)
Q_PROPERTY(float minZValue READ minZValue WRITE setMinZValue NOTIFY minZValueChanged)
Q_PROPERTY(float maxZValue READ maxZValue WRITE setMaxZValue NOTIFY maxZValueChanged)
+ Q_PROPERTY(float minYValue READ minYValue WRITE setMinYValue NOTIFY minYValueChanged REVISION(6, 3))
+ Q_PROPERTY(float maxYValue READ maxYValue WRITE setMaxYValue NOTIFY maxYValueChanged REVISION(6, 3))
+ Q_PROPERTY(bool autoScaleY READ autoScaleY WRITE setAutoScaleY NOTIFY autoScaleYChanged REVISION(6, 3))
public:
explicit QHeightMapSurfaceDataProxy(QObject *parent = nullptr);
@@ -69,6 +46,12 @@ public:
float minZValue() const;
void setMaxZValue(float max);
float maxZValue() const;
+ void setMinYValue(float min);
+ float minYValue() const;
+ void setMaxYValue(float max);
+ float maxYValue() const;
+ void setAutoScaleY(bool enabled);
+ bool autoScaleY() const;
Q_SIGNALS:
void heightMapChanged(const QImage &image);
@@ -77,6 +60,9 @@ Q_SIGNALS:
void maxXValueChanged(float value);
void minZValueChanged(float value);
void maxZValueChanged(float value);
+ Q_REVISION(6, 3) void minYValueChanged(float value);
+ Q_REVISION(6, 3) void maxYValueChanged(float value);
+ Q_REVISION(6, 3) void autoScaleYChanged(bool enabled);
protected:
explicit QHeightMapSurfaceDataProxy(QHeightMapSurfaceDataProxyPrivate *d, QObject *parent = nullptr);
@@ -89,6 +75,6 @@ private:
friend class Surface3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy_p.h b/src/datavisualization/data/qheightmapsurfacedataproxy_p.h
index 12219dd3..a6bd613c 100644
--- a/src/datavisualization/data/qheightmapsurfacedataproxy_p.h
+++ b/src/datavisualization/data/qheightmapsurfacedataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "qsurfacedataproxy_p.h"
#include <QtCore/QTimer>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QHeightMapSurfaceDataProxyPrivate : public QSurfaceDataProxyPrivate
{
@@ -59,6 +33,9 @@ public:
void setMaxXValue(float max);
void setMinZValue(float min);
void setMaxZValue(float max);
+ void setMinYValue(float min);
+ void setMaxYValue(float max);
+ void setAutoScaleY(bool enabled);
private:
QHeightMapSurfaceDataProxy *qptr();
void handlePendingResolve();
@@ -71,10 +48,13 @@ private:
float m_maxXValue;
float m_minZValue;
float m_maxZValue;
+ float m_minYValue;
+ float m_maxYValue;
+ bool m_autoScaleY;
friend class QHeightMapSurfaceDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qitemmodelbardataproxy.cpp b/src/datavisualization/data/qitemmodelbardataproxy.cpp
index f87016e1..74e23cc9 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelbardataproxy.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qitemmodelbardataproxy_p.h"
#include "baritemmodelhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QItemModelBarDataProxy
@@ -76,12 +50,12 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* 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
+ * QString::replace(const QRegularExpression &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
- * \l{Qt Quick 2 Bars Example}.
+ * \l{Simple Bar Graph} example.
*
* \sa {Qt Data Visualization Data Handling}
*/
@@ -215,7 +189,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rowRole, rowRolePattern
@@ -225,7 +199,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa columnRole, columnRolePattern
@@ -235,7 +209,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa valueRole, valueRolePattern
@@ -245,7 +219,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rotationRole, rotationRolePattern
@@ -669,7 +643,7 @@ int QItemModelBarDataProxy::columnCategoryIndex(const QString &category)
*
* \sa rowRole, rowRoleReplace
*/
-void QItemModelBarDataProxy::setRowRolePattern(const QRegExp &pattern)
+void QItemModelBarDataProxy::setRowRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_rowRolePattern != pattern) {
dptr()->m_rowRolePattern = pattern;
@@ -677,7 +651,7 @@ void QItemModelBarDataProxy::setRowRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelBarDataProxy::rowRolePattern() const
+QRegularExpression QItemModelBarDataProxy::rowRolePattern() const
{
return dptrc()->m_rowRolePattern;
}
@@ -695,7 +669,7 @@ QRegExp QItemModelBarDataProxy::rowRolePattern() const
*
* \sa columnRole, columnRoleReplace
*/
-void QItemModelBarDataProxy::setColumnRolePattern(const QRegExp &pattern)
+void QItemModelBarDataProxy::setColumnRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_columnRolePattern != pattern) {
dptr()->m_columnRolePattern = pattern;
@@ -703,7 +677,7 @@ void QItemModelBarDataProxy::setColumnRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelBarDataProxy::columnRolePattern() const
+QRegularExpression QItemModelBarDataProxy::columnRolePattern() const
{
return dptrc()->m_columnRolePattern;
}
@@ -719,7 +693,7 @@ QRegExp QItemModelBarDataProxy::columnRolePattern() const
*
* \sa valueRole, valueRoleReplace
*/
-void QItemModelBarDataProxy::setValueRolePattern(const QRegExp &pattern)
+void QItemModelBarDataProxy::setValueRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_valueRolePattern != pattern) {
dptr()->m_valueRolePattern = pattern;
@@ -727,7 +701,7 @@ void QItemModelBarDataProxy::setValueRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelBarDataProxy::valueRolePattern() const
+QRegularExpression QItemModelBarDataProxy::valueRolePattern() const
{
return dptrc()->m_valueRolePattern;
}
@@ -743,7 +717,7 @@ QRegExp QItemModelBarDataProxy::valueRolePattern() const
*
* \sa rotationRole, rotationRoleReplace
*/
-void QItemModelBarDataProxy::setRotationRolePattern(const QRegExp &pattern)
+void QItemModelBarDataProxy::setRotationRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_rotationRolePattern != pattern) {
dptr()->m_rotationRolePattern = pattern;
@@ -751,7 +725,7 @@ void QItemModelBarDataProxy::setRotationRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelBarDataProxy::rotationRolePattern() const
+QRegularExpression QItemModelBarDataProxy::rotationRolePattern() const
{
return dptrc()->m_rotationRolePattern;
}
@@ -762,7 +736,7 @@ QRegExp QItemModelBarDataProxy::rotationRolePattern() const
* \brief 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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rowRole, rowRolePattern
@@ -786,7 +760,7 @@ QString QItemModelBarDataProxy::rowRoleReplace() const
* \brief 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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa columnRole, columnRolePattern
@@ -810,7 +784,7 @@ QString QItemModelBarDataProxy::columnRoleReplace() const
* \brief 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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa valueRole, valueRolePattern
@@ -835,7 +809,7 @@ QString QItemModelBarDataProxy::valueRoleReplace() const
* 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)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rotationRole, rotationRolePattern
@@ -959,4 +933,4 @@ void QItemModelBarDataProxyPrivate::connectItemModelHandler()
m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qitemmodelbardataproxy.h b/src/datavisualization/data/qitemmodelbardataproxy.h
index 2dfa0753..1b372a3c 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy.h
+++ b/src/datavisualization/data/qitemmodelbardataproxy.h
@@ -1,44 +1,18 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QITEMMODELBARDATAPROXY_H
#define QITEMMODELBARDATAPROXY_H
#include <QtDataVisualization/qbardataproxy.h>
#include <QtCore/QAbstractItemModel>
-#include <QtCore/QRegExp>
+#include <QtCore/QRegularExpression>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QItemModelBarDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QItemModelBarDataProxy : public QBarDataProxy
+class Q_DATAVISUALIZATION_EXPORT QItemModelBarDataProxy : public QBarDataProxy
{
Q_OBJECT
Q_ENUMS(MultiMatchBehavior)
@@ -52,15 +26,15 @@ 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)
+ Q_PROPERTY(QRegularExpression rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression valueRolePattern READ valueRolePattern WRITE setValueRolePattern NOTIFY valueRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QString rowRoleReplace READ rowRoleReplace WRITE setRowRoleReplace NOTIFY rowRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString columnRoleReplace READ columnRoleReplace WRITE setColumnRoleReplace NOTIFY columnRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString valueRoleReplace READ valueRoleReplace WRITE setValueRoleReplace NOTIFY valueRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString rotationRoleReplace READ rotationRoleReplace WRITE setRotationRoleReplace NOTIFY rotationRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(MultiMatchBehavior multiMatchBehavior READ multiMatchBehavior WRITE setMultiMatchBehavior NOTIFY multiMatchBehaviorChanged REVISION(1, 1))
public:
enum MultiMatchBehavior {
@@ -122,14 +96,14 @@ 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 setRowRolePattern(const QRegularExpression &pattern);
+ QRegularExpression rowRolePattern() const;
+ void setColumnRolePattern(const QRegularExpression &pattern);
+ QRegularExpression columnRolePattern() const;
+ void setValueRolePattern(const QRegularExpression &pattern);
+ QRegularExpression valueRolePattern() const;
+ void setRotationRolePattern(const QRegularExpression &pattern);
+ QRegularExpression rotationRolePattern() const;
void setRowRoleReplace(const QString &replace);
QString rowRoleReplace() const;
@@ -154,15 +128,15 @@ Q_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);
+ Q_REVISION(1, 1) void rowRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void columnRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void valueRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void rotationRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void rowRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void columnRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void valueRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void rotationRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void multiMatchBehaviorChanged(MultiMatchBehavior behavior);
protected:
QItemModelBarDataProxyPrivate *dptr();
@@ -174,6 +148,6 @@ private:
friend class BarItemModelHandler;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qitemmodelbardataproxy_p.h b/src/datavisualization/data/qitemmodelbardataproxy_p.h
index a4eefbcd..cea4eb30 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy_p.h
+++ b/src/datavisualization/data/qitemmodelbardataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qitemmodelbardataproxy.h"
#include "qbardataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class BarItemModelHandler;
@@ -74,10 +48,10 @@ private:
bool m_autoRowCategories;
bool m_autoColumnCategories;
- QRegExp m_rowRolePattern;
- QRegExp m_columnRolePattern;
- QRegExp m_valueRolePattern;
- QRegExp m_rotationRolePattern;
+ QRegularExpression m_rowRolePattern;
+ QRegularExpression m_columnRolePattern;
+ QRegularExpression m_valueRolePattern;
+ QRegularExpression m_rotationRolePattern;
QString m_rowRoleReplace;
QString m_columnRoleReplace;
@@ -90,6 +64,6 @@ private:
friend class QItemModelBarDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
index 58180e69..63392cc0 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qitemmodelscatterdataproxy_p.h"
#include "scatteritemmodelhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QItemModelScatterDataProxy
@@ -59,12 +33,12 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* 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
+ * QString::replace(const QRegularExpression &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}.
+ * ItemModelBarDataProxy usage in \l{Simple Bar Graph} example.
*
* \sa {Qt Data Visualization Data Handling}
*/
@@ -170,7 +144,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* This property defines the replace content to be used in conjunction with xPosRolePattern.
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa xPosRole, xPosRolePattern
@@ -181,7 +155,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* This property defines the replace content to be used in conjunction with yPosRolePattern.
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa yPosRole, yPosRolePattern
@@ -192,7 +166,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* This property defines the replace content to be used in conjunction with zPosRolePattern.
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa zPosRole, zPosRolePattern
@@ -202,7 +176,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \qmlproperty string ItemModelScatterDataProxy::rotationRoleReplace
* This property defines the replace content to be used in conjunction with rotationRolePattern.
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rotationRole, rotationRolePattern
@@ -386,7 +360,7 @@ QString QItemModelScatterDataProxy::rotationRole() const
*
* \sa xPosRole, xPosRoleReplace
*/
-void QItemModelScatterDataProxy::setXPosRolePattern(const QRegExp &pattern)
+void QItemModelScatterDataProxy::setXPosRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_xPosRolePattern != pattern) {
dptr()->m_xPosRolePattern = pattern;
@@ -394,7 +368,7 @@ void QItemModelScatterDataProxy::setXPosRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelScatterDataProxy::xPosRolePattern() const
+QRegularExpression QItemModelScatterDataProxy::xPosRolePattern() const
{
return dptrc()->m_xPosRolePattern;
}
@@ -410,7 +384,7 @@ QRegExp QItemModelScatterDataProxy::xPosRolePattern() const
*
* \sa yPosRole, yPosRoleReplace
*/
-void QItemModelScatterDataProxy::setYPosRolePattern(const QRegExp &pattern)
+void QItemModelScatterDataProxy::setYPosRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_yPosRolePattern != pattern) {
dptr()->m_yPosRolePattern = pattern;
@@ -418,7 +392,7 @@ void QItemModelScatterDataProxy::setYPosRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelScatterDataProxy::yPosRolePattern() const
+QRegularExpression QItemModelScatterDataProxy::yPosRolePattern() const
{
return dptrc()->m_yPosRolePattern;
}
@@ -434,7 +408,7 @@ QRegExp QItemModelScatterDataProxy::yPosRolePattern() const
*
* \sa zPosRole, zPosRoleReplace
*/
-void QItemModelScatterDataProxy::setZPosRolePattern(const QRegExp &pattern)
+void QItemModelScatterDataProxy::setZPosRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_zPosRolePattern != pattern) {
dptr()->m_zPosRolePattern = pattern;
@@ -442,7 +416,7 @@ void QItemModelScatterDataProxy::setZPosRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelScatterDataProxy::zPosRolePattern() const
+QRegularExpression QItemModelScatterDataProxy::zPosRolePattern() const
{
return dptrc()->m_zPosRolePattern;
}
@@ -458,7 +432,7 @@ QRegExp QItemModelScatterDataProxy::zPosRolePattern() const
*
* \sa rotationRole, rotationRoleReplace
*/
-void QItemModelScatterDataProxy::setRotationRolePattern(const QRegExp &pattern)
+void QItemModelScatterDataProxy::setRotationRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_rotationRolePattern != pattern) {
dptr()->m_rotationRolePattern = pattern;
@@ -466,7 +440,7 @@ void QItemModelScatterDataProxy::setRotationRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelScatterDataProxy::rotationRolePattern() const
+QRegularExpression QItemModelScatterDataProxy::rotationRolePattern() const
{
return dptrc()->m_rotationRolePattern;
}
@@ -478,7 +452,7 @@ QRegExp QItemModelScatterDataProxy::rotationRolePattern() const
* pattern.
*
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa xPosRole, xPosRolePattern
@@ -503,7 +477,7 @@ QString QItemModelScatterDataProxy::xPosRoleReplace() const
* pattern.
*
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa yPosRole, yPosRolePattern
@@ -528,7 +502,7 @@ QString QItemModelScatterDataProxy::yPosRoleReplace() const
* pattern.
*
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa zPosRole, zPosRolePattern
@@ -553,7 +527,7 @@ QString QItemModelScatterDataProxy::zPosRoleReplace() const
* pattern.
*
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rotationRole, rotationRolePattern
@@ -647,4 +621,4 @@ void QItemModelScatterDataProxyPrivate::connectItemModelHandler()
m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.h b/src/datavisualization/data/qitemmodelscatterdataproxy.h
index 9a85c4aa..3e4d41f3 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy.h
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QITEMMODELSCATTERDATAPROXY_H
#define QITEMMODELSCATTERDATAPROXY_H
@@ -33,13 +7,13 @@
#include <QtDataVisualization/qscatterdataproxy.h>
#include <QtCore/QAbstractItemModel>
#include <QtCore/QString>
-#include <QtCore/QRegExp>
+#include <QtCore/QRegularExpression>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QItemModelScatterDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QItemModelScatterDataProxy : public QScatterDataProxy
+class Q_DATAVISUALIZATION_EXPORT QItemModelScatterDataProxy : public QScatterDataProxy
{
Q_OBJECT
Q_PROPERTY(QAbstractItemModel* itemModel READ itemModel WRITE setItemModel NOTIFY itemModelChanged)
@@ -47,14 +21,14 @@ class QT_DATAVISUALIZATION_EXPORT QItemModelScatterDataProxy : public QScatterDa
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)
+ Q_PROPERTY(QRegularExpression xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression rotationRolePattern READ rotationRolePattern WRITE setRotationRolePattern NOTIFY rotationRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QString xPosRoleReplace READ xPosRoleReplace WRITE setXPosRoleReplace NOTIFY xPosRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString yPosRoleReplace READ yPosRoleReplace WRITE setYPosRoleReplace NOTIFY yPosRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString zPosRoleReplace READ zPosRoleReplace WRITE setZPosRoleReplace NOTIFY zPosRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString rotationRoleReplace READ rotationRoleReplace WRITE setRotationRoleReplace NOTIFY rotationRoleReplaceChanged REVISION(1, 1))
public:
explicit QItemModelScatterDataProxy(QObject *parent = nullptr);
@@ -83,14 +57,14 @@ 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 setXPosRolePattern(const QRegularExpression &pattern);
+ QRegularExpression xPosRolePattern() const;
+ void setYPosRolePattern(const QRegularExpression &pattern);
+ QRegularExpression yPosRolePattern() const;
+ void setZPosRolePattern(const QRegularExpression &pattern);
+ QRegularExpression zPosRolePattern() const;
+ void setRotationRolePattern(const QRegularExpression &pattern);
+ QRegularExpression rotationRolePattern() const;
void setXPosRoleReplace(const QString &replace);
QString xPosRoleReplace() const;
@@ -107,14 +81,14 @@ Q_SIGNALS:
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);
+ Q_REVISION(1, 1) void xPosRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void yPosRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void zPosRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void rotationRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void rotationRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void xPosRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void yPosRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void zPosRoleReplaceChanged(const QString &replace);
protected:
QItemModelScatterDataProxyPrivate *dptr();
@@ -126,6 +100,6 @@ private:
friend class ScatterItemModelHandler;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy_p.h b/src/datavisualization/data/qitemmodelscatterdataproxy_p.h
index a8d3c0e6..2559a321 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy_p.h
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qitemmodelscatterdataproxy.h"
#include "qscatterdataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ScatterItemModelHandler;
@@ -65,10 +39,10 @@ private:
QString m_zPosRole;
QString m_rotationRole;
- QRegExp m_xPosRolePattern;
- QRegExp m_yPosRolePattern;
- QRegExp m_zPosRolePattern;
- QRegExp m_rotationRolePattern;
+ QRegularExpression m_xPosRolePattern;
+ QRegularExpression m_yPosRolePattern;
+ QRegularExpression m_zPosRolePattern;
+ QRegularExpression m_rotationRolePattern;
QString m_xPosRoleReplace;
QString m_yPosRoleReplace;
@@ -79,6 +53,6 @@ private:
friend class QItemModelScatterDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
index 47230326..75fe3691 100644
--- a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qitemmodelsurfacedataproxy_p.h"
#include "surfaceitemmodelhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QItemModelSurfaceDataProxy
@@ -82,12 +56,12 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* 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
+ * QString::replace(const QRegularExpression &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}.
+ * ItemModelBarDataProxy usage in \l{Simple Bar Graph} example.
*
* \sa {Qt Data Visualization Data Handling}
*/
@@ -251,7 +225,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The replace content to be used in conjunction with rowRolePattern.
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rowRole, rowRolePattern
@@ -263,7 +237,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The replace content to be used in conjunction with columnRolePattern.
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa columnRole, columnRolePattern
@@ -275,7 +249,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The replace content to be used in conjunction with xPosRolePattern.
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa xPosRole, xPosRolePattern
@@ -287,7 +261,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The replace content to be used in conjunction with yPosRolePattern.
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa yPosRole, yPosRolePattern
@@ -299,7 +273,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The replace content to be used in conjunction with zPosRolePattern.
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa zPosRole, zPosRolePattern
@@ -770,7 +744,7 @@ int QItemModelSurfaceDataProxy::columnCategoryIndex(const QString &category)
*
* \sa rowRole, rowRoleReplace
*/
-void QItemModelSurfaceDataProxy::setRowRolePattern(const QRegExp &pattern)
+void QItemModelSurfaceDataProxy::setRowRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_rowRolePattern != pattern) {
dptr()->m_rowRolePattern = pattern;
@@ -778,7 +752,7 @@ void QItemModelSurfaceDataProxy::setRowRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelSurfaceDataProxy::rowRolePattern() const
+QRegularExpression QItemModelSurfaceDataProxy::rowRolePattern() const
{
return dptrc()->m_rowRolePattern;
}
@@ -795,7 +769,7 @@ QRegExp QItemModelSurfaceDataProxy::rowRolePattern() const
*
* \sa columnRole, columnRoleReplace
*/
-void QItemModelSurfaceDataProxy::setColumnRolePattern(const QRegExp &pattern)
+void QItemModelSurfaceDataProxy::setColumnRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_columnRolePattern != pattern) {
dptr()->m_columnRolePattern = pattern;
@@ -803,7 +777,7 @@ void QItemModelSurfaceDataProxy::setColumnRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelSurfaceDataProxy::columnRolePattern() const
+QRegularExpression QItemModelSurfaceDataProxy::columnRolePattern() const
{
return dptrc()->m_columnRolePattern;
}
@@ -820,7 +794,7 @@ QRegExp QItemModelSurfaceDataProxy::columnRolePattern() const
*
* \sa xPosRole, xPosRoleReplace
*/
-void QItemModelSurfaceDataProxy::setXPosRolePattern(const QRegExp &pattern)
+void QItemModelSurfaceDataProxy::setXPosRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_xPosRolePattern != pattern) {
dptr()->m_xPosRolePattern = pattern;
@@ -828,7 +802,7 @@ void QItemModelSurfaceDataProxy::setXPosRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelSurfaceDataProxy::xPosRolePattern() const
+QRegularExpression QItemModelSurfaceDataProxy::xPosRolePattern() const
{
return dptrc()->m_xPosRolePattern;
}
@@ -845,7 +819,7 @@ QRegExp QItemModelSurfaceDataProxy::xPosRolePattern() const
*
* \sa yPosRole, yPosRoleReplace
*/
-void QItemModelSurfaceDataProxy::setYPosRolePattern(const QRegExp &pattern)
+void QItemModelSurfaceDataProxy::setYPosRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_yPosRolePattern != pattern) {
dptr()->m_yPosRolePattern = pattern;
@@ -853,7 +827,7 @@ void QItemModelSurfaceDataProxy::setYPosRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelSurfaceDataProxy::yPosRolePattern() const
+QRegularExpression QItemModelSurfaceDataProxy::yPosRolePattern() const
{
return dptrc()->m_yPosRolePattern;
}
@@ -870,7 +844,7 @@ QRegExp QItemModelSurfaceDataProxy::yPosRolePattern() const
*
* \sa zPosRole, zPosRoleReplace
*/
-void QItemModelSurfaceDataProxy::setZPosRolePattern(const QRegExp &pattern)
+void QItemModelSurfaceDataProxy::setZPosRolePattern(const QRegularExpression &pattern)
{
if (dptr()->m_zPosRolePattern != pattern) {
dptr()->m_zPosRolePattern = pattern;
@@ -878,7 +852,7 @@ void QItemModelSurfaceDataProxy::setZPosRolePattern(const QRegExp &pattern)
}
}
-QRegExp QItemModelSurfaceDataProxy::zPosRolePattern() const
+QRegularExpression QItemModelSurfaceDataProxy::zPosRolePattern() const
{
return dptrc()->m_zPosRolePattern;
}
@@ -890,7 +864,7 @@ QRegExp QItemModelSurfaceDataProxy::zPosRolePattern() const
* pattern.
*
* Defaults to an empty string. For more information on how the search and replace using regular
- * expressions works, see QString::replace(const QRegExp &rx, const QString &after)
+ * expressions works, see QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa rowRole, rowRolePattern
@@ -916,7 +890,7 @@ QString QItemModelSurfaceDataProxy::rowRoleReplace() const
*
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa columnRole, columnRolePattern
@@ -942,7 +916,7 @@ QString QItemModelSurfaceDataProxy::columnRoleReplace() const
*
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa xPosRole, xPosRolePattern
@@ -968,7 +942,7 @@ QString QItemModelSurfaceDataProxy::xPosRoleReplace() const
*
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa yPosRole, yPosRolePattern
@@ -994,7 +968,7 @@ QString QItemModelSurfaceDataProxy::yPosRoleReplace() const
*
* Defaults to an empty string. For more information on how the search and
* replace using regular expressions works, see the
- * QString::replace(const QRegExp &rx, const QString &after)
+ * QString::replace(const QRegularExpression &rx, const QString &after)
* function documentation.
*
* \sa zPosRole, zPosRolePattern
@@ -1124,4 +1098,4 @@ void QItemModelSurfaceDataProxyPrivate::connectItemModelHandler()
m_itemModelHandler, &AbstractItemModelHandler::handleMappingChanged);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.h b/src/datavisualization/data/qitemmodelsurfacedataproxy.h
index ec94c1f0..2d90f146 100644
--- a/src/datavisualization/data/qitemmodelsurfacedataproxy.h
+++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QITEMMODELSURFACEDATAPROXY_H
#define QITEMMODELSURFACEDATAPROXY_H
@@ -33,13 +7,13 @@
#include <QtDataVisualization/qsurfacedataproxy.h>
#include <QtCore/QAbstractItemModel>
#include <QtCore/QStringList>
-#include <QtCore/QRegExp>
+#include <QtCore/QRegularExpression>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QItemModelSurfaceDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QItemModelSurfaceDataProxy : public QSurfaceDataProxy
+class Q_DATAVISUALIZATION_EXPORT QItemModelSurfaceDataProxy : public QSurfaceDataProxy
{
Q_OBJECT
Q_ENUMS(MultiMatchBehavior)
@@ -54,17 +28,17 @@ class QT_DATAVISUALIZATION_EXPORT QItemModelSurfaceDataProxy : public QSurfaceDa
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 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(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 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(MultiMatchBehavior multiMatchBehavior READ multiMatchBehavior WRITE setMultiMatchBehavior NOTIFY multiMatchBehaviorChanged REVISION 1)
+ Q_PROPERTY(QRegularExpression rowRolePattern READ rowRolePattern WRITE setRowRolePattern NOTIFY rowRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression columnRolePattern READ columnRolePattern WRITE setColumnRolePattern NOTIFY columnRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression xPosRolePattern READ xPosRolePattern WRITE setXPosRolePattern NOTIFY xPosRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression yPosRolePattern READ yPosRolePattern WRITE setYPosRolePattern NOTIFY yPosRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QRegularExpression zPosRolePattern READ zPosRolePattern WRITE setZPosRolePattern NOTIFY zPosRolePatternChanged REVISION(1, 1))
+ Q_PROPERTY(QString rowRoleReplace READ rowRoleReplace WRITE setRowRoleReplace NOTIFY rowRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString columnRoleReplace READ columnRoleReplace WRITE setColumnRoleReplace NOTIFY columnRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString xPosRoleReplace READ xPosRoleReplace WRITE setXPosRoleReplace NOTIFY xPosRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString yPosRoleReplace READ yPosRoleReplace WRITE setYPosRoleReplace NOTIFY yPosRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(QString zPosRoleReplace READ zPosRoleReplace WRITE setZPosRoleReplace NOTIFY zPosRoleReplaceChanged REVISION(1, 1))
+ Q_PROPERTY(MultiMatchBehavior multiMatchBehavior READ multiMatchBehavior WRITE setMultiMatchBehavior NOTIFY multiMatchBehaviorChanged REVISION(1, 1))
public:
enum MultiMatchBehavior {
@@ -132,16 +106,16 @@ 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 setXPosRolePattern(const QRegExp &pattern);
- QRegExp xPosRolePattern() const;
- void setYPosRolePattern(const QRegExp &pattern);
- QRegExp yPosRolePattern() const;
- void setZPosRolePattern(const QRegExp &pattern);
- QRegExp zPosRolePattern() const;
+ void setRowRolePattern(const QRegularExpression &pattern);
+ QRegularExpression rowRolePattern() const;
+ void setColumnRolePattern(const QRegularExpression &pattern);
+ QRegularExpression columnRolePattern() const;
+ void setXPosRolePattern(const QRegularExpression &pattern);
+ QRegularExpression xPosRolePattern() const;
+ void setYPosRolePattern(const QRegularExpression &pattern);
+ QRegularExpression yPosRolePattern() const;
+ void setZPosRolePattern(const QRegularExpression &pattern);
+ QRegularExpression zPosRolePattern() const;
void setRowRoleReplace(const QString &replace);
QString rowRoleReplace() const;
@@ -169,17 +143,17 @@ Q_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 xPosRolePatternChanged(const QRegExp &pattern);
- Q_REVISION(1) void yPosRolePatternChanged(const QRegExp &pattern);
- Q_REVISION(1) void zPosRolePatternChanged(const QRegExp &pattern);
- Q_REVISION(1) void rowRoleReplaceChanged(const QString &replace);
- Q_REVISION(1) void columnRoleReplaceChanged(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);
- Q_REVISION(1) void multiMatchBehaviorChanged(MultiMatchBehavior behavior);
+ Q_REVISION(1, 1) void rowRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void columnRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void xPosRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void yPosRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void zPosRolePatternChanged(const QRegularExpression &pattern);
+ Q_REVISION(1, 1) void rowRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void columnRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void xPosRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void yPosRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void zPosRoleReplaceChanged(const QString &replace);
+ Q_REVISION(1, 1) void multiMatchBehaviorChanged(MultiMatchBehavior behavior);
protected:
QItemModelSurfaceDataProxyPrivate *dptr();
@@ -191,6 +165,6 @@ private:
friend class SurfaceItemModelHandler;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h b/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h
index 011a5221..a7de381a 100644
--- a/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h
+++ b/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qitemmodelsurfacedataproxy.h"
#include "qsurfacedataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class SurfaceItemModelHandler;
@@ -75,11 +49,11 @@ private:
bool m_autoRowCategories;
bool m_autoColumnCategories;
- QRegExp m_rowRolePattern;
- QRegExp m_columnRolePattern;
- QRegExp m_xPosRolePattern;
- QRegExp m_yPosRolePattern;
- QRegExp m_zPosRolePattern;
+ QRegularExpression m_rowRolePattern;
+ QRegularExpression m_columnRolePattern;
+ QRegularExpression m_xPosRolePattern;
+ QRegularExpression m_yPosRolePattern;
+ QRegularExpression m_zPosRolePattern;
QString m_rowRoleReplace;
QString m_columnRoleReplace;
@@ -93,6 +67,6 @@ private:
friend class QItemModelSurfaceDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qscatter3dseries.cpp b/src/datavisualization/data/qscatter3dseries.cpp
index 1557a6c3..3e0ea45b 100644
--- a/src/datavisualization/data/qscatter3dseries.cpp
+++ b/src/datavisualization/data/qscatter3dseries.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qscatter3dseries_p.h"
#include "scatter3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QScatter3DSeries
@@ -392,4 +366,4 @@ void QScatter3DSeriesPrivate::setItemSize(float size)
m_controller->markSeriesVisualsDirty();
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qscatter3dseries.h b/src/datavisualization/data/qscatter3dseries.h
index 0a1f93e9..599dfea4 100644
--- a/src/datavisualization/data/qscatter3dseries.h
+++ b/src/datavisualization/data/qscatter3dseries.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QSCATTER3DSERIES_H
#define QSCATTER3DSERIES_H
@@ -33,11 +7,11 @@
#include <QtDataVisualization/qabstract3dseries.h>
#include <QtDataVisualization/qscatterdataproxy.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QScatter3DSeriesPrivate;
-class QT_DATAVISUALIZATION_EXPORT QScatter3DSeries : public QAbstract3DSeries
+class Q_DATAVISUALIZATION_EXPORT QScatter3DSeries : public QAbstract3DSeries
{
Q_OBJECT
Q_PROPERTY(QScatterDataProxy *dataProxy READ dataProxy WRITE setDataProxy NOTIFY dataProxyChanged)
@@ -75,6 +49,6 @@ private:
friend class Scatter3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qscatter3dseries_p.h b/src/datavisualization/data/qscatter3dseries_p.h
index c173857e..14f7672d 100644
--- a/src/datavisualization/data/qscatter3dseries_p.h
+++ b/src/datavisualization/data/qscatter3dseries_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qscatter3dseries.h"
#include "qabstract3dseries_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QScatter3DSeriesPrivate : public QAbstract3DSeriesPrivate
{
@@ -52,9 +26,9 @@ public:
QScatter3DSeriesPrivate(QScatter3DSeries *q);
virtual ~QScatter3DSeriesPrivate();
- virtual void setDataProxy(QAbstractDataProxy *proxy);
- virtual void connectControllerAndProxy(Abstract3DController *newController);
- virtual void createItemLabel();
+ void setDataProxy(QAbstractDataProxy *proxy) override;
+ void connectControllerAndProxy(Abstract3DController *newController) override;
+ void createItemLabel() override;
void setSelectedItem(int index);
void setItemSize(float size);
@@ -68,6 +42,6 @@ private:
friend class QScatter3DSeries;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qscatterdataitem.cpp b/src/datavisualization/data/qscatterdataitem.cpp
index 12ea47af..f55b45bf 100644
--- a/src/datavisualization/data/qscatterdataitem.cpp
+++ b/src/datavisualization/data/qscatterdataitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qscatterdataitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QScatterDataItem
@@ -176,4 +150,4 @@ QScatterDataItemPrivate::~QScatterDataItemPrivate()
{
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qscatterdataitem.h b/src/datavisualization/data/qscatterdataitem.h
index 94be3a48..9ed68de9 100644
--- a/src/datavisualization/data/qscatterdataitem.h
+++ b/src/datavisualization/data/qscatterdataitem.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QSCATTERDATAITEM_H
#define QSCATTERDATAITEM_H
@@ -33,11 +7,11 @@
#include <QtDataVisualization/qdatavisualizationglobal.h>
#include <QtGui/QQuaternion>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QScatterDataItemPrivate;
-class QT_DATAVISUALIZATION_EXPORT QScatterDataItem
+class Q_DATAVISUALIZATION_EXPORT QScatterDataItem
{
public:
QScatterDataItem();
@@ -69,6 +43,6 @@ private:
QQuaternion m_rotation;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qscatterdataitem_p.h b/src/datavisualization/data/qscatterdataitem_p.h
index 7eac8950..a3cf11c5 100644
--- a/src/datavisualization/data/qscatterdataitem_p.h
+++ b/src/datavisualization/data/qscatterdataitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qscatterdataitem.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QScatterDataItemPrivate
{
@@ -52,6 +26,6 @@ public:
virtual ~QScatterDataItemPrivate();
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qscatterdataproxy.cpp b/src/datavisualization/data/qscatterdataproxy.cpp
index 884d2da9..3e793430 100644
--- a/src/datavisualization/data/qscatterdataproxy.cpp
+++ b/src/datavisualization/data/qscatterdataproxy.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qscatterdataproxy_p.h"
#include "qscatter3dseries_p.h"
#include "qabstract3daxis_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QScatterDataProxy
@@ -451,4 +425,4 @@ QScatterDataProxy *QScatterDataProxyPrivate::qptr()
return static_cast<QScatterDataProxy *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qscatterdataproxy.h b/src/datavisualization/data/qscatterdataproxy.h
index 0a2f73ba..fd22db08 100644
--- a/src/datavisualization/data/qscatterdataproxy.h
+++ b/src/datavisualization/data/qscatterdataproxy.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QSCATTERDATAPROXY_H
#define QSCATTERDATAPROXY_H
@@ -35,14 +9,14 @@
Q_MOC_INCLUDE(<QtDataVisualization/qscatter3dseries.h>)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QScatterDataProxyPrivate;
class QScatter3DSeries;
typedef QList<QScatterDataItem> QScatterDataArray;
-class QT_DATAVISUALIZATION_EXPORT QScatterDataProxy : public QAbstractDataProxy
+class Q_DATAVISUALIZATION_EXPORT QScatterDataProxy : public QAbstractDataProxy
{
Q_OBJECT
@@ -92,6 +66,6 @@ private:
friend class Scatter3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qscatterdataproxy_p.h b/src/datavisualization/data/qscatterdataproxy_p.h
index 157152b0..8df992d1 100644
--- a/src/datavisualization/data/qscatterdataproxy_p.h
+++ b/src/datavisualization/data/qscatterdataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "qabstractdataproxy_p.h"
#include "qscatterdataitem.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DAxis;
@@ -67,7 +41,7 @@ public:
QAbstract3DAxis *axisY, QAbstract3DAxis *axisZ) const;
bool isValidValue(float axisValue, float value, QAbstract3DAxis *axis) const;
- virtual void setSeries(QAbstract3DSeries *series);
+ void setSeries(QAbstract3DSeries *series) override;
private:
QScatterDataProxy *qptr();
QScatterDataArray *m_dataArray;
@@ -75,6 +49,6 @@ private:
friend class QScatterDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qsurface3dseries.cpp b/src/datavisualization/data/qsurface3dseries.cpp
index 83d766bd..9ac4a1de 100644
--- a/src/datavisualization/data/qsurface3dseries.cpp
+++ b/src/datavisualization/data/qsurface3dseries.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qsurface3dseries_p.h"
#include "surface3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QSurface3DSeries
@@ -165,6 +139,12 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* file name is set.
*/
+/*!
+ * \qmlproperty color Surface3DSeries::wireframeColor
+ * \since 6.3
+ *
+ * The color used to draw the gridlines of the surface wireframe.
+ */
/*!
* \enum QSurface3DSeries::DrawFlag
@@ -399,6 +379,24 @@ QString QSurface3DSeries::textureFile() const
}
/*!
+ * \property QSurface3DSeries::wireframeColor
+ * \since 6.3
+ *
+ * \brief The color for the surface wireframe.
+ */
+void QSurface3DSeries::setWireframeColor(const QColor &color)
+{
+ if (dptr()->m_wireframeColor != color) {
+ dptr()->setWireframeColor(color);
+ emit wireframeColorChanged(color);
+ }
+}
+
+QColor QSurface3DSeries::wireframeColor() const
+{
+ return dptrc()->m_wireframeColor;
+}
+/*!
* \internal
*/
QSurface3DSeriesPrivate *QSurface3DSeries::dptr()
@@ -420,7 +418,8 @@ QSurface3DSeriesPrivate::QSurface3DSeriesPrivate(QSurface3DSeries *q)
: QAbstract3DSeriesPrivate(q, QAbstract3DSeries::SeriesTypeSurface),
m_selectedPoint(Surface3DController::invalidSelectionPosition()),
m_flatShadingEnabled(true),
- m_drawMode(QSurface3DSeries::DrawSurfaceAndWireframe)
+ m_drawMode(QSurface3DSeries::DrawSurfaceAndWireframe),
+ m_wireframeColor(Qt::black)
{
m_itemLabelFormat = QStringLiteral("@xLabel, @yLabel, @zLabel");
m_mesh = QAbstract3DSeries::MeshSphere;
@@ -553,4 +552,11 @@ void QSurface3DSeriesPrivate::setTexture(const QImage &texture)
static_cast<Surface3DController *>(m_controller)->updateSurfaceTexture(qptr());
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+void QSurface3DSeriesPrivate::setWireframeColor(const QColor &color)
+{
+ m_wireframeColor = color;
+ if (m_controller)
+ m_controller->markSeriesVisualsDirty();
+}
+
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qsurface3dseries.h b/src/datavisualization/data/qsurface3dseries.h
index b0b83ea3..60804e8f 100644
--- a/src/datavisualization/data/qsurface3dseries.h
+++ b/src/datavisualization/data/qsurface3dseries.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QSURFACE3DSERIES_H
#define QSURFACE3DSERIES_H
@@ -33,11 +7,11 @@
#include <QtDataVisualization/qabstract3dseries.h>
#include <QtDataVisualization/qsurfacedataproxy.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QSurface3DSeriesPrivate;
-class QT_DATAVISUALIZATION_EXPORT QSurface3DSeries : public QAbstract3DSeries
+class Q_DATAVISUALIZATION_EXPORT QSurface3DSeries : public QAbstract3DSeries
{
Q_OBJECT
Q_FLAGS(DrawFlag DrawFlags)
@@ -48,6 +22,7 @@ class QT_DATAVISUALIZATION_EXPORT QSurface3DSeries : public QAbstract3DSeries
Q_PROPERTY(DrawFlags drawMode READ drawMode WRITE setDrawMode NOTIFY drawModeChanged)
Q_PROPERTY(QImage texture READ texture WRITE setTexture NOTIFY textureChanged)
Q_PROPERTY(QString textureFile READ textureFile WRITE setTextureFile NOTIFY textureFileChanged)
+ Q_PROPERTY(QColor wireframeColor READ wireframeColor WRITE setWireframeColor NOTIFY wireframeColorChanged REVISION(6, 3))
public:
enum DrawFlag {
@@ -55,6 +30,7 @@ public:
DrawSurface = 2,
DrawSurfaceAndWireframe = DrawWireframe | DrawSurface
};
+ Q_ENUM(DrawFlag)
Q_DECLARE_FLAGS(DrawFlags, DrawFlag)
explicit QSurface3DSeries(QObject *parent = nullptr);
@@ -81,6 +57,9 @@ public:
void setTextureFile(const QString &filename);
QString textureFile() const;
+ void setWireframeColor(const QColor &color);
+ QColor wireframeColor() const;
+
Q_SIGNALS:
void dataProxyChanged(QSurfaceDataProxy *proxy);
void selectedPointChanged(const QPoint &position);
@@ -89,6 +68,7 @@ Q_SIGNALS:
void drawModeChanged(QSurface3DSeries::DrawFlags mode);
void textureChanged(const QImage &image);
void textureFileChanged(const QString &filename);
+ Q_REVISION(6, 3) void wireframeColorChanged(const QColor &color);
protected:
explicit QSurface3DSeries(QSurface3DSeriesPrivate *d, QObject *parent = nullptr);
@@ -101,6 +81,8 @@ private:
friend class Surface3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+Q_DECLARE_OPERATORS_FOR_FLAGS(QSurface3DSeries::DrawFlags)
+
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qsurface3dseries_p.h b/src/datavisualization/data/qsurface3dseries_p.h
index f3519a5a..56008f49 100644
--- a/src/datavisualization/data/qsurface3dseries_p.h
+++ b/src/datavisualization/data/qsurface3dseries_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qsurface3dseries.h"
#include "qabstract3dseries_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QSurface3DSeriesPrivate : public QAbstract3DSeriesPrivate
{
@@ -52,14 +26,15 @@ public:
QSurface3DSeriesPrivate(QSurface3DSeries *q);
virtual ~QSurface3DSeriesPrivate();
- virtual void setDataProxy(QAbstractDataProxy *proxy);
- virtual void connectControllerAndProxy(Abstract3DController *newController);
- virtual void createItemLabel();
+ void setDataProxy(QAbstractDataProxy *proxy) override;
+ void connectControllerAndProxy(Abstract3DController *newController) override;
+ void createItemLabel() override;
void setSelectedPoint(const QPoint &position);
void setFlatShadingEnabled(bool enabled);
void setDrawMode(QSurface3DSeries::DrawFlags mode);
void setTexture(const QImage &texture);
+ void setWireframeColor(const QColor &color);
private:
QSurface3DSeries *qptr();
@@ -69,11 +44,12 @@ private:
QSurface3DSeries::DrawFlags m_drawMode;
QImage m_texture;
QString m_textureFile;
+ QColor m_wireframeColor;
private:
friend class QSurface3DSeries;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qsurfacedataitem.cpp b/src/datavisualization/data/qsurfacedataitem.cpp
index a4aeb18d..5d977c0f 100644
--- a/src/datavisualization/data/qsurfacedataitem.cpp
+++ b/src/datavisualization/data/qsurfacedataitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qsurfacedataitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QSurfaceDataItem
@@ -150,4 +124,4 @@ QSurfaceDataItemPrivate::~QSurfaceDataItemPrivate()
{
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qsurfacedataitem.h b/src/datavisualization/data/qsurfacedataitem.h
index c4d9f7c8..fce196e7 100644
--- a/src/datavisualization/data/qsurfacedataitem.h
+++ b/src/datavisualization/data/qsurfacedataitem.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QSURFACEDATAITEM_H
#define QSURFACEDATAITEM_H
@@ -33,11 +7,11 @@
#include <QtDataVisualization/qdatavisualizationglobal.h>
#include <QtGui/QVector3D>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QSurfaceDataItemPrivate;
-class QT_DATAVISUALIZATION_EXPORT QSurfaceDataItem
+class Q_DATAVISUALIZATION_EXPORT QSurfaceDataItem
{
public:
QSurfaceDataItem();
@@ -65,6 +39,6 @@ private:
QVector3D m_position;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qsurfacedataitem_p.h b/src/datavisualization/data/qsurfacedataitem_p.h
index 18babd90..85b42513 100644
--- a/src/datavisualization/data/qsurfacedataitem_p.h
+++ b/src/datavisualization/data/qsurfacedataitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qsurfacedataitem.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QSurfaceDataItemPrivate
{
@@ -52,6 +26,6 @@ public:
virtual ~QSurfaceDataItemPrivate();
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp
index 50514889..afb91c3f 100644
--- a/src/datavisualization/data/qsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qsurfacedataproxy.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qsurfacedataproxy_p.h"
#include "qsurface3dseries_p.h"
#include "qabstract3daxis_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QSurfaceDataProxy
@@ -475,7 +449,8 @@ void QSurfaceDataProxyPrivate::setItem(int rowIndex, int columnIndex, const QSur
int QSurfaceDataProxyPrivate::addRow(QSurfaceDataRow *row)
{
- Q_ASSERT(m_dataArray->at(0)->size() == row->size());
+ Q_ASSERT(m_dataArray->isEmpty()
+ || m_dataArray->at(0)->size() == row->size());
int currentSize = m_dataArray->size();
m_dataArray->append(row);
return currentSize;
@@ -485,7 +460,8 @@ int QSurfaceDataProxyPrivate::addRows(const QSurfaceDataArray &rows)
{
int currentSize = m_dataArray->size();
for (int i = 0; i < rows.size(); i++) {
- Q_ASSERT(m_dataArray->at(0)->size() == rows.at(i)->size());
+ Q_ASSERT(m_dataArray->isEmpty()
+ || m_dataArray->at(0)->size() == rows.at(i)->size());
m_dataArray->append(rows.at(i));
}
return currentSize;
@@ -494,7 +470,8 @@ int QSurfaceDataProxyPrivate::addRows(const QSurfaceDataArray &rows)
void QSurfaceDataProxyPrivate::insertRow(int rowIndex, QSurfaceDataRow *row)
{
Q_ASSERT(rowIndex >= 0 && rowIndex <= m_dataArray->size());
- Q_ASSERT(m_dataArray->at(0)->size() == row->size());
+ Q_ASSERT(m_dataArray->isEmpty()
+ || m_dataArray->at(0)->size() == row->size());
m_dataArray->insert(rowIndex, row);
}
@@ -503,7 +480,8 @@ void QSurfaceDataProxyPrivate::insertRows(int rowIndex, const QSurfaceDataArray
Q_ASSERT(rowIndex >= 0 && rowIndex <= m_dataArray->size());
for (int i = 0; i < rows.size(); i++) {
- Q_ASSERT(m_dataArray->at(0)->size() == rows.at(i)->size());
+ Q_ASSERT(m_dataArray->isEmpty()
+ || m_dataArray->at(0)->size() == rows.at(i)->size());
m_dataArray->insert(rowIndex++, rows.at(i));
}
}
@@ -548,9 +526,11 @@ void QSurfaceDataProxyPrivate::limitValues(QVector3D &minValues, QVector3D &maxV
float itemValue = m_dataArray->at(i)->at(j).y();
if (qIsNaN(itemValue) || qIsInf(itemValue))
continue;
- if (min > itemValue && isValidValue(itemValue, axisY))
+ if ((min > itemValue || (qIsNaN(min) || qIsInf(min)))
+ && isValidValue(itemValue, axisY)) {
min = itemValue;
- if (max < itemValue)
+ }
+ if (max < itemValue || (qIsNaN(max) || qIsInf(max)))
max = itemValue;
}
}
@@ -565,33 +545,59 @@ void QSurfaceDataProxyPrivate::limitValues(QVector3D &minValues, QVector3D &maxV
float xHigh = m_dataArray->at(0)->last().x();
float zLow = m_dataArray->at(0)->at(0).z();
float zHigh = m_dataArray->last()->at(0).z();
- for (int i = 0; i < columns; i++) {
- float zItemValue = m_dataArray->at(0)->at(i).z();
- if (qIsNaN(zItemValue) || qIsInf(zItemValue))
- continue;
- else if (isValidValue(zItemValue, axisZ))
- zLow = qMin(zLow,zItemValue);
+ for (int i = 0; i < rows; i++) {
+ for (int j = 0; j < columns; j++) {
+ float zItemValue = m_dataArray->at(i)->at(j).z();
+ if (qIsNaN(zItemValue) || qIsInf(zItemValue))
+ continue;
+ else if (isValidValue(zItemValue, axisZ))
+ zLow = qMin(zLow,zItemValue);
+ }
+ if (!qIsNaN(zLow) && !qIsInf(zLow))
+ break;
}
- for (int i = 0; i < columns; i++) {
- float zItemValue = m_dataArray->last()->at(i).z();
- if (qIsNaN(zItemValue) || qIsInf(zItemValue))
- continue;
- else if (isValidValue(zItemValue, axisZ))
- zHigh = qMax(zHigh, zItemValue);
+ for (int i = rows - 1; i >= 0; i--) {
+ for (int j = 0; j < columns; j++) {
+ float zItemValue = m_dataArray->at(i)->at(j).z();
+ if (qIsNaN(zItemValue) || qIsInf(zItemValue))
+ continue;
+ else if (isValidValue(zItemValue, axisZ))
+ {
+ if (!qIsNaN(zHigh) && !qIsInf(zHigh))
+ zHigh = qMax(zHigh, zItemValue);
+ else
+ zHigh = zItemValue;
+ }
+ }
+ if (!qIsNaN(zHigh) && !qIsInf(zHigh))
+ break;
}
- for (int i = 0; i < rows; i++) {
- float xItemValue = m_dataArray->at(i)->at(0).x();
- if (qIsNaN(xItemValue) || qIsInf(xItemValue))
- continue;
- else if (isValidValue(xItemValue, axisX))
- xLow = qMin(xLow, xItemValue);
+ for (int j = 0; j<columns; j++){
+ for (int i = 0; i < rows; i++) {
+ float xItemValue = m_dataArray->at(i)->at(j).x();
+ if (qIsNaN(xItemValue) || qIsInf(xItemValue))
+ continue;
+ else if (isValidValue(xItemValue, axisX))
+ xLow = qMin(xLow, xItemValue);
+ }
+ if (!qIsNaN(xLow) && !qIsInf(xLow))
+ break;
}
- for (int i = 0; i < rows; i++) {
- float xItemValue = m_dataArray->at(i)->last().x();
- if (qIsNaN(xItemValue) || qIsInf(xItemValue))
- continue;
- else if (isValidValue(xItemValue, axisX))
- xHigh = qMax(xHigh, xItemValue);
+ for (int j = columns-1; j >= 0; j--){
+ for (int i = 0; i < rows; i++) {
+ float xItemValue = m_dataArray->at(i)->at(j).x();
+ if (qIsNaN(xItemValue) || qIsInf(xItemValue))
+ continue;
+ else if (isValidValue(xItemValue, axisX))
+ {
+ if (!qIsNaN(xHigh) && !qIsInf(xHigh))
+ xHigh = qMax(xHigh, xItemValue);
+ else
+ xHigh = xItemValue;
+ }
+ }
+ if (!qIsNaN(xHigh) && !qIsInf(xHigh))
+ break;
}
minValues.setX(xLow);
minValues.setZ(zLow);
@@ -634,4 +640,4 @@ void QSurfaceDataProxyPrivate::setSeries(QAbstract3DSeries *series)
emit qptr()->seriesChanged(surfaceSeries);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/qsurfacedataproxy.h b/src/datavisualization/data/qsurfacedataproxy.h
index 9f767ce2..ece1cd61 100644
--- a/src/datavisualization/data/qsurfacedataproxy.h
+++ b/src/datavisualization/data/qsurfacedataproxy.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QSURFACEDATAPROXY_H
#define QSURFACEDATAPROXY_H
@@ -35,7 +9,7 @@
Q_MOC_INCLUDE(<QtDataVisualization/qsurface3dseries.h>)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QSurfaceDataProxyPrivate;
class QSurface3DSeries;
@@ -43,7 +17,7 @@ class QSurface3DSeries;
typedef QList<QSurfaceDataItem> QSurfaceDataRow;
typedef QList<QSurfaceDataRow *> QSurfaceDataArray;
-class QT_DATAVISUALIZATION_EXPORT QSurfaceDataProxy : public QAbstractDataProxy
+class Q_DATAVISUALIZATION_EXPORT QSurfaceDataProxy : public QAbstractDataProxy
{
Q_OBJECT
@@ -101,6 +75,6 @@ private:
friend class Surface3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/qsurfacedataproxy_p.h b/src/datavisualization/data/qsurfacedataproxy_p.h
index 80443aec..a17d8eb5 100644
--- a/src/datavisualization/data/qsurfacedataproxy_p.h
+++ b/src/datavisualization/data/qsurfacedataproxy_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qsurfacedataproxy.h"
#include "qabstractdataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DAxis;
@@ -67,7 +41,7 @@ public:
QAbstract3DAxis *axisY, QAbstract3DAxis *axisZ) const;
bool isValidValue(float value, QAbstract3DAxis *axis) const;
- virtual void setSeries(QAbstract3DSeries *series);
+ void setSeries(QAbstract3DSeries *series) override;
protected:
QSurfaceDataArray *m_dataArray;
@@ -80,6 +54,6 @@ private:
friend class QSurfaceDataProxy;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/scatteritemmodelhandler.cpp b/src/datavisualization/data/scatteritemmodelhandler.cpp
index 67b9bb3a..8aa4ba7d 100644
--- a/src/datavisualization/data/scatteritemmodelhandler.cpp
+++ b/src/datavisualization/data/scatteritemmodelhandler.cpp
@@ -1,37 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "scatteritemmodelhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-static const int noRoleIndex = -1;
+QT_BEGIN_NAMESPACE
ScatterItemModelHandler::ScatterItemModelHandler(QItemModelScatterDataProxy *proxy, QObject *parent)
: AbstractItemModelHandler(parent),
@@ -211,10 +183,10 @@ void ScatterItemModelHandler::resolveModel()
m_yPosReplace = m_proxy->yPosRoleReplace();
m_zPosReplace = m_proxy->zPosRoleReplace();
m_rotationReplace = m_proxy->rotationRoleReplace();
- m_haveXPosPattern = !m_xPosPattern.isEmpty() && m_xPosPattern.isValid();
- m_haveYPosPattern = !m_yPosPattern.isEmpty() && m_yPosPattern.isValid();
- m_haveZPosPattern = !m_zPosPattern.isEmpty() && m_zPosPattern.isValid();
- m_haveRotationPattern = !m_rotationPattern.isEmpty() && m_rotationPattern.isValid();
+ m_haveXPosPattern = !m_xPosPattern.namedCaptureGroups().isEmpty() && m_xPosPattern.isValid();
+ m_haveYPosPattern = !m_yPosPattern.namedCaptureGroups().isEmpty() && m_yPosPattern.isValid();
+ m_haveZPosPattern = !m_zPosPattern.namedCaptureGroups().isEmpty() && m_zPosPattern.isValid();
+ m_haveRotationPattern = !m_rotationPattern.namedCaptureGroups().isEmpty() && m_rotationPattern.isValid();
QHash<int, QByteArray> roleHash = m_itemModel->roleNames();
m_xPosRole = roleHash.key(m_proxy->xPosRole().toLatin1(), noRoleIndex);
@@ -241,4 +213,4 @@ void ScatterItemModelHandler::resolveModel()
m_proxy->resetArray(m_proxyArray);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/scatteritemmodelhandler_p.h b/src/datavisualization/data/scatteritemmodelhandler_p.h
index 8573f675..7eb084c2 100644
--- a/src/datavisualization/data/scatteritemmodelhandler_p.h
+++ b/src/datavisualization/data/scatteritemmodelhandler_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "abstractitemmodelhandler_p.h"
#include "qitemmodelscatterdataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ScatterItemModelHandler : public AbstractItemModelHandler
{
@@ -53,13 +27,13 @@ public:
virtual ~ScatterItemModelHandler();
public Q_SLOTS:
- virtual void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
- const QList<int> &roles = QList<int>());
- virtual void handleRowsInserted(const QModelIndex &parent, int start, int end);
- virtual void handleRowsRemoved(const QModelIndex &parent, int start, int end);
+ void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
+ const QList<int> &roles = QList<int>()) override;
+ void handleRowsInserted(const QModelIndex &parent, int start, int end) override;
+ void handleRowsRemoved(const QModelIndex &parent, int start, int end) override;
protected:
- void virtual resolveModel();
+ void resolveModel() override;
private:
void modelPosToScatterItem(int modelRow, int modelColumn, QScatterDataItem &item);
@@ -70,10 +44,10 @@ private:
int m_yPosRole;
int m_zPosRole;
int m_rotationRole;
- QRegExp m_xPosPattern;
- QRegExp m_yPosPattern;
- QRegExp m_zPosPattern;
- QRegExp m_rotationPattern;
+ QRegularExpression m_xPosPattern;
+ QRegularExpression m_yPosPattern;
+ QRegularExpression m_zPosPattern;
+ QRegularExpression m_rotationPattern;
QString m_xPosReplace;
QString m_yPosReplace;
QString m_zPosReplace;
@@ -84,6 +58,6 @@ private:
bool m_haveRotationPattern;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/scatterrenderitem.cpp b/src/datavisualization/data/scatterrenderitem.cpp
index 61fb85dd..b8c8a4d5 100644
--- a/src/datavisualization/data/scatterrenderitem.cpp
+++ b/src/datavisualization/data/scatterrenderitem.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "scatterrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
ScatterRenderItem::ScatterRenderItem()
: AbstractRenderItem(),
@@ -48,4 +22,4 @@ ScatterRenderItem::~ScatterRenderItem()
{
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/scatterrenderitem_p.h b/src/datavisualization/data/scatterrenderitem_p.h
index 4c0c30a4..8eb1c766 100644
--- a/src/datavisualization/data/scatterrenderitem_p.h
+++ b/src/datavisualization/data/scatterrenderitem_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -42,13 +16,14 @@
#include "abstractrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ScatterRenderItem : public AbstractRenderItem
{
public:
ScatterRenderItem();
ScatterRenderItem(const ScatterRenderItem &other);
+ ScatterRenderItem &operator=(const ScatterRenderItem &) = default;
virtual ~ScatterRenderItem();
inline const QVector3D &position() const { return m_position; }
@@ -67,6 +42,6 @@ protected:
};
typedef QList<ScatterRenderItem> ScatterRenderItemArray;
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/surfaceitemmodelhandler.cpp b/src/datavisualization/data/surfaceitemmodelhandler.cpp
index 122499be..bdec0308 100644
--- a/src/datavisualization/data/surfaceitemmodelhandler.cpp
+++ b/src/datavisualization/data/surfaceitemmodelhandler.cpp
@@ -1,37 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "surfaceitemmodelhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-static const int noRoleIndex = -1;
+QT_BEGIN_NAMESPACE
SurfaceItemModelHandler::SurfaceItemModelHandler(QItemModelSurfaceDataProxy *proxy, QObject *parent)
: AbstractItemModelHandler(parent),
@@ -123,8 +95,8 @@ void SurfaceItemModelHandler::resolveModel()
}
// Position patterns can be reused on single item changes, so store them to member variables.
- QRegExp rowPattern(m_proxy->rowRolePattern());
- QRegExp colPattern(m_proxy->columnRolePattern());
+ QRegularExpression rowPattern(m_proxy->rowRolePattern());
+ QRegularExpression colPattern(m_proxy->columnRolePattern());
m_xPosPattern = m_proxy->xPosRolePattern();
m_yPosPattern = m_proxy->yPosRolePattern();
m_zPosPattern = m_proxy->zPosRolePattern();
@@ -133,11 +105,11 @@ void SurfaceItemModelHandler::resolveModel()
m_xPosReplace = m_proxy->xPosRoleReplace();
m_yPosReplace = m_proxy->yPosRoleReplace();
m_zPosReplace = m_proxy->zPosRoleReplace();
- bool haveRowPattern = !rowPattern.isEmpty() && rowPattern.isValid();
- bool haveColPattern = !colPattern.isEmpty() && colPattern.isValid();
- m_haveXPosPattern = !m_xPosPattern.isEmpty() && m_xPosPattern.isValid();
- m_haveYPosPattern = !m_yPosPattern.isEmpty() && m_yPosPattern.isValid();
- m_haveZPosPattern = !m_zPosPattern.isEmpty() && m_zPosPattern.isValid();
+ bool haveRowPattern = !rowPattern.namedCaptureGroups().isEmpty() && rowPattern.isValid();
+ bool haveColPattern = !colPattern.namedCaptureGroups().isEmpty() && colPattern.isValid();
+ m_haveXPosPattern = !m_xPosPattern.namedCaptureGroups().isEmpty() && m_xPosPattern.isValid();
+ m_haveYPosPattern = !m_yPosPattern.namedCaptureGroups().isEmpty() && m_yPosPattern.isValid();
+ m_haveZPosPattern = !m_zPosPattern.namedCaptureGroups().isEmpty() && m_zPosPattern.isValid();
QHash<int, QByteArray> roleHash = m_itemModel->roleNames();
@@ -313,12 +285,14 @@ void SurfaceItemModelHandler::resolveModel()
for (int j = 0; j < columnList.size(); j++) {
QVector3D &itemPos = itemValueMap[rowKey][columnList.at(j)];
if (cumulative) {
- if (average) {
- itemPos /= float((*matchCountMap)[rowKey][columnList.at(j)]);
- } else { // cumulativeY
- float divisor = float((*matchCountMap)[rowKey][columnList.at(j)]);
- itemPos.setX(itemPos.x() / divisor);
- itemPos.setZ(itemPos.z() / divisor);
+ float divisor = float((*matchCountMap)[rowKey][columnList.at(j)]);
+ if (divisor) {
+ if (average) {
+ itemPos /= divisor;
+ } else { // cumulativeY
+ itemPos.setX(itemPos.x() / divisor);
+ itemPos.setZ(itemPos.z() / divisor);
+ }
}
}
newProxyRow[j].setPosition(itemPos);
@@ -331,4 +305,4 @@ void SurfaceItemModelHandler::resolveModel()
m_proxy->resetArray(m_proxyArray);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/data/surfaceitemmodelhandler_p.h b/src/datavisualization/data/surfaceitemmodelhandler_p.h
index 6304c822..fc3178b9 100644
--- a/src/datavisualization/data/surfaceitemmodelhandler_p.h
+++ b/src/datavisualization/data/surfaceitemmodelhandler_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "abstractitemmodelhandler_p.h"
#include "qitemmodelsurfacedataproxy_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class SurfaceItemModelHandler : public AbstractItemModelHandler
{
@@ -53,20 +27,20 @@ public:
virtual ~SurfaceItemModelHandler();
public Q_SLOTS:
- virtual void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
- const QList<int> &roles = QList<int>());
+ void handleDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
+ const QList<int> &roles = QList<int>()) override;
protected:
- void virtual resolveModel();
+ void resolveModel() override;
QItemModelSurfaceDataProxy *m_proxy; // Not owned
QSurfaceDataArray *m_proxyArray; // Not owned
int m_xPosRole;
int m_yPosRole;
int m_zPosRole;
- QRegExp m_xPosPattern;
- QRegExp m_yPosPattern;
- QRegExp m_zPosPattern;
+ QRegularExpression m_xPosPattern;
+ QRegularExpression m_yPosPattern;
+ QRegularExpression m_zPosPattern;
QString m_xPosReplace;
QString m_yPosReplace;
QString m_zPosReplace;
@@ -75,6 +49,6 @@ protected:
bool m_haveZPosPattern;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/datavisualization.pro b/src/datavisualization/datavisualization.pro
deleted file mode 100644
index beb1c512..00000000
--- a/src/datavisualization/datavisualization.pro
+++ /dev/null
@@ -1,25 +0,0 @@
-TARGET = QtDataVisualization
-
-QT += core gui opengl
-osx: QT += gui-private
-
-QMAKE_DOCS = $$PWD/doc/qtdatavis3d.qdocconf
-
-QMAKE_TARGET_PRODUCT = "Qt Data Visualization (Qt $$QT_VERSION)"
-QMAKE_TARGET_DESCRIPTION = "3D Data Visualization component for Qt."
-
-include($$PWD/global/global.pri)
-include($$PWD/engine/engine.pri)
-include($$PWD/utils/utils.pri)
-include($$PWD/theme/theme.pri)
-include($$PWD/axis/axis.pri)
-include($$PWD/data/data.pri)
-include($$PWD/input/input.pri)
-
-OTHER_FILES += doc/qtdatavis3d.qdocconf \
- doc/src/* \
- doc/images/* \
- doc/snippets/* \
- global/*.qdoc
-
-load(qt_module)
diff --git a/src/datavisualization/doc/qtdatavis3d.qdocconf b/src/datavisualization/doc/qtdatavis3d.qdocconf
index e8dd6070..952cac3e 100644
--- a/src/datavisualization/doc/qtdatavis3d.qdocconf
+++ b/src/datavisualization/doc/qtdatavis3d.qdocconf
@@ -1,55 +1,49 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
include($QT_INSTALL_DOCS/config/exampleurl-qtdatavis3d.qdocconf)
-project = QtDataVisualization
+project = QtDataVis3D
description = Qt Data Visualization Reference Documentation
version = $QT_VERSION
buildversion = Qt Data Visualization | Commercial or GPLv3
+moduleheader = QtDataVisualization
+examplesinstallpath = datavisualization
exampledirs += ../../../examples/datavisualization \
snippets
-headerdirs += ..
+{headerdirs,sourcedirs} += ..
+
imagedirs += ../images \
images
-sourcedirs += ..
-examplesinstallpath = datavisualization
-
-depends = qtcore qtgui qtqml qtquick qtmultimedia qtdoc qtwidgets
-
-qhp.projects = QtDataVisualization
-
-qhp.QtDataVisualization.file = qtdatavis3d.qhp
-qhp.QtDataVisualization.namespace = org.qt-project.qtdatavisualization.$QT_VERSION_TAG
-qhp.QtDataVisualization.virtualFolder = qtdatavisualization
-qhp.QtDataVisualization.indexTitle = Qt Data Visualization
-qhp.QtDataVisualization.indexRoot =
-
-qhp.QtDataVisualization.filterAttributes = qtdatavisualization $QT_VERSION qtrefdoc
-qhp.QtDataVisualization.customFilters.Qt.name = QtDataVisualization $QT_VERSION
-qhp.QtDataVisualization.customFilters.Qt.filterAttributes = qtdatavisualization $QT_VERSION
-qhp.QtDataVisualization.subprojects = gettingstarted examples classes types
-qhp.QtDataVisualization.subprojects.gettingstarted.title = Getting Started
-qhp.QtDataVisualization.subprojects.gettingstarted.indexTitle = Qt Data Visualization Getting Started
-qhp.QtDataVisualization.subprojects.gettingstarted.selectors = fake:page
-qhp.QtDataVisualization.subprojects.gettingstarted.sortPages = true
-qhp.QtDataVisualization.subprojects.examples.title = Examples
-qhp.QtDataVisualization.subprojects.examples.indexTitle = Qt Data Visualization Examples
-qhp.QtDataVisualization.subprojects.examples.selectors = fake:example
-qhp.QtDataVisualization.subprojects.examples.sortPages = true
-qhp.QtDataVisualization.subprojects.classes.title = C++ Classes
-qhp.QtDataVisualization.subprojects.classes.indexTitle = Qt Data Visualization C++ Classes
-qhp.QtDataVisualization.subprojects.classes.selectors = class
-qhp.QtDataVisualization.subprojects.classes.sortPages = true
-qhp.QtDataVisualization.subprojects.types.title = QML Types
-qhp.QtDataVisualization.subprojects.types.indexTitle = Qt Data Visualization QML Types
-qhp.QtDataVisualization.subprojects.types.selectors = qmlclass
-qhp.QtDataVisualization.subprojects.types.sortPages = true
+depends = qtcore qtgui qtqml qtquick qtdoc qtcmake qtwidgets
+
+qhp.projects = QtDataVis3D
+
+qhp.QtDataVis3D.file = qtdatavis3d.qhp
+qhp.QtDataVis3D.namespace = org.qt-project.qtdatavisualization.$QT_VERSION_TAG
+qhp.QtDataVis3D.virtualFolder = qtdatavisualization
+qhp.QtDataVis3D.indexTitle = Qt Data Visualization
+qhp.QtDataVis3D.indexRoot =
+
+qhp.QtDataVis3D.subprojects = gettingstarted examples classes types
+qhp.QtDataVis3D.subprojects.gettingstarted.title = Getting Started
+qhp.QtDataVis3D.subprojects.gettingstarted.indexTitle = Qt Data Visualization Getting Started
+qhp.QtDataVis3D.subprojects.gettingstarted.selectors = doc:page
+qhp.QtDataVis3D.subprojects.gettingstarted.sortPages = true
+qhp.QtDataVis3D.subprojects.examples.title = Examples
+qhp.QtDataVis3D.subprojects.examples.indexTitle = Qt Data Visualization Examples
+qhp.QtDataVis3D.subprojects.examples.selectors = doc:example
+qhp.QtDataVis3D.subprojects.examples.sortPages = true
+qhp.QtDataVis3D.subprojects.classes.title = C++ Classes
+qhp.QtDataVis3D.subprojects.classes.indexTitle = Qt Data Visualization C++ Classes
+qhp.QtDataVis3D.subprojects.classes.selectors = class
+qhp.QtDataVis3D.subprojects.classes.sortPages = true
+qhp.QtDataVis3D.subprojects.types.title = QML Types
+qhp.QtDataVis3D.subprojects.types.indexTitle = Qt Data Visualization QML Types
+qhp.QtDataVis3D.subprojects.types.selectors = qmlclass
+qhp.QtDataVis3D.subprojects.types.sortPages = true
navigation.landingpage = Qt Data Visualization
navigation.cppclassespage = Qt Data Visualization C++ Classes
navigation.qmltypespage = Qt Data Visualization QML Types
-
-manifestmeta.highlighted.names = "QtDataVisualization/Bars Example" \
- "QtDataVisualization/Qt Quick 2 Surface Multiseries Example"
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp
index 51e32e77..2f10a988 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp
@@ -1,39 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [3]
#include <QtDataVisualization>
-using namespace QtDataVisualization;
-
int main(int argc, char **argv)
{
+ qputenv("QSG_RHI_BACKEND", "opengl");
QGuiApplication app(argc, argv);
//! [4]
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp
index ca7de036..5bf508f3 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp
@@ -1,39 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [3]
#include <QtDataVisualization>
-using namespace QtDataVisualization;
-
int main(int argc, char **argv)
{
+ qputenv("QSG_RHI_BACKEND", "opengl");
QGuiApplication app(argc, argv);
//! [0]
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp
index 1d5038d0..3946ede6 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp
@@ -1,39 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [5]
#include <QtDataVisualization>
-using namespace QtDataVisualization;
-
int main(int argc, char **argv)
{
+ qputenv("QSG_RHI_BACKEND", "opengl");
QGuiApplication app(argc, argv);
//! [0]
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp b/src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp
index 5528be4e..a192976d 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp
@@ -1,37 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtDataVisualization/Q3DBars>
#include <QtDataVisualization/Q3DTheme>
-using namespace QtDataVisualization;
-
int main(int argc, char **argv)
{
//! [0]
diff --git a/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp b/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp
index c02c89f4..488d3a6f 100644
--- a/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
import QtDataVisualization 1.2
diff --git a/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.cpp b/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.cpp
index 64e7751c..fa4e5178 100644
--- a/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.cpp
@@ -1,36 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
#include <QtDataVisualization>
-
-using namespace QtDataVisualization;
//! [0]
//! [1]
diff --git a/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.pro b/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.pro
index fea49c20..00652a42 100644
--- a/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.pro
+++ b/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.pro
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2018 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#! [0]
QT += datavisualization
diff --git a/src/datavisualization/doc/src/qtdatavisualization-index.qdoc b/src/datavisualization/doc/src/qtdatavisualization-index.qdoc
index 44049bf3..5896b094 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-index.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-index.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Data Visualization
@@ -31,47 +7,39 @@
\brief Provides functionality for 3D visualization.
- Qt Data Visualization module provides a way to visualize data in 3D as bar,
- scatter, and surface graphs. It is especially useful for visualizing depth
- maps and large quantities of rapidly changing data, such as data received
- from multiple sensors. The look and feel of graphs can be customized
- by using themes or by adding custom items and labels to them.
+ The Qt Data Visualization module enables you to visualize data in 3D as
+ bar, scatter, and surface graphs. It's especially useful for visualizing
+ depth maps and large quantities of rapidly changing data, such as data
+ received from multiple sensors. The look and feel of graphs can be
+ customized by using themes or by adding custom items and labels.
- Qt Data Visualization is built on Qt 5 and OpenGL to take advantage of
- hardware acceleration and Qt Quick 2.
+ Qt Data Visualization is built on Qt 6 and OpenGL to take advantage of
+ hardware acceleration and Qt Quick.
- \section1 Getting Started
+ \section1 Using the Module
- To import Qt Data Visualization QML types, add the following import statement to your \c .qml
- file:
+ \section2 QML API
- \qml \QtMinorVersion
- import QtDataVisualization 1.\1
- \endqml
+ \include {module-use.qdocinc} {using the qml api} {QtDataVisualization}
- If you intend to use Qt Data Visualization C++ classes in your application, use the
- following include and using directives:
+ \section2 C++ API
- \snippet doc_src_qtdatavisualization.cpp 0
+ \include {module-use.qdocinc} {using the c++ api}
- \note If you are only using a few classes from this module, we recommend including only those
- specific classes instead of the whole module.
+ \section3 Building with CMake
- To link against the Qt Data Visualization module, add this line to your \c qmake project file:
+ \include {module-use.qdocinc} {building with cmake} {DataVisualization}
- \snippet doc_src_qtdatavisualization.pro 0
+ \section3 Building with qmake
- \section1 Licenses
+ \include {module-use.qdocinc} {building_with_qmake} {datavisualization}
- Qt Data Visualization is available under commercial licenses from \l{The Qt Company}.
- In addition, it is available under the \l{GNU General Public License, version 3}.
- See \l{Qt Licensing} for further details.
-
- \section1 Articles
+ \section1 Articles and Guides
\list
\li \l{Qt Data Visualization Overview}{Overview}
\li \l{Qt Data Visualization Data Handling}{Data Handling}
- \li \l{Qt Data Visualization Interacting with Data}{Interacting with Data}
+ \li \l{Qt Data Visualization Interacting with Data}{Interacting with
+ Data}
\li \l{Qt Data Visualization Known Issues}{Known Issues}
\endlist
@@ -85,4 +53,9 @@
\li \l{Qt Data Visualization C++ Classes}
\li \l{Qt Data Visualization QML Types}
\endlist
+
+ \section1 Licenses and Attributions
+ Qt Data Visualization is available under commercial licenses from \l{The Qt
+ Company}. In addition, it is available under the \l{GNU General Public
+ License, version 3}. See \l{Qt Licensing} for further details.
*/
diff --git a/src/datavisualization/doc/src/qtdatavisualization-overview.qdoc b/src/datavisualization/doc/src/qtdatavisualization-overview.qdoc
index f62a1d90..0bf83ec4 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-overview.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-overview.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Qt Data Visualization Overview
\page qtdatavisualization-overview.html
\brief An overview of the Qt Data Visualization module.
+ \ingroup explanation
The Qt Data Visualization module provides a way to develop rapidly
responding, complex, and dynamic 3D visualization for analytical demanding
@@ -79,8 +56,8 @@
\image q3dbars-minimal.png
- For more information, see \l{How to construct a minimal Q3DBars graph},
- \l {Bars Example}, and \l {Qt Quick 2 Bars Example}.
+ For more information, see \l{How to construct a minimal Q3DBars graph}, and
+ \l {Simple Bar Graph} examples.
\section2 3D Scatter Graphs
@@ -92,8 +69,8 @@
\image q3dscatter-minimal.png
- For more information, see \l{How to construct a minimal Q3DScatter graph},
- \l{Scatter Example}, and \l{Qt Quick 2 Scatter Example}.
+ For more information, see \l{How to construct a minimal Q3DScatter graph}, and
+ \l{Simple Scatter Graph} examples.
\section2 3D Surface Graphs
@@ -105,9 +82,8 @@
\image q3dsurface-minimal.png
- For more information, see \l{How to construct a minimal Q3DSurface graph},
- \l{Surface Example}, \l{Textured Surface Example}, \l{Qt Quick 2 Surface
- Example}, and \l{Qt Quick 2 Surface Multiseries Example}.
+ For more information, see \l{How to construct a minimal Q3DSurface graph}, \l{Graph Gallery},
+ and \l{Surface Graph Gallery} examples.
\section1 Using OpenGL for Rendering Data
@@ -138,7 +114,7 @@
be partially transparent. Therefore, changing the rendering mode is a
question of performance versus quality.
- Qt Quick 2 uses a dedicated scenegraph for data rendering, and is therefore
+ Qt Quick uses a dedicated scenegraph for data rendering, and is therefore
the best choice for data visualization.
\section1 3D Axes
@@ -211,7 +187,7 @@
If a graph displays the data from several data series, some settings can be
specified separately for each series. For example, different gradients can
be specified for different layers of the graph to make it look more
- realistic. For an example, see \l{Qt Quick 2 Surface Multiseries Example}.
+ realistic. For an example, see \l{Surface Graph Gallery}.
\section1 Customizing 3D Scenes
@@ -223,7 +199,7 @@
position follows the camera automatically.
The camera can be customized by specifying its preset position, rotation,
- and zoom level. For an example, see \l{Qt Quick 2 Scatter Example}.
+ and zoom level. For an example, see \l{Simple Scatter Graph}.
\section1 Customizing Items
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
index bc3d58f3..c2bb0cc5 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\qmltype AbstractGraph3D
@@ -89,26 +65,19 @@
How the graph will be rendered. Defaults to \c{RenderIndirect}.
\value RenderDirectToBackground
- Indicates that the graph will be rendered directly on the window background.
+ Indicates that the graph will be rendered directly on the window background and QML items are
+ rendered on top of it. Using non-transparent QML item as a background will hide the graph.
Clears the whole window before rendering the graph, including the areas
- outside the graph.
- Since the graphs in this rendering mode are drawn on the window background under other QML
- items, the regular QML window clearing before rendering is suppressed. The graphs handle the clearing
- themselves instead.
- If the surface format of the window supports antialiasing, it will be used (see
+ outside the graph. If the surface format of the window supports antialiasing, it will be used (see
\c {QtDataVisualization::qDefaultSurfaceFormat()}).
This rendering mode offers the best performance at the expense of non-standard QML behavior. For example,
the graphs do not obey the z ordering of QML items and the opacity value has no effect on them.
+
\value RenderDirectToBackground_NoClear
- Similar to \c RenderDirectToBackground mode, except that the graph will not clear the whole
- window before rendering the graph. This mode is better for windows where you have other custom items
- besides the graphs that also draw on the window background. In that case you need to either take care
- of the window clearing yourself or ensure that all areas of the window are fully covered with opaque
- items.
- If one graph in the window uses either of the direct rendering modes, then all other graphs in the
- same window also drawn in direct modes should use the exact same direct rendering mode.
- Otherwise some graphs may not show up, depending on the drawing order of the graphs.
+ \obsolete
+ \note This will work exactly the same way as \c RenderDirectToBackground does in Qt 6
+ as not clearing the window is not supported anymore.
\value RenderIndirect
Indicates the graph will be first rendered to an offscreen surface that
@@ -197,6 +166,12 @@
*/
/*!
+ * \qmlmethod bool AbstractGraph3D::hasSeries(Abstract3DSeries series)
+ * \since 6.3
+ * Returns whether the \a series has already been added to the graph.
+ */
+
+/*!
* \qmlmethod int AbstractGraph3D::addCustomItem(Custom3DItem item)
*
* Adds a Custom3DItem \a item to the graph. Graph takes ownership of the added item.
@@ -309,7 +284,7 @@
* \c selectedElementChanged signal is emitted.
*
* The signal can be used for example for implementing customized input
- * handling, as demonstrated by the \l {Qt Quick 2 Axis Dragging Example}.
+ * handling, as demonstrated by the \l {Axis Handling} example.
*
* \sa selectedLabelIndex(), selectedAxis(), selectedCustomItemIndex(), selectedCustomItem(),
* Bars3D::selectedSeries, Scatter3D::selectedSeries, Scene3D::selectionQueryPosition,
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-bars3d.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-bars3d.qdoc
index efe39238..5116aa3a 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-bars3d.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-bars3d.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
* \qmltype Bars3D
@@ -33,7 +9,7 @@
* \ingroup datavisualization_qml
* \brief 3D bar graph.
*
- * This type enables developers to render bar graphs in 3D with Qt Quick 2.
+ * This type enables developers to render bar graphs in 3D with Qt Quick.
*
* You will need to import data visualization module to use this type:
*
@@ -43,7 +19,7 @@
*
* \snippet doc_src_qmldatavisualization.cpp 1
*
- * See \l{Qt Quick 2 Bars Example} for more thorough usage example.
+ * See \l{Simple Bar Graph} for more thorough usage example.
*
* \sa Bar3DSeries, ItemModelBarDataProxy, Scatter3D, Surface3D, {Qt Data Visualization C++ Classes}
*/
@@ -108,6 +84,14 @@
*/
/*!
+ * \qmlproperty size Bars3D::barSeriesMargin
+ * \since 6.3
+ *
+ * Margin between series columns in X and Z dimensions. Preset to \c {(0.0, 0.0)} by default.
+ * Sensible values are on the range [0,1).
+ */
+
+/*!
* \qmlproperty Bar3DSeries Bars3D::selectedSeries
* The selected series or \c null. If \l {QAbstract3DGraph::selectionMode}{selectionMode} has
* the \c SelectionMultiSeries flag set, this property holds the series that
@@ -116,7 +100,7 @@
/*!
* \qmlproperty list<Bar3DSeries> Bars3D::seriesList
- * \default
+ * \qmldefault
* The series of the graph.
* By default, this property contains an empty list.
* To set the series, either use the addSeries() function or define them as children of the graph.
@@ -156,11 +140,13 @@
* generate the row or column labels on the axes in cases where the labels are not explicitly set
* to the axes. If the newly added series has specified a selected bar, it will be highlighted and
* any existing selection will be cleared. Only one added series can have an active selection.
+ * \sa AbstractGraph3D::hasSeries()
*/
/*!
* \qmlmethod void Bars3D::removeSeries(Bar3DSeries series)
* Remove the \a series from the graph.
+ * \sa AbstractGraph3D::hasSeries()
*/
/*!
@@ -171,4 +157,5 @@
* \note When moving a series to a new \a index that is after its old index,
* the new position in list is calculated as if the series was still in its old
* index, so the final index is actually the \a index decremented by one.
+ * \sa AbstractGraph3D::hasSeries()
*/
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-color.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-color.qdoc
index ee23ae20..cb8b70d2 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-color.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-color.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\qmltype ThemeColor
@@ -41,4 +17,6 @@
The color property describes the color of this ThemeColor.
The default color is black.
+
+ \note Transparency is not supported and will result in undefined behavior.
*/
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-colorgradient.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-colorgradient.qdoc
index 53e2b76a..36277944 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-colorgradient.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-colorgradient.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\qmltype ColorGradientStop
@@ -54,6 +30,8 @@
The default color is black.
+ \note Transparency in a gradient is not supported and will result in undefined behavior.
+
\sa ColorGradient
*/
@@ -80,7 +58,7 @@
/*!
\qmlproperty list<ColorGradientStop> ColorGradient::stops
- \default
+ \qmldefault
This property holds the gradient stops describing the gradient.
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc
index 52b6d12e..8e43ea79 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\qmltype Scatter3D
@@ -33,7 +9,7 @@
\ingroup datavisualization_qml
\brief 3D scatter graph.
- This type enables developers to render scatter graphs in 3D with Qt Quick 2.
+ This type enables developers to render scatter graphs in 3D with Qt Quick.
You will need to import data visualization module to use this type:
@@ -43,7 +19,7 @@
\snippet doc_src_qmldatavisualization.cpp 2
- See \l{Qt Quick 2 Scatter Example} for more thorough usage example.
+ See \l{Simple Scatter Graph} for more thorough usage example.
\sa Scatter3DSeries, ScatterDataProxy, Bars3D, Surface3D, {Qt Data Visualization C++ Classes}
*/
@@ -85,7 +61,7 @@
/*!
* \qmlproperty list<Scatter3DSeries> Scatter3D::seriesList
- * \default
+ * \qmldefault
* This property holds the series of the graph.
* By default, this property contains an empty list.
* To set the series, either use the addSeries() method or define them as
@@ -97,9 +73,11 @@
* Adds the \a series to the graph. A graph can contain multiple series, but has only one set of
* axes. If the newly added series has specified a selected item, it will be highlighted and
* any existing selection will be cleared. Only one added series can have an active selection.
+ * \sa AbstractGraph3D::hasSeries()
*/
/*!
* \qmlmethod void Scatter3D::removeSeries(Scatter3DSeries series)
* Remove the \a series from the graph.
+ * \sa AbstractGraph3D::hasSeries()
*/
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-surface3d.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-surface3d.qdoc
index bf90396f..b8f47fd3 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-surface3d.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-surface3d.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\qmltype Surface3D
@@ -33,7 +9,7 @@
\ingroup datavisualization_qml
\brief Describes the usage of the 3D surface graph.
- This type enables developers to render surface plots in 3D with Qt Quick 2.
+ This type enables developers to render surface plots in 3D with Qt Quick.
You will need to import the data visualization module to use this type:
@@ -43,7 +19,7 @@
\snippet doc_src_qmldatavisualization.cpp 3
- See \l{Qt Quick 2 Surface Example} for more thorough usage example.
+ See \l{Surface Graph Gallery} for more thorough usage example.
\sa Surface3DSeries, ItemModelSurfaceDataProxy, Bars3D, Scatter3D, {Qt Data Visualization C++ Classes}
*/
@@ -83,7 +59,7 @@
/*!
* \qmlproperty list<Surface3DSeries> Surface3D::seriesList
- * \default
+ * \qmldefault
* This property holds the series of the graph.
* By default, this property contains an empty list.
* To set the series, either use the addSeries() function or define them as children of the graph.
@@ -108,9 +84,11 @@
/*!
* \qmlmethod void Surface3D::addSeries(Surface3DSeries series)
* Adds the \a series to the graph.
+ * \sa AbstractGraph3D::hasSeries()
*/
/*!
* \qmlmethod void Surface3D::removeSeries(Surface3DSeries series)
* Removes the \a series from the graph.
+ * \sa AbstractGraph3D::hasSeries()
*/
diff --git a/src/datavisualization/doc/src/qtdatavisualization.qdoc b/src/datavisualization/doc/src/qtdatavisualization.qdoc
index 726db582..5b91c2da 100644
--- a/src/datavisualization/doc/src/qtdatavisualization.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization.qdoc
@@ -1,43 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \namespace QtDataVisualization
- \inmodule QtDataVisualization
- \brief Contains the classes and enumerations in the Qt Data Visualization
- module.
-
- \generatelist{classesbymodule QtDataVisualization}
-*/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\module QtDataVisualization
\title Qt Data Visualization C++ Classes
\ingroup modules
+ \qtcmakepackage DataVisualization
+ \qtvariable datavisualization
\brief C++ classes for the Qt Data Visualization API.
@@ -58,7 +27,6 @@
/*!
\group datavisualization_examples
- \ingroup all-examples
\title Qt Data Visualization Examples
\brief Examples for the Qt Data Visualization.
@@ -68,10 +36,12 @@
\section1 Examples
\annotatedlist qtdatavisualization_examples
+ The following examples show how to use Qt Quick to visualize data:
+ \annotatedlist qtdatavisualization_qmlexamples
*/
/*!
- \page qtdatavisualization_data_handling.html
+ \page qtdatavisualization-data-handling.html
\title Qt Data Visualization Data Handling
\section1 Series
@@ -142,9 +112,9 @@
QHeightMapSurfaceDataProxy is a specialized proxy for generating a surface graph from a
heightmap image. See the QHeightMapSurfaceDataProxy documentation for more information.
- The \l{Custom Proxy Example}{Custom Proxy} example shows how a custom proxy can be created. It
- defines a custom data set based on variant lists and an extension of the basic proxy to resolve
- that data with an associated mapper.
+ The \l{Graph Gallery} example shows how a custom proxy can be created, under the
+ \uicontrol {Bar Graph} tab. It defines a custom data set based on variant lists and an
+ extension of the basic proxy to resolve that data with an associated mapper.
\section1 Dealing with Real-time Data
@@ -174,7 +144,7 @@
*/
/*!
- \page qtdatavisualization_interacting_with_data.html
+ \page qtdatavisualization-interacting-with-data.html
\title Qt Data Visualization Interacting with Data
\section1 Interacting with Data
@@ -192,9 +162,8 @@
the default touch controls, see QTouch3DInputHandler. The default handlers
must be disabled when using customized input handlers.
- The \l{Custom Input Example} illustrates how to use a custom input handler
- to select items upon mouseover instead of mouse click. The information
- below the mouse cursor is displayed as a popup.
+ The \l{Graph Gallery} example, under \uicontrol {Scatter Graph} tab, illustrates how to use
+ a custom input handler to drag an axis label to move the visible part of the data.
In addition to perspective projection, orthographic projection can be used
to create 2D graphs by replacing the default input handler with one that
@@ -221,12 +190,17 @@
*/
/*!
- \page qtdatavisualization_known_issues.html
+ \page qtdatavisualization-known-issues.html
\title Qt Data Visualization Known Issues
\list
+ \li As OpenGL is not necessarily the default rendering backend anymore in Qt 6.x (it is
+ Metal on macOS and Direct3D on Windows, for example), it is necessary to define
+ the rendering backend explicitly either on your environment variables, or in your
+ application main. It can be defined by adding \c {qputenv("QSG_RHI_BACKEND", "opengl");}
+ in the beginning of your main function.
\li Some platforms like Android and WinRT cannot handle multiple native windows properly,
- so only the Qt Quick 2 graphs are available in practice for those platforms.
+ so only the Qt Quick graphs are available in practice for those platforms.
\li Surfaces with non-straight rows and columns do not always render properly.
\li Q3DLight class (and Light3D QML item) are currently not usable for anything.
\li Changing most of Q3DScene properties affecting subviewports currently has no effect.
@@ -240,7 +214,7 @@
*/
/*!
- * \fn QSurfaceFormat QtDataVisualization::qDefaultSurfaceFormat(bool antialias)
+ * \fn QSurfaceFormat qDefaultSurfaceFormat(bool antialias)
* \relates QAbstract3DGraph
*
* This convenience function can be used to create a custom surface format suitable for use by
@@ -258,7 +232,7 @@
*
* // ...
*
- * Q3DBars *graph = new Q3DBars(QtDataVisualization::qDefaultSurfaceFormat(false));
+ * Q3DBars *graph = new Q3DBars(qDefaultSurfaceFormat(false));
* \endcode
*
* For example, enable antialiasing for direct rendering modes on QML application:
@@ -269,7 +243,7 @@
* // ...
*
* QQuickView viewer;
- * viewer.setFormat(QtDataVisualization::qDefaultSurfaceFormat());
+ * viewer.setFormat(qDefaultSurfaceFormat(true));
* \endcode
*
* \note Antialiasing is not supported in OpenGL ES2 environments.
diff --git a/src/datavisualization/engine/abstract3dcontroller.cpp b/src/datavisualization/engine/abstract3dcontroller.cpp
index 40cbe88d..f7d7f206 100644
--- a/src/datavisualization/engine/abstract3dcontroller.cpp
+++ b/src/datavisualization/engine/abstract3dcontroller.cpp
@@ -1,32 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
+
+#include "abstractdeclarativeinterface_p.h"
#include "abstract3dcontroller_p.h"
#include "qabstract3daxis_p.h"
#include "qvalue3daxis_p.h"
@@ -41,7 +18,7 @@
#include <QtOpenGL/QOpenGLFramebufferObject>
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
Abstract3DController::Abstract3DController(QRect initialViewport, Q3DScene *scene,
QObject *parent) :
@@ -178,6 +155,11 @@ void Abstract3DController::removeSeries(QAbstract3DSeries *series)
}
}
+bool Abstract3DController::hasSeries(QAbstract3DSeries *series)
+{
+ return m_seriesList.contains(series);
+}
+
QList<QAbstract3DSeries *> Abstract3DController::seriesList()
{
return m_seriesList;
@@ -692,12 +674,16 @@ void Abstract3DController::handleThemeTypeChanged(Q3DTheme::Theme theme)
{
Q_UNUSED(theme);
+ if (!m_qml)
+ return;
+
// Changing theme type is logically equivalent of changing the entire theme
// object, so reset all attached series to the new theme.
-
+ bool force = m_qml->isReady();
Q3DTheme *activeTheme = m_themeManager->activeTheme();
for (int i = 0; i < m_seriesList.size(); i++)
- m_seriesList.at(i)->d_ptr->resetToTheme(*activeTheme, i, true);
+ m_seriesList.at(i)->d_ptr->resetToTheme(*activeTheme, i, force);
+
markSeriesVisualsDirty();
}
@@ -1012,7 +998,7 @@ int Abstract3DController::addCustomItem(QCustom3DItem *item)
item->d_ptr->resetDirtyBits();
m_isCustomDataDirty = true;
emitNeedRender();
- return m_customItems.count() - 1;
+ return m_customItems.size() - 1;
}
void Abstract3DController::deleteCustomItems()
@@ -1539,7 +1525,7 @@ int Abstract3DController::selectedLabelIndex() const
{
int index = m_selectedLabelIndex;
QAbstract3DAxis *axis = selectedAxis();
- if (axis && axis->labels().count() <= index)
+ if (axis && axis->labels().size() <= index)
index = -1;
return index;
}
@@ -1569,7 +1555,7 @@ QAbstract3DAxis *Abstract3DController::selectedAxis() const
int Abstract3DController::selectedCustomItemIndex() const
{
int index = m_selectedCustomItemIndex;
- if (m_customItems.count() <= index)
+ if (m_customItems.size() <= index)
index = -1;
return index;
}
@@ -1608,7 +1594,7 @@ bool Abstract3DController::isOrthoProjection() const
void Abstract3DController::setAspectRatio(qreal ratio)
{
- if (m_aspectRatio != ratio) {
+ if (m_aspectRatio != ratio && ratio > 0) {
m_aspectRatio = ratio;
m_changeTracker.aspectRatioChanged = true;
emit aspectRatioChanged(m_aspectRatio);
@@ -1624,7 +1610,7 @@ qreal Abstract3DController::aspectRatio()
void Abstract3DController::setHorizontalAspectRatio(qreal ratio)
{
- if (m_horizontalAspectRatio != ratio) {
+ if (m_horizontalAspectRatio != ratio && ratio > 0) {
m_horizontalAspectRatio = ratio;
m_changeTracker.horizontalAspectRatioChanged = true;
emit horizontalAspectRatioChanged(m_horizontalAspectRatio);
@@ -1655,7 +1641,7 @@ bool Abstract3DController::reflection() const
void Abstract3DController::setReflectivity(qreal reflectivity)
{
- if (m_reflectivity != reflectivity) {
+ if (m_reflectivity != reflectivity && reflectivity > 0) {
m_reflectivity = reflectivity;
m_changeTracker.reflectivityChanged = true;
emit reflectivityChanged(m_reflectivity);
@@ -1744,4 +1730,4 @@ qreal Abstract3DController::margin() const
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/abstract3dcontroller_p.h b/src/datavisualization/engine/abstract3dcontroller_p.h
index 48a71dd9..5081d37f 100644
--- a/src/datavisualization/engine/abstract3dcontroller_p.h
+++ b/src/datavisualization/engine/abstract3dcontroller_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,7 +14,8 @@
#ifndef ABSTRACT3DCONTROLLER_P_H
#define ABSTRACT3DCONTROLLER_P_H
-#include "datavisualizationglobal_p.h"
+#include <private/datavisualizationglobal_p.h>
+
#include "qabstract3daxis.h"
#include "drawer_p.h"
#include "qabstract3dinputhandler.h"
@@ -54,8 +29,10 @@
QT_FORWARD_DECLARE_CLASS(QOpenGLFramebufferObject)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
+class AbstractDeclarativeInterface;
+class AbstractDeclarative;
class Abstract3DRenderer;
class QAbstract3DSeries;
class ThemeManager;
@@ -163,7 +140,7 @@ struct Abstract3DChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Abstract3DController : public QObject
+class Q_DATAVISUALIZATION_EXPORT Abstract3DController : public QObject
{
Q_OBJECT
@@ -225,6 +202,7 @@ protected:
qreal m_margin;
QMutex m_renderMutex;
+ AbstractDeclarativeInterface *m_qml = nullptr;
explicit Abstract3DController(QRect initialViewport, Q3DScene *scene, QObject *parent = 0);
@@ -240,6 +218,7 @@ public:
virtual void addSeries(QAbstract3DSeries *series);
virtual void insertSeries(int index, QAbstract3DSeries *series);
virtual void removeSeries(QAbstract3DSeries *series);
+ virtual bool hasSeries(QAbstract3DSeries *series);
QList<QAbstract3DSeries *> seriesList();
virtual void setAxisX(QAbstract3DAxis *axis);
@@ -435,6 +414,6 @@ private:
friend class QAbstract3DGraphPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/abstract3drenderer.cpp b/src/datavisualization/engine/abstract3drenderer.cpp
index ef77dc92..a39a6079 100644
--- a/src/datavisualization/engine/abstract3drenderer.cpp
+++ b/src/datavisualization/engine/abstract3drenderer.cpp
@@ -1,31 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "abstract3drenderer_p.h"
#include "texturehelper_p.h"
@@ -42,7 +18,7 @@
#include <QtGui/QOffscreenSurface>
#include <QtCore/QThread>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
// Defined in shaderhelper.cpp
extern void discardDebugMsgs(QtMsgType type, const QMessageLogContext &context, const QString &msg);
@@ -118,7 +94,7 @@ Abstract3DRenderer::Abstract3DRenderer(Abstract3DController *controller)
m_oldCameraTarget(QVector3D(2000.0f, 2000.0f, 2000.0f)), // Just random invalid target
m_reflectionEnabled(false),
m_reflectivity(0.5),
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
m_funcs_2_1(0),
#endif
m_context(0),
@@ -127,12 +103,12 @@ Abstract3DRenderer::Abstract3DRenderer(Abstract3DController *controller)
{
initializeOpenGLFunctions();
m_isOpenGLES = Utils::isOpenGLES();
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!m_isOpenGLES) {
// Discard warnings about deprecated functions
QtMessageHandler handler = qInstallMessageHandler(discardDebugMsgs);
- m_funcs_2_1 = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_2_1>();
+ m_funcs_2_1 = new QOpenGLFunctions_2_1;
if (m_funcs_2_1)
m_funcs_2_1->initializeOpenGLFunctions();
@@ -192,6 +168,10 @@ Abstract3DRenderer::~Abstract3DRenderer()
m_axisCacheX.clearLabels();
m_axisCacheY.clearLabels();
m_axisCacheZ.clearLabels();
+
+#if !QT_CONFIG(opengles2)
+ delete m_funcs_2_1;
+#endif
}
void Abstract3DRenderer::contextCleanup()
@@ -210,7 +190,7 @@ void Abstract3DRenderer::initializeOpenGL()
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!m_isOpenGLES) {
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
@@ -745,8 +725,10 @@ void Abstract3DRenderer::updateCustomData(const QList<QCustom3DItem *> &customIt
CustomRenderItem *renderItem = m_customRenderCache.value(item);
if (!renderItem)
renderItem = addCustomItem(item);
- renderItem->setValid(true);
- renderItem->setIndex(i); // always update index, as it must match the custom item index
+ if (renderItem) {
+ renderItem->setValid(true);
+ renderItem->setIndex(i); // always update index, as it must match the custom item index
+ }
}
// Check render item cache and remove items that are not in customItems list anymore
@@ -937,12 +919,27 @@ void Abstract3DRenderer::drawAxisTitleX(const QVector3D &labelRotation,
xRotation = -90.0f - labelRotation.z();
extraRotation = -extraRotation;
}
+ if (m_yFlipped) {
+ alignment = Qt::AlignBottom;
+ extraRotation = -extraRotation;
+ if (m_xFlipped)
+ xRotation = 90.0f + labelRotation.z();
+ else
+ xRotation = 90.0f - labelRotation.z();
+ }
} else {
if (m_xFlipped) {
offsetRotation = -offsetRotation;
xRotation = -90.0f - labelRotation.z();
extraRotation = -extraRotation;
}
+ if (m_yFlipped) {
+ xRotation = 90.0f + labelRotation.z();
+ alignment = Qt::AlignBottom;
+ extraRotation = -extraRotation;
+ if (m_xFlipped)
+ xRotation = 90.0f - labelRotation.z();
+ }
}
}
@@ -1034,6 +1031,11 @@ void Abstract3DRenderer::drawAxisTitleZ(const QVector3D &labelRotation,
yRotation = -yRotation;
}
}
+ if (m_yFlipped) {
+ xRotation = -xRotation;
+ alignment = Qt::AlignBottom;
+ extraRotation = -extraRotation;
+ }
}
float offsetRotation = zRotation;
@@ -1129,7 +1131,10 @@ CustomRenderItem *Abstract3DRenderer::addCustomItem(QCustom3DItem *item)
CustomRenderItem *newItem = new CustomRenderItem();
newItem->setRenderer(this);
newItem->setItemPointer(item); // Store pointer for render item updates
- newItem->setMesh(item->meshFile());
+ if (!newItem->setMesh(item->meshFile())) {
+ delete newItem;
+ return nullptr;
+ }
newItem->setOrigPosition(item->position());
newItem->setOrigScaling(item->scaling());
newItem->setScalingAbsolute(item->isScalingAbsolute());
@@ -1442,7 +1447,7 @@ void Abstract3DRenderer::drawCustomItems(RenderingState state,
bool volumeDetected = false;
int loopCount = 0;
while (loopCount < 2) {
- for (QCustom3DItem *customItem : qAsConst(m_customItemDrawOrder)) {
+ for (QCustom3DItem *customItem : std::as_const(m_customItemDrawOrder)) {
CustomRenderItem *item = m_customRenderCache.value(customItem);
// Check that the render item is visible, and skip drawing if not
// Also check if reflected item is on the "wrong" side, and skip drawing if it is
@@ -1633,7 +1638,7 @@ void Abstract3DRenderer::drawCustomItems(RenderingState state,
m_drawer->drawObject(shader, item->mesh(), item->texture());
}
}
- } else if (RenderingSelection == state) {
+ } else if (RenderingSelection == state && !volumeDetected) {
// Selection render
shader->setUniformValue(shader->MVP(), MVPMatrix);
QVector4D itemColor = indexToSelectionColor(item->index());
@@ -1991,4 +1996,4 @@ void Abstract3DRenderer::updateCameraViewport()
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/abstract3drenderer_p.h b/src/datavisualization/engine/abstract3drenderer_p.h
index affd0d69..560e6d2e 100644
--- a/src/datavisualization/engine/abstract3drenderer_p.h
+++ b/src/datavisualization/engine/abstract3drenderer_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -41,8 +15,8 @@
#define ABSTRACT3DRENDERER_P_H
#include <QtGui/QOpenGLFunctions>
-#if !defined(QT_OPENGL_ES_2)
-# include <QtGui/QOpenGLFunctions_2_1>
+#if !QT_CONFIG(opengles2)
+# include <QtOpenGL/QOpenGLFunctions_2_1>
#endif
#include "datavisualizationglobal_p.h"
#include "abstract3dcontroller_p.h"
@@ -50,9 +24,11 @@
#include "seriesrendercache_p.h"
#include "customrenderitem_p.h"
+#include <QtCore/qpointer.h>
+
QT_FORWARD_DECLARE_CLASS(QOffscreenSurface)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class TextureHelper;
class Theme;
@@ -333,8 +309,8 @@ protected:
qreal m_reflectivity;
QLocale m_locale;
-#if !defined(QT_OPENGL_ES_2)
- QOpenGLFunctions_2_1 *m_funcs_2_1; // Not owned
+#if !QT_CONFIG(opengles2)
+ QOpenGLFunctions_2_1 *m_funcs_2_1;
#endif
QPointer<QOpenGLContext> m_context; // Not owned
bool m_isOpenGLES;
@@ -343,6 +319,6 @@ private:
friend class Abstract3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/abstractdeclarativeinterface.cpp b/src/datavisualization/engine/abstractdeclarativeinterface.cpp
new file mode 100644
index 00000000..8a8b80fd
--- /dev/null
+++ b/src/datavisualization/engine/abstractdeclarativeinterface.cpp
@@ -0,0 +1,11 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <QtDataVisualization/private/abstractdeclarativeinterface_p.h>
+
+QT_BEGIN_NAMESPACE
+
+AbstractDeclarativeInterface::~AbstractDeclarativeInterface()
+ = default;
+
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/abstractdeclarativeinterface_p.h b/src/datavisualization/engine/abstractdeclarativeinterface_p.h
new file mode 100644
index 00000000..8ea01bb1
--- /dev/null
+++ b/src/datavisualization/engine/abstractdeclarativeinterface_p.h
@@ -0,0 +1,31 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef ABSTRACTDECLARATIVEINTERFACE_P_H
+#define ABSTRACTDECLARATIVEINTERFACE_P_H
+
+#include <QtDataVisualization/qdatavisualizationglobal.h>
+
+//
+// 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.
+
+QT_BEGIN_NAMESPACE
+
+class Q_DATAVISUALIZATION_EXPORT AbstractDeclarativeInterface
+{
+protected:
+ ~AbstractDeclarativeInterface();
+public:
+ virtual bool isReady() const = 0;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/datavisualization/engine/axisrendercache.cpp b/src/datavisualization/engine/axisrendercache.cpp
index cdf6c7ac..1218eec2 100644
--- a/src/datavisualization/engine/axisrendercache.cpp
+++ b/src/datavisualization/engine/axisrendercache.cpp
@@ -1,37 +1,13 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "axisrendercache_p.h"
#include <QtGui/QFontMetrics>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
AxisRenderCache::AxisRenderCache()
: m_type(QAbstract3DAxis::AxisTypeNone),
@@ -208,4 +184,4 @@ int AxisRenderCache::maxLabelWidth(const QStringList &labels) const
return labelWidth;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/axisrendercache_p.h b/src/datavisualization/engine/axisrendercache_p.h
index bf2e3f70..a8913f1d 100644
--- a/src/datavisualization/engine/axisrendercache_p.h
+++ b/src/datavisualization/engine/axisrendercache_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "drawer_p.h"
#include <QtCore/QPointer>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class AxisRenderCache : public QObject
{
@@ -154,6 +128,6 @@ private:
Q_DISABLE_COPY(AxisRenderCache)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/bars3dcontroller.cpp b/src/datavisualization/engine/bars3dcontroller.cpp
index a6bfd080..a307f2f4 100644
--- a/src/datavisualization/engine/bars3dcontroller.cpp
+++ b/src/datavisualization/engine/bars3dcontroller.cpp
@@ -1,31 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "bars3dcontroller_p.h"
#include "bars3drenderer_p.h"
@@ -37,7 +13,7 @@
#include "q3dtheme_p.h"
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
Bars3DController::Bars3DController(QRect boundRect, Q3DScene *scene)
: Abstract3DController(boundRect, scene),
@@ -49,6 +25,7 @@ Bars3DController::Bars3DController(QRect boundRect, Q3DScene *scene)
m_barThicknessRatio(1.0f),
m_barSpacing(QSizeF(1.0, 1.0)),
m_floorLevel(0.0f),
+ m_barSeriesMargin(0.0f, 0.0f),
m_renderer(0)
{
// Setting a null axis creates a new default axis according to orientation and graph type.
@@ -108,6 +85,11 @@ void Bars3DController::synchDataToRenderer()
m_changeTracker.floorLevelChanged = false;
}
+ if (m_changeTracker.barSeriesMarginChanged) {
+ m_renderer->updateBarSeriesMargin(m_barSeriesMargin);
+ m_changeTracker.barSeriesMarginChanged = false;
+ }
+
Abstract3DController::synchDataToRenderer();
// Notify changes to renderer
@@ -322,6 +304,11 @@ void Bars3DController::handleDataColumnLabelsChanged()
}
}
+void Bars3DController::handleRowColorsChanged()
+{
+ emitNeedRender();
+}
+
void Bars3DController::handleAxisAutoAdjustRangeChangedInOrientation(
QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust)
{
@@ -510,6 +497,18 @@ QSizeF Bars3DController::barSpacing()
return m_barSpacing;
}
+void Bars3DController::setBarSeriesMargin(const QSizeF &margin)
+{
+ m_barSeriesMargin = margin;
+ m_changeTracker.barSeriesMarginChanged = true;
+ emitNeedRender();
+}
+
+QSizeF Bars3DController::barSeriesMargin()
+{
+ return m_barSeriesMargin;
+}
+
bool Bars3DController::isBarSpecRelative()
{
return m_isBarSpecRelative;
@@ -730,4 +729,4 @@ QAbstract3DAxis *Bars3DController::createDefaultAxis(QAbstract3DAxis::AxisOrient
return defaultAxis;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/bars3dcontroller_p.h b/src/datavisualization/engine/bars3dcontroller_p.h
index 74847ccd..a92db468 100644
--- a/src/datavisualization/engine/bars3dcontroller_p.h
+++ b/src/datavisualization/engine/bars3dcontroller_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,10 +14,10 @@
#ifndef Q3DBARSCONTROLLER_p_H
#define Q3DBARSCONTROLLER_p_H
-#include "datavisualizationglobal_p.h"
-#include "abstract3dcontroller_p.h"
+#include <private/datavisualizationglobal_p.h>
+#include <private/abstract3dcontroller_p.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Bars3DRenderer;
class QBar3DSeries;
@@ -55,6 +29,7 @@ struct Bars3DChangeBitField {
bool rowsChanged : 1;
bool itemChanged : 1;
bool floorLevelChanged : 1;
+ bool barSeriesMarginChanged : 1;
Bars3DChangeBitField() :
multiSeriesScalingChanged(true),
@@ -62,12 +37,13 @@ struct Bars3DChangeBitField {
selectedBarChanged(true),
rowsChanged(false),
itemChanged(false),
- floorLevelChanged(false)
+ floorLevelChanged(false),
+ barSeriesMarginChanged(false)
{
}
};
-class QT_DATAVISUALIZATION_EXPORT Bars3DController : public Abstract3DController
+class Q_DATAVISUALIZATION_EXPORT Bars3DController : public Abstract3DController
{
Q_OBJECT
@@ -98,6 +74,7 @@ private:
GLfloat m_barThicknessRatio;
QSizeF m_barSpacing;
float m_floorLevel;
+ QSizeF m_barSeriesMargin;
// Rendering
Bars3DRenderer *m_renderer;
@@ -106,8 +83,8 @@ public:
explicit Bars3DController(QRect rect, Q3DScene *scene = 0);
~Bars3DController();
- virtual void initializeOpenGL();
- virtual void synchDataToRenderer();
+ void initializeOpenGL() override;
+ void synchDataToRenderer() override;
void setMultiSeriesScaling(bool uniform);
bool multiSeriesScaling() const;
@@ -118,6 +95,9 @@ public:
void setBarSpecs(GLfloat thicknessRatio = 1.0f,
const QSizeF &spacing = QSizeF(1.0, 1.0),
bool relative = true);
+ void setBarSeriesMargin(const QSizeF &margin);
+ QSizeF barSeriesMargin();
+
GLfloat barThickness();
QSizeF barSpacing();
bool isBarSpecRelative();
@@ -126,29 +106,29 @@ public:
inline QBar3DSeries *selectedSeries() const { return m_selectedBarSeries; }
- void setSelectionMode(QAbstract3DGraph::SelectionFlags mode);
+ void setSelectionMode(QAbstract3DGraph::SelectionFlags mode) override;
void setSelectedBar(const QPoint &position, QBar3DSeries *series, bool enterSlice);
- virtual void clearSelection();
+ void clearSelection() override;
- virtual void handleAxisAutoAdjustRangeChangedInOrientation(
- QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust);
- virtual void handleSeriesVisibilityChangedBySender(QObject *sender);
- virtual void handlePendingClick();
+ void handleAxisAutoAdjustRangeChangedInOrientation(
+ QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust) override;
+ void handleSeriesVisibilityChangedBySender(QObject *sender) override;
+ void handlePendingClick() override;
static QPoint invalidSelectionPosition();
- virtual void setAxisX(QAbstract3DAxis *axis);
- virtual void setAxisZ(QAbstract3DAxis *axis);
+ void setAxisX(QAbstract3DAxis *axis) override;
+ void setAxisZ(QAbstract3DAxis *axis) override;
virtual void setPrimarySeries(QBar3DSeries *series);
virtual QBar3DSeries *primarySeries() const;
- virtual void addSeries(QAbstract3DSeries *series);
- virtual void removeSeries(QAbstract3DSeries *series);
- virtual void insertSeries(int index, QAbstract3DSeries *series);
+ void addSeries(QAbstract3DSeries *series) override;
+ void removeSeries(QAbstract3DSeries *series) override;
+ void insertSeries(int index, QAbstract3DSeries *series) override;
virtual QList<QBar3DSeries *> barSeriesList();
- virtual void handleAxisRangeChangedBySender(QObject *sender);
- virtual void adjustAxisRanges();
+ void handleAxisRangeChangedBySender(QObject *sender) override;
+ void adjustAxisRanges() override;
public Q_SLOTS:
void handleArrayReset();
@@ -159,13 +139,14 @@ public Q_SLOTS:
void handleItemChanged(int rowIndex, int columnIndex);
void handleDataRowLabelsChanged();
void handleDataColumnLabelsChanged();
+ void handleRowColorsChanged();
Q_SIGNALS:
void primarySeriesChanged(QBar3DSeries *series);
void selectedSeriesChanged(QBar3DSeries *series);
protected:
- virtual QAbstract3DAxis *createDefaultAxis(QAbstract3DAxis::AxisOrientation orientation);
+ QAbstract3DAxis *createDefaultAxis(QAbstract3DAxis::AxisOrientation orientation) override;
private:
void adjustSelectionPosition(QPoint &pos, const QBar3DSeries *series);
@@ -173,6 +154,6 @@ private:
Q_DISABLE_COPY(Bars3DController)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/bars3drenderer.cpp b/src/datavisualization/engine/bars3drenderer.cpp
index bfc0f5c8..8d2d9cce 100644
--- a/src/datavisualization/engine/bars3drenderer.cpp
+++ b/src/datavisualization/engine/bars3drenderer.cpp
@@ -1,31 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "bars3drenderer_p.h"
#include "q3dcamera_p.h"
@@ -40,7 +16,7 @@
// You should see the scene from where the light is
//#define SHOW_DEPTH_TEXTURE_SCENE
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
const bool sliceGridLabels = true;
@@ -49,6 +25,7 @@ Bars3DRenderer::Bars3DRenderer(Bars3DController *controller)
m_cachedIsSlicingActivated(false),
m_cachedRowCount(0),
m_cachedColumnCount(0),
+ m_cachedBarSeriesMargin(0.0f, 0.0f),
m_selectedBar(0),
m_sliceCache(0),
m_sliceTitleItem(0),
@@ -198,7 +175,8 @@ void Bars3DRenderer::updateData()
m_seriesScaleX = 1.0f / float(m_visibleSeriesCount);
m_seriesStep = 1.0f / float(m_visibleSeriesCount);
- m_seriesStart = -((float(m_visibleSeriesCount) - 1.0f) / 2.0f) * m_seriesStep;
+ m_seriesStart = -((float(m_visibleSeriesCount) - 1.0f) / 2.0f)
+ * (m_seriesStep - (m_seriesStep * m_cachedBarSeriesMargin.width()));
if (m_keepSeriesUniform)
m_seriesScaleZ = m_seriesScaleX;
@@ -1077,7 +1055,9 @@ void Bars3DRenderer::drawScene(GLuint defaultFboHandle)
foreach (SeriesRenderCache *baseCache, m_renderCacheList) {
if (baseCache->isVisible()) {
BarSeriesRenderCache *cache = static_cast<BarSeriesRenderCache *>(baseCache);
- float seriesPos = m_seriesStart + m_seriesStep * cache->visualIndex() + 0.5f;
+ float seriesPos = m_seriesStart + m_seriesStep
+ * (cache->visualIndex() - (cache->visualIndex()
+ * m_cachedBarSeriesMargin.width())) + 0.5f;
ObjectHelper *barObj = cache->object();
QQuaternion seriesRotation(cache->meshRotation());
const BarRenderItemArray &renderArray = cache->renderArray();
@@ -1199,7 +1179,9 @@ void Bars3DRenderer::drawScene(GLuint defaultFboHandle)
foreach (SeriesRenderCache *baseCache, m_renderCacheList) {
if (baseCache->isVisible()) {
BarSeriesRenderCache *cache = static_cast<BarSeriesRenderCache *>(baseCache);
- float seriesPos = m_seriesStart + m_seriesStep * cache->visualIndex() + 0.5f;
+ float seriesPos = m_seriesStart + m_seriesStep
+ * (cache->visualIndex() - (cache->visualIndex()
+ * m_cachedBarSeriesMargin.width())) + 0.5f;
ObjectHelper *barObj = cache->object();
QQuaternion seriesRotation(cache->meshRotation());
const BarRenderItemArray &renderArray = cache->renderArray();
@@ -1459,7 +1441,9 @@ bool Bars3DRenderer::drawBars(BarRenderItem **selectedBar,
foreach (SeriesRenderCache *baseCache, m_renderCacheList) {
if (baseCache->isVisible()) {
BarSeriesRenderCache *cache = static_cast<BarSeriesRenderCache *>(baseCache);
- float seriesPos = m_seriesStart + m_seriesStep * cache->visualIndex() + 0.5f;
+ float seriesPos = m_seriesStart + m_seriesStep
+ * (cache->visualIndex() - (cache->visualIndex()
+ * m_cachedBarSeriesMargin.width())) + 0.5f;
ObjectHelper *barObj = cache->object();
QQuaternion seriesRotation(cache->meshRotation());
Q3DTheme::ColorStyle colorStyle = cache->colorStyle();
@@ -1620,10 +1604,17 @@ bool Bars3DRenderer::drawBars(BarRenderItem **selectedBar,
}
case Bars3DController::SelectionNone: {
// Current bar is not selected, nor on a row or column
- if (colorStyleIsUniform)
- barColor = baseColor;
- else
+ if (colorStyleIsUniform) {
+ QList<QColor> rowColors = cache->series()->rowColors();
+ if (rowColors.size() == 0) {
+ barColor = baseColor;
+ } else {
+ int rowColorIndex = row % rowColors.size();
+ barColor = Utils::vectorFromColor(rowColors[rowColorIndex]);
+ }
+ } else {
gradientTexture = cache->baseGradientTexture();
+ }
break;
}
}
@@ -2051,10 +2042,14 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer
glEnable(GL_POLYGON_OFFSET_FILL);
+ // If camera x rotation is 180, side labels face wrong direction
+ float activeCameraXRotation = (activeCamera->xRotation() >= 180.0f) ? -180.0f
+ : activeCamera->xRotation();
+
float labelAutoAngle = m_axisCacheY.labelAutoRotation();
float labelAngleFraction = labelAutoAngle / 90.0f;
float fractionCamY = activeCamera->yRotation() * labelAngleFraction;
- float fractionCamX = activeCamera->xRotation() * labelAngleFraction;
+ float fractionCamX = activeCameraXRotation * labelAngleFraction;
float labelsMaxWidth = 0.0f;
int startIndex;
@@ -2168,7 +2163,7 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer
labelAutoAngle = m_axisCacheZ.labelAutoRotation();
labelAngleFraction = labelAutoAngle / 90.0f;
fractionCamY = activeCamera->yRotation() * labelAngleFraction;
- fractionCamX = activeCamera->xRotation() * labelAngleFraction;
+ fractionCamX = activeCameraXRotation * labelAngleFraction;
GLfloat labelYAdjustment = 0.005f;
GLfloat colPosValue = m_scaleXWithBackground + labelMargin;
GLfloat rowPosValue = m_scaleZWithBackground + labelMargin;
@@ -2293,7 +2288,7 @@ void Bars3DRenderer::drawLabels(bool drawSelection, const Q3DCamera *activeCamer
labelAutoAngle = m_axisCacheX.labelAutoRotation();
labelAngleFraction = labelAutoAngle / 90.0f;
fractionCamY = activeCamera->yRotation() * labelAngleFraction;
- fractionCamX = activeCamera->xRotation() * labelAngleFraction;
+ fractionCamX = activeCameraXRotation * labelAngleFraction;
alignment = (m_xFlipped != m_zFlipped) ? Qt::AlignLeft : Qt::AlignRight;
if (labelAutoAngle == 0.0f) {
labelRotation = QVector3D(-90.0f, 90.0f, 0.0f);
@@ -2460,6 +2455,13 @@ void Bars3DRenderer::updateBarSpecs(GLfloat thicknessRatio, const QSizeF &spacin
calculateSceneScalingFactors();
}
+void Bars3DRenderer::updateBarSeriesMargin(const QSizeF &margin)
+{
+ m_cachedBarSeriesMargin = margin;
+ calculateSeriesStartPosition();
+ calculateSceneScalingFactors();
+}
+
void Bars3DRenderer::updateAxisRange(QAbstract3DAxis::AxisOrientation orientation, float min,
float max)
{
@@ -2592,6 +2594,10 @@ void Bars3DRenderer::calculateSceneScalingFactors()
m_scaleX = m_cachedBarThickness.width() / m_scaleFactor;
m_scaleZ = m_cachedBarThickness.height() / m_scaleFactor;
+ // Adjust scaling according to margin
+ m_scaleX -= m_scaleX * m_cachedBarSeriesMargin.width();
+ m_scaleZ -= m_scaleZ * m_cachedBarSeriesMargin.height();
+
// Whole graph scale factors
m_xScaleFactor = m_rowWidth / m_scaleFactor;
m_zScaleFactor = m_columnDepth / m_scaleFactor;
@@ -2655,6 +2661,12 @@ void Bars3DRenderer::calculateHeightAdjustment()
}
}
+void Bars3DRenderer::calculateSeriesStartPosition()
+{
+ m_seriesStart = -((float(m_visibleSeriesCount) - 1.0f) / 2.0f)
+ * (m_seriesStep - (m_seriesStep * m_cachedBarSeriesMargin.width()));
+}
+
Bars3DController::SelectionType Bars3DRenderer::isSelected(int row, int bar,
const BarSeriesRenderCache *cache)
{
@@ -2873,4 +2885,4 @@ void Bars3DRenderer::updateMargin(float margin)
calculateSceneScalingFactors();
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/bars3drenderer_p.h b/src/datavisualization/engine/bars3drenderer_p.h
index 3ca38e39..d6c3c471 100644
--- a/src/datavisualization/engine/bars3drenderer_p.h
+++ b/src/datavisualization/engine/bars3drenderer_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -50,14 +24,14 @@ class QPoint;
class QSizeF;
QT_END_NAMESPACE
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ShaderHelper;
class LabelItem;
class Q3DScene;
class BarSeriesRenderCache;
-class QT_DATAVISUALIZATION_EXPORT Bars3DRenderer : public Abstract3DRenderer
+class Q_DATAVISUALIZATION_EXPORT Bars3DRenderer : public Abstract3DRenderer
{
Q_OBJECT
@@ -68,6 +42,7 @@ private:
bool m_cachedIsSlicingActivated;
int m_cachedRowCount;
int m_cachedColumnCount;
+ QSizeF m_cachedBarSeriesMargin;
// Internal state
BarRenderItem *m_selectedBar; // points to renderitem array
@@ -119,48 +94,49 @@ public:
explicit Bars3DRenderer(Bars3DController *controller);
~Bars3DRenderer();
- void updateData();
- void updateSeries(const QList<QAbstract3DSeries *> &seriesList);
- SeriesRenderCache *createNewCache(QAbstract3DSeries *series);
+ void updateData() override;
+ void updateSeries(const QList<QAbstract3DSeries *> &seriesList) override;
+ SeriesRenderCache *createNewCache(QAbstract3DSeries *series) override;
void updateRows(const QList<Bars3DController::ChangeRow> &rows);
void updateItems(const QList<Bars3DController::ChangeItem> &items);
- void updateScene(Q3DScene *scene);
- void render(GLuint defaultFboHandle = 0);
+ void updateScene(Q3DScene *scene) override;
+ void render(GLuint defaultFboHandle = 0) override;
- QVector3D convertPositionToTranslation(const QVector3D &position, bool isAbsolute);
+ QVector3D convertPositionToTranslation(const QVector3D &position, bool isAbsolute) override;
- void updateAspectRatio(float ratio);
+ void updateAspectRatio(float ratio) override;
void updateFloorLevel(float level);
- void updateMargin(float margin);
+ void updateMargin(float margin) override;
protected:
- void contextCleanup();
- virtual void initializeOpenGL();
- virtual void fixCameraTarget(QVector3D &target);
- virtual void getVisibleItemBounds(QVector3D &minBounds, QVector3D &maxBounds);
+ void contextCleanup() override;
+ void initializeOpenGL() override;
+ void fixCameraTarget(QVector3D &target) override;
+ void getVisibleItemBounds(QVector3D &minBounds, QVector3D &maxBounds) override;
public Q_SLOTS:
void updateMultiSeriesScaling(bool uniform);
void updateBarSpecs(GLfloat thicknessRatio = 1.0f,
const QSizeF &spacing = QSizeF(1.0, 1.0),
bool relative = true);
+ void updateBarSeriesMargin(const QSizeF &margin);
void updateSlicingActive(bool isSlicing);
void updateSelectedBar(const QPoint &position, QBar3DSeries *series);
inline QPoint clickedPosition() const { return m_clickedPosition; }
void resetClickedStatus();
// Overloaded from abstract renderer
- virtual void updateAxisRange(QAbstract3DAxis::AxisOrientation orientation, float min,
- float max);
- virtual void updateAxisReversed(QAbstract3DAxis::AxisOrientation orientation,
- bool enable);
+ void updateAxisRange(QAbstract3DAxis::AxisOrientation orientation, float min,
+ float max) override;
+ void updateAxisReversed(QAbstract3DAxis::AxisOrientation orientation,
+ bool enable) override;
private:
- virtual void initShaders(const QString &vertexShader, const QString &fragmentShader);
- virtual void initGradientShaders(const QString &vertexShader, const QString &fragmentShader);
- virtual void updateShadowQuality(QAbstract3DGraph::ShadowQuality quality);
- virtual void updateTextures();
- virtual void fixMeshFileName(QString &fileName, QAbstract3DSeries::Mesh mesh);
+ void initShaders(const QString &vertexShader, const QString &fragmentShader) override;
+ void initGradientShaders(const QString &vertexShader, const QString &fragmentShader) override;
+ void updateShadowQuality(QAbstract3DGraph::ShadowQuality quality) override;
+ void updateTextures() override;
+ void fixMeshFileName(QString &fileName, QAbstract3DSeries::Mesh mesh) override;
void drawSlicedScene();
void drawScene(GLuint defaultFboHandle);
@@ -180,12 +156,13 @@ private:
void loadBackgroundMesh();
void initSelectionShader();
- void initBackgroundShaders(const QString &vertexShader, const QString &fragmentShader);
- void initSelectionBuffer();
+ void initBackgroundShaders(const QString &vertexShader, const QString &fragmentShader) override;
+ void initSelectionBuffer() override;
void initDepthShader();
- void updateDepthBuffer();
+ void updateDepthBuffer() override;
void calculateSceneScalingFactors();
void calculateHeightAdjustment();
+ void calculateSeriesStartPosition();
Abstract3DController::SelectionType isSelected(int row, int bar,
const BarSeriesRenderCache *cache);
QPoint selectionColorToArrayPosition(const QVector4D &selectionColor);
@@ -197,6 +174,6 @@ private:
Q_DISABLE_COPY(Bars3DRenderer)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/barseriesrendercache.cpp b/src/datavisualization/engine/barseriesrendercache.cpp
index 65bc7a64..da3655a9 100644
--- a/src/datavisualization/engine/barseriesrendercache.cpp
+++ b/src/datavisualization/engine/barseriesrendercache.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "barseriesrendercache_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
BarSeriesRenderCache::BarSeriesRenderCache(QAbstract3DSeries *series,
Abstract3DRenderer *renderer)
@@ -50,4 +24,4 @@ void BarSeriesRenderCache::cleanup(TextureHelper *texHelper)
SeriesRenderCache::cleanup(texHelper);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/barseriesrendercache_p.h b/src/datavisualization/engine/barseriesrendercache_p.h
index 9b2ae1e1..faf963eb 100644
--- a/src/datavisualization/engine/barseriesrendercache_p.h
+++ b/src/datavisualization/engine/barseriesrendercache_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -45,7 +19,7 @@
#include "qbar3dseries_p.h"
#include "barrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class BarSeriesRenderCache : public SeriesRenderCache
{
@@ -53,7 +27,7 @@ public:
BarSeriesRenderCache(QAbstract3DSeries *series, Abstract3DRenderer *renderer);
virtual ~BarSeriesRenderCache();
- void cleanup(TextureHelper *texHelper);
+ void cleanup(TextureHelper *texHelper) override;
inline BarRenderItemArray &renderArray() { return m_renderArray; }
inline QBar3DSeries *series() const { return static_cast<QBar3DSeries *>(m_series); }
@@ -67,6 +41,6 @@ protected:
int m_visualIndex; // order of the series is relevant
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/drawer.cpp b/src/datavisualization/engine/drawer.cpp
index 3b873ba4..63028fb4 100644
--- a/src/datavisualization/engine/drawer.cpp
+++ b/src/datavisualization/engine/drawer.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "drawer_p.h"
#include "shaderhelper_p.h"
@@ -44,12 +18,13 @@ class StaticLibInitializer
public:
StaticLibInitializer()
{
- Q_INIT_RESOURCE(engine);
+ Q_INIT_RESOURCE(datavisualizationshaders);
+ Q_INIT_RESOURCE(datavisualizationmeshes);
}
};
StaticLibInitializer staticLibInitializer;
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
// Vertex array buffer for point
const GLfloat point_data[] = {0.0f, 0.0f, 0.0f};
@@ -105,7 +80,7 @@ QFont Drawer::font() const
void Drawer::drawObject(ShaderHelper *shader, AbstractObjectHelper *object, GLuint textureId,
GLuint depthTextureId, GLuint textureId3D)
{
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
Q_UNUSED(textureId3D);
#endif
if (textureId) {
@@ -121,7 +96,7 @@ void Drawer::drawObject(ShaderHelper *shader, AbstractObjectHelper *object, GLui
glBindTexture(GL_TEXTURE_2D, depthTextureId);
shader->setUniformValue(shader->shadow(), 1);
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (textureId3D) {
// Activate texture
glActiveTexture(GL_TEXTURE2);
@@ -166,7 +141,7 @@ void Drawer::drawObject(ShaderHelper *shader, AbstractObjectHelper *object, GLui
glDisableVertexAttribArray(shader->posAtt());
// Release textures
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (textureId3D) {
glActiveTexture(GL_TEXTURE2);
glBindTexture(GL_TEXTURE_3D, 0);
@@ -196,6 +171,10 @@ void Drawer::drawSelectionObject(ShaderHelper *shader, AbstractObjectHelper *obj
void Drawer::drawSurfaceGrid(ShaderHelper *shader, SurfaceObject *object)
{
+ // Get grid line color
+ QVector4D lineColor = Utils::vectorFromColor(object->wireframeColor());
+ shader->setUniformValue(shader->color(), lineColor);
+
// 1st attribute buffer : vertices
glEnableVertexAttribArray(shader->posAtt());
glBindBuffer(GL_ARRAY_BUFFER, object->vertexBuf());
@@ -451,4 +430,4 @@ void Drawer::generateLabelItem(LabelItem &item, const QString &text, int widestL
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/drawer_p.h b/src/datavisualization/engine/drawer_p.h
index 64b84eb2..54881d6d 100644
--- a/src/datavisualization/engine/drawer_p.h
+++ b/src/datavisualization/engine/drawer_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,13 +14,14 @@
#ifndef DRAWER_P_H
#define DRAWER_P_H
-#include "datavisualizationglobal_p.h"
-#include "q3dbars.h"
-#include "q3dtheme.h"
-#include "labelitem_p.h"
-#include "abstractrenderitem_p.h"
+#include <private/datavisualizationglobal_p.h>
+#include <private/labelitem_p.h>
+#include <private/abstractrenderitem_p.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+#include <QtDataVisualization/q3dbars.h>
+#include <QtDataVisualization/q3dtheme.h>
+
+QT_BEGIN_NAMESPACE
class ShaderHelper;
class ObjectHelper;
@@ -115,6 +90,6 @@ private:
GLfloat m_scaledFontSize;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/engine.pri b/src/datavisualization/engine/engine.pri
deleted file mode 100644
index 60703e96..00000000
--- a/src/datavisualization/engine/engine.pri
+++ /dev/null
@@ -1,61 +0,0 @@
-HEADERS += $$PWD/qabstract3dgraph_p.h \
- $$PWD/qabstract3dgraph.h \
- $$PWD/q3dbars.h \
- $$PWD/q3dbars_p.h \
- $$PWD/drawer_p.h \
- $$PWD/bars3dcontroller_p.h \
- $$PWD/bars3drenderer_p.h \
- $$PWD/q3dsurface.h \
- $$PWD/q3dsurface_p.h \
- $$PWD/surface3dcontroller_p.h \
- $$PWD/surface3drenderer_p.h \
- $$PWD/abstract3dcontroller_p.h \
- $$PWD/q3dscatter.h \
- $$PWD/q3dscatter_p.h \
- $$PWD/scatter3dcontroller_p.h \
- $$PWD/scatter3drenderer_p.h \
- $$PWD/axisrendercache_p.h \
- $$PWD/seriesrendercache_p.h \
- $$PWD/abstract3drenderer_p.h \
- $$PWD/selectionpointer_p.h \
- $$PWD/q3dcamera.h \
- $$PWD/q3dcamera_p.h \
- $$PWD/q3dscene.h \
- $$PWD/q3dlight.h \
- $$PWD/q3dlight_p.h \
- $$PWD/q3dobject.h \
- $$PWD/q3dobject_p.h \
- $$PWD/q3dscene_p.h \
- $$PWD/surfaceseriesrendercache_p.h \
- $$PWD/barseriesrendercache_p.h \
- $$PWD/scatterseriesrendercache_p.h
-
-SOURCES += $$PWD/qabstract3dgraph.cpp \
- $$PWD/q3dbars.cpp \
- $$PWD/drawer.cpp \
- $$PWD/bars3dcontroller.cpp \
- $$PWD/bars3drenderer.cpp \
- $$PWD/q3dsurface.cpp \
- $$PWD/surface3drenderer.cpp \
- $$PWD/surface3dcontroller.cpp \
- $$PWD/abstract3dcontroller.cpp \
- $$PWD/q3dscatter.cpp \
- $$PWD/scatter3dcontroller.cpp \
- $$PWD/scatter3drenderer.cpp \
- $$PWD/axisrendercache.cpp \
- $$PWD/seriesrendercache.cpp \
- $$PWD/abstract3drenderer.cpp \
- $$PWD/selectionpointer.cpp \
- $$PWD/q3dcamera.cpp \
- $$PWD/q3dlight.cpp \
- $$PWD/q3dobject.cpp \
- $$PWD/q3dscene.cpp \
- $$PWD/surfaceseriesrendercache.cpp \
- $$PWD/barseriesrendercache.cpp \
- $$PWD/scatterseriesrendercache.cpp
-
-RESOURCES += engine/engine.qrc
-
-OTHER_FILES += $$PWD/meshes/* $$PWD/shaders/*
-
-INCLUDEPATH += $$PWD
diff --git a/src/datavisualization/engine/engine.qrc b/src/datavisualization/engine/engine.qrc
deleted file mode 100644
index 0ef169c9..00000000
--- a/src/datavisualization/engine/engine.qrc
+++ /dev/null
@@ -1,74 +0,0 @@
-<RCC>
- <qresource prefix="/defaultMeshes">
- <file alias="cone">meshes/coneFlat.obj</file>
- <file alias="coneSmooth">meshes/coneSmooth.obj</file>
- <file alias="pyramid">meshes/pyramidFlat.obj</file>
- <file alias="pyramidSmooth">meshes/pyramidSmooth.obj</file>
- <file alias="bar">meshes/cubeFlat.obj</file>
- <file alias="barSmooth">meshes/cubeSmooth.obj</file>
- <file alias="cylinder">meshes/cylinderFlat.obj</file>
- <file alias="cylinderSmooth">meshes/cylinderSmooth.obj</file>
- <file alias="background">meshes/background.obj</file>
- <file alias="plane">meshes/plane.obj</file>
- <file alias="sphere">meshes/sphere.obj</file>
- <file alias="sphereSmooth">meshes/sphereSmooth.obj</file>
- <file alias="bevelbar">meshes/barFlat.obj</file>
- <file alias="bevelbarSmooth">meshes/barSmooth.obj</file>
- <file alias="coneFull">meshes/coneFilledFlat.obj</file>
- <file alias="coneSmoothFull">meshes/coneFilledSmooth.obj</file>
- <file alias="cylinderFull">meshes/cylinderFilledFlat.obj</file>
- <file alias="cylinderSmoothFull">meshes/cylinderFilledSmooth.obj</file>
- <file alias="pyramidFull">meshes/pyramidFilledFlat.obj</file>
- <file alias="pyramidSmoothFull">meshes/pyramidFilledSmooth.obj</file>
- <file alias="bevelbarFull">meshes/barFilledFlat.obj</file>
- <file alias="bevelbarSmoothFull">meshes/barFilledSmooth.obj</file>
- <file alias="barFull">meshes/cubeFilledFlat.obj</file>
- <file alias="barSmoothFull">meshes/cubeFilledSmooth.obj</file>
- <file alias="backgroundNoFloor">meshes/backgroundNoFloor.obj</file>
- <file alias="minimal">meshes/minimalFlat.obj</file>
- <file alias="minimalSmooth">meshes/minimalSmooth.obj</file>
- <file alias="arrow">meshes/arrowFlat.obj</file>
- <file alias="arrowSmooth">meshes/arrowSmooth.obj</file>
- </qresource>
- <qresource prefix="/shaders">
- <file alias="fragment">shaders/default.frag</file>
- <file alias="vertex">shaders/default.vert</file>
- <file alias="fragmentColorOnY">shaders/colorOnY.frag</file>
- <file alias="fragmentPlainColor">shaders/plainColor.frag</file>
- <file alias="vertexPlainColor">shaders/plainColor.vert</file>
- <file alias="fragmentLabel">shaders/label.frag</file>
- <file alias="vertexLabel">shaders/label.vert</file>
- <file alias="fragmentDepth">shaders/depth.frag</file>
- <file alias="vertexDepth">shaders/depth.vert</file>
- <file alias="fragmentShadow">shaders/shadow.frag</file>
- <file alias="vertexShadow">shaders/shadow.vert</file>
- <file alias="fragmentShadowNoTex">shaders/shadowNoTex.frag</file>
- <file alias="fragmentShadowNoTexColorOnY">shaders/shadowNoTexColorOnY.frag</file>
- <file alias="fragmentColorOnYES2">shaders/colorOnY_ES2.frag</file>
- <file alias="fragmentES2">shaders/default_ES2.frag</file>
- <file alias="fragmentSurface">shaders/surface.frag</file>
- <file alias="vertexSurfaceFlat">shaders/surfaceFlat.vert</file>
- <file alias="fragmentSurfaceFlat">shaders/surfaceFlat.frag</file>
- <file alias="fragmentSurfaceES2">shaders/surface_ES2.frag</file>
- <file alias="vertexPointES2">shaders/point_ES2.vert</file>
- <file alias="fragmentSurfaceShadowNoTex">shaders/surfaceShadowNoTex.frag</file>
- <file alias="fragmentSurfaceShadowFlat">shaders/surfaceShadowFlat.frag</file>
- <file alias="vertexSurfaceShadowFlat">shaders/surfaceShadowFlat.vert</file>
- <file alias="fragmentTexture">shaders/texture.frag</file>
- <file alias="fragmentTextureES2">shaders/texture_ES2.frag</file>
- <file alias="vertexTexture">shaders/texture.vert</file>
- <file alias="fragmentTexturedSurfaceShadowFlat">shaders/surfaceTexturedShadowFlat.frag</file>
- <file alias="fragmentSurfaceTexturedFlat">shaders/surfaceTexturedFlat.frag</file>
- <file alias="fragmentTexture3D">shaders/texture3d.frag</file>
- <file alias="vertexTexture3D">shaders/texture3d.vert</file>
- <file alias="fragmentTexture3DSlice">shaders/texture3dslice.frag</file>
- <file alias="vertexShadowNoMatrices">shaders/shadowNoMatrices.vert</file>
- <file alias="vertexNoMatrices">shaders/defaultNoMatrices.vert</file>
- <file alias="fragmentTexture3DLowDef">shaders/texture3dlowdef.frag</file>
- <file alias="vertexPointES2_UV">shaders/point_ES2_UV.vert</file>
- <file alias="fragment3DSliceFrames">shaders/3dsliceframes.frag</file>
- <file alias="vertexPosition">shaders/position.vert</file>
- <file alias="fragmentPositionMap">shaders/positionmap.frag</file>
- <file alias="fragmentTexturedSurfaceShadow">shaders/surfaceTexturedShadow.frag</file>
- </qresource>
-</RCC>
diff --git a/src/datavisualization/engine/q3dbars.cpp b/src/datavisualization/engine/q3dbars.cpp
index 2f2cf63b..a5204b24 100644
--- a/src/datavisualization/engine/q3dbars.cpp
+++ b/src/datavisualization/engine/q3dbars.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "q3dbars_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class Q3DBars
@@ -88,7 +62,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* The scene can be rotated, zoomed into, and a bar can be selected to view its value,
* but no other interaction is included in this minimal code example. You can learn more by
- * familiarizing yourself with the examples provided, like the \l{Bars Example}.
+ * familiarizing yourself with the examples provided, like the \l{Bar Graph}.
*
* \sa Q3DScatter, Q3DSurface, {Qt Data Visualization C++ Classes}
*/
@@ -157,7 +131,7 @@ QBar3DSeries *Q3DBars::primarySeries() const
* to the axes. If the newly added series has specified a selected bar, it will be highlighted and
* any existing selection will be cleared. Only one added series can have an active selection.
*
- * \sa seriesList(), primarySeries
+ * \sa seriesList(), primarySeries, QAbstract3DGraph::hasSeries()
*/
void Q3DBars::addSeries(QBar3DSeries *series)
{
@@ -166,6 +140,8 @@ void Q3DBars::addSeries(QBar3DSeries *series)
/*!
* Removes the \a series from the graph.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
void Q3DBars::removeSeries(QBar3DSeries *series)
{
@@ -180,7 +156,7 @@ void Q3DBars::removeSeries(QBar3DSeries *series)
* the new position in list is calculated as if the series was still in its old
* index, so the final index is actually the \a index decremented by one.
*
- * \sa addSeries(), seriesList()
+ * \sa addSeries(), seriesList(), QAbstract3DGraph::hasSeries()
*/
void Q3DBars::insertSeries(int index, QBar3DSeries *series)
{
@@ -189,6 +165,8 @@ void Q3DBars::insertSeries(int index, QBar3DSeries *series)
/*!
* Returns the list of series added to this graph.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
QList<QBar3DSeries *> Q3DBars::seriesList() const
{
@@ -247,7 +225,7 @@ float Q3DBars::barThickness() const
* Preset to \c {(1.0, 1.0)} by default. Spacing is affected by the
* barSpacingRelative property.
*
- * \sa barSpacingRelative, multiSeriesUniform
+ * \sa barSpacingRelative, multiSeriesUniform, barSeriesMargin
*/
void Q3DBars::setBarSpacing(const QSizeF &spacing)
{
@@ -285,6 +263,31 @@ bool Q3DBars::isBarSpacingRelative() const
}
/*!
+ * \property Q3DBars::barSeriesMargin
+ * \since 6.3
+ *
+ * \brief Margin between series columns in X and Z dimensions.
+ * Sensible values are on the range [0,1).
+ *
+ * Preset to \c {(0.0, 0.0)} by default. This property enables
+ * showing bars from different series side by side, but with space between columns.
+ *
+ * \sa barSpacing
+ */
+void Q3DBars::setBarSeriesMargin(const QSizeF &margin)
+{
+ if (margin != barSeriesMargin()) {
+ dptr()->m_shared->setBarSeriesMargin(margin);
+ emit barSeriesMarginChanged(margin);
+ }
+}
+
+QSizeF Q3DBars::barSeriesMargin() const
+{
+ return dptrc()->m_shared->barSeriesMargin();
+}
+
+/*!
* \property Q3DBars::rowAxis
*
* \brief The axis attached to the active row.
@@ -469,4 +472,4 @@ Q3DBars *Q3DBarsPrivate::qptr()
return static_cast<Q3DBars *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/q3dbars.h b/src/datavisualization/engine/q3dbars.h
index 6bbe7600..75d9b15f 100644
--- a/src/datavisualization/engine/q3dbars.h
+++ b/src/datavisualization/engine/q3dbars.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DBARS_H
#define Q3DBARS_H
@@ -35,17 +9,18 @@
#include <QtDataVisualization/qcategory3daxis.h>
#include <QtDataVisualization/qbar3dseries.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DBarsPrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DBars : public QAbstract3DGraph
+class Q_DATAVISUALIZATION_EXPORT Q3DBars : public QAbstract3DGraph
{
Q_OBJECT
Q_PROPERTY(bool multiSeriesUniform READ isMultiSeriesUniform WRITE setMultiSeriesUniform NOTIFY multiSeriesUniformChanged)
Q_PROPERTY(float barThickness READ barThickness WRITE setBarThickness NOTIFY barThicknessChanged)
Q_PROPERTY(QSizeF barSpacing READ barSpacing WRITE setBarSpacing NOTIFY barSpacingChanged)
Q_PROPERTY(bool barSpacingRelative READ isBarSpacingRelative WRITE setBarSpacingRelative NOTIFY barSpacingRelativeChanged)
+ Q_PROPERTY(QSizeF barSeriesMargin READ barSeriesMargin WRITE setBarSeriesMargin NOTIFY barSeriesMarginChanged REVISION(6, 3))
Q_PROPERTY(QCategory3DAxis *rowAxis READ rowAxis WRITE setRowAxis NOTIFY rowAxisChanged)
Q_PROPERTY(QCategory3DAxis *columnAxis READ columnAxis WRITE setColumnAxis NOTIFY columnAxisChanged)
Q_PROPERTY(QValue3DAxis *valueAxis READ valueAxis WRITE setValueAxis NOTIFY valueAxisChanged)
@@ -76,6 +51,9 @@ public:
void setBarSpacingRelative(bool relative);
bool isBarSpacingRelative() const;
+ void setBarSeriesMargin(const QSizeF &margin);
+ QSizeF barSeriesMargin() const;
+
void setRowAxis(QCategory3DAxis *axis);
QCategory3DAxis *rowAxis() const;
void setColumnAxis(QCategory3DAxis *axis);
@@ -95,6 +73,7 @@ Q_SIGNALS:
void barThicknessChanged(float thicknessRatio);
void barSpacingChanged(const QSizeF &spacing);
void barSpacingRelativeChanged(bool relative);
+ Q_REVISION(6, 3) void barSeriesMarginChanged(const QSizeF &margin);
void rowAxisChanged(QCategory3DAxis *axis);
void columnAxisChanged(QCategory3DAxis *axis);
void valueAxisChanged(QValue3DAxis *axis);
@@ -108,6 +87,6 @@ private:
Q_DISABLE_COPY(Q3DBars)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dbars_p.h b/src/datavisualization/engine/q3dbars_p.h
index de581071..cd2a2ac1 100644
--- a/src/datavisualization/engine/q3dbars_p.h
+++ b/src/datavisualization/engine/q3dbars_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "bars3dcontroller_p.h"
#include "qabstract3dgraph_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DBars;
@@ -54,15 +28,15 @@ public:
Q3DBarsPrivate(Q3DBars *q);
~Q3DBarsPrivate();
- void handleAxisXChanged(QAbstract3DAxis *axis);
- void handleAxisYChanged(QAbstract3DAxis *axis);
- void handleAxisZChanged(QAbstract3DAxis *axis);
+ void handleAxisXChanged(QAbstract3DAxis *axis) override;
+ void handleAxisYChanged(QAbstract3DAxis *axis) override;
+ void handleAxisZChanged(QAbstract3DAxis *axis) override;
Q3DBars *qptr();
Bars3DController *m_shared;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dcamera.cpp b/src/datavisualization/engine/q3dcamera.cpp
index 5b359a4e..69839fdc 100644
--- a/src/datavisualization/engine/q3dcamera.cpp
+++ b/src/datavisualization/engine/q3dcamera.cpp
@@ -1,38 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "q3dcamera_p.h"
#include "utils_p.h"
#include <QtCore/qmath.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class Q3DCamera
@@ -939,4 +913,4 @@ QVector3D Q3DCameraPrivate::calculatePositionRelativeToCamera(const QVector3D &r
zPos + relativePosition.z());
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/q3dcamera.h b/src/datavisualization/engine/q3dcamera.h
index 9ef4a1b8..1c59bc13 100644
--- a/src/datavisualization/engine/q3dcamera.h
+++ b/src/datavisualization/engine/q3dcamera.h
@@ -1,42 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DCAMERA_H
#define Q3DCAMERA_H
#include <QtDataVisualization/q3dobject.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DCameraPrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DCamera : public Q3DObject
+class Q_DATAVISUALIZATION_EXPORT Q3DCamera : public Q3DObject
{
Q_OBJECT
Q_ENUMS(CameraPreset)
@@ -46,9 +20,9 @@ class QT_DATAVISUALIZATION_EXPORT Q3DCamera : public Q3DObject
Q_PROPERTY(CameraPreset cameraPreset READ cameraPreset WRITE setCameraPreset NOTIFY cameraPresetChanged)
Q_PROPERTY(bool wrapXRotation READ wrapXRotation WRITE setWrapXRotation NOTIFY wrapXRotationChanged)
Q_PROPERTY(bool wrapYRotation READ wrapYRotation WRITE setWrapYRotation NOTIFY wrapYRotationChanged)
- Q_PROPERTY(QVector3D target READ target WRITE setTarget NOTIFY targetChanged REVISION 1)
- Q_PROPERTY(float minZoomLevel READ minZoomLevel WRITE setMinZoomLevel NOTIFY minZoomLevelChanged REVISION 1)
- Q_PROPERTY(float maxZoomLevel READ maxZoomLevel WRITE setMaxZoomLevel NOTIFY maxZoomLevelChanged REVISION 1)
+ Q_PROPERTY(QVector3D target READ target WRITE setTarget NOTIFY targetChanged REVISION(1, 2))
+ Q_PROPERTY(float minZoomLevel READ minZoomLevel WRITE setMinZoomLevel NOTIFY minZoomLevelChanged REVISION(1, 2))
+ Q_PROPERTY(float maxZoomLevel READ maxZoomLevel WRITE setMaxZoomLevel NOTIFY maxZoomLevelChanged REVISION(1, 2))
public:
enum CameraPreset {
@@ -93,7 +67,7 @@ public:
bool wrapYRotation() const;
void setWrapYRotation(bool isEnabled);
- virtual void copyValuesFrom(const Q3DObject &source);
+ void copyValuesFrom(const Q3DObject &source) override;
CameraPreset cameraPreset() const;
void setCameraPreset(CameraPreset preset);
@@ -117,9 +91,9 @@ Q_SIGNALS:
void cameraPresetChanged(Q3DCamera::CameraPreset preset);
void wrapXRotationChanged(bool isEnabled);
void wrapYRotationChanged(bool isEnabled);
- Q_REVISION(1) void targetChanged(const QVector3D &target);
- Q_REVISION(1) void minZoomLevelChanged(float zoomLevel);
- Q_REVISION(1) void maxZoomLevelChanged(float zoomLevel);
+ Q_REVISION(1, 2) void targetChanged(const QVector3D &target);
+ Q_REVISION(1, 2) void minZoomLevelChanged(float zoomLevel);
+ Q_REVISION(1, 2) void maxZoomLevelChanged(float zoomLevel);
private:
QScopedPointer<Q3DCameraPrivate> d_ptr;
@@ -137,6 +111,6 @@ private:
friend class QTouch3DInputHandlerPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dcamera_p.h b/src/datavisualization/engine/q3dcamera_p.h
index 8c45d483..dac62870 100644
--- a/src/datavisualization/engine/q3dcamera_p.h
+++ b/src/datavisualization/engine/q3dcamera_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "q3dcamera.h"
#include <QtGui/QMatrix4x4>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DCamera;
@@ -89,7 +63,7 @@ Q_SIGNALS:
void minYRotationChanged(float rotation);
void maxXRotationChanged(float rotation);
void maxYRotationChanged(float rotation);
- void viewMatrixChanged(QMatrix4x4 viewMatrix);
+ void viewMatrixChanged(const QMatrix4x4 &viewMatrix);
void viewMatrixAutoUpdateChanged(bool enabled);
public:
@@ -123,6 +97,6 @@ public:
friend class QTouch3DInputHandler;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dlight.cpp b/src/datavisualization/engine/q3dlight.cpp
index bce35d99..86afbe01 100644
--- a/src/datavisualization/engine/q3dlight.cpp
+++ b/src/datavisualization/engine/q3dlight.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "q3dlight_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class Q3DLight
@@ -122,4 +96,4 @@ void Q3DLightPrivate::sync(Q3DLight &other)
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/q3dlight.h b/src/datavisualization/engine/q3dlight.h
index 546ac424..ceae12bf 100644
--- a/src/datavisualization/engine/q3dlight.h
+++ b/src/datavisualization/engine/q3dlight.h
@@ -1,45 +1,19 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DLIGHT_H
#define Q3DLIGHT_H
#include <QtDataVisualization/q3dobject.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DLightPrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DLight : public Q3DObject
+class Q_DATAVISUALIZATION_EXPORT Q3DLight : public Q3DObject
{
Q_OBJECT
- Q_PROPERTY(bool autoPosition READ isAutoPosition WRITE setAutoPosition NOTIFY autoPositionChanged REVISION 1)
+ Q_PROPERTY(bool autoPosition READ isAutoPosition WRITE setAutoPosition NOTIFY autoPositionChanged REVISION(1, 3))
public:
explicit Q3DLight(QObject *parent = nullptr);
@@ -49,7 +23,7 @@ public:
bool isAutoPosition();
Q_SIGNALS:
- Q_REVISION(1) void autoPositionChanged(bool autoPosition);
+ Q_REVISION(1, 3) void autoPositionChanged(bool autoPosition);
private:
QScopedPointer<Q3DLightPrivate> d_ptr;
@@ -60,6 +34,6 @@ private:
friend class Q3DScenePrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dlight_p.h b/src/datavisualization/engine/q3dlight_p.h
index 6348deb9..6e1e7ff5 100644
--- a/src/datavisualization/engine/q3dlight_p.h
+++ b/src/datavisualization/engine/q3dlight_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "q3dlight.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DScene;
class Q3DLight;
@@ -61,7 +35,7 @@ public:
bool m_automaticLight;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dobject.cpp b/src/datavisualization/engine/q3dobject.cpp
index 099fa2f0..c9e417dd 100644
--- a/src/datavisualization/engine/q3dobject.cpp
+++ b/src/datavisualization/engine/q3dobject.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "q3dobject_p.h"
#include "q3dscene_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
\class Q3DObject
@@ -155,4 +129,4 @@ Q3DObjectPrivate::~Q3DObjectPrivate()
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/q3dobject.h b/src/datavisualization/engine/q3dobject.h
index 812e89cb..875e1955 100644
--- a/src/datavisualization/engine/q3dobject.h
+++ b/src/datavisualization/engine/q3dobject.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DOBJECT_H
#define Q3DOBJECT_H
@@ -36,12 +10,12 @@
Q_MOC_INCLUDE(<QtDataVisualization/q3dscene.h>)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DObjectPrivate;
class Q3DScene;
-class QT_DATAVISUALIZATION_EXPORT Q3DObject : public QObject
+class Q_DATAVISUALIZATION_EXPORT Q3DObject : public QObject
{
Q_OBJECT
Q_PROPERTY(Q3DScene* parentScene READ parentScene)
@@ -73,6 +47,6 @@ private:
friend class Q3DScenePrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dobject_p.h b/src/datavisualization/engine/q3dobject_p.h
index ef1f2371..9eeaaae8 100644
--- a/src/datavisualization/engine/q3dobject_p.h
+++ b/src/datavisualization/engine/q3dobject_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -42,7 +16,7 @@
#include "datavisualizationglobal_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DObject;
class Q3DScene;
@@ -59,6 +33,6 @@ public:
bool m_isDirty;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dscatter.cpp b/src/datavisualization/engine/q3dscatter.cpp
index b16b2513..07c86110 100644
--- a/src/datavisualization/engine/q3dscatter.cpp
+++ b/src/datavisualization/engine/q3dscatter.cpp
@@ -1,36 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "q3dscatter.h"
#include "q3dscatter_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class Q3DScatter
@@ -77,7 +53,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The scene can be rotated, zoomed into, and an item can be selected to view its position,
* but no other interaction is included in this minimal code example.
* You can learn more by familiarizing yourself with the examples provided, like
- * the \l{Scatter Example}.
+ * the \l{Scatter Graph}.
*
* \sa Q3DBars, Q3DSurface, {Qt Data Visualization C++ Classes}
*/
@@ -110,6 +86,8 @@ Q3DScatter::~Q3DScatter()
* Adds the \a series to the graph. A graph can contain multiple series, but has only one set of
* axes. If the newly added series has specified a selected item, it will be highlighted and
* any existing selection will be cleared. Only one added series can have an active selection.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
void Q3DScatter::addSeries(QScatter3DSeries *series)
{
@@ -118,6 +96,8 @@ void Q3DScatter::addSeries(QScatter3DSeries *series)
/*!
* Removes the \a series from the graph.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
void Q3DScatter::removeSeries(QScatter3DSeries *series)
{
@@ -126,6 +106,8 @@ void Q3DScatter::removeSeries(QScatter3DSeries *series)
/*!
* Returns the list of series added to this graph.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
QList<QScatter3DSeries *> Q3DScatter::seriesList() const
{
@@ -306,5 +288,5 @@ Q3DScatter *Q3DScatterPrivate::qptr()
return static_cast<Q3DScatter *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/q3dscatter.h b/src/datavisualization/engine/q3dscatter.h
index 9067ee0f..5396471e 100644
--- a/src/datavisualization/engine/q3dscatter.h
+++ b/src/datavisualization/engine/q3dscatter.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DSCATTER_H
#define Q3DSCATTER_H
@@ -34,11 +8,11 @@
#include <QtDataVisualization/qvalue3daxis.h>
#include <QtDataVisualization/qscatter3dseries.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DScatterPrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DScatter : public QAbstract3DGraph
+class Q_DATAVISUALIZATION_EXPORT Q3DScatter : public QAbstract3DGraph
{
Q_OBJECT
Q_PROPERTY(QValue3DAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
@@ -78,6 +52,6 @@ private:
Q_DISABLE_COPY(Q3DScatter)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dscatter_p.h b/src/datavisualization/engine/q3dscatter_p.h
index 748fc2e9..b307a65b 100644
--- a/src/datavisualization/engine/q3dscatter_p.h
+++ b/src/datavisualization/engine/q3dscatter_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "scatter3dcontroller_p.h"
#include "qabstract3dgraph_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DScatter;
@@ -54,15 +28,15 @@ public:
Q3DScatterPrivate(Q3DScatter *q);
~Q3DScatterPrivate();
- void handleAxisXChanged(QAbstract3DAxis *axis);
- void handleAxisYChanged(QAbstract3DAxis *axis);
- void handleAxisZChanged(QAbstract3DAxis *axis);
+ void handleAxisXChanged(QAbstract3DAxis *axis) override;
+ void handleAxisYChanged(QAbstract3DAxis *axis) override;
+ void handleAxisZChanged(QAbstract3DAxis *axis) override;
Q3DScatter *qptr();
Scatter3DController *m_shared;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dscene.cpp b/src/datavisualization/engine/q3dscene.cpp
index 75437c9c..143983e7 100644
--- a/src/datavisualization/engine/q3dscene.cpp
+++ b/src/datavisualization/engine/q3dscene.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "q3dscene_p.h"
#include "q3dcamera_p.h"
#include "q3dlight_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class Q3DScene
@@ -832,4 +806,4 @@ bool Q3DScenePrivate::isInArea(const QRect &area, int x, int y) const
return ( x >= areaMinX && x <= areaMaxX && y >= areaMinY && y <= areaMaxY );
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/q3dscene.h b/src/datavisualization/engine/q3dscene.h
index de71255d..dd9e68c7 100644
--- a/src/datavisualization/engine/q3dscene.h
+++ b/src/datavisualization/engine/q3dscene.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DSCENE_H
#define Q3DSCENE_H
@@ -36,11 +10,11 @@
#include <QtCore/QObject>
#include <QtCore/QRect>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DScenePrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DScene : public QObject
+class Q_DATAVISUALIZATION_EXPORT Q3DScene : public QObject
{
Q_OBJECT
Q_PROPERTY(QRect viewport READ viewport NOTIFY viewportChanged)
@@ -52,7 +26,7 @@ class QT_DATAVISUALIZATION_EXPORT Q3DScene : public QObject
Q_PROPERTY(Q3DCamera* activeCamera READ activeCamera WRITE setActiveCamera NOTIFY activeCameraChanged)
Q_PROPERTY(Q3DLight* activeLight READ activeLight WRITE setActiveLight NOTIFY activeLightChanged)
Q_PROPERTY(float devicePixelRatio READ devicePixelRatio WRITE setDevicePixelRatio NOTIFY devicePixelRatioChanged)
- Q_PROPERTY(QPoint graphPositionQuery READ graphPositionQuery WRITE setGraphPositionQuery NOTIFY graphPositionQueryChanged REVISION 1)
+ Q_PROPERTY(QPoint graphPositionQuery READ graphPositionQuery WRITE setGraphPositionQuery NOTIFY graphPositionQueryChanged REVISION(1, 2))
public:
explicit Q3DScene(QObject *parent = nullptr);
@@ -100,7 +74,7 @@ Q_SIGNALS:
void activeLightChanged(Q3DLight *light);
void devicePixelRatioChanged(float pixelRatio);
void selectionQueryPositionChanged(const QPoint &position);
- Q_REVISION(1) void graphPositionQueryChanged(const QPoint &position);
+ Q_REVISION(1, 2) void graphPositionQueryChanged(const QPoint &position);
private:
QScopedPointer<Q3DScenePrivate> d_ptr;
@@ -121,6 +95,6 @@ private:
friend class Q3DObject;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dscene_p.h b/src/datavisualization/engine/q3dscene_p.h
index 4056e89d..687606cb 100644
--- a/src/datavisualization/engine/q3dscene_p.h
+++ b/src/datavisualization/engine/q3dscene_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,10 +14,10 @@
#ifndef Q3DSCENE_P_H
#define Q3DSCENE_P_H
-#include "datavisualizationglobal_p.h"
-#include "q3dscene.h"
+#include <private/datavisualizationglobal_p.h>
+#include <QtDataVisualization/q3dscene.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DCamera;
class Q3DLight;
@@ -77,7 +51,7 @@ struct Q3DSceneChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Q3DScenePrivate : public QObject
+class Q_DATAVISUALIZATION_EXPORT Q3DScenePrivate : public QObject
{
Q_OBJECT
public:
@@ -133,6 +107,6 @@ public:
QRect m_defaultLargeViewport;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dsurface.cpp b/src/datavisualization/engine/q3dsurface.cpp
index f3fac1c7..2b456814 100644
--- a/src/datavisualization/engine/q3dsurface.cpp
+++ b/src/datavisualization/engine/q3dsurface.cpp
@@ -1,36 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "q3dsurface.h"
#include "q3dsurface_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class Q3DSurface
@@ -91,7 +67,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The scene can be rotated, zoomed into, and a surface point can be selected to view its position,
* but no other interaction is included in this minimal code example.
* You can learn more by familiarizing yourself with the examples provided,
- * like the \l{Surface Example}.
+ * like the \l{Surface Graph}.
*
*
* \sa Q3DBars, Q3DScatter, {Qt Data Visualization C++ Classes}
@@ -127,6 +103,8 @@ Q3DSurface::~Q3DSurface()
* Adds the \a series to the graph. A graph can contain multiple series, but has only one set of
* axes. If the newly added series has specified a selected item, it will be highlighted and
* any existing selection will be cleared. Only one added series can have an active selection.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
void Q3DSurface::addSeries(QSurface3DSeries *series)
{
@@ -135,6 +113,8 @@ void Q3DSurface::addSeries(QSurface3DSeries *series)
/*!
* Removes the \a series from the graph.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
void Q3DSurface::removeSeries(QSurface3DSeries *series)
{
@@ -143,6 +123,8 @@ void Q3DSurface::removeSeries(QSurface3DSeries *series)
/*!
* Returns the list of series added to this graph.
+ *
+ * \sa QAbstract3DGraph::hasSeries()
*/
QList<QSurface3DSeries *> Q3DSurface::seriesList() const
{
@@ -356,4 +338,4 @@ Q3DSurface *Q3DSurfacePrivate::qptr()
return static_cast<Q3DSurface *>(q_ptr);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/q3dsurface.h b/src/datavisualization/engine/q3dsurface.h
index 48a27c4f..c6f26972 100644
--- a/src/datavisualization/engine/q3dsurface.h
+++ b/src/datavisualization/engine/q3dsurface.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DSURFACE_H
#define Q3DSURFACE_H
@@ -34,11 +8,11 @@
#include <QtDataVisualization/qvalue3daxis.h>
#include <QtDataVisualization/qsurface3dseries.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DSurfacePrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DSurface : public QAbstract3DGraph
+class Q_DATAVISUALIZATION_EXPORT Q3DSurface : public QAbstract3DGraph
{
Q_OBJECT
Q_PROPERTY(QValue3DAxis *axisX READ axisX WRITE setAxisX NOTIFY axisXChanged)
@@ -83,6 +57,6 @@ private:
Q_DISABLE_COPY(Q3DSurface)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/q3dsurface_p.h b/src/datavisualization/engine/q3dsurface_p.h
index c9c22d63..b70bb643 100644
--- a/src/datavisualization/engine/q3dsurface_p.h
+++ b/src/datavisualization/engine/q3dsurface_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "surface3dcontroller_p.h"
#include "qabstract3dgraph_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DSurface;
@@ -54,15 +28,15 @@ public:
Q3DSurfacePrivate(Q3DSurface *q);
~Q3DSurfacePrivate();
- void handleAxisXChanged(QAbstract3DAxis *axis);
- void handleAxisYChanged(QAbstract3DAxis *axis);
- void handleAxisZChanged(QAbstract3DAxis *axis);
+ void handleAxisXChanged(QAbstract3DAxis *axis) override;
+ void handleAxisYChanged(QAbstract3DAxis *axis) override;
+ void handleAxisZChanged(QAbstract3DAxis *axis) override;
Q3DSurface *qptr();
Surface3DController *m_shared;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/qabstract3dgraph.cpp b/src/datavisualization/engine/qabstract3dgraph.cpp
index cb972779..3b7eca01 100644
--- a/src/datavisualization/engine/qabstract3dgraph.cpp
+++ b/src/datavisualization/engine/qabstract3dgraph.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qabstract3dgraph.h"
#include "qabstract3dgraph_p.h"
@@ -41,11 +15,11 @@
#include <QtGui/QPainter>
#include <QtOpenGL/QOpenGLFramebufferObject>
#include <QtGui/QOffscreenSurface>
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
#include <qpa/qplatformnativeinterface.h>
#endif
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QAbstract3DGraph
@@ -60,7 +34,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* Anti-aliasing is turned on by default on C++, except in OpenGL ES2
* environments, where anti-aliasing is not supported by Qt Data Visualization.
* To specify non-default anti-aliasing for a graph, give a custom surface format as
- * a constructor parameter. You can use the convenience function \c QtDataVisualization::qDefaultSurfaceFormat()
+ * a constructor parameter. You can use the convenience function \c qDefaultSurfaceFormat()
* to create the surface format object.
*
* \note QAbstract3DGraph sets window flag \c Qt::FramelessWindowHint on by default. If you want to display
@@ -110,6 +84,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
\value SelectionMultiSeries
Setting this mode means that items for all series at same position are highlighted, instead
of just the selected item. The actual selection in the other series doesn't change.
+ When setting this mode flag, one or more of the basic selection flags (\c {SelectionItem},
+ \c {SelectionRow}, or \c SelectionColumn) must also be set.
Multi-series selection is not supported for Q3DScatter.
*/
@@ -186,7 +162,7 @@ QAbstract3DGraph::QAbstract3DGraph(QAbstract3DGraphPrivate *d, const QSurfaceFor
// Make sure renderable type is correct
surfaceFormat.setRenderableType(QSurfaceFormat::DefaultRenderableType);
} else {
- surfaceFormat = qDefaultSurfaceFormat();
+ surfaceFormat = qDefaultSurfaceFormat(true);
}
d_ptr->m_context = new QOpenGLContext(this);
@@ -224,7 +200,7 @@ QAbstract3DGraph::QAbstract3DGraph(QAbstract3DGraphPrivate *d, const QSurfaceFor
d_ptr->renderLater();
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
// Enable touch events for Mac touchpads
typedef void * (*EnableTouch)(QWindow*, bool);
EnableTouch enableTouch =
@@ -436,6 +412,16 @@ void QAbstract3DGraph::clearSelection()
}
/*!
+ * Returns whether the \a series has already been added to the graph.
+ *
+ * \since 6.3
+ */
+bool QAbstract3DGraph::hasSeries(QAbstract3DSeries *series) const
+{
+ return d_ptr->m_visualController->hasSeries(series);
+}
+
+/*!
* Adds a QCustom3DItem \a item to the graph. Graph takes ownership of the added item.
*
* Returns the index to the added item if the add operation was successful, -1
@@ -581,7 +567,7 @@ QCustom3DItem *QAbstract3DGraph::selectedCustomItem() const
* \c selectedElementChanged signal is emitted.
*
* The signal can be used for example for implementing custom input handlers, as
- * demonstrated by the \l {Axis Range Dragging With Labels Example}.
+ * demonstrated in the \l {Graph Gallery} example under \uicontrol {Scatter Graph} tab.
*
* \sa selectedLabelIndex(), selectedAxis(), selectedCustomItemIndex(), selectedCustomItem(),
* Q3DBars::selectedSeries(), Q3DScatter::selectedSeries(), Q3DSurface::selectedSeries(),
@@ -656,11 +642,6 @@ qreal QAbstract3DGraph::currentFps() const
*
* \brief Whether orthographic projection is used for displaying the graph.
*
- * If \c {true}, ortographic projection is used to create 2D graphs by replacing
- * the default input handler with one that does not allow rotating the graph and
- * by setting the camera to view the graph
- * directly from the side or from the top. Also, axis labels typically need to be rotated when
- * viewing the graph from the sides.
* Defaults to \c{false}.
* \note Shadows will be disabled when set to \c{true}.
*
@@ -1198,4 +1179,4 @@ QImage QAbstract3DGraphPrivate::renderToImage(int msaaSamples, const QSize &imag
return image;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/qabstract3dgraph.h b/src/datavisualization/engine/qabstract3dgraph.h
index a59259d1..f3d8ecaa 100644
--- a/src/datavisualization/engine/qabstract3dgraph.h
+++ b/src/datavisualization/engine/qabstract3dgraph.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QABSTRACT3DGRAPH_H
#define QABSTRACT3DGRAPH_H
@@ -38,17 +12,16 @@
#include <QtGui/QOpenGLFunctions>
#include <QtCore/QLocale>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DGraphPrivate;
class QCustom3DItem;
class QAbstract3DAxis;
+class QAbstract3DSeries;
-class QT_DATAVISUALIZATION_EXPORT QAbstract3DGraph : public QWindow, protected QOpenGLFunctions
+class Q_DATAVISUALIZATION_EXPORT QAbstract3DGraph : public QWindow, protected QOpenGLFunctions
{
Q_OBJECT
- Q_ENUMS(ShadowQuality)
- Q_ENUMS(ElementType)
Q_FLAGS(SelectionFlag SelectionFlags)
Q_FLAGS(OptimizationHint OptimizationHints)
Q_PROPERTY(QAbstract3DInputHandler* activeInputHandler READ activeInputHandler WRITE setActiveInputHandler NOTIFY activeInputHandlerChanged)
@@ -88,6 +61,7 @@ public:
SelectionSlice = 8,
SelectionMultiSeries = 16
};
+ Q_ENUM(SelectionFlag)
Q_DECLARE_FLAGS(SelectionFlags, SelectionFlag)
enum ShadowQuality {
@@ -99,6 +73,7 @@ public:
ShadowQualitySoftMedium,
ShadowQualitySoftHigh
};
+ Q_ENUM(ShadowQuality)
enum ElementType {
ElementNone = 0,
@@ -108,11 +83,13 @@ public:
ElementAxisZLabel,
ElementCustomItem
};
+ Q_ENUM(ElementType)
enum OptimizationHint {
OptimizationDefault = 0,
OptimizationStatic = 1
};
+ Q_ENUM(OptimizationHint)
Q_DECLARE_FLAGS(OptimizationHints, OptimizationHint)
public:
@@ -141,6 +118,8 @@ public:
void clearSelection();
+ bool hasSeries(QAbstract3DSeries *series) const;
+
int addCustomItem(QCustom3DItem *item);
void removeCustomItems();
void removeCustomItem(QCustom3DItem *item);
@@ -197,17 +176,17 @@ public:
bool hasContext() const;
protected:
- bool event(QEvent *event);
- void resizeEvent(QResizeEvent *event);
- void exposeEvent(QExposeEvent *event);
-
- void mouseDoubleClickEvent(QMouseEvent *event);
- void touchEvent(QTouchEvent *event);
- void mousePressEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
+ bool event(QEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void exposeEvent(QExposeEvent *event) override;
+
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void touchEvent(QTouchEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
#if QT_CONFIG(wheelevent)
- void wheelEvent(QWheelEvent *event);
+ void wheelEvent(QWheelEvent *event) override;
#endif
Q_SIGNALS:
@@ -241,6 +220,6 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstract3DGraph::SelectionFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstract3DGraph::OptimizationHints)
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/qabstract3dgraph_p.h b/src/datavisualization/engine/qabstract3dgraph_p.h
index 88962a6b..ed86769f 100644
--- a/src/datavisualization/engine/qabstract3dgraph_p.h
+++ b/src/datavisualization/engine/qabstract3dgraph_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -47,7 +21,7 @@ class QOpenGLContext;
class QOffscreenSurface;
QT_END_NAMESPACE
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DGraph;
class Abstract3DController;
@@ -86,6 +60,6 @@ public:
bool m_initialized;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/scatter3dcontroller.cpp b/src/datavisualization/engine/scatter3dcontroller.cpp
index 365617e0..af7bb204 100644
--- a/src/datavisualization/engine/scatter3dcontroller.cpp
+++ b/src/datavisualization/engine/scatter3dcontroller.cpp
@@ -1,31 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "scatter3dcontroller_p.h"
#include "scatter3drenderer_p.h"
@@ -34,7 +10,7 @@
#include "qscatter3dseries_p.h"
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
static const int insertRemoveRecordReserveSize = 31;
@@ -485,4 +461,4 @@ void Scatter3DController::adjustAxisRanges()
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/scatter3dcontroller_p.h b/src/datavisualization/engine/scatter3dcontroller_p.h
index 46acd282..175e4b82 100644
--- a/src/datavisualization/engine/scatter3dcontroller_p.h
+++ b/src/datavisualization/engine/scatter3dcontroller_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,10 +14,10 @@
#ifndef Q3DSCATTERCONTROLLER_p_H
#define Q3DSCATTERCONTROLLER_p_H
-#include "datavisualizationglobal_p.h"
-#include "abstract3dcontroller_p.h"
+#include <private/datavisualizationglobal_p.h>
+#include <private/abstract3dcontroller_p.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Scatter3DRenderer;
class QScatterDataProxy;
@@ -60,7 +34,7 @@ struct Scatter3DChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Scatter3DController : public Abstract3DController
+class Q_DATAVISUALIZATION_EXPORT Scatter3DController : public Abstract3DController
{
Q_OBJECT
@@ -107,28 +81,28 @@ public:
explicit Scatter3DController(QRect rect, Q3DScene *scene = 0);
~Scatter3DController();
- virtual void initializeOpenGL();
+ void initializeOpenGL() override;
// Change selection mode
- void setSelectionMode(QAbstract3DGraph::SelectionFlags mode);
+ void setSelectionMode(QAbstract3DGraph::SelectionFlags mode) override;
inline QScatter3DSeries *selectedSeries() const { return m_selectedItemSeries; }
void setSelectedItem(int index, QScatter3DSeries *series);
static inline int invalidSelectionIndex() { return -1; }
- virtual void clearSelection();
+ void clearSelection() override;
- void synchDataToRenderer();
+ void synchDataToRenderer() override;
- virtual void addSeries(QAbstract3DSeries *series);
- virtual void removeSeries(QAbstract3DSeries *series);
+ void addSeries(QAbstract3DSeries *series) override;
+ void removeSeries(QAbstract3DSeries *series) override;
virtual QList<QScatter3DSeries *> scatterSeriesList();
- virtual void handleAxisAutoAdjustRangeChangedInOrientation(
- QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust);
- virtual void handleAxisRangeChangedBySender(QObject *sender);
- virtual void handlePendingClick();
- virtual void adjustAxisRanges();
+ void handleAxisAutoAdjustRangeChangedInOrientation(
+ QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust) override;
+ void handleAxisRangeChangedBySender(QObject *sender) override;
+ void handlePendingClick() override;
+ void adjustAxisRanges() override;
public Q_SLOTS:
void handleArrayReset();
@@ -141,13 +115,13 @@ Q_SIGNALS:
void selectedSeriesChanged(QScatter3DSeries *series);
protected:
- virtual void startRecordingRemovesAndInserts();
+ void startRecordingRemovesAndInserts() override;
private:
Q_DISABLE_COPY(Scatter3DController)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/scatter3drenderer.cpp b/src/datavisualization/engine/scatter3drenderer.cpp
index e999827e..6a224ebd 100644
--- a/src/datavisualization/engine/scatter3drenderer.cpp
+++ b/src/datavisualization/engine/scatter3drenderer.cpp
@@ -1,31 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "scatter3drenderer_p.h"
#include "q3dcamera_p.h"
@@ -42,7 +18,7 @@
// You should see the scene from where the light is
//#define SHOW_DEPTH_TEXTURE_SCENE
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
const GLfloat defaultMinSize = 0.01f;
const GLfloat defaultMaxSize = 0.1f;
@@ -376,7 +352,7 @@ void Scatter3DRenderer::updateItems(const QList<Scatter3DController::ChangeItem>
const int index = item.index;
if (index >= cache->renderArray().size())
continue; // Items removed from array for same render
- bool oldVisibility;
+ bool oldVisibility = false;
ScatterRenderItem &item = cache->renderArray()[index];
if (optimizationStatic)
oldVisibility = item.isVisible();
@@ -554,7 +530,7 @@ void Scatter3DRenderer::drawScene(const GLuint defaultFboHandle)
ShaderHelper *pointSelectionShader;
if (!m_isOpenGLES) {
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (m_havePointSeries) {
glEnable(GL_POINT_SMOOTH);
glEnable(GL_PROGRAM_POINT_SIZE);
@@ -751,7 +727,7 @@ void Scatter3DRenderer::drawScene(const GLuint defaultFboHandle)
float itemSize = cache->itemSize() / itemScaler;
if (itemSize == 0.0f)
itemSize = m_dotSizeScale;
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (drawingPoints && !m_isOpenGLES)
m_funcs_2_1->glPointSize(itemSize * activeCamera->zoomLevel());
#endif
@@ -884,7 +860,7 @@ void Scatter3DRenderer::drawScene(const GLuint defaultFboHandle)
float itemSize = cache->itemSize() / itemScaler;
if (itemSize == 0.0f)
itemSize = m_dotSizeScale;
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (drawingPoints && !m_isOpenGLES)
m_funcs_2_1->glPointSize(itemSize * activeCamera->zoomLevel());
#endif
@@ -1195,7 +1171,7 @@ void Scatter3DRenderer::drawScene(const GLuint defaultFboHandle)
}
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (m_havePointSeries) {
glDisable(GL_POINT_SMOOTH);
glDisable(GL_PROGRAM_POINT_SIZE);
@@ -2528,4 +2504,4 @@ QVector3D Scatter3DRenderer::convertPositionToTranslation(const QVector3D &posit
return QVector3D(xTrans, yTrans, zTrans);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/scatter3drenderer_p.h b/src/datavisualization/engine/scatter3drenderer_p.h
index f0366e0c..c1673e80 100644
--- a/src/datavisualization/engine/scatter3drenderer_p.h
+++ b/src/datavisualization/engine/scatter3drenderer_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -47,14 +21,14 @@
QT_FORWARD_DECLARE_CLASS(QSizeF)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ShaderHelper;
class Q3DScene;
class ScatterSeriesRenderCache;
class QScatterDataItem;
-class QT_DATAVISUALIZATION_EXPORT Scatter3DRenderer : public Abstract3DRenderer
+class Q_DATAVISUALIZATION_EXPORT Scatter3DRenderer : public Abstract3DRenderer
{
Q_OBJECT
@@ -97,44 +71,44 @@ public:
explicit Scatter3DRenderer(Scatter3DController *controller);
~Scatter3DRenderer();
- void updateData();
- void updateSeries(const QList<QAbstract3DSeries *> &seriesList);
- SeriesRenderCache *createNewCache(QAbstract3DSeries *series);
+ void updateData() override;
+ void updateSeries(const QList<QAbstract3DSeries *> &seriesList) override;
+ SeriesRenderCache *createNewCache(QAbstract3DSeries *series) override;
void updateItems(const QList<Scatter3DController::ChangeItem> &items);
- void updateScene(Q3DScene *scene);
+ void updateScene(Q3DScene *scene) override;
void updateAxisLabels(QAbstract3DAxis::AxisOrientation orientation,
- const QStringList &labels);
+ const QStringList &labels) override;
void updateAxisTitleVisibility(QAbstract3DAxis::AxisOrientation orientation,
- bool visible);
- void updateOptimizationHint(QAbstract3DGraph::OptimizationHints hint);
- void updateMargin(float margin);
+ bool visible) override;
+ void updateOptimizationHint(QAbstract3DGraph::OptimizationHints hint) override;
+ void updateMargin(float margin) override;
- QVector3D convertPositionToTranslation(const QVector3D &position, bool isAbsolute);
+ QVector3D convertPositionToTranslation(const QVector3D &position, bool isAbsolute) override;
inline int clickedIndex() const { return m_clickedIndex; }
void resetClickedStatus();
- void render(GLuint defaultFboHandle);
+ void render(GLuint defaultFboHandle) override;
public Q_SLOTS:
void updateSelectedItem(int index, QScatter3DSeries *series);
protected:
- void contextCleanup();
- virtual void initializeOpenGL();
- virtual void fixCameraTarget(QVector3D &target);
- virtual void getVisibleItemBounds(QVector3D &minBounds, QVector3D &maxBounds);
+ void contextCleanup() override;
+ void initializeOpenGL() override;
+ void fixCameraTarget(QVector3D &target) override;
+ void getVisibleItemBounds(QVector3D &minBounds, QVector3D &maxBounds) override;
private:
- virtual void initShaders(const QString &vertexShader, const QString &fragmentShader);
- virtual void initGradientShaders(const QString &vertexShader, const QString &fragmentShader);
- virtual void initStaticSelectedItemShaders(const QString &vertexShader,
- const QString &fragmentShader,
- const QString &gradientVertexShader,
- const QString &gradientFragmentShader);
- virtual void updateShadowQuality(QAbstract3DGraph::ShadowQuality quality);
- virtual void updateTextures();
- virtual void fixMeshFileName(QString &fileName, QAbstract3DSeries::Mesh mesh);
+ void initShaders(const QString &vertexShader, const QString &fragmentShader) override;
+ void initGradientShaders(const QString &vertexShader, const QString &fragmentShader) override;
+ void initStaticSelectedItemShaders(const QString &vertexShader,
+ const QString &fragmentShader,
+ const QString &gradientVertexShader,
+ const QString &gradientFragmentShader) override;
+ void updateShadowQuality(QAbstract3DGraph::ShadowQuality quality) override;
+ void updateTextures() override;
+ void fixMeshFileName(QString &fileName, QAbstract3DSeries::Mesh mesh) override;
void drawScene(GLuint defaultFboHandle);
void drawLabels(bool drawSelection, const Q3DCamera *activeCamera,
@@ -142,11 +116,11 @@ private:
void loadBackgroundMesh();
void initSelectionShader();
- void initBackgroundShaders(const QString &vertexShader, const QString &fragmentShader);
+ void initBackgroundShaders(const QString &vertexShader, const QString &fragmentShader) override;
void initStaticPointShaders(const QString &vertexShader, const QString &fragmentShader);
- void initSelectionBuffer();
+ void initSelectionBuffer() override;
void initDepthShader();
- void updateDepthBuffer();
+ void updateDepthBuffer() override;
void initPointShader();
void calculateTranslation(ScatterRenderItem &item);
void calculateSceneScalingFactors();
@@ -158,6 +132,6 @@ private:
Q_DISABLE_COPY(Scatter3DRenderer)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/scatterseriesrendercache.cpp b/src/datavisualization/engine/scatterseriesrendercache.cpp
index ba511f6c..2447076e 100644
--- a/src/datavisualization/engine/scatterseriesrendercache.cpp
+++ b/src/datavisualization/engine/scatterseriesrendercache.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "scatterseriesrendercache_p.h"
#include "scatterobjectbufferhelper_p.h"
#include "scatterpointbufferhelper_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
ScatterSeriesRenderCache::ScatterSeriesRenderCache(QAbstract3DSeries *series,
Abstract3DRenderer *renderer)
@@ -60,4 +34,4 @@ void ScatterSeriesRenderCache::cleanup(TextureHelper *texHelper)
SeriesRenderCache::cleanup(texHelper);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/scatterseriesrendercache_p.h b/src/datavisualization/engine/scatterseriesrendercache_p.h
index 8f858d0f..f19909af 100644
--- a/src/datavisualization/engine/scatterseriesrendercache_p.h
+++ b/src/datavisualization/engine/scatterseriesrendercache_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -45,7 +19,7 @@
#include "qscatter3dseries_p.h"
#include "scatterrenderitem_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ScatterObjectBufferHelper;
class ScatterPointBufferHelper;
@@ -56,7 +30,7 @@ public:
ScatterSeriesRenderCache(QAbstract3DSeries *series, Abstract3DRenderer *renderer);
virtual ~ScatterSeriesRenderCache();
- void cleanup(TextureHelper *texHelper);
+ void cleanup(TextureHelper *texHelper) override;
inline ScatterRenderItemArray &renderArray() { return m_renderArray; }
inline QScatter3DSeries *series() const { return static_cast<QScatter3DSeries *>(m_series); }
@@ -93,6 +67,6 @@ protected:
bool m_visibilityChanged; // Used to detect if full buffer change needed
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/selectionpointer.cpp b/src/datavisualization/engine/selectionpointer.cpp
index be4a52a9..d78171e3 100644
--- a/src/datavisualization/engine/selectionpointer.cpp
+++ b/src/datavisualization/engine/selectionpointer.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "selectionpointer_p.h"
#include "shaderhelper_p.h"
@@ -34,9 +8,9 @@
#include "q3dcamera_p.h"
#include "utils_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
-const GLfloat sliceUnits = 2.5;
+const GLfloat spSliceUnits = 2.5;
SelectionPointer::SelectionPointer(Drawer *drawer)
: QObject(0),
@@ -94,7 +68,7 @@ void SelectionPointer::renderSelectionPointer(GLuint defaultFboHandle, bool useO
QMatrix4x4 projectionMatrix;
GLfloat viewPortRatio = (GLfloat)m_mainViewPort.width() / (GLfloat)m_mainViewPort.height();
if (m_cachedIsSlicingActivated) {
- GLfloat sliceUnitsScaled = sliceUnits / m_autoScaleAdjustment;
+ GLfloat sliceUnitsScaled = spSliceUnits / m_autoScaleAdjustment;
viewMatrix.lookAt(QVector3D(0.0f, 0.0f, 1.0f), zeroVector, upVector);
projectionMatrix.ortho(-sliceUnitsScaled * viewPortRatio, sliceUnitsScaled * viewPortRatio,
-sliceUnitsScaled, sliceUnitsScaled,
@@ -164,7 +138,7 @@ void SelectionPointer::renderSelectionLabel(GLuint defaultFboHandle, bool useOrt
QMatrix4x4 projectionMatrix;
GLfloat viewPortRatio = (GLfloat)m_mainViewPort.width() / (GLfloat)m_mainViewPort.height();
if (m_cachedIsSlicingActivated) {
- GLfloat sliceUnitsScaled = sliceUnits / m_autoScaleAdjustment;
+ GLfloat sliceUnitsScaled = spSliceUnits / m_autoScaleAdjustment;
viewMatrix.lookAt(QVector3D(0.0f, 0.0f, 1.0f), zeroVector, upVector);
projectionMatrix.ortho(-sliceUnitsScaled * viewPortRatio, sliceUnitsScaled * viewPortRatio,
-sliceUnitsScaled, sliceUnitsScaled,
@@ -305,4 +279,4 @@ void SelectionPointer::initShaders()
m_pointShader->initialize();
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/selectionpointer_p.h b/src/datavisualization/engine/selectionpointer_p.h
index 0ba9b53a..42041b9e 100644
--- a/src/datavisualization/engine/selectionpointer_p.h
+++ b/src/datavisualization/engine/selectionpointer_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "surface3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ShaderHelper;
class ObjectHelper;
@@ -95,6 +69,6 @@ private:
QQuaternion m_rotation;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/seriesrendercache.cpp b/src/datavisualization/engine/seriesrendercache.cpp
index 29c7a633..4794f605 100644
--- a/src/datavisualization/engine/seriesrendercache.cpp
+++ b/src/datavisualization/engine/seriesrendercache.cpp
@@ -1,38 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "seriesrendercache_p.h"
#include "abstract3drenderer_p.h"
#include "texturehelper_p.h"
#include "utils_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
const QString smoothString(QStringLiteral("Smooth"));
@@ -206,4 +180,4 @@ void SeriesRenderCache::cleanup(TextureHelper *texHelper)
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/seriesrendercache_p.h b/src/datavisualization/engine/seriesrendercache_p.h
index c0932a4c..6f430a91 100644
--- a/src/datavisualization/engine/seriesrendercache_p.h
+++ b/src/datavisualization/engine/seriesrendercache_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qabstract3dseries_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Abstract3DRenderer;
class ObjectHelper;
@@ -110,7 +84,7 @@ protected:
bool m_staticObjectUVDirty;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/surface3dcontroller.cpp b/src/datavisualization/engine/surface3dcontroller.cpp
index ba845ac1..13b32666 100644
--- a/src/datavisualization/engine/surface3dcontroller.cpp
+++ b/src/datavisualization/engine/surface3dcontroller.cpp
@@ -1,31 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "surface3dcontroller_p.h"
#include "surface3drenderer_p.h"
@@ -34,7 +10,7 @@
#include "qsurface3dseries_p.h"
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
Surface3DController::Surface3DController(QRect rect, Q3DScene *scene)
: Abstract3DController(rect, scene),
@@ -602,4 +578,4 @@ void Surface3DController::adjustAxisRanges()
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/surface3dcontroller_p.h b/src/datavisualization/engine/surface3dcontroller_p.h
index 8cbfeb60..3d9276d8 100644
--- a/src/datavisualization/engine/surface3dcontroller_p.h
+++ b/src/datavisualization/engine/surface3dcontroller_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,10 +14,10 @@
#ifndef SURFACE3DCONTROLLER_P_H
#define SURFACE3DCONTROLLER_P_H
-#include "abstract3dcontroller_p.h"
-#include "datavisualizationglobal_p.h"
+#include <private/abstract3dcontroller_p.h>
+#include <private/datavisualizationglobal_p.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Surface3DRenderer;
class QSurface3DSeries;
@@ -65,7 +39,7 @@ struct Surface3DChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Surface3DController : public Abstract3DController
+class Q_DATAVISUALIZATION_EXPORT Surface3DController : public Abstract3DController
{
Q_OBJECT
@@ -95,27 +69,27 @@ public:
explicit Surface3DController(QRect rect, Q3DScene *scene = 0);
~Surface3DController();
- virtual void initializeOpenGL();
- virtual void synchDataToRenderer();
+ void initializeOpenGL() override;
+ void synchDataToRenderer() override;
- void setSelectionMode(QAbstract3DGraph::SelectionFlags mode);
+ void setSelectionMode(QAbstract3DGraph::SelectionFlags mode) override;
void setSelectedPoint(const QPoint &position, QSurface3DSeries *series, bool enterSlice);
- virtual void clearSelection();
+ void clearSelection() override;
inline QSurface3DSeries *selectedSeries() const { return m_selectedSeries; }
- virtual void handleAxisAutoAdjustRangeChangedInOrientation(
- QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust);
- virtual void handleAxisRangeChangedBySender(QObject *sender);
- virtual void handleSeriesVisibilityChangedBySender(QObject *sender);
- virtual void handlePendingClick();
- virtual void adjustAxisRanges();
+ void handleAxisAutoAdjustRangeChangedInOrientation(
+ QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust) override;
+ void handleAxisRangeChangedBySender(QObject *sender) override;
+ void handleSeriesVisibilityChangedBySender(QObject *sender) override;
+ void handlePendingClick() override;
+ void adjustAxisRanges() override;
static QPoint invalidSelectionPosition();
bool isFlatShadingSupported();
- virtual void addSeries(QAbstract3DSeries *series);
- virtual void removeSeries(QAbstract3DSeries *series);
+ void addSeries(QAbstract3DSeries *series) override;
+ void removeSeries(QAbstract3DSeries *series) override;
virtual QList<QSurface3DSeries *> surfaceSeriesList();
void setFlipHorizontalGrid(bool flip);
@@ -141,6 +115,6 @@ private:
Q_DISABLE_COPY(Surface3DController)
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp
index ea4f23e7..cffed56d 100644
--- a/src/datavisualization/engine/surface3drenderer.cpp
+++ b/src/datavisualization/engine/surface3drenderer.cpp
@@ -1,31 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "surface3drenderer_p.h"
#include "q3dcamera_p.h"
@@ -37,7 +13,7 @@
static const int ID_TO_RGBA_MASK = 0xff;
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
//#define SHOW_DEPTH_TEXTURE_SCENE
@@ -3062,4 +3038,4 @@ void Surface3DRenderer::updateMargin(float margin)
calculateSceneScalingFactors();
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/surface3drenderer_p.h b/src/datavisualization/engine/surface3drenderer_p.h
index d527f248..e60abbc0 100644
--- a/src/datavisualization/engine/surface3drenderer_p.h
+++ b/src/datavisualization/engine/surface3drenderer_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -45,12 +19,12 @@
#include "abstract3drenderer_p.h"
#include "surfaceseriesrendercache_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ShaderHelper;
class Q3DScene;
-class QT_DATAVISUALIZATION_EXPORT Surface3DRenderer : public Abstract3DRenderer
+class Q_DATAVISUALIZATION_EXPORT Surface3DRenderer : public Abstract3DRenderer
{
Q_OBJECT
@@ -92,34 +66,34 @@ public:
explicit Surface3DRenderer(Surface3DController *controller);
~Surface3DRenderer();
- void updateData();
- void updateSeries(const QList<QAbstract3DSeries *> &seriesList);
+ void updateData() override;
+ void updateSeries(const QList<QAbstract3DSeries *> &seriesList) override;
void updateSurfaceTextures(QList<QSurface3DSeries *> seriesList);
- SeriesRenderCache *createNewCache(QAbstract3DSeries *series);
- void cleanCache(SeriesRenderCache *cache);
- void updateSelectionMode(QAbstract3DGraph::SelectionFlags mode);
+ SeriesRenderCache *createNewCache(QAbstract3DSeries *series) override;
+ void cleanCache(SeriesRenderCache *cache) override;
+ void updateSelectionMode(QAbstract3DGraph::SelectionFlags mode) override;
void updateRows(const QList<Surface3DController::ChangeRow> &rows);
void updateItems(const QList<Surface3DController::ChangeItem> &points);
- void updateScene(Q3DScene *scene);
+ void updateScene(Q3DScene *scene) override;
void updateSlicingActive(bool isSlicing);
void updateSelectedPoint(const QPoint &position, QSurface3DSeries *series);
void updateFlipHorizontalGrid(bool flip);
inline QPoint clickedPosition() const { return m_clickedPosition; }
void resetClickedStatus();
- QVector3D convertPositionToTranslation(const QVector3D &position, bool isAbsolute);
+ QVector3D convertPositionToTranslation(const QVector3D &position, bool isAbsolute) override;
void updateAxisLabels(QAbstract3DAxis::AxisOrientation orientation,
- const QStringList &labels);
+ const QStringList &labels) override;
void updateAxisTitleVisibility(QAbstract3DAxis::AxisOrientation orientation,
- bool visible);
- void updateMargin(float margin);
+ bool visible) override;
+ void updateMargin(float margin) override;
- void render(GLuint defaultFboHandle = 0);
+ void render(GLuint defaultFboHandle = 0) override;
protected:
- void contextCleanup();
- void initializeOpenGL();
- virtual void fixCameraTarget(QVector3D &target);
- virtual void getVisibleItemBounds(QVector3D &minBounds, QVector3D &maxBounds);
+ void contextCleanup() override;
+ void initializeOpenGL() override;
+ virtual void fixCameraTarget(QVector3D &target) override;
+ virtual void getVisibleItemBounds(QVector3D &minBounds, QVector3D &maxBounds) override;
Q_SIGNALS:
void flatShadingSupportedChanged(bool supported);
@@ -132,9 +106,9 @@ private:
void findMatchingRow(float z, int &sample, int direction, QSurfaceDataArray &dataArray);
void findMatchingColumn(float x, int &sample, int direction, QSurfaceDataArray &dataArray);
void updateSliceObject(SurfaceSeriesRenderCache *cache, const QPoint &point);
- void updateShadowQuality(QAbstract3DGraph::ShadowQuality quality);
- void updateTextures();
- void initShaders(const QString &vertexShader, const QString &fragmentShader);
+ void updateShadowQuality(QAbstract3DGraph::ShadowQuality quality) override;
+ void updateTextures() override;
+ void initShaders(const QString &vertexShader, const QString &fragmentShader) override;
QRect calculateSampleRect(const QSurfaceDataArray &array);
void loadBackgroundMesh();
@@ -144,10 +118,10 @@ private:
const QMatrix4x4 &viewMatrix, const QMatrix4x4 &projectionMatrix);
void calculateSceneScalingFactors();
- void initBackgroundShaders(const QString &vertexShader, const QString &fragmentShader);
+ void initBackgroundShaders(const QString &vertexShader, const QString &fragmentShader) override;
void initSelectionShaders();
void initSurfaceShaders();
- void initSelectionBuffer();
+ void initSelectionBuffer() override;
void initDepthShader();
void updateSelectionTextures();
void createSelectionTexture(SurfaceSeriesRenderCache *cache, uint &lastSelectionId);
@@ -156,7 +130,7 @@ private:
void surfacePointSelected(const QPoint &point);
void updateSelectionPoint(SurfaceSeriesRenderCache *cache, const QPoint &point, bool label);
QPoint selectionIdToSurfacePoint(uint id);
- void updateDepthBuffer();
+ void updateDepthBuffer() override;
void emitSelectedPointChanged(QPoint position);
Q_DISABLE_COPY(Surface3DRenderer)
@@ -164,6 +138,6 @@ private:
friend class SurfaceObject;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/engine/surfaceseriesrendercache.cpp b/src/datavisualization/engine/surfaceseriesrendercache.cpp
index 3d2b7363..94b92ff5 100644
--- a/src/datavisualization/engine/surfaceseriesrendercache.cpp
+++ b/src/datavisualization/engine/surfaceseriesrendercache.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "surfaceseriesrendercache_p.h"
#include "surface3drenderer_p.h"
#include "texturehelper_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
SurfaceSeriesRenderCache::SurfaceSeriesRenderCache(QAbstract3DSeries *series,
Surface3DRenderer *renderer)
@@ -66,6 +40,10 @@ void SurfaceSeriesRenderCache::populate(bool newSeries)
QSurface3DSeries::DrawFlags drawMode = series()->drawMode();
m_surfaceVisible = drawMode.testFlag(QSurface3DSeries::DrawSurface);
m_surfaceGridVisible = drawMode.testFlag(QSurface3DSeries::DrawWireframe);
+ QColor lineColor = series()->wireframeColor();
+ m_surfaceObj->setLineColor(lineColor);
+ m_sliceSurfaceObj->setLineColor(lineColor);
+
if (m_flatChangeAllowed && m_surfaceFlatShading != series()->isFlatShadingEnabled()) {
m_surfaceFlatShading = series()->isFlatShadingEnabled();
m_flatStatusDirty = true;
@@ -95,4 +73,4 @@ void SurfaceSeriesRenderCache::cleanup(TextureHelper *texHelper)
SeriesRenderCache::cleanup(texHelper);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/engine/surfaceseriesrendercache_p.h b/src/datavisualization/engine/surfaceseriesrendercache_p.h
index 4d435cd5..f61e6ad3 100644
--- a/src/datavisualization/engine/surfaceseriesrendercache_p.h
+++ b/src/datavisualization/engine/surfaceseriesrendercache_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -48,7 +22,7 @@
#include <QtGui/QMatrix4x4>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Surface3DRenderer;
@@ -58,8 +32,8 @@ public:
SurfaceSeriesRenderCache(QAbstract3DSeries *series, Surface3DRenderer *renderer);
virtual ~SurfaceSeriesRenderCache();
- virtual void populate(bool newSeries);
- virtual void cleanup(TextureHelper *texHelper);
+ void populate(bool newSeries) override;
+ void cleanup(TextureHelper *texHelper) override;
inline bool surfaceVisible() const { return m_surfaceVisible; }
inline bool surfaceGridVisible() const { return m_surfaceGridVisible; }
@@ -121,6 +95,6 @@ protected:
GLuint m_surfaceTexture;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/global/datavisualizationglobal_p.h b/src/datavisualization/global/datavisualizationglobal_p.h
index 6d71255e..ff3e1f94 100644
--- a/src/datavisualization/global/datavisualizationglobal_p.h
+++ b/src/datavisualization/global/datavisualizationglobal_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -42,11 +16,12 @@
#include "qdatavisualizationglobal.h"
#include <QtGui/QOpenGLFunctions>
+#include <QtOpenGL/QOpenGLFramebufferObject>
#include <QtGui/QVector3D>
#include <QtGui/QQuaternion>
#include <QtCore/QDebug>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
// Constants used in several files
// Distance from camera to origin
@@ -83,6 +58,6 @@ static const GLfloat uniformTextureWidth = 2.0f;
static const GLfloat labelMargin = 0.05f;
static const GLfloat gridLineWidth = 0.005f;
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/global/global.pri b/src/datavisualization/global/global.pri
deleted file mode 100644
index a43ffb20..00000000
--- a/src/datavisualization/global/global.pri
+++ /dev/null
@@ -1,5 +0,0 @@
-HEADERS += \
- $$PWD/qdatavisualizationglobal.h \
- $$PWD/datavisualizationglobal_p.h
-
-INCLUDEPATH += $$PWD
diff --git a/src/datavisualization/global/qdatavisualizationglobal.h b/src/datavisualization/global/qdatavisualizationglobal.h
index 1755ba21..5a67d1c1 100644
--- a/src/datavisualization/global/qdatavisualizationglobal.h
+++ b/src/datavisualization/global/qdatavisualizationglobal.h
@@ -1,36 +1,13 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QDATAVISUALIZATIONGLOBAL_H
#define QDATAVISUALIZATIONGLOBAL_H
#include <QtCore/qglobal.h>
+#include <QtDataVisualization/qtdatavisualizationexports.h>
+
+QT_BEGIN_NAMESPACE
#define QT_DATAVISUALIZATION_VERSION_STR QT_VERSION_STR
/*
@@ -42,22 +19,6 @@
*/
#define QT_DATAVISUALIZATION_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
-#ifndef QT_STATIC
-# if defined(QT_BUILD_DATAVISUALIZATION_LIB)
-# define QT_DATAVISUALIZATION_EXPORT Q_DECL_EXPORT
-# else
-# define QT_DATAVISUALIZATION_EXPORT Q_DECL_IMPORT
-# endif
-#else
-# define QT_DATAVISUALIZATION_EXPORT
-#endif
-
-#ifndef Q_CLANG_QDOC
-#define QT_BEGIN_NAMESPACE_DATAVISUALIZATION namespace QtDataVisualization {
-#define QT_END_NAMESPACE_DATAVISUALIZATION }
-#else /* Let documentation be generated with the standard Qt namespace */
-#define QT_BEGIN_NAMESPACE_DATAVISUALIZATION QT_BEGIN_NAMESPACE
-#define QT_END_NAMESPACE_DATAVISUALIZATION QT_END_NAMESPACE
-#endif // Q_CLANG_QDOC
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/input/input.pri b/src/datavisualization/input/input.pri
deleted file mode 100644
index f6b9fd6a..00000000
--- a/src/datavisualization/input/input.pri
+++ /dev/null
@@ -1,14 +0,0 @@
-HEADERS += \
- $$PWD/qabstract3dinputhandler.h \
- $$PWD/q3dinputhandler.h \
- $$PWD/qtouch3dinputhandler.h \
- $$PWD/qabstract3dinputhandler_p.h \
- $$PWD/q3dinputhandler_p.h \
- $$PWD/qtouch3dinputhandler_p.h
-
-SOURCES += \
- $$PWD/qabstract3dinputhandler.cpp \
- $$PWD/q3dinputhandler.cpp \
- $$PWD/qtouch3dinputhandler.cpp
-
-INCLUDEPATH += $$PWD
diff --git a/src/datavisualization/input/q3dinputhandler.cpp b/src/datavisualization/input/q3dinputhandler.cpp
index 3d5dd059..f62aaf70 100644
--- a/src/datavisualization/input/q3dinputhandler.cpp
+++ b/src/datavisualization/input/q3dinputhandler.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "datavisualizationglobal_p.h"
#include "q3dinputhandler_p.h"
#include "abstract3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
static const int halfSizeZoomLevel = 50;
static const int oneToOneZoomLevel = 100;
@@ -42,7 +16,7 @@ static const int nearZoomRangeDivider = 12;
static const int midZoomRangeDivider = 60;
static const int farZoomRangeDivider = 120;
-static const float rotationSpeed = 100.0f;
+[[maybe_unused]] static const float rotationSpeed = 100.0f;
/*!
* \class Q3DInputHandler
@@ -435,4 +409,4 @@ void Q3DInputHandlerPrivate::handleQueriedGraphPositionChange()
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/input/q3dinputhandler.h b/src/datavisualization/input/q3dinputhandler.h
index df3d5cb6..be977385 100644
--- a/src/datavisualization/input/q3dinputhandler.h
+++ b/src/datavisualization/input/q3dinputhandler.h
@@ -1,42 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DINPUTHANDLER_H
#define Q3DINPUTHANDLER_H
#include <QtDataVisualization/qabstract3dinputhandler.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DInputHandlerPrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DInputHandler : public QAbstract3DInputHandler
+class Q_DATAVISUALIZATION_EXPORT Q3DInputHandler : public QAbstract3DInputHandler
{
Q_OBJECT
Q_PROPERTY(bool rotationEnabled READ isRotationEnabled WRITE setRotationEnabled NOTIFY rotationEnabledChanged)
@@ -58,11 +32,11 @@ public:
bool isZoomAtTargetEnabled() const;
// Input event listeners
- virtual void mousePressEvent(QMouseEvent *event, const QPoint &mousePos);
- virtual void mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos);
- virtual void mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos);
+ void mousePressEvent(QMouseEvent *event, const QPoint &mousePos) override;
+ void mouseReleaseEvent(QMouseEvent *event, const QPoint &mousePos) override;
+ void mouseMoveEvent(QMouseEvent *event, const QPoint &mousePos) override;
#if QT_CONFIG(wheelevent)
- virtual void wheelEvent(QWheelEvent *event);
+ void wheelEvent(QWheelEvent *event) override;
#endif
Q_SIGNALS:
@@ -77,6 +51,6 @@ private:
QScopedPointer<Q3DInputHandlerPrivate> d_ptr;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/input/q3dinputhandler_p.h b/src/datavisualization/input/q3dinputhandler_p.h
index 248bd594..b9244fb8 100644
--- a/src/datavisualization/input/q3dinputhandler_p.h
+++ b/src/datavisualization/input/q3dinputhandler_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "qabstract3dinputhandler_p.h"
#include "q3dinputhandler.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Abstract3DController;
@@ -77,6 +51,6 @@ protected:
friend class Q3DInputHandler;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/input/qabstract3dinputhandler.cpp b/src/datavisualization/input/qabstract3dinputhandler.cpp
index 2809bee3..bb19e7f9 100644
--- a/src/datavisualization/input/qabstract3dinputhandler.cpp
+++ b/src/datavisualization/input/qabstract3dinputhandler.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qabstract3dinputhandler_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class QAbstract3DInputHandler
@@ -259,4 +233,4 @@ QAbstract3DInputHandlerPrivate::~QAbstract3DInputHandlerPrivate()
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/input/qabstract3dinputhandler.h b/src/datavisualization/input/qabstract3dinputhandler.h
index 21cabc47..8ef40600 100644
--- a/src/datavisualization/input/qabstract3dinputhandler.h
+++ b/src/datavisualization/input/qabstract3dinputhandler.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QABSTRACT3DINPUTHANDLER_H
#define QABSTRACT3DINPUTHANDLER_H
@@ -38,11 +12,11 @@
#include <QtGui/QMouseEvent>
#include <QtGui/QTouchEvent>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DInputHandlerPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstract3DInputHandler : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstract3DInputHandler : public QObject
{
Q_OBJECT
Q_ENUMS(InputView)
@@ -101,6 +75,6 @@ private:
friend class QTouch3DInputHandlerPrivate;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/input/qabstract3dinputhandler_p.h b/src/datavisualization/input/qabstract3dinputhandler_p.h
index ee43fb37..3c664871 100644
--- a/src/datavisualization/input/qabstract3dinputhandler_p.h
+++ b/src/datavisualization/input/qabstract3dinputhandler_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "qabstract3dinputhandler.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DInputHandler;
class Q3DScene;
@@ -77,6 +51,6 @@ private:
friend class Abstract3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/input/qtouch3dinputhandler.cpp b/src/datavisualization/input/qtouch3dinputhandler.cpp
index 7d5d5d15..35b79a9f 100644
--- a/src/datavisualization/input/qtouch3dinputhandler.cpp
+++ b/src/datavisualization/input/qtouch3dinputhandler.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "qtouch3dinputhandler_p.h"
#include <QtCore/QTimer>
#include <QtCore/qmath.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
static const float maxTapAndHoldJitter = 20.0f;
static const int maxPinchJitter = 10;
@@ -41,7 +15,7 @@ static const int maxSelectionJitter = 10;
static const int maxSelectionJitter = 5;
#endif
static const int tapAndHoldTime = 250;
-static const float rotationSpeed = 200.0f;
+static const float t3ihRotationSpeed = 200.0f;
static const float touchZoomDrift = 0.02f;
/*!
@@ -119,15 +93,15 @@ QTouch3DInputHandler::~QTouch3DInputHandler()
void QTouch3DInputHandler::touchEvent(QTouchEvent *event)
{
QList<QTouchEvent::TouchPoint> points;
- points = event->touchPoints();
+ points = event->points();
- if (!scene()->isSlicingActive() && points.count() == 2) {
+ if (!scene()->isSlicingActive() && points.size() == 2) {
d_ptr->m_holdTimer->stop();
- QPointF distance = points.at(0).pos() - points.at(1).pos();
- QPoint midPoint = ((points.at(0).pos() + points.at(1).pos()) / 2.0).toPoint();
+ QPointF distance = points.at(0).position() - points.at(1).position();
+ QPoint midPoint = ((points.at(0).position() + points.at(1).position()) / 2.0).toPoint();
d_ptr->handlePinchZoom(distance.manhattanLength(), midPoint);
- } else if (points.count() == 1) {
- QPointF pointerPos = points.at(0).pos();
+ } else if (points.size() == 1) {
+ QPointF pointerPos = points.at(0).position();
if (event->type() == QEvent::TouchBegin) {
// Flush input state
d_ptr->m_inputState = QAbstract3DInputHandlerPrivate::InputStateNone;
@@ -265,9 +239,9 @@ void QTouch3DInputHandlerPrivate::handleRotation(const QPointF &position)
float yRotation = camera->yRotation();
QPointF inputPos = q_ptr->inputPosition();
float mouseMoveX = float(inputPos.x() - position.x())
- / (scene->viewport().width() / rotationSpeed);
+ / (scene->viewport().width() / t3ihRotationSpeed);
float mouseMoveY = float(inputPos.y() - position.y())
- / (scene->viewport().height() / rotationSpeed);
+ / (scene->viewport().height() / t3ihRotationSpeed);
xRotation -= mouseMoveX;
yRotation -= mouseMoveY;
camera->setXRotation(xRotation);
@@ -278,4 +252,4 @@ void QTouch3DInputHandlerPrivate::handleRotation(const QPointF &position)
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/input/qtouch3dinputhandler.h b/src/datavisualization/input/qtouch3dinputhandler.h
index 468cd67f..ba7c5ba4 100644
--- a/src/datavisualization/input/qtouch3dinputhandler.h
+++ b/src/datavisualization/input/qtouch3dinputhandler.h
@@ -1,42 +1,16 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QTOUCH3DINPUTHANDLER_H
#define QTOUCH3DINPUTHANDLER_H
#include <QtDataVisualization/q3dinputhandler.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QTouch3DInputHandlerPrivate;
-class QT_DATAVISUALIZATION_EXPORT QTouch3DInputHandler : public Q3DInputHandler
+class Q_DATAVISUALIZATION_EXPORT QTouch3DInputHandler : public Q3DInputHandler
{
Q_OBJECT
@@ -45,7 +19,7 @@ public:
virtual ~QTouch3DInputHandler();
// Input event listeners
- virtual void touchEvent(QTouchEvent *event);
+ void touchEvent(QTouchEvent *event) override;
private:
Q_DISABLE_COPY(QTouch3DInputHandler)
@@ -53,6 +27,6 @@ private:
QScopedPointer<QTouch3DInputHandlerPrivate> d_ptr;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/input/qtouch3dinputhandler_p.h b/src/datavisualization/input/qtouch3dinputhandler_p.h
index 940c7653..fbfe0e10 100644
--- a/src/datavisualization/input/qtouch3dinputhandler_p.h
+++ b/src/datavisualization/input/qtouch3dinputhandler_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QTOUCH3DINPUTHANDLER_P_H
#define QTOUCH3DINPUTHANDLER_P_H
@@ -45,7 +19,7 @@
QT_FORWARD_DECLARE_CLASS(QTimer)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class QAbstract3DInputHandler;
@@ -71,6 +45,6 @@ public:
QPointF m_touchHoldPos;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/theme/q3dtheme.cpp b/src/datavisualization/theme/q3dtheme.cpp
index 46a7a5c3..0b56210b 100644
--- a/src/datavisualization/theme/q3dtheme.cpp
+++ b/src/datavisualization/theme/q3dtheme.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "q3dtheme_p.h"
#include "thememanager_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
/*!
* \class Q3DTheme
@@ -335,6 +309,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \qmlproperty color Theme3D::gridLineColor
*
* The color of the grid lines.
+ *
+ * \note Transparency is not supported and will result in undefined behavior.
*/
/*!
@@ -343,6 +319,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The highlight color for a selected object. Used if
* \l{AbstractGraph3D::selectionMode}{selectionMode}
* has the \c AbstractGraph3D.SelectionItem flag set.
+ *
+ * \note Transparency is not supported and will result in undefined behavior.
*/
/*!
@@ -352,6 +330,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \l{AbstractGraph3D::selectionMode}{selectionMode}
* has the \c AbstractGraph3D.SelectionRow or \c AbstractGraph3D.SelectionColumn
* flag set.
+ *
+ * \note Transparency is not supported and will result in undefined behavior.
*/
/*!
@@ -380,6 +360,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* The highlight gradient for a selected object. Used if
* \l{AbstractGraph3D::selectionMode}{selectionMode}
* has the \c AbstractGraph3D.SelectionItem flag set.
+ *
+ * \note Transparency is not supported and will result in undefined behavior.
*/
/*!
@@ -389,6 +371,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \l{AbstractGraph3D::selectionMode}{selectionMode}
* has the \c AbstractGraph3D.SelectionRow or \c AbstractGraph3D.SelectionColumn
* flag set.
+ *
+ * \note Transparency is not supported and will result in undefined behavior.
*/
/*!
@@ -632,6 +616,8 @@ QColor Q3DTheme::labelBackgroundColor() const
* \property Q3DTheme::gridLineColor
*
* \brief The color of the grid lines.
+ *
+ * \note Transparency is not supported and will result in undefined behavior.
*/
void Q3DTheme::setGridLineColor(const QColor &color)
{
@@ -1022,11 +1008,13 @@ Q3DTheme::ColorStyle Q3DTheme::colorStyle() const
*/
void Q3DTheme::setType(Theme themeType)
{
- d_ptr->m_dirtyBits.themeIdDirty = true;
- if (d_ptr->m_themeId != themeType) {
- d_ptr->m_themeId = themeType;
- ThemeManager::setPredefinedPropertiesToTheme(this, themeType);
- emit typeChanged(themeType);
+ if (themeType >= ThemeQt && themeType <= ThemeUserDefined) {
+ d_ptr->m_dirtyBits.themeIdDirty = true;
+ if (d_ptr->m_themeId != themeType) {
+ d_ptr->m_themeId = themeType;
+ ThemeManager::setPredefinedPropertiesToTheme(this, themeType);
+ emit typeChanged(themeType);
+ }
}
}
@@ -1203,4 +1191,4 @@ bool Q3DThemePrivate::sync(Q3DThemePrivate &other)
return updateDrawer;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/theme/q3dtheme.h b/src/datavisualization/theme/q3dtheme.h
index e0a49631..5087d854 100644
--- a/src/datavisualization/theme/q3dtheme.h
+++ b/src/datavisualization/theme/q3dtheme.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef Q3DTHEME_H
#define Q3DTHEME_H
@@ -36,11 +10,11 @@
#include <QtGui/QFont>
#include <QtGui/QColor>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Q3DThemePrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DTheme : public QObject
+class Q_DATAVISUALIZATION_EXPORT Q3DTheme : public QObject
{
Q_OBJECT
Q_ENUMS(ColorStyle)
@@ -76,7 +50,7 @@ public:
};
enum Theme {
- ThemeQt,
+ ThemeQt = 0,
ThemePrimaryColors,
ThemeDigia,
ThemeStoneMoss,
@@ -197,6 +171,6 @@ private:
friend class Abstract3DController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/theme/q3dtheme_p.h b/src/datavisualization/theme/q3dtheme_p.h
index 6061fd38..ae054faf 100644
--- a/src/datavisualization/theme/q3dtheme_p.h
+++ b/src/datavisualization/theme/q3dtheme_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,10 +14,10 @@
#ifndef Q3DTHEME_P_H
#define Q3DTHEME_P_H
-#include "datavisualizationglobal_p.h"
+#include <private/datavisualizationglobal_p.h>
#include "q3dtheme.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
struct Q3DThemeDirtyBitField {
bool baseColorDirty : 1;
@@ -96,7 +70,7 @@ struct Q3DThemeDirtyBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Q3DThemePrivate : public QObject
+class Q_DATAVISUALIZATION_EXPORT Q3DThemePrivate : public QObject
{
Q_OBJECT
public:
@@ -155,6 +129,6 @@ protected:
Q3DTheme *q_ptr;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/theme/theme.pri b/src/datavisualization/theme/theme.pri
deleted file mode 100644
index cf7b434c..00000000
--- a/src/datavisualization/theme/theme.pri
+++ /dev/null
@@ -1,10 +0,0 @@
-HEADERS += \
- $$PWD/q3dtheme.h \
- $$PWD/q3dtheme_p.h \
- $$PWD/thememanager_p.h
-
-SOURCES += \
- $$PWD/q3dtheme.cpp \
- $$PWD/thememanager.cpp
-
-INCLUDEPATH += $$PWD
diff --git a/src/datavisualization/theme/thememanager.cpp b/src/datavisualization/theme/thememanager.cpp
index 01c7c10b..8dfd6a72 100644
--- a/src/datavisualization/theme/thememanager.cpp
+++ b/src/datavisualization/theme/thememanager.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "thememanager_p.h"
#include "q3dtheme_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
const float defaultBuiltInColorLevel = 0.7f; // for built-in gradient themes
const float defaultColorLevel = 0.5f; // for built-in uniform themes
@@ -101,7 +75,8 @@ void ThemeManager::setActiveTheme(Q3DTheme *theme)
m_activeTheme = theme;
// Reset all bits to dirty for sync
- m_activeTheme->d_ptr->resetDirtyBits();
+ if (theme->d_ptr->isForcePredefinedType())
+ m_activeTheme->d_ptr->resetDirtyBits();
// Connect signals from new one
connectThemeSignals();
@@ -601,4 +576,4 @@ void ThemeManager::setColorStyle(Q3DTheme *theme, Q3DTheme::ColorStyle style)
theme->setColorStyle(style);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/theme/thememanager_p.h b/src/datavisualization/theme/thememanager_p.h
index 2e0be5f0..ea28bd1f 100644
--- a/src/datavisualization/theme/thememanager_p.h
+++ b/src/datavisualization/theme/thememanager_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "abstract3dcontroller_p.h"
#include "q3dtheme.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ThemeManager : public QObject
{
@@ -92,6 +66,6 @@ private:
Abstract3DController *m_controller;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/abstractobjecthelper.cpp b/src/datavisualization/utils/abstractobjecthelper.cpp
index db0318ce..a99bdfac 100644
--- a/src/datavisualization/utils/abstractobjecthelper.cpp
+++ b/src/datavisualization/utils/abstractobjecthelper.cpp
@@ -1,35 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "abstractobjecthelper_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
AbstractObjectHelper::AbstractObjectHelper()
: m_vertexbuffer(0),
@@ -85,4 +59,4 @@ GLuint AbstractObjectHelper::indexCount()
return m_indexCount;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/abstractobjecthelper_p.h b/src/datavisualization/utils/abstractobjecthelper_p.h
index cb03b156..918db4e4 100644
--- a/src/datavisualization/utils/abstractobjecthelper_p.h
+++ b/src/datavisualization/utils/abstractobjecthelper_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -42,7 +16,7 @@
#include "datavisualizationglobal_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class AbstractObjectHelper: protected QOpenGLFunctions
{
@@ -67,6 +41,6 @@ public:
GLboolean m_meshDataLoaded;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/camerahelper.cpp b/src/datavisualization/utils/camerahelper.cpp
index 38091b49..1a8c8823 100644
--- a/src/datavisualization/utils/camerahelper.cpp
+++ b/src/datavisualization/utils/camerahelper.cpp
@@ -1,38 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "camerahelper_p.h"
#include <QtCore/qmath.h>
#include <QtGui/QMatrix4x4>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
CameraHelper::CameraHelper(QObject *parent) :
QObject(parent),
@@ -265,4 +239,4 @@ void CameraHelper::setCameraPreset(Q3DCamera::CameraPreset preset)
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/camerahelper_p.h b/src/datavisualization/utils/camerahelper_p.h
index fd28e3e6..88c556b3 100644
--- a/src/datavisualization/utils/camerahelper_p.h
+++ b/src/datavisualization/utils/camerahelper_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -48,7 +22,7 @@ class QMatrix4x4;
class QPoint;
QT_END_NAMESPACE
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class CameraHelper : public QObject
{
@@ -95,6 +69,6 @@ public:
void setCameraPreset(Q3DCamera::CameraPreset preset);
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/meshloader.cpp b/src/datavisualization/utils/meshloader.cpp
index 2069b444..dc21b0f6 100644
--- a/src/datavisualization/utils/meshloader.cpp
+++ b/src/datavisualization/utils/meshloader.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "meshloader_p.h"
@@ -34,7 +8,7 @@
#include <QtCore/QList>
#include <QtGui/QVector2D>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
QString slashTag = QStringLiteral("/");
@@ -81,6 +55,10 @@ bool MeshLoader::loadOBJ(const QString &path, QList<QVector3D> &out_vertices,
QStringList set1 = lineContents.at(1).split(slashTag);
QStringList set2 = lineContents.at(2).split(slashTag);
QStringList set3 = lineContents.at(3).split(slashTag);
+ if (set1.size() < 3 || set2.size() < 3 || set3.size() < 3) {
+ qWarning("The file being loaded is missing UVs and/or normals");
+ return false;
+ }
vertexIndex[0] = set1.at(0).toUInt();
vertexIndex[1] = set2.at(0).toUInt();
vertexIndex[2] = set3.at(0).toUInt();
@@ -123,4 +101,4 @@ bool MeshLoader::loadOBJ(const QString &path, QList<QVector3D> &out_vertices,
return true;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/meshloader_p.h b/src/datavisualization/utils/meshloader_p.h
index e8f60ffc..cbd4036b 100644
--- a/src/datavisualization/utils/meshloader_p.h
+++ b/src/datavisualization/utils/meshloader_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include <QtGui/QVector2D>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class MeshLoader
{
@@ -52,6 +26,6 @@ class MeshLoader
QList<QVector2D> &out_uvs, QList<QVector3D> &out_normals);
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/objecthelper.cpp b/src/datavisualization/utils/objecthelper.cpp
index 410a22d7..6053b255 100644
--- a/src/datavisualization/utils/objecthelper.cpp
+++ b/src/datavisualization/utils/objecthelper.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "meshloader_p.h"
#include "vertexindexer_p.h"
#include "objecthelper_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
ObjectHelper::ObjectHelper(const QString &objectFile)
: m_objectFile(objectFile)
@@ -113,10 +87,19 @@ ObjectHelper *ObjectHelper::getObjectHelper(const Abstract3DRenderer *cacheId,
objRef = new ObjectHelperRef;
objRef->refCount = 0;
objRef->obj = new ObjectHelper(objectFile);
- objectTable->insert(objectFile, objRef);
+ if (objRef->obj->m_meshDataLoaded) {
+ objectTable->insert(objectFile, objRef);
+ } else {
+ delete objRef->obj;
+ delete objRef;
+ objRef = nullptr;
+ }
+ }
+ if (objRef) {
+ objRef->refCount++;
+ return objRef->obj;
}
- objRef->refCount++;
- return objRef->obj;
+ return nullptr;
}
void ObjectHelper::load()
@@ -140,41 +123,44 @@ void ObjectHelper::load()
QList<QVector2D> uvs;
QList<QVector3D> normals;
bool loadOk = MeshLoader::loadOBJ(m_objectFile, vertices, uvs, normals);
- if (!loadOk)
- qFatal("loading failed");
-
- // Index vertices
- VertexIndexer::indexVBO(vertices, uvs, normals, m_indices, m_indexedVertices, m_indexedUVs,
- m_indexedNormals);
-
- m_indexCount = m_indices.size();
-
- glGenBuffers(1, &m_vertexbuffer);
- glBindBuffer(GL_ARRAY_BUFFER, m_vertexbuffer);
- glBufferData(GL_ARRAY_BUFFER, m_indexedVertices.size() * sizeof(QVector3D),
- &m_indexedVertices.at(0),
- GL_STATIC_DRAW);
- glGenBuffers(1, &m_normalbuffer);
- glBindBuffer(GL_ARRAY_BUFFER, m_normalbuffer);
- glBufferData(GL_ARRAY_BUFFER, m_indexedNormals.size() * sizeof(QVector3D),
- &m_indexedNormals.at(0),
- GL_STATIC_DRAW);
-
- glGenBuffers(1, &m_uvbuffer);
- glBindBuffer(GL_ARRAY_BUFFER, m_uvbuffer);
- glBufferData(GL_ARRAY_BUFFER, m_indexedUVs.size() * sizeof(QVector2D),
- &m_indexedUVs.at(0), GL_STATIC_DRAW);
-
- glGenBuffers(1, &m_elementbuffer);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_elementbuffer);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_indices.size() * sizeof(GLuint),
- &m_indices.at(0), GL_STATIC_DRAW);
-
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
- m_meshDataLoaded = true;
+ if (!loadOk) {
+ qCritical() << "Loading" << m_objectFile << "failed";
+ m_meshDataLoaded = false;
+ } else {
+ // Index vertices
+ VertexIndexer::indexVBO(vertices, uvs, normals, m_indices, m_indexedVertices, m_indexedUVs,
+ m_indexedNormals);
+
+ m_indexCount = m_indices.size();
+
+ glGenBuffers(1, &m_vertexbuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_vertexbuffer);
+ glBufferData(GL_ARRAY_BUFFER, m_indexedVertices.size() * sizeof(QVector3D),
+ &m_indexedVertices.at(0),
+ GL_STATIC_DRAW);
+
+ glGenBuffers(1, &m_normalbuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_normalbuffer);
+ glBufferData(GL_ARRAY_BUFFER, m_indexedNormals.size() * sizeof(QVector3D),
+ &m_indexedNormals.at(0),
+ GL_STATIC_DRAW);
+
+ glGenBuffers(1, &m_uvbuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_uvbuffer);
+ glBufferData(GL_ARRAY_BUFFER, m_indexedUVs.size() * sizeof(QVector2D),
+ &m_indexedUVs.at(0), GL_STATIC_DRAW);
+
+ glGenBuffers(1, &m_elementbuffer);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_elementbuffer);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_indices.size() * sizeof(GLuint),
+ &m_indices.at(0), GL_STATIC_DRAW);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+
+ m_meshDataLoaded = true;
+ }
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/objecthelper_p.h b/src/datavisualization/utils/objecthelper_p.h
index d1c2ea78..1ac0feb0 100644
--- a/src/datavisualization/utils/objecthelper_p.h
+++ b/src/datavisualization/utils/objecthelper_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,7 +17,7 @@
#include "datavisualizationglobal_p.h"
#include "abstractobjecthelper_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Abstract3DRenderer;
@@ -76,6 +50,6 @@ private:
QList<QVector3D> m_indexedNormals;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/qutils.h b/src/datavisualization/utils/qutils.h
index b7001652..6b58a977 100644
--- a/src/datavisualization/utils/qutils.h
+++ b/src/datavisualization/utils/qutils.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QUTILS_H
#define QUTILS_H
@@ -36,11 +10,9 @@
#include <QtGui/QOffscreenSurface>
#include <QtCore/QCoreApplication>
-namespace QtDataVisualization {
+QT_BEGIN_NAMESPACE
-#ifndef Q_QDOC
-static inline QSurfaceFormat qDefaultSurfaceFormat(bool antialias = true) Q_DECL_UNUSED;
-#endif
+[[maybe_unused]]
static inline QSurfaceFormat qDefaultSurfaceFormat(bool antialias)
{
bool isES = false;
@@ -65,7 +37,7 @@ static inline QSurfaceFormat qDefaultSurfaceFormat(bool antialias)
ctx->makeCurrent(dummySurface);
}
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
isES = true;
#elif (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
isES = false;
@@ -111,6 +83,6 @@ static inline QSurfaceFormat qDefaultSurfaceFormat(bool antialias)
return surfaceFormat;
}
-}
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/scatterobjectbufferhelper.cpp b/src/datavisualization/utils/scatterobjectbufferhelper.cpp
index 8e06617b..0a04d038 100644
--- a/src/datavisualization/utils/scatterobjectbufferhelper.cpp
+++ b/src/datavisualization/utils/scatterobjectbufferhelper.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "scatterobjectbufferhelper_p.h"
#include "objecthelper_p.h"
@@ -33,9 +7,9 @@
#include <QtGui/QMatrix4x4>
#include <QtCore/qmath.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
-const GLfloat itemScaler = 3.0f;
+const GLfloat ScatterObjectBufferHelper::itemScaler = 3.0f;
ScatterObjectBufferHelper::ScatterObjectBufferHelper()
: m_scaleY(0.0f)
@@ -48,7 +22,6 @@ ScatterObjectBufferHelper::~ScatterObjectBufferHelper()
void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal dotScale)
{
- m_meshDataLoaded = false;
m_indexCount = 0;
ObjectHelper *dotObj = cache->object();
@@ -71,6 +44,7 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal
m_uvbuffer = 0;
m_normalbuffer = 0;
m_elementbuffer = 0;
+ m_meshDataLoaded = false;
}
// Index vertices
@@ -78,10 +52,10 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal
const QList<QVector3D> indexed_vertices = dotObj->indexedvertices();
const QList<QVector2D> indexed_uvs = dotObj->indexedUVs();
const QList<QVector3D> indexed_normals = dotObj->indexedNormals();
- const int indicesCount = indices.count();
- const int verticeCount = indexed_vertices.count();
- const int uvsCount = indexed_uvs.count();
- const int normalsCount = indexed_normals.count();
+ const int indicesCount = indices.size();
+ const int verticeCount = indexed_vertices.size();
+ const int uvsCount = indexed_uvs.size();
+ const int normalsCount = indexed_normals.size();
float itemSize = cache->itemSize() / itemScaler;
if (itemSize == 0.0f)
@@ -98,7 +72,7 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal
QList<QVector3D> scaled_vertices;
scaled_vertices.resize(verticeCount);
for (int i = 0; i < verticeCount; i++)
- scaled_vertices[i] = indexed_vertices[i] * modelMatrix;
+ scaled_vertices[i] = (QVector4D(indexed_vertices[i]) * modelMatrix).toVector3D();
QList<GLuint> buffered_indices;
QList<QVector3D> buffered_vertices;
@@ -141,9 +115,11 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal
modelMatrix = matrix.transposed(); // Because of row-column major difference
for (int j = 0; j < verticeCount; j++) {
- buffered_vertices[j + offset] = indexed_vertices[j] * modelMatrix
+ buffered_vertices[j + offset]
+ = (QVector4D(indexed_vertices[j]) * modelMatrix).toVector3D()
+ item.translation();
- buffered_normals[j + offset] = indexed_normals[j] * itModelMatrix;
+ buffered_normals[j + offset]
+ = (QVector4D(indexed_normals[j]) * itModelMatrix).toVector3D();
}
}
@@ -196,7 +172,7 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal
void ScatterObjectBufferHelper::updateUVs(ScatterSeriesRenderCache *cache)
{
ObjectHelper *dotObj = cache->object();
- const int uvsCount = dotObj->indexedUVs().count();
+ const int uvsCount = dotObj->indexedUVs().size();
const ScatterRenderItemArray &renderArray = cache->renderArray();
const bool updateAll = (cache->updateIndices().size() == 0);
const int updateSize = updateAll ? renderArray.size() : cache->updateIndices().size();
@@ -237,7 +213,7 @@ uint ScatterObjectBufferHelper::createRangeGradientUVs(ScatterSeriesRenderCache
QList<QVector2D> &buffered_uvs)
{
ObjectHelper *dotObj = cache->object();
- const int uvsCount = dotObj->indexedUVs().count();
+ const int uvsCount = dotObj->indexedUVs().size();
const ScatterRenderItemArray &renderArray = cache->renderArray();
const bool updateAll = (cache->updateIndices().size() == 0);
const int updateSize = updateAll ? renderArray.size() : cache->updateIndices().size();
@@ -280,7 +256,7 @@ uint ScatterObjectBufferHelper::createObjectGradientUVs(ScatterSeriesRenderCache
const QList<QVector3D> &indexed_vertices)
{
ObjectHelper *dotObj = cache->object();
- const int uvsCount = dotObj->indexedUVs().count();
+ const int uvsCount = dotObj->indexedUVs().size();
const ScatterRenderItemArray &renderArray = cache->renderArray();
const uint renderArraySize = renderArray.size();
@@ -317,7 +293,7 @@ void ScatterObjectBufferHelper::update(ScatterSeriesRenderCache *cache, qreal do
// Index vertices
const QList<QVector3D> indexed_vertices = dotObj->indexedvertices();
- int verticeCount = indexed_vertices.count();
+ int verticeCount = indexed_vertices.size();
float itemSize = cache->itemSize() / itemScaler;
if (itemSize == 0.0f)
@@ -334,7 +310,7 @@ void ScatterObjectBufferHelper::update(ScatterSeriesRenderCache *cache, qreal do
QList<QVector3D> scaled_vertices;
scaled_vertices.resize(verticeCount);
for (int i = 0; i < verticeCount; i++)
- scaled_vertices[i] = indexed_vertices[i] * modelMatrix;
+ scaled_vertices[i] = (QVector4D(indexed_vertices[i]) * modelMatrix).toVector3D();
QList<QVector3D> buffered_vertices;
buffered_vertices.resize(verticeCount * updateSize);
@@ -356,9 +332,11 @@ void ScatterObjectBufferHelper::update(ScatterSeriesRenderCache *cache, qreal do
modelMatrix = matrix.transposed();
modelMatrix.scale(modelScaler);
- for (int j = 0; j < verticeCount; j++)
- buffered_vertices[j + offset] = indexed_vertices[j] * modelMatrix
+ for (int j = 0; j < verticeCount; j++) {
+ buffered_vertices[j + offset]
+ = (QVector4D(indexed_vertices[j]) * modelMatrix).toVector3D()
+ item.translation();
+ }
}
itemCount++;
}
@@ -386,4 +364,4 @@ void ScatterObjectBufferHelper::update(ScatterSeriesRenderCache *cache, qreal do
m_meshDataLoaded = true;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/scatterobjectbufferhelper_p.h b/src/datavisualization/utils/scatterobjectbufferhelper_p.h
index fac5e922..5328e029 100644
--- a/src/datavisualization/utils/scatterobjectbufferhelper_p.h
+++ b/src/datavisualization/utils/scatterobjectbufferhelper_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "abstractobjecthelper_p.h"
#include "scatterseriesrendercache_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ScatterObjectBufferHelper : public AbstractObjectHelper
{
@@ -63,8 +37,9 @@ private:
const QList<QVector3D> &indexed_vertices);
float m_scaleY;
+ static const GLfloat itemScaler;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/scatterpointbufferhelper.cpp b/src/datavisualization/utils/scatterpointbufferhelper.cpp
index d3621423..ccb5dd13 100644
--- a/src/datavisualization/utils/scatterpointbufferhelper.cpp
+++ b/src/datavisualization/utils/scatterpointbufferhelper.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "scatterpointbufferhelper_p.h"
#include <QtGui/QVector2D>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
const QVector3D hiddenPos(-1000.0f, -1000.0f, -1000.0f);
@@ -97,6 +71,7 @@ void ScatterPointBufferHelper::load(ScatterSeriesRenderCache *cache)
m_bufferedPoints.clear();
m_pointbuffer = 0;
m_uvbuffer = 0;
+ m_meshDataLoaded = false;
}
bool itemsVisible = false;
@@ -215,4 +190,4 @@ void ScatterPointBufferHelper::createRangeGradientUVs(ScatterSeriesRenderCache *
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/scatterpointbufferhelper_p.h b/src/datavisualization/utils/scatterpointbufferhelper_p.h
index d1e8f5b0..ff19a36e 100644
--- a/src/datavisualization/utils/scatterpointbufferhelper_p.h
+++ b/src/datavisualization/utils/scatterpointbufferhelper_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
#include "abstractobjecthelper_p.h"
#include "scatterseriesrendercache_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ScatterPointBufferHelper : public AbstractObjectHelper
{
@@ -73,6 +47,6 @@ private:
float m_scaleY;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/shaderhelper.cpp b/src/datavisualization/utils/shaderhelper.cpp
index ba029be2..7de9592d 100644
--- a/src/datavisualization/utils/shaderhelper.cpp
+++ b/src/datavisualization/utils/shaderhelper.cpp
@@ -1,37 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "shaderhelper_p.h"
#include <QtOpenGL/QOpenGLShader>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
void discardDebugMsgs(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
@@ -113,7 +87,12 @@ void ShaderHelper::initialize()
qFatal("Compiling Vertex shader failed");
if (!m_program->addShaderFromSourceFile(QOpenGLShader::Fragment, m_fragmentShaderFile))
qFatal("Compiling Fragment shader failed");
- m_program->link();
+
+ if (!m_program->link()) {
+ qWarning() << "Unable to link shader program:" <<
+ m_vertexShaderFile << m_fragmentShaderFile;
+ return;
+ }
m_positionAttr = m_program->attributeLocation("vertexPosition_mdl");
m_normalAttr = m_program->attributeLocation("vertexNormal_mdl");
@@ -416,4 +395,4 @@ GLint ShaderHelper::normalAtt()
return m_normalAttr;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/shaderhelper_p.h b/src/datavisualization/utils/shaderhelper_p.h
index c4e4a717..93f861b2 100644
--- a/src/datavisualization/utils/shaderhelper_p.h
+++ b/src/datavisualization/utils/shaderhelper_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
QT_FORWARD_DECLARE_CLASS(QOpenGLShaderProgram)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class ShaderHelper
{
@@ -146,6 +120,6 @@ class ShaderHelper
GLboolean m_initialized;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/surfaceobject.cpp b/src/datavisualization/utils/surfaceobject.cpp
index 96a75422..30635e6c 100644
--- a/src/datavisualization/utils/surfaceobject.cpp
+++ b/src/datavisualization/utils/surfaceobject.cpp
@@ -1,38 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "surfaceobject_p.h"
#include "surface3drenderer_p.h"
#include <QtGui/QVector2D>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
SurfaceObject::SurfaceObject(Surface3DRenderer *renderer)
: m_axisCacheX(renderer->m_axisCacheX),
@@ -870,7 +844,8 @@ void SurfaceObject::getNormalizedVertex(const QSurfaceDataItem &data, QVector3D
}
float normalizedY = m_axisCacheY.positionAt(data.y());
m_minY = qMin(normalizedY, m_minY);
- m_maxY = qMax(normalizedY, m_maxY);
+ if (!qIsNaN(normalizedY) && !qIsInf(normalizedY))
+ m_maxY = qMax(normalizedY, m_maxY);
vertex.setX(normalizedX);
vertex.setY(normalizedY);
vertex.setZ(normalizedZ);
@@ -992,4 +967,4 @@ QVector3D SurfaceObject::normal(const QVector3D &a, const QVector3D &b, const QV
return normal;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/surfaceobject_p.h b/src/datavisualization/utils/surfaceobject_p.h
index 532f7692..7a2b7241 100644
--- a/src/datavisualization/utils/surfaceobject_p.h
+++ b/src/datavisualization/utils/surfaceobject_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,13 +14,13 @@
#ifndef SURFACEOBJECT_P_H
#define SURFACEOBJECT_P_H
-#include "datavisualizationglobal_p.h"
#include "abstractobjecthelper_p.h"
#include "qsurfacedataproxy.h"
#include <QtCore/QRect>
+#include <QtGui/QColor>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Surface3DRenderer;
class AxisRenderCache;
@@ -88,13 +62,15 @@ public:
void createCoarseGridlineIndices(int x, int y, int endX, int endY);
void uploadBuffers();
GLuint gridElementBuf();
- GLuint uvBuf();
+ GLuint uvBuf() override;
GLuint gridIndexCount();
QVector3D vertexAt(int column, int row);
void clear();
float minYValue() const { return m_minY; }
float maxYValue() const { return m_maxY; }
inline void activateSurfaceTexture(bool value) { m_returnTextureBuffer = value; }
+ inline void setLineColor(const QColor &color) { m_wireframeColor = color; }
+ inline const QColor &wireframeColor() const { return m_wireframeColor; }
private:
void createCoarseIndices(GLint *indices, int &p, int row, int upperRow, int j);
@@ -129,8 +105,9 @@ private:
bool m_returnTextureBuffer = false;
SurfaceObject::DataDimensions m_dataDimension;
SurfaceObject::DataDimensions m_oldDataDimension = DataDimensions(-1);
+ QColor m_wireframeColor;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/texturehelper.cpp b/src/datavisualization/utils/texturehelper.cpp
index 0e66459c..c892014a 100644
--- a/src/datavisualization/utils/texturehelper.cpp
+++ b/src/datavisualization/utils/texturehelper.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "texturehelper_p.h"
#include "utils_p.h"
@@ -34,7 +8,7 @@
#include <QtGui/QPainter>
#include <QtCore/QTime>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
// Defined in shaderhelper.cpp
extern void discardDebugMsgs(QtMsgType type, const QMessageLogContext &context, const QString &msg);
@@ -42,13 +16,12 @@ extern void discardDebugMsgs(QtMsgType type, const QMessageLogContext &context,
TextureHelper::TextureHelper()
{
initializeOpenGLFunctions();
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!Utils::isOpenGLES()) {
// Discard warnings about deprecated functions
QtMessageHandler handler = qInstallMessageHandler(discardDebugMsgs);
- m_openGlFunctions_2_1 =
- QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_2_1>();
+ m_openGlFunctions_2_1 = new QOpenGLFunctions_2_1;
if (m_openGlFunctions_2_1)
m_openGlFunctions_2_1->initializeOpenGLFunctions();
@@ -63,6 +36,9 @@ TextureHelper::TextureHelper()
TextureHelper::~TextureHelper()
{
+#if !QT_CONFIG(opengles2)
+ delete m_openGlFunctions_2_1;
+#endif
}
GLuint TextureHelper::create2DTexture(const QImage &image, bool useTrilinearFiltering,
@@ -115,7 +91,7 @@ GLuint TextureHelper::create3DTexture(const QList<uchar> *data, int width, int h
return 0;
GLuint textureId = 0;
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
Q_UNUSED(dataFormat);
Q_UNUSED(data);
#else
@@ -290,7 +266,7 @@ GLuint TextureHelper::createGradientTexture(const QLinearGradient &gradient)
GLuint TextureHelper::createDepthTexture(const QSize &size, GLuint textureSize)
{
GLuint depthtextureid = 0;
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
Q_UNUSED(size);
Q_UNUSED(textureSize);
#else
@@ -316,7 +292,7 @@ GLuint TextureHelper::createDepthTextureFrameBuffer(const QSize &size, GLuint &f
GLuint textureSize)
{
GLuint depthtextureid = createDepthTexture(size, textureSize);
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
Q_UNUSED(frameBuffer);
#else
if (!Utils::isOpenGLES()) {
@@ -328,7 +304,7 @@ GLuint TextureHelper::createDepthTextureFrameBuffer(const QSize &size, GLuint &f
// Attach texture to depth attachment
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthtextureid, 0);
- m_openGlFunctions_2_1->glDrawBuffer(GL_NONE);
+ m_openGlFunctions_2_1->glDrawBuffers(0, GL_NONE);
m_openGlFunctions_2_1->glReadBuffer(GL_NONE);
// Verify that the frame buffer is complete
@@ -402,7 +378,7 @@ void TextureHelper::convertToGLFormatHelper(QImage &dstImage, const QImage &srcI
const uint *p = (const uint*) srcImage.scanLine(srcImage.height() - 1);
uint *q = (uint*) dstImage.scanLine(0);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (texture_format == GL_BGRA) {
#else
if (texture_format == GL_BGRA8_EXT) {
@@ -457,7 +433,7 @@ void TextureHelper::convertToGLFormatHelper(QImage &dstImage, const QImage &srcI
QRgb TextureHelper::qt_gl_convertToGLFormatHelper(QRgb src_pixel, GLenum texture_format)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (texture_format == GL_BGRA) {
#else
if (texture_format == GL_BGRA8_EXT) {
@@ -481,4 +457,4 @@ QRgb TextureHelper::qt_gl_convertToGLFormatHelper(QRgb src_pixel, GLenum texture
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/texturehelper_p.h b/src/datavisualization/utils/texturehelper_p.h
index fac32a42..f9baa272 100644
--- a/src/datavisualization/utils/texturehelper_p.h
+++ b/src/datavisualization/utils/texturehelper_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -43,12 +17,12 @@
#include "datavisualizationglobal_p.h"
#include <QtGui/QRgb>
#include <QtGui/QLinearGradient>
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
// 3D Textures are not supported by ES set
-# include <QtGui/QOpenGLFunctions_2_1>
+# include <QtOpenGL/QOpenGLFunctions_2_1>
#endif
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class TextureHelper : protected QOpenGLFunctions
{
@@ -77,8 +51,8 @@ class TextureHelper : protected QOpenGLFunctions
void convertToGLFormatHelper(QImage &dstImage, const QImage &srcImage, GLenum texture_format);
QRgb qt_gl_convertToGLFormatHelper(QRgb src_pixel, GLenum texture_format);
-#if !defined(QT_OPENGL_ES_2)
- QOpenGLFunctions_2_1 *m_openGlFunctions_2_1; // Not owned
+#if !QT_CONFIG(opengles2)
+ QOpenGLFunctions_2_1 *m_openGlFunctions_2_1 = nullptr;
#endif
friend class Bars3DRenderer;
friend class Surface3DRenderer;
@@ -86,6 +60,6 @@ class TextureHelper : protected QOpenGLFunctions
friend class Abstract3DRenderer;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/utils.cpp b/src/datavisualization/utils/utils.cpp
index e80058db..3470c44d 100644
--- a/src/datavisualization/utils/utils.cpp
+++ b/src/datavisualization/utils/utils.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "utils_p.h"
@@ -33,8 +7,10 @@
#include <QtGui/QOpenGLContext>
#include <QtGui/QOffscreenSurface>
#include <QtCore/QCoreApplication>
+#include <QtCore/QRegularExpression>
+#include <QLocale>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
#define NUM_IN_POWER(y, x) for (;y<x;y<<=1)
#define MIN_POWER 2
@@ -217,24 +193,28 @@ QImage Utils::getGradientImage(QLinearGradient &gradient)
Utils::ParamType Utils::preParseFormat(const QString &format, QString &preStr, QString &postStr,
int &precision, char &formatSpec)
{
- static QRegExp formatMatcher(QStringLiteral("^([^%]*)%([\\-\\+#\\s\\d\\.lhjztL]*)([dicuoxfegXFEG])(.*)$"));
- static QRegExp precisionMatcher(QStringLiteral("\\.(\\d+)"));
+ static QRegularExpression formatMatcher(QStringLiteral("^([^%]*)%([\\-\\+#\\s\\d\\.lhjztL]*)([dicuoxfegXFEG])(.*)$"));
+ static QRegularExpression precisionMatcher(QStringLiteral("\\.(\\d+)"));
Utils::ParamType retVal;
- if (formatMatcher.indexIn(format, 0) != -1) {
- preStr = formatMatcher.cap(1);
+ QRegularExpressionMatch formatMatch = formatMatcher.match(format, 0);
+
+ if (formatMatch.hasMatch()) {
+ preStr = formatMatch.captured(1);
// Six and 'g' are defaults in Qt API
precision = 6;
- if (!formatMatcher.cap(2).isEmpty()) {
- if (precisionMatcher.indexIn(formatMatcher.cap(2), 0) != -1)
- precision = precisionMatcher.cap(1).toInt();
+ if (!formatMatch.captured(2).isEmpty()) {
+ QRegularExpressionMatch precisionMatch = precisionMatcher.match(formatMatch.captured(2),
+ 0);
+ if (precisionMatch.hasMatch())
+ precision = precisionMatch.captured(1).toInt();
}
- if (formatMatcher.cap(3).isEmpty())
+ if (formatMatch.captured(3).isEmpty())
formatSpec = 'g';
else
- formatSpec = formatMatcher.cap(3).at(0).toLatin1();
- postStr = formatMatcher.cap(4);
+ formatSpec = formatMatch.captured(3).at(0).toLatin1();
+ postStr = formatMatch.captured(4);
retVal = mapFormatCharToParamType(formatSpec);
} else {
retVal = ParamTypeUnknown;
@@ -350,7 +330,7 @@ void Utils::resolveStatics()
ctx->makeCurrent(dummySurface);
}
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
isES = true;
#elif (QT_VERSION < QT_VERSION_CHECK(5, 3, 0))
isES = false;
@@ -383,4 +363,4 @@ void Utils::resolveStatics()
staticsResolved = true;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/utils.pri b/src/datavisualization/utils/utils.pri
deleted file mode 100644
index 904407b8..00000000
--- a/src/datavisualization/utils/utils.pri
+++ /dev/null
@@ -1,26 +0,0 @@
-HEADERS += $$PWD/meshloader_p.h \
- $$PWD/vertexindexer_p.h \
- $$PWD/camerahelper_p.h \
- $$PWD/shaderhelper_p.h \
- $$PWD/objecthelper_p.h \
- $$PWD/texturehelper_p.h \
- $$PWD/utils_p.h \
- $$PWD/abstractobjecthelper_p.h \
- $$PWD/surfaceobject_p.h \
- $$PWD/qutils.h \
- $$PWD/scatterobjectbufferhelper_p.h \
- $$PWD/scatterpointbufferhelper_p.h
-
-SOURCES += $$PWD/meshloader.cpp \
- $$PWD/vertexindexer.cpp \
- $$PWD/camerahelper.cpp \
- $$PWD/shaderhelper.cpp \
- $$PWD/objecthelper.cpp \
- $$PWD/texturehelper.cpp \
- $$PWD/utils.cpp \
- $$PWD/abstractobjecthelper.cpp \
- $$PWD/surfaceobject.cpp \
- $$PWD/scatterobjectbufferhelper.cpp \
- $$PWD/scatterpointbufferhelper.cpp
-
-INCLUDEPATH += $$PWD
diff --git a/src/datavisualization/utils/utils_p.h b/src/datavisualization/utils/utils_p.h
index 08f036c8..06c98407 100644
--- a/src/datavisualization/utils/utils_p.h
+++ b/src/datavisualization/utils/utils_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -44,7 +18,7 @@
QT_FORWARD_DECLARE_CLASS(QLinearGradient)
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Utils
{
@@ -87,6 +61,6 @@ private:
static ParamType mapFormatCharToParamType(char formatSpec);
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/utils/vertexindexer.cpp b/src/datavisualization/utils/vertexindexer.cpp
index 5b770366..65316c63 100644
--- a/src/datavisualization/utils/vertexindexer.cpp
+++ b/src/datavisualization/utils/vertexindexer.cpp
@@ -1,37 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "vertexindexer_p.h"
#include <QtCore/qmath.h>
+#include <QtCore/qmap.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
int unique_vertices = 0;
@@ -78,4 +53,4 @@ void VertexIndexer::indexVBO(const QList<QVector3D> &in_vertices, const QList<QV
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/vertexindexer_p.h b/src/datavisualization/utils/vertexindexer_p.h
index 42a48465..e7f0f775 100644
--- a/src/datavisualization/utils/vertexindexer_p.h
+++ b/src/datavisualization/utils/vertexindexer_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -45,7 +19,7 @@
#include <QtCore/QList>
#include <QtGui/QVector2D>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class VertexIndexer
{
@@ -70,6 +44,6 @@ private:
GLuint &result);
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml/CMakeLists.txt b/src/datavisualizationqml/CMakeLists.txt
new file mode 100644
index 00000000..110a5ef0
--- /dev/null
+++ b/src/datavisualizationqml/CMakeLists.txt
@@ -0,0 +1,66 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+set(qml_files
+ "designer/Bars3DSpecifics.qml"
+ "designer/Scatter3DSpecifics.qml"
+ "designer/Surface3DSpecifics.qml"
+ "designer/default/Bars3D.qml"
+ "designer/default/Scatter3D.qml"
+ "designer/default/Surface3D.qml"
+)
+
+set(resources
+ "designer/qtdatavisualization.metainfo"
+ "designer/images/bars3d-icon.png"
+ "designer/images/bars3d-icon16.png"
+ "designer/images/scatter3d-icon.png"
+ "designer/images/scatter3d-icon16.png"
+ "designer/images/surface3d-icon.png"
+ "designer/images/surface3d-icon16.png"
+)
+
+set_source_files_properties(${qml_files} PROPERTIES
+ QT_QML_SKIP_QMLDIR_ENTRY TRUE
+)
+
+qt_internal_add_qml_module(DataVisualizationQml
+ URI "QtDataVisualization"
+ VERSION "${PROJECT_VERSION}"
+ PAST_MAJOR_VERSIONS 1
+ DEPENDENCIES
+ QtQuick
+ SOURCES
+ abstractdeclarative.cpp abstractdeclarative_p.h
+ colorgradient.cpp colorgradient_p.h
+ declarativebars.cpp declarativebars_p.h
+ declarativecolor.cpp declarativecolor_p.h
+ declarativerendernode.cpp declarativerendernode_p.h
+ declarativescatter.cpp declarativescatter_p.h
+ declarativescene.cpp declarativescene_p.h
+ declarativeseries.cpp declarativeseries_p.h
+ declarativesurface.cpp declarativesurface_p.h
+ declarativetheme.cpp declarativetheme_p.h
+ enumtostringmap.cpp enumtostringmap_p.h
+ foreigntypes_p.h
+ glstatestore.cpp glstatestore_p.h
+ NO_PCH_SOURCES
+ declarativetheme.cpp # undef QT_NO_FOREACH
+ QML_FILES
+ ${qml_files}
+ RESOURCES
+ ${resources}
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::OpenGL
+ Qt::Qml
+ Qt::Quick
+ Qt::DataVisualizationPrivate
+ NO_GENERATE_CPP_EXPORTS
+)
+
+qt_internal_extend_target(DataVisualizationQml CONDITION MACOS
+ PUBLIC_LIBRARIES
+ Qt::GuiPrivate
+)
diff --git a/src/datavisualizationqml2/abstractdeclarative.cpp b/src/datavisualizationqml/abstractdeclarative.cpp
index 5a1edbc7..af19d46f 100644
--- a/src/datavisualizationqml2/abstractdeclarative.cpp
+++ b/src/datavisualizationqml/abstractdeclarative.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "abstractdeclarative_p.h"
#include "declarativetheme_p.h"
@@ -34,7 +8,7 @@
#if defined(Q_OS_IOS)
#include <QtCore/QTimer>
#endif
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
#include <qpa/qplatformnativeinterface.h>
#endif
@@ -44,14 +18,13 @@
#include "glstatestore_p.h"
#endif
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
-static QList<const QQuickWindow *> clearList;
static QHash<AbstractDeclarative *, QQuickWindow *> graphWindowList;
-static QHash<QQuickWindow *, bool> windowClearList;
AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
QQuickItem(parent),
+ AbstractDeclarativeInterface(),
m_controller(0),
m_contextWindow(0),
m_renderMode(RenderIndirect),
@@ -68,8 +41,11 @@ AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
connect(this, &QQuickItem::windowChanged, this, &AbstractDeclarative::handleWindowChanged);
// Set contents to false in case we are in qml designer to make component look nice
- m_runningInDesigner = QGuiApplication::applicationDisplayName() == "Qml2Puppet";
+ m_runningInDesigner = QGuiApplication::applicationDisplayName() == QLatin1String("Qml2Puppet");
setFlag(ItemHasContents, !m_runningInDesigner);
+
+ // Accept touchevents
+ setAcceptTouchEvents(true);
}
AbstractDeclarative::~AbstractDeclarative()
@@ -88,8 +64,11 @@ AbstractDeclarative::~AbstractDeclarative()
void AbstractDeclarative::setRenderingMode(AbstractDeclarative::RenderingMode mode)
{
- if (mode == m_renderMode)
+ if (mode == m_renderMode
+ || mode <= AbstractDeclarative::RenderingMode::RenderDirectToBackground
+ || mode >= AbstractDeclarative::RenderingMode::RenderIndirect) {
return;
+ }
RenderingMode previousMode = m_renderMode;
@@ -106,7 +85,7 @@ void AbstractDeclarative::setRenderingMode(AbstractDeclarative::RenderingMode mo
update();
setFlag(ItemHasContents, false);
if (win) {
- QObject::connect(win, &QQuickWindow::beforeRendering, this,
+ QObject::connect(win, &QQuickWindow::beforeRenderPassRecording, this,
&AbstractDeclarative::render, Qt::DirectConnection);
checkWindowList(win);
setAntialiasing(m_windowSamples > 0);
@@ -120,7 +99,7 @@ void AbstractDeclarative::setRenderingMode(AbstractDeclarative::RenderingMode mo
setFlag(ItemHasContents, !m_runningInDesigner);
update();
if (win) {
- QObject::disconnect(win, &QQuickWindow::beforeRendering, this,
+ QObject::disconnect(win, &QQuickWindow::beforeRenderPassRecording, this,
&AbstractDeclarative::render);
checkWindowList(win);
}
@@ -184,6 +163,11 @@ void AbstractDeclarative::clearSelection()
m_controller->clearSelection();
}
+bool AbstractDeclarative::hasSeries(QAbstract3DSeries *series)
+{
+ return m_controller->hasSeries(series);
+}
+
void AbstractDeclarative::setSelectionMode(SelectionFlags mode)
{
int intmode = int(mode);
@@ -272,13 +256,13 @@ void AbstractDeclarative::appendCustomItemFunc(QQmlListProperty<QCustom3DItem> *
decl->addCustomItem(item);
}
-int AbstractDeclarative::countCustomItemFunc(QQmlListProperty<QCustom3DItem> *list)
+qsizetype AbstractDeclarative::countCustomItemFunc(QQmlListProperty<QCustom3DItem> *list)
{
return reinterpret_cast<AbstractDeclarative *>(list->data)->m_controller->m_customItems.size();
}
QCustom3DItem *AbstractDeclarative::atCustomItemFunc(QQmlListProperty<QCustom3DItem> *list,
- int index)
+ qsizetype index)
{
return reinterpret_cast<AbstractDeclarative *>(list->data)->m_controller->m_customItems.at(index);
}
@@ -293,6 +277,7 @@ void AbstractDeclarative::setSharedController(Abstract3DController *controller)
{
Q_ASSERT(controller);
m_controller = controller;
+ m_controller->m_qml = this;
if (!m_controller->isOpenGLES())
m_samples = 4;
@@ -406,9 +391,6 @@ void AbstractDeclarative::doneOpenGLContext(QQuickWindow *window)
void AbstractDeclarative::synchDataToRenderer()
{
- if (m_renderMode == RenderDirectToBackground && clearList.size())
- clearList.clear();
-
QQuickWindow *win = window();
activateOpenGLContext(win);
m_controller->synchDataToRenderer();
@@ -443,11 +425,10 @@ void AbstractDeclarative::setMsaaSamples(int samples)
void AbstractDeclarative::handleWindowChanged(QQuickWindow *window)
{
checkWindowList(window);
-
if (!window)
return;
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
bool previousVisibility = window->isVisible();
// Enable touch events for Mac touchpads
window->setVisible(true);
@@ -472,7 +453,7 @@ void AbstractDeclarative::handleWindowChanged(QQuickWindow *window)
if (m_renderMode == RenderDirectToBackground_NoClear
|| m_renderMode == RenderDirectToBackground) {
- connect(window, &QQuickWindow::beforeRendering, this, &AbstractDeclarative::render,
+ connect(window, &QQuickWindow::beforeRenderPassRecording, this, &AbstractDeclarative::render,
Qt::DirectConnection);
setAntialiasing(m_windowSamples > 0);
if (m_windowSamples != oldWindowSamples)
@@ -491,9 +472,9 @@ void AbstractDeclarative::handleWindowChanged(QQuickWindow *window)
#endif
}
-void AbstractDeclarative::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
+void AbstractDeclarative::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
{
- QQuickItem::geometryChanged(newGeometry, oldGeometry);
+ QQuickItem::geometryChange(newGeometry, oldGeometry);
m_cachedGeometry = newGeometry;
@@ -579,16 +560,12 @@ void AbstractDeclarative::render()
// Clear the background once per window as that is not done by default
QQuickWindow *win = window();
+ win->beginExternalCommands();
activateOpenGLContext(win);
+
QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- if (m_renderMode == RenderDirectToBackground && !clearList.contains(win)) {
- clearList.append(win);
- QColor clearColor = win->color();
- funcs->glClearColor(clearColor.redF(), clearColor.greenF(), clearColor.blueF(), 1.0f);
- funcs->glClear(GL_COLOR_BUFFER_BIT);
- }
- if (isVisible()) {
+ if (funcs && isVisible()) {
funcs->glDepthMask(GL_TRUE);
funcs->glEnable(GL_DEPTH_TEST);
funcs->glDepthFunc(GL_LESS);
@@ -600,7 +577,9 @@ void AbstractDeclarative::render()
funcs->glEnable(GL_BLEND);
}
+
doneOpenGLContext(win);
+ win->endExternalCommands();
}
QAbstract3DInputHandler* AbstractDeclarative::inputHandler() const
@@ -652,7 +631,6 @@ void AbstractDeclarative::wheelEvent(QWheelEvent *event)
void AbstractDeclarative::checkWindowList(QQuickWindow *window)
{
QQuickWindow *oldWindow = graphWindowList.value(this);
-
graphWindowList[this] = window;
if (oldWindow != window && oldWindow) {
@@ -660,7 +638,7 @@ void AbstractDeclarative::checkWindowList(QQuickWindow *window)
&AbstractDeclarative::windowDestroyed);
QObject::disconnect(oldWindow, &QQuickWindow::beforeSynchronizing, this,
&AbstractDeclarative::synchDataToRenderer);
- QObject::disconnect(oldWindow, &QQuickWindow::beforeRendering, this,
+ QObject::disconnect(oldWindow, &QQuickWindow::beforeRenderPassRecording, this,
&AbstractDeclarative::render);
if (!m_controller.isNull()) {
QObject::disconnect(m_controller.data(), &Abstract3DController::needRender,
@@ -669,34 +647,18 @@ void AbstractDeclarative::checkWindowList(QQuickWindow *window)
}
QList<QQuickWindow *> windowList;
-
- foreach (AbstractDeclarative *graph, graphWindowList.keys()) {
+ const auto graphs = graphWindowList.keys();
+ for (AbstractDeclarative *graph : graphs) {
if (graph->m_renderMode == RenderDirectToBackground
|| graph->m_renderMode == RenderDirectToBackground_NoClear) {
windowList.append(graphWindowList.value(graph));
}
}
- if (oldWindow && !windowList.contains(oldWindow)
- && windowClearList.contains(oldWindow)) {
- // Return window clear value
- oldWindow->setClearBeforeRendering(windowClearList.value(oldWindow));
- windowClearList.remove(oldWindow);
- }
-
if (!window) {
graphWindowList.remove(this);
return;
}
-
- if ((m_renderMode == RenderDirectToBackground
- || m_renderMode == RenderDirectToBackground_NoClear)
- && !windowClearList.contains(window)) {
- // Save old clear value
- windowClearList[window] = window->clearBeforeRendering();
- // Disable clearing of the window as we render underneath
- window->setClearBeforeRendering(false);
- }
}
void AbstractDeclarative::setMeasureFps(bool enable)
@@ -834,8 +796,6 @@ void AbstractDeclarative::windowDestroyed(QObject *obj)
if (win == oldWindow)
graphWindowList.remove(this);
-
- windowClearList.remove(win);
}
void AbstractDeclarative::destroyContext()
@@ -855,4 +815,4 @@ void AbstractDeclarative::destroyContext()
}
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/abstractdeclarative_p.h b/src/datavisualizationqml/abstractdeclarative_p.h
index 18cca6e2..090738c5 100644
--- a/src/datavisualizationqml2/abstractdeclarative_p.h
+++ b/src/datavisualizationqml/abstractdeclarative_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,10 +14,12 @@
#ifndef ABSTRACTDECLARATIVE_P_H
#define ABSTRACTDECLARATIVE_P_H
-#include "datavisualizationglobal_p.h"
-#include "abstract3dcontroller_p.h"
#include "declarativescene_p.h"
+#include <private/datavisualizationglobal_p.h>
+#include <private/abstract3dcontroller_p.h>
+#include <QtDataVisualization/private/abstractdeclarativeinterface_p.h>
+
#include <QtQuick/QQuickItem>
#include <QtCore/QPointer>
#include <QtCore/QThread>
@@ -52,16 +28,11 @@
class GLStateStore;
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
-class AbstractDeclarative : public QQuickItem
+class AbstractDeclarative : public QQuickItem, public AbstractDeclarativeInterface
{
Q_OBJECT
- Q_ENUMS(ShadowQuality)
- Q_ENUMS(RenderingMode)
- Q_ENUMS(ElementType)
- Q_FLAGS(SelectionFlag SelectionFlags)
- Q_FLAGS(OptimizationHint OptimizationHints)
Q_PROPERTY(SelectionFlags selectionMode READ selectionMode WRITE setSelectionMode NOTIFY selectionModeChanged)
Q_PROPERTY(ShadowQuality shadowQuality READ shadowQuality WRITE setShadowQuality NOTIFY shadowQualityChanged)
Q_PROPERTY(bool shadowsSupported READ shadowsSupported NOTIFY shadowsSupportedChanged)
@@ -70,21 +41,25 @@ class AbstractDeclarative : public QQuickItem
Q_PROPERTY(QAbstract3DInputHandler* inputHandler READ inputHandler WRITE setInputHandler NOTIFY inputHandlerChanged)
Q_PROPERTY(Q3DTheme* theme READ theme WRITE setTheme NOTIFY themeChanged)
Q_PROPERTY(RenderingMode renderingMode READ renderingMode WRITE setRenderingMode NOTIFY renderingModeChanged)
- Q_PROPERTY(bool measureFps READ measureFps WRITE setMeasureFps NOTIFY measureFpsChanged REVISION 1)
- Q_PROPERTY(qreal currentFps READ currentFps NOTIFY currentFpsChanged REVISION 1)
- Q_PROPERTY(QQmlListProperty<QCustom3DItem> customItemList READ customItemList REVISION 1)
- Q_PROPERTY(bool orthoProjection READ isOrthoProjection WRITE setOrthoProjection NOTIFY orthoProjectionChanged REVISION 1)
- Q_PROPERTY(ElementType selectedElement READ selectedElement NOTIFY selectedElementChanged REVISION 1)
- Q_PROPERTY(qreal aspectRatio READ aspectRatio WRITE setAspectRatio NOTIFY aspectRatioChanged REVISION 1)
- Q_PROPERTY(OptimizationHints optimizationHints READ optimizationHints WRITE setOptimizationHints NOTIFY optimizationHintsChanged REVISION 1)
- Q_PROPERTY(bool polar READ isPolar WRITE setPolar NOTIFY polarChanged REVISION 2)
- Q_PROPERTY(float radialLabelOffset READ radialLabelOffset WRITE setRadialLabelOffset NOTIFY radialLabelOffsetChanged REVISION 2)
- Q_PROPERTY(qreal horizontalAspectRatio READ horizontalAspectRatio WRITE setHorizontalAspectRatio NOTIFY horizontalAspectRatioChanged REVISION 2)
- Q_PROPERTY(bool reflection READ isReflection WRITE setReflection NOTIFY reflectionChanged REVISION 2)
- Q_PROPERTY(qreal reflectivity READ reflectivity WRITE setReflectivity NOTIFY reflectivityChanged REVISION 2)
- Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged REVISION 2)
- Q_PROPERTY(QVector3D queriedGraphPosition READ queriedGraphPosition NOTIFY queriedGraphPositionChanged REVISION 2)
- Q_PROPERTY(qreal margin READ margin WRITE setMargin NOTIFY marginChanged REVISION 2)
+ Q_PROPERTY(bool measureFps READ measureFps WRITE setMeasureFps NOTIFY measureFpsChanged REVISION(1, 1))
+ Q_PROPERTY(qreal currentFps READ currentFps NOTIFY currentFpsChanged REVISION(1, 1))
+ Q_PROPERTY(QQmlListProperty<QCustom3DItem> customItemList READ customItemList REVISION(1, 1))
+ Q_PROPERTY(bool orthoProjection READ isOrthoProjection WRITE setOrthoProjection NOTIFY orthoProjectionChanged REVISION(1, 1))
+ Q_PROPERTY(ElementType selectedElement READ selectedElement NOTIFY selectedElementChanged REVISION(1, 1))
+ Q_PROPERTY(qreal aspectRatio READ aspectRatio WRITE setAspectRatio NOTIFY aspectRatioChanged REVISION(1, 1))
+ Q_PROPERTY(OptimizationHints optimizationHints READ optimizationHints WRITE setOptimizationHints NOTIFY optimizationHintsChanged REVISION(1, 1))
+ Q_PROPERTY(bool polar READ isPolar WRITE setPolar NOTIFY polarChanged REVISION(1, 2))
+ Q_PROPERTY(float radialLabelOffset READ radialLabelOffset WRITE setRadialLabelOffset NOTIFY radialLabelOffsetChanged REVISION(1, 2))
+ Q_PROPERTY(qreal horizontalAspectRatio READ horizontalAspectRatio WRITE setHorizontalAspectRatio NOTIFY horizontalAspectRatioChanged REVISION(1, 2))
+ Q_PROPERTY(bool reflection READ isReflection WRITE setReflection NOTIFY reflectionChanged REVISION(1, 2))
+ Q_PROPERTY(qreal reflectivity READ reflectivity WRITE setReflectivity NOTIFY reflectivityChanged REVISION(1, 2))
+ Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged REVISION(1, 2))
+ Q_PROPERTY(QVector3D queriedGraphPosition READ queriedGraphPosition NOTIFY queriedGraphPositionChanged REVISION(1, 2))
+ Q_PROPERTY(qreal margin READ margin WRITE setMargin NOTIFY marginChanged REVISION(1, 2))
+
+ QML_NAMED_ELEMENT(AbstractGraph3D)
+ QML_ADDED_IN_VERSION(1, 0)
+ QML_UNCREATABLE("Trying to create uncreatable: AbstractGraph3D.")
public:
enum SelectionFlag {
@@ -132,6 +107,14 @@ public:
};
Q_DECLARE_FLAGS(OptimizationHints, OptimizationHint)
+ Q_ENUM(ShadowQuality)
+ Q_ENUM(RenderingMode)
+ Q_ENUM(ElementType)
+ Q_ENUM(SelectionFlag)
+ Q_ENUM(OptimizationHint)
+ Q_FLAGS(SelectionFlag SelectionFlags)
+ Q_FLAGS(OptimizationHint OptimizationHints)
+
public:
explicit AbstractDeclarative(QQuickItem *parent = 0);
virtual ~AbstractDeclarative();
@@ -162,26 +145,28 @@ public:
Q_INVOKABLE virtual void clearSelection();
- Q_REVISION(1) Q_INVOKABLE virtual int addCustomItem(QCustom3DItem *item);
- Q_REVISION(1) Q_INVOKABLE virtual void removeCustomItems();
- Q_REVISION(1) Q_INVOKABLE virtual void removeCustomItem(QCustom3DItem *item);
- Q_REVISION(1) Q_INVOKABLE virtual void removeCustomItemAt(const QVector3D &position);
- Q_REVISION(1) Q_INVOKABLE virtual void releaseCustomItem(QCustom3DItem *item);
+ Q_REVISION(6, 3) Q_INVOKABLE virtual bool hasSeries(QAbstract3DSeries *series);
- Q_REVISION(1) Q_INVOKABLE virtual int selectedLabelIndex() const;
- Q_REVISION(1) Q_INVOKABLE virtual QAbstract3DAxis *selectedAxis() const;
+ Q_REVISION(1, 1) Q_INVOKABLE virtual int addCustomItem(QCustom3DItem *item);
+ Q_REVISION(1, 1) Q_INVOKABLE virtual void removeCustomItems();
+ Q_REVISION(1, 1) Q_INVOKABLE virtual void removeCustomItem(QCustom3DItem *item);
+ Q_REVISION(1, 1) Q_INVOKABLE virtual void removeCustomItemAt(const QVector3D &position);
+ Q_REVISION(1, 1) Q_INVOKABLE virtual void releaseCustomItem(QCustom3DItem *item);
- Q_REVISION(1) Q_INVOKABLE virtual int selectedCustomItemIndex() const;
- Q_REVISION(1) Q_INVOKABLE virtual QCustom3DItem *selectedCustomItem() const;
+ Q_REVISION(1, 1) Q_INVOKABLE virtual int selectedLabelIndex() const;
+ Q_REVISION(1, 1) Q_INVOKABLE virtual QAbstract3DAxis *selectedAxis() const;
+
+ Q_REVISION(1, 1) Q_INVOKABLE virtual int selectedCustomItemIndex() const;
+ Q_REVISION(1, 1) Q_INVOKABLE virtual QCustom3DItem *selectedCustomItem() const;
QQmlListProperty<QCustom3DItem> customItemList();
static void appendCustomItemFunc(QQmlListProperty<QCustom3DItem> *list,
QCustom3DItem *item);
- static int countCustomItemFunc(QQmlListProperty<QCustom3DItem> *list);
- static QCustom3DItem *atCustomItemFunc(QQmlListProperty<QCustom3DItem> *list, int index);
+ static qsizetype countCustomItemFunc(QQmlListProperty<QCustom3DItem> *list);
+ static QCustom3DItem *atCustomItemFunc(QQmlListProperty<QCustom3DItem> *list, qsizetype index);
static void clearCustomItemFunc(QQmlListProperty<QCustom3DItem> *list);
- virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
+ void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
void setSharedController(Abstract3DController *controller);
// Used to synch up data model from controller to renderer while main thread is locked
@@ -231,6 +216,8 @@ public:
QMutex *mutex() { return &m_mutex; }
+ bool isReady() const override { return isComponentComplete(); }
+
public Q_SLOTS:
virtual void handleAxisXChanged(QAbstract3DAxis *axis) = 0;
virtual void handleAxisYChanged(QAbstract3DAxis *axis) = 0;
@@ -239,22 +226,22 @@ public Q_SLOTS:
void destroyContext();
protected:
- virtual void mouseDoubleClickEvent(QMouseEvent *event);
- virtual void touchEvent(QTouchEvent *event);
- virtual void mousePressEvent(QMouseEvent *event);
- virtual void mouseReleaseEvent(QMouseEvent *event);
- virtual void mouseMoveEvent(QMouseEvent *event);
+ void mouseDoubleClickEvent(QMouseEvent *event) override;
+ void touchEvent(QTouchEvent *event) override;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
#if QT_CONFIG(wheelevent)
- virtual void wheelEvent(QWheelEvent *event);
+ void wheelEvent(QWheelEvent *event) override;
#endif
virtual void handleWindowChanged(QQuickWindow *win);
- virtual void itemChange(ItemChange change, const ItemChangeData &value);
+ void itemChange(ItemChange change, const ItemChangeData &value) override;
virtual void updateWindowParameters();
virtual void handleSelectionModeChange(QAbstract3DGraph::SelectionFlags mode);
virtual void handleShadowQualityChange(QAbstract3DGraph::ShadowQuality quality);
virtual void handleSelectedElementChange(QAbstract3DGraph::ElementType type);
virtual void handleOptimizationHintChange(QAbstract3DGraph::OptimizationHints hints);
- virtual QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *);
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
Q_SIGNALS:
void selectionModeChanged(AbstractDeclarative::SelectionFlags mode);
@@ -265,20 +252,20 @@ Q_SIGNALS:
void inputHandlerChanged(QAbstract3DInputHandler *inputHandler);
void themeChanged(Q3DTheme *theme);
void renderingModeChanged(AbstractDeclarative::RenderingMode mode);
- Q_REVISION(1) void measureFpsChanged(bool enabled);
- Q_REVISION(1) void currentFpsChanged(qreal fps);
- Q_REVISION(1) void selectedElementChanged(AbstractDeclarative::ElementType type);
- Q_REVISION(1) void orthoProjectionChanged(bool enabled);
- Q_REVISION(1) void aspectRatioChanged(qreal ratio);
- Q_REVISION(1) void optimizationHintsChanged(AbstractDeclarative::OptimizationHints hints);
- Q_REVISION(2) void polarChanged(bool enabled);
- Q_REVISION(2) void radialLabelOffsetChanged(float offset);
- Q_REVISION(2) void horizontalAspectRatioChanged(qreal ratio);
- Q_REVISION(2) void reflectionChanged(bool enabled);
- Q_REVISION(2) void reflectivityChanged(qreal reflectivity);
- Q_REVISION(2) void localeChanged(const QLocale &locale);
- Q_REVISION(2) void queriedGraphPositionChanged(const QVector3D &data);
- Q_REVISION(2) void marginChanged(qreal margin);
+ Q_REVISION(1, 1) void measureFpsChanged(bool enabled);
+ Q_REVISION(1, 1) void currentFpsChanged(qreal fps);
+ Q_REVISION(1, 1) void selectedElementChanged(AbstractDeclarative::ElementType type);
+ Q_REVISION(1, 1) void orthoProjectionChanged(bool enabled);
+ Q_REVISION(1, 1) void aspectRatioChanged(qreal ratio);
+ Q_REVISION(1, 1) void optimizationHintsChanged(AbstractDeclarative::OptimizationHints hints);
+ Q_REVISION(1, 2) void polarChanged(bool enabled);
+ Q_REVISION(1, 2) void radialLabelOffsetChanged(float offset);
+ Q_REVISION(1, 2) void horizontalAspectRatioChanged(qreal ratio);
+ Q_REVISION(1, 2) void reflectionChanged(bool enabled);
+ Q_REVISION(1, 2) void reflectivityChanged(qreal reflectivity);
+ Q_REVISION(1, 2) void localeChanged(const QLocale &locale);
+ Q_REVISION(1, 2) void queriedGraphPositionChanged(const QVector3D &data);
+ Q_REVISION(1, 2) void marginChanged(qreal margin);
protected:
QSharedPointer<QMutex> m_nodeMutex;
@@ -305,6 +292,6 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(AbstractDeclarative::SelectionFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(AbstractDeclarative::OptimizationHints)
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml/colorgradient.cpp b/src/datavisualizationqml/colorgradient.cpp
new file mode 100644
index 00000000..c00c43aa
--- /dev/null
+++ b/src/datavisualizationqml/colorgradient.cpp
@@ -0,0 +1,62 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "colorgradient_p.h"
+
+QT_BEGIN_NAMESPACE
+
+ColorGradientStop::ColorGradientStop(QObject *parent)
+ : QObject(parent)
+{
+}
+
+qreal ColorGradientStop::position() const
+{
+ return m_position;
+}
+
+void ColorGradientStop::setPosition(qreal position)
+{
+ m_position = position;
+ updateGradient();
+ emit positionChanged(position);
+}
+
+QColor ColorGradientStop::color() const
+{
+ return m_color;
+}
+
+void ColorGradientStop::setColor(const QColor &color)
+{
+ m_color = color;
+ updateGradient();
+ emit colorChanged(color);
+}
+
+void ColorGradientStop::updateGradient()
+{
+ if (ColorGradient *grad = qobject_cast<ColorGradient*>(parent()))
+ grad->doUpdate();
+}
+
+ColorGradient::ColorGradient(QObject *parent)
+: QObject(parent)
+{
+}
+
+ColorGradient::~ColorGradient()
+{
+}
+
+QQmlListProperty<ColorGradientStop> ColorGradient::stops()
+{
+ return QQmlListProperty<ColorGradientStop>(this, &m_stops);
+}
+
+void ColorGradient::doUpdate()
+{
+ emit updated();
+}
+
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml/colorgradient_p.h b/src/datavisualizationqml/colorgradient_p.h
new file mode 100644
index 00000000..5e5d0e51
--- /dev/null
+++ b/src/datavisualizationqml/colorgradient_p.h
@@ -0,0 +1,79 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+//
+// 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 COLORGRADIENT_P_H
+#define COLORGRADIENT_P_H
+
+#include <private/datavisualizationglobal_p.h>
+#include <QtGui/QColor>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
+
+class ColorGradientStop : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+
+ QML_ELEMENT
+ QML_ADDED_IN_VERSION(1, 0)
+
+public:
+ ColorGradientStop(QObject *parent = 0);
+
+ qreal position() const;
+ void setPosition(qreal position);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+Q_SIGNALS:
+ void positionChanged(qreal position);
+ void colorChanged(const QColor &color);
+
+private:
+ void updateGradient();
+
+private:
+ qreal m_position;
+ QColor m_color;
+};
+
+class ColorGradient : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QQmlListProperty<ColorGradientStop> stops READ stops)
+ Q_CLASSINFO("DefaultProperty", "stops")
+
+ QML_ELEMENT
+ QML_ADDED_IN_VERSION(1, 0)
+
+public:
+ ColorGradient(QObject *parent = 0);
+ ~ColorGradient();
+
+ QQmlListProperty<ColorGradientStop> stops();
+
+ void doUpdate();
+ QList<ColorGradientStop *> m_stops;
+
+Q_SIGNALS:
+ void updated();
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/datavisualizationqml2/declarativebars.cpp b/src/datavisualizationqml/declarativebars.cpp
index ca1d3f60..1cba987a 100644
--- a/src/datavisualizationqml2/declarativebars.cpp
+++ b/src/datavisualizationqml/declarativebars.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "declarativebars_p.h"
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
DeclarativeBars::DeclarativeBars(QQuickItem *parent)
: AbstractDeclarative(parent),
@@ -112,7 +86,7 @@ float DeclarativeBars::barThickness() const
return m_barsController->barThickness();
}
-void DeclarativeBars::setBarSpacing(QSizeF spacing)
+void DeclarativeBars::setBarSpacing(const QSizeF &spacing)
{
if (spacing != barSpacing()) {
m_barsController->setBarSpecs(GLfloat(barThickness()), spacing, isBarSpacingRelative());
@@ -138,6 +112,19 @@ bool DeclarativeBars::isBarSpacingRelative() const
return m_barsController->isBarSpecRelative();
}
+void DeclarativeBars::setBarSeriesMargin(const QSizeF &margin)
+{
+ if (margin != barSeriesMargin()) {
+ m_barsController->setBarSeriesMargin(margin);
+ emit barSeriesMarginChanged(barSeriesMargin());
+ }
+}
+
+QSizeF DeclarativeBars::barSeriesMargin() const
+{
+ return m_barsController->barSeriesMargin();
+}
+
QBar3DSeries *DeclarativeBars::selectedSeries() const
{
return m_barsController->selectedSeries();
@@ -170,12 +157,12 @@ void DeclarativeBars::appendSeriesFunc(QQmlListProperty<QBar3DSeries> *list, QBa
reinterpret_cast<DeclarativeBars *>(list->data)->addSeries(series);
}
-int DeclarativeBars::countSeriesFunc(QQmlListProperty<QBar3DSeries> *list)
+qsizetype DeclarativeBars::countSeriesFunc(QQmlListProperty<QBar3DSeries> *list)
{
return reinterpret_cast<DeclarativeBars *>(list->data)->m_barsController->barSeriesList().size();
}
-QBar3DSeries *DeclarativeBars::atSeriesFunc(QQmlListProperty<QBar3DSeries> *list, int index)
+QBar3DSeries *DeclarativeBars::atSeriesFunc(QQmlListProperty<QBar3DSeries> *list, qsizetype index)
{
return reinterpret_cast<DeclarativeBars *>(list->data)->m_barsController->barSeriesList().at(index);
}
@@ -230,4 +217,4 @@ void DeclarativeBars::handleAxisZChanged(QAbstract3DAxis *axis)
emit rowAxisChanged(static_cast<QCategory3DAxis *>(axis));
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativebars_p.h b/src/datavisualizationqml/declarativebars_p.h
index 2fe6a602..82653ab2 100644
--- a/src/datavisualizationqml2/declarativebars_p.h
+++ b/src/datavisualizationqml/declarativebars_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,12 +14,12 @@
#ifndef DECLARATIVEBARS_P_H
#define DECLARATIVEBARS_P_H
-#include "datavisualizationglobal_p.h"
#include "abstractdeclarative_p.h"
-#include "bars3dcontroller_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+#include <private/datavisualizationglobal_p.h>
+#include <private/bars3dcontroller_p.h>
+QT_BEGIN_NAMESPACE
class DeclarativeBars : public AbstractDeclarative
{
Q_OBJECT
@@ -56,12 +30,16 @@ class DeclarativeBars : public AbstractDeclarative
Q_PROPERTY(float barThickness READ barThickness WRITE setBarThickness NOTIFY barThicknessChanged)
Q_PROPERTY(QSizeF barSpacing READ barSpacing WRITE setBarSpacing NOTIFY barSpacingChanged)
Q_PROPERTY(bool barSpacingRelative READ isBarSpacingRelative WRITE setBarSpacingRelative NOTIFY barSpacingRelativeChanged)
+ Q_PROPERTY(QSizeF barSeriesMargin READ barSeriesMargin WRITE setBarSeriesMargin NOTIFY barSeriesMarginChanged REVISION(6, 3))
Q_PROPERTY(QQmlListProperty<QBar3DSeries> seriesList READ seriesList)
Q_PROPERTY(QBar3DSeries *selectedSeries READ selectedSeries NOTIFY selectedSeriesChanged)
Q_PROPERTY(QBar3DSeries *primarySeries READ primarySeries WRITE setPrimarySeries NOTIFY primarySeriesChanged)
- Q_PROPERTY(float floorLevel READ floorLevel WRITE setFloorLevel NOTIFY floorLevelChanged REVISION 1)
+ Q_PROPERTY(float floorLevel READ floorLevel WRITE setFloorLevel NOTIFY floorLevelChanged REVISION(1, 2))
Q_CLASSINFO("DefaultProperty", "seriesList")
+ QML_NAMED_ELEMENT(Bars3D)
+ QML_ADDED_IN_VERSION(1, 0)
+
public:
explicit DeclarativeBars(QQuickItem *parent = 0);
~DeclarativeBars();
@@ -79,16 +57,19 @@ public:
void setBarThickness(float thicknessRatio);
float barThickness() const;
- void setBarSpacing(QSizeF spacing);
+ void setBarSpacing(const QSizeF &spacing);
QSizeF barSpacing() const;
void setBarSpacingRelative(bool relative);
bool isBarSpacingRelative() const;
+ void setBarSeriesMargin(const QSizeF &margin);
+ QSizeF barSeriesMargin() const;
+
QQmlListProperty<QBar3DSeries> seriesList();
static void appendSeriesFunc(QQmlListProperty<QBar3DSeries> *list, QBar3DSeries *series);
- static int countSeriesFunc(QQmlListProperty<QBar3DSeries> *list);
- static QBar3DSeries *atSeriesFunc(QQmlListProperty<QBar3DSeries> *list, int index);
+ static qsizetype countSeriesFunc(QQmlListProperty<QBar3DSeries> *list);
+ static QBar3DSeries *atSeriesFunc(QQmlListProperty<QBar3DSeries> *list, qsizetype index);
static void clearSeriesFunc(QQmlListProperty<QBar3DSeries> *list);
Q_INVOKABLE void addSeries(QBar3DSeries *series);
Q_INVOKABLE void removeSeries(QBar3DSeries *series);
@@ -101,9 +82,9 @@ public:
float floorLevel() const;
public Q_SLOTS:
- void handleAxisXChanged(QAbstract3DAxis *axis);
- void handleAxisYChanged(QAbstract3DAxis *axis);
- void handleAxisZChanged(QAbstract3DAxis *axis);
+ void handleAxisXChanged(QAbstract3DAxis *axis) override;
+ void handleAxisYChanged(QAbstract3DAxis *axis) override;
+ void handleAxisZChanged(QAbstract3DAxis *axis) override;
Q_SIGNALS:
void rowAxisChanged(QCategory3DAxis *axis);
@@ -111,17 +92,18 @@ Q_SIGNALS:
void columnAxisChanged(QCategory3DAxis *axis);
void multiSeriesUniformChanged(bool uniform);
void barThicknessChanged(float thicknessRatio);
- void barSpacingChanged(QSizeF spacing);
+ void barSpacingChanged(const QSizeF &spacing);
void barSpacingRelativeChanged(bool relative);
- void meshFileNameChanged(QString filename);
+ Q_REVISION(6, 3) void barSeriesMarginChanged(const QSizeF &margin);
+ void meshFileNameChanged(const QString &filename);
void primarySeriesChanged(QBar3DSeries *series);
void selectedSeriesChanged(QBar3DSeries *series);
- Q_REVISION(1) void floorLevelChanged(float level);
+ Q_REVISION(1, 2) void floorLevelChanged(float level);
private:
Bars3DController *m_barsController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml/declarativecolor.cpp b/src/datavisualizationqml/declarativecolor.cpp
new file mode 100644
index 00000000..979c3f1e
--- /dev/null
+++ b/src/datavisualizationqml/declarativecolor.cpp
@@ -0,0 +1,26 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "declarativecolor_p.h"
+
+QT_BEGIN_NAMESPACE
+
+DeclarativeColor::DeclarativeColor(QObject *parent)
+ : QObject(parent)
+{
+}
+
+void DeclarativeColor::setColor(const QColor &color)
+{
+ if (m_color != color) {
+ m_color = color;
+ emit colorChanged(color);
+ }
+}
+
+QColor DeclarativeColor::color() const
+{
+ return m_color;
+}
+
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml/declarativecolor_p.h b/src/datavisualizationqml/declarativecolor_p.h
new file mode 100644
index 00000000..426d674d
--- /dev/null
+++ b/src/datavisualizationqml/declarativecolor_p.h
@@ -0,0 +1,46 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+//
+// 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 DECLARATIVECOLOR_P_H
+#define DECLARATIVECOLOR_P_H
+
+#include <private/datavisualizationglobal_p.h>
+#include <QtGui/QColor>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
+
+class DeclarativeColor : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+
+ QML_NAMED_ELEMENT(ThemeColor)
+ QML_ADDED_IN_VERSION(1, 0)
+
+public:
+ DeclarativeColor(QObject *parent = 0);
+
+ void setColor(const QColor &color);
+ QColor color() const;
+
+Q_SIGNALS:
+ void colorChanged(const QColor &color);
+
+private:
+ QColor m_color;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/datavisualizationqml2/declarativerendernode.cpp b/src/datavisualizationqml/declarativerendernode.cpp
index a5eb027e..5a9f466c 100644
--- a/src/datavisualizationqml2/declarativerendernode.cpp
+++ b/src/datavisualizationqml/declarativerendernode.cpp
@@ -1,38 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "declarativerendernode_p.h"
#include "abstractdeclarative_p.h"
#include <QtOpenGL/QOpenGLFramebufferObject>
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
DeclarativeRenderNode::DeclarativeRenderNode(AbstractDeclarative *declarative,
const QSharedPointer<QMutex> &nodeMutex)
@@ -114,9 +88,7 @@ void DeclarativeRenderNode::updateFBO()
delete m_texture;
const uint id = m_fbo->texture();
- m_texture =
- m_window->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture,
- &id, 0 /* nativeLayout */, m_size);
+ m_texture = QNativeInterface::QSGOpenGLTexture::fromNative(id, m_window, m_size);
m_material.setTexture(m_texture);
m_materialO.setTexture(m_texture);
@@ -182,4 +154,4 @@ void DeclarativeRenderNode::handleControllerDestroyed()
m_controller = 0;
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativerendernode_p.h b/src/datavisualizationqml/declarativerendernode_p.h
index 08da5163..2f6d22ec 100644
--- a/src/datavisualizationqml2/declarativerendernode_p.h
+++ b/src/datavisualizationqml/declarativerendernode_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,7 +14,7 @@
#ifndef DECLARATIVERENDERNODE_P_H
#define DECLARATIVERENDERNODE_P_H
-#include "datavisualizationglobal_p.h"
+#include <private/datavisualizationglobal_p.h>
#include <QtQuick/QSGGeometryNode>
#include <QtQuick/QSGTextureMaterial>
@@ -49,7 +23,7 @@
#include <QtCore/QSharedPointer>
#include <QtCore/QObject>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class Abstract3DController;
class AbstractDeclarative;
@@ -72,7 +46,7 @@ public:
void setQuickWindow(QQuickWindow *window);
void setSamples(int samples);
- void preprocess();
+ void preprocess() override;
public Q_SLOTS:
void handleControllerDestroyed();
@@ -97,6 +71,6 @@ private:
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml2/declarativescatter.cpp b/src/datavisualizationqml/declarativescatter.cpp
index 29e56a79..1e3795a0 100644
--- a/src/datavisualizationqml2/declarativescatter.cpp
+++ b/src/datavisualizationqml/declarativescatter.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "declarativescatter_p.h"
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
DeclarativeScatter::DeclarativeScatter(QQuickItem *parent)
: AbstractDeclarative(parent),
@@ -103,12 +77,13 @@ void DeclarativeScatter::appendSeriesFunc(QQmlListProperty<QScatter3DSeries> *li
reinterpret_cast<DeclarativeScatter *>(list->data)->addSeries(series);
}
-int DeclarativeScatter::countSeriesFunc(QQmlListProperty<QScatter3DSeries> *list)
+qsizetype DeclarativeScatter::countSeriesFunc(QQmlListProperty<QScatter3DSeries> *list)
{
return reinterpret_cast<DeclarativeScatter *>(list->data)->m_scatterController->scatterSeriesList().size();
}
-QScatter3DSeries *DeclarativeScatter::atSeriesFunc(QQmlListProperty<QScatter3DSeries> *list, int index)
+QScatter3DSeries *DeclarativeScatter::atSeriesFunc(QQmlListProperty<QScatter3DSeries> *list,
+ qsizetype index)
{
return reinterpret_cast<DeclarativeScatter *>(list->data)->m_scatterController->scatterSeriesList().at(index);
}
@@ -148,4 +123,4 @@ void DeclarativeScatter::handleAxisZChanged(QAbstract3DAxis *axis)
emit axisZChanged(static_cast<QValue3DAxis *>(axis));
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativescatter_p.h b/src/datavisualizationqml/declarativescatter_p.h
index f164a482..4b020b76 100644
--- a/src/datavisualizationqml2/declarativescatter_p.h
+++ b/src/datavisualizationqml/declarativescatter_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,12 +14,13 @@
#ifndef DECLARATIVESCATTER_P_H
#define DECLARATIVESCATTER_P_H
-#include "datavisualizationglobal_p.h"
#include "abstractdeclarative_p.h"
-#include "scatter3dcontroller_p.h"
#include "qscatter3dseries.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+#include <private/datavisualizationglobal_p.h>
+#include <private/scatter3dcontroller_p.h>
+
+QT_BEGIN_NAMESPACE
class DeclarativeScatter : public AbstractDeclarative
{
@@ -57,6 +32,9 @@ class DeclarativeScatter : public AbstractDeclarative
Q_PROPERTY(QQmlListProperty<QScatter3DSeries> seriesList READ seriesList)
Q_CLASSINFO("DefaultProperty", "seriesList")
+ QML_NAMED_ELEMENT(Scatter3D)
+ QML_ADDED_IN_VERSION(1, 0)
+
public:
explicit DeclarativeScatter(QQuickItem *parent = 0);
~DeclarativeScatter();
@@ -70,8 +48,8 @@ public:
QQmlListProperty<QScatter3DSeries> seriesList();
static void appendSeriesFunc(QQmlListProperty<QScatter3DSeries> *list, QScatter3DSeries *series);
- static int countSeriesFunc(QQmlListProperty<QScatter3DSeries> *list);
- static QScatter3DSeries *atSeriesFunc(QQmlListProperty<QScatter3DSeries> *list, int index);
+ static qsizetype countSeriesFunc(QQmlListProperty<QScatter3DSeries> *list);
+ static QScatter3DSeries *atSeriesFunc(QQmlListProperty<QScatter3DSeries> *list, qsizetype index);
static void clearSeriesFunc(QQmlListProperty<QScatter3DSeries> *list);
Q_INVOKABLE void addSeries(QScatter3DSeries *series);
Q_INVOKABLE void removeSeries(QScatter3DSeries *series);
@@ -79,9 +57,9 @@ public:
QScatter3DSeries *selectedSeries() const;
public Q_SLOTS:
- void handleAxisXChanged(QAbstract3DAxis *axis);
- void handleAxisYChanged(QAbstract3DAxis *axis);
- void handleAxisZChanged(QAbstract3DAxis *axis);
+ void handleAxisXChanged(QAbstract3DAxis *axis) override;
+ void handleAxisYChanged(QAbstract3DAxis *axis) override;
+ void handleAxisZChanged(QAbstract3DAxis *axis) override;
Q_SIGNALS:
void axisXChanged(QValue3DAxis *axis);
@@ -93,6 +71,6 @@ protected:
Scatter3DController *m_scatterController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml/declarativescene.cpp b/src/datavisualizationqml/declarativescene.cpp
new file mode 100644
index 00000000..75508994
--- /dev/null
+++ b/src/datavisualizationqml/declarativescene.cpp
@@ -0,0 +1,34 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include "declarativescene_p.h"
+
+QT_BEGIN_NAMESPACE
+
+Declarative3DScene::Declarative3DScene(QObject *parent)
+ : Q3DScene(parent)
+{
+ QObject::connect(this, &Q3DScene::selectionQueryPositionChanged, this,
+ &Declarative3DScene::selectionQueryPositionChanged);
+}
+
+Declarative3DScene::~Declarative3DScene()
+{
+}
+
+void Declarative3DScene::setSelectionQueryPosition(const QPointF &point)
+{
+ Q3DScene::setSelectionQueryPosition(point.toPoint());
+}
+
+QPointF Declarative3DScene::selectionQueryPosition() const
+{
+ return QPointF(Q3DScene::selectionQueryPosition());
+}
+
+QPoint Declarative3DScene::invalidSelectionPoint() const
+{
+ return Q3DScene::invalidSelectionPoint();
+}
+
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml/declarativescene_p.h b/src/datavisualizationqml/declarativescene_p.h
new file mode 100644
index 00000000..ba38b5e8
--- /dev/null
+++ b/src/datavisualizationqml/declarativescene_p.h
@@ -0,0 +1,50 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+//
+// 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 DECLARATIVESCENE_P_H
+#define DECLARATIVESCENE_P_H
+
+#include <QtQml/qqml.h>
+#include <private/datavisualizationglobal_p.h>
+#include <QtDataVisualization/q3dscene.h>
+
+QT_BEGIN_NAMESPACE
+
+class Declarative3DScene : public Q3DScene
+{
+ Q_OBJECT
+ // This property is overloaded to use QPointF instead of QPoint to work around qml bug
+ // where Qt.point(0, 0) can't be assigned due to error "Cannot assign QPointF to QPoint".
+ Q_PROPERTY(QPointF selectionQueryPosition READ selectionQueryPosition WRITE setSelectionQueryPosition NOTIFY selectionQueryPositionChanged)
+ // This is static method in parent class, overload as constant property for qml.
+ Q_PROPERTY(QPoint invalidSelectionPoint READ invalidSelectionPoint CONSTANT)
+
+ QML_NAMED_ELEMENT(Scene3D)
+ QML_ADDED_IN_VERSION(1, 0)
+ QML_UNCREATABLE("Trying to create uncreatable: Scene3D.")
+
+public:
+ Declarative3DScene(QObject *parent = 0);
+ virtual ~Declarative3DScene();
+
+ void setSelectionQueryPosition(const QPointF &point);
+ QPointF selectionQueryPosition() const;
+ QPoint invalidSelectionPoint() const;
+
+Q_SIGNALS:
+ void selectionQueryPositionChanged(const QPointF &position);
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/datavisualizationqml2/declarativeseries.cpp b/src/datavisualizationqml/declarativeseries.cpp
index 119c960a..65c2cc76 100644
--- a/src/datavisualizationqml2/declarativeseries.cpp
+++ b/src/datavisualizationqml/declarativeseries.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "declarativeseries_p.h"
#include <QtCore/QMetaMethod>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
static void setSeriesGradient(QAbstract3DSeries *series, const ColorGradient &gradient,
GradientType type)
@@ -103,7 +77,8 @@ DeclarativeBar3DSeries::DeclarativeBar3DSeries(QObject *parent)
: QBar3DSeries(parent),
m_baseGradient(0),
m_singleHighlightGradient(0),
- m_multiHighlightGradient(0)
+ m_multiHighlightGradient(0),
+ m_dummyColors(false)
{
QObject::connect(this, &QBar3DSeries::selectedBarChanged, this,
&DeclarativeBar3DSeries::selectedBarChanged);
@@ -171,6 +146,37 @@ ColorGradient *DeclarativeBar3DSeries::multiHighlightGradient() const
return m_multiHighlightGradient;
}
+QQmlListProperty<DeclarativeColor> DeclarativeBar3DSeries::rowColors()
+{
+ return QQmlListProperty<DeclarativeColor>(this, this,
+ &DeclarativeBar3DSeries::appendRowColorsFunc,
+ &DeclarativeBar3DSeries::countRowColorsFunc,
+ &DeclarativeBar3DSeries::atRowColorsFunc,
+ &DeclarativeBar3DSeries::clearRowColorsFunc);
+}
+
+void DeclarativeBar3DSeries::appendRowColorsFunc(QQmlListProperty<DeclarativeColor> *list,
+ DeclarativeColor *color)
+{
+ reinterpret_cast<DeclarativeBar3DSeries *>(list->data)->addColor(color);
+}
+
+qsizetype DeclarativeBar3DSeries::countRowColorsFunc(QQmlListProperty<DeclarativeColor> *list)
+{
+ return reinterpret_cast<DeclarativeBar3DSeries *>(list->data)->colorList().size();
+}
+
+DeclarativeColor *DeclarativeBar3DSeries::atRowColorsFunc(QQmlListProperty<DeclarativeColor> *list,
+ qsizetype index)
+{
+ return reinterpret_cast<DeclarativeBar3DSeries *>(list->data)->colorList().at(index);
+}
+
+void DeclarativeBar3DSeries::clearRowColorsFunc(QQmlListProperty<DeclarativeColor> *list)
+{
+ reinterpret_cast<DeclarativeBar3DSeries *>(list->data)->clearColors();
+}
+
void DeclarativeBar3DSeries::handleBaseGradientUpdate()
{
if (m_baseGradient)
@@ -189,6 +195,73 @@ void DeclarativeBar3DSeries::handleMultiHighlightGradientUpdate()
setSeriesGradient(this, *m_multiHighlightGradient, GradientTypeMulti);
}
+void DeclarativeBar3DSeries::handleRowColorUpdate()
+{
+ int colorCount = m_rowColors.size();
+ int changed = 0;
+
+ DeclarativeColor *color = qobject_cast<DeclarativeColor*>(QObject::sender());
+ for (int i = 0; i < colorCount; i++) {
+ if (color == m_rowColors.at(i)) {
+ changed = i;
+ break;
+ }
+ }
+ QList<QColor> list = QBar3DSeries::rowColors();
+ list[changed] = m_rowColors.at(changed)->color();
+ QBar3DSeries::setRowColors(list);
+}
+
+void DeclarativeBar3DSeries::addColor(DeclarativeColor *color)
+{
+ if (!color) {
+ qWarning("Color is invalid, use ThemeColor");
+ return;
+ }
+ clearDummyColors();
+ m_rowColors.append(color);
+ connect(color, &DeclarativeColor::colorChanged, this,
+ &DeclarativeBar3DSeries::handleRowColorUpdate);
+ QList<QColor> list = QBar3DSeries::rowColors();
+ list.append(color->color());
+ QBar3DSeries::setRowColors(list);
+}
+
+QList<DeclarativeColor *> DeclarativeBar3DSeries::colorList()
+{
+ if (m_rowColors.isEmpty()) {
+ m_dummyColors = true;
+ const QList<QColor> list = QBar3DSeries::rowColors();
+ for (const QColor &item : list) {
+ DeclarativeColor *color = new DeclarativeColor(this);
+ color->setColor(item);
+ m_rowColors.append(color);
+ connect(color, &DeclarativeColor::colorChanged, this,
+ &DeclarativeBar3DSeries::handleRowColorUpdate);
+ }
+ }
+ return m_rowColors;
+}
+
+void DeclarativeBar3DSeries::clearColors()
+{
+ clearDummyColors();
+ for (const auto color : std::as_const(m_rowColors))
+ disconnect(color, 0, this, 0);
+
+ m_rowColors.clear();
+ QBar3DSeries::setRowColors(QList<QColor>());
+}
+
+void DeclarativeBar3DSeries::clearDummyColors()
+{
+ if (m_dummyColors) {
+ qDeleteAll(m_rowColors);
+ m_rowColors.clear();
+ m_dummyColors = false;
+ }
+}
+
DeclarativeScatter3DSeries::DeclarativeScatter3DSeries(QObject *parent)
: QScatter3DSeries(parent),
m_baseGradient(0),
@@ -359,4 +432,4 @@ void DeclarativeSurface3DSeries::handleMultiHighlightGradientUpdate()
setSeriesGradient(this, *m_multiHighlightGradient, GradientTypeMulti);
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativeseries_p.h b/src/datavisualizationqml/declarativeseries_p.h
index 3c070006..13b1eda3 100644
--- a/src/datavisualizationqml2/declarativeseries_p.h
+++ b/src/datavisualizationqml/declarativeseries_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,14 +14,16 @@
#ifndef DECLARATIVESERIES_P_H
#define DECLARATIVESERIES_P_H
-#include "datavisualizationglobal_p.h"
#include "qbar3dseries.h"
#include "qscatter3dseries.h"
#include "qsurface3dseries.h"
#include "colorgradient_p.h"
-#include <QtQml/QQmlListProperty>
+#include "declarativecolor_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+#include <private/datavisualizationglobal_p.h>
+#include <QtQml/qqml.h>
+
+QT_BEGIN_NAMESPACE
enum GradientType {
GradientTypeBase,
@@ -67,8 +43,12 @@ class DeclarativeBar3DSeries : public QBar3DSeries
Q_PROPERTY(ColorGradient *baseGradient READ baseGradient WRITE setBaseGradient NOTIFY baseGradientChanged)
Q_PROPERTY(ColorGradient *singleHighlightGradient READ singleHighlightGradient WRITE setSingleHighlightGradient NOTIFY singleHighlightGradientChanged)
Q_PROPERTY(ColorGradient *multiHighlightGradient READ multiHighlightGradient WRITE setMultiHighlightGradient NOTIFY multiHighlightGradientChanged)
+ Q_PROPERTY(QQmlListProperty<DeclarativeColor> rowColors READ rowColors REVISION(6, 3))
Q_CLASSINFO("DefaultProperty", "seriesChildren")
+ QML_NAMED_ELEMENT(Bar3DSeries)
+ QML_ADDED_IN_VERSION(1, 0)
+
public:
DeclarativeBar3DSeries(QObject *parent = 0);
virtual ~DeclarativeBar3DSeries();
@@ -87,13 +67,22 @@ public:
void setMultiHighlightGradient(ColorGradient *gradient);
ColorGradient *multiHighlightGradient() const;
+ QQmlListProperty<DeclarativeColor> rowColors();
+ static void appendRowColorsFunc(QQmlListProperty<DeclarativeColor> *list,
+ DeclarativeColor *color);
+ static qsizetype countRowColorsFunc(QQmlListProperty<DeclarativeColor> *list);
+ static DeclarativeColor *atRowColorsFunc(QQmlListProperty<DeclarativeColor> *list,
+ qsizetype index);
+ static void clearRowColorsFunc(QQmlListProperty<DeclarativeColor> *list);
+
public Q_SLOTS:
void handleBaseGradientUpdate();
void handleSingleHighlightGradientUpdate();
void handleMultiHighlightGradientUpdate();
+ void handleRowColorUpdate();
Q_SIGNALS:
- void selectedBarChanged(QPointF position);
+ void selectedBarChanged(const QPointF &position);
void baseGradientChanged(ColorGradient *gradient);
void singleHighlightGradientChanged(ColorGradient *gradient);
void multiHighlightGradientChanged(ColorGradient *gradient);
@@ -102,6 +91,14 @@ private:
ColorGradient *m_baseGradient; // Not owned
ColorGradient *m_singleHighlightGradient; // Not owned
ColorGradient *m_multiHighlightGradient; // Not owned
+
+ QList<DeclarativeColor *> m_rowColors;
+ bool m_dummyColors;
+
+ void addColor(DeclarativeColor *color);
+ QList<DeclarativeColor *> colorList();
+ void clearColors();
+ void clearDummyColors();
};
class DeclarativeScatter3DSeries : public QScatter3DSeries
@@ -115,6 +112,9 @@ class DeclarativeScatter3DSeries : public QScatter3DSeries
Q_PROPERTY(int invalidSelectionIndex READ invalidSelectionIndex CONSTANT)
Q_CLASSINFO("DefaultProperty", "seriesChildren")
+ QML_NAMED_ELEMENT(Scatter3DSeries)
+ QML_ADDED_IN_VERSION(1, 0)
+
public:
DeclarativeScatter3DSeries(QObject *parent = 0);
virtual ~DeclarativeScatter3DSeries();
@@ -161,6 +161,9 @@ class DeclarativeSurface3DSeries : public QSurface3DSeries
Q_PROPERTY(ColorGradient *multiHighlightGradient READ multiHighlightGradient WRITE setMultiHighlightGradient NOTIFY multiHighlightGradientChanged)
Q_CLASSINFO("DefaultProperty", "seriesChildren")
+ QML_NAMED_ELEMENT(Surface3DSeries)
+ QML_ADDED_IN_VERSION(1, 0)
+
public:
DeclarativeSurface3DSeries(QObject *parent = 0);
virtual ~DeclarativeSurface3DSeries();
@@ -185,7 +188,7 @@ public Q_SLOTS:
void handleMultiHighlightGradientUpdate();
Q_SIGNALS:
- void selectedPointChanged(QPointF position);
+ void selectedPointChanged(const QPointF &position);
void baseGradientChanged(ColorGradient *gradient);
void singleHighlightGradientChanged(ColorGradient *gradient);
void multiHighlightGradientChanged(ColorGradient *gradient);
@@ -196,6 +199,6 @@ private:
ColorGradient *m_multiHighlightGradient; // Not owned
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml2/declarativesurface.cpp b/src/datavisualizationqml/declarativesurface.cpp
index 2e210246..cff80e98 100644
--- a/src/datavisualizationqml2/declarativesurface.cpp
+++ b/src/datavisualizationqml/declarativesurface.cpp
@@ -1,36 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "declarativesurface_p.h"
#include <QtCore/QMutexLocker>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
DeclarativeSurface::DeclarativeSurface(QQuickItem *parent)
: AbstractDeclarative(parent),
@@ -115,12 +89,13 @@ void DeclarativeSurface::appendSeriesFunc(QQmlListProperty<QSurface3DSeries> *li
reinterpret_cast<DeclarativeSurface *>(list->data)->addSeries(series);
}
-int DeclarativeSurface::countSeriesFunc(QQmlListProperty<QSurface3DSeries> *list)
+qsizetype DeclarativeSurface::countSeriesFunc(QQmlListProperty<QSurface3DSeries> *list)
{
return reinterpret_cast<DeclarativeSurface *>(list->data)->m_surfaceController->surfaceSeriesList().size();
}
-QSurface3DSeries *DeclarativeSurface::atSeriesFunc(QQmlListProperty<QSurface3DSeries> *list, int index)
+QSurface3DSeries *DeclarativeSurface::atSeriesFunc(QQmlListProperty<QSurface3DSeries> *list,
+ qsizetype index)
{
return reinterpret_cast<DeclarativeSurface *>(list->data)->m_surfaceController->surfaceSeriesList().at(index);
}
@@ -160,4 +135,4 @@ void DeclarativeSurface::handleAxisZChanged(QAbstract3DAxis *axis)
emit axisZChanged(static_cast<QValue3DAxis *>(axis));
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativesurface_p.h b/src/datavisualizationqml/declarativesurface_p.h
index d78f20c0..4634834a 100644
--- a/src/datavisualizationqml2/declarativesurface_p.h
+++ b/src/datavisualizationqml/declarativesurface_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,12 +14,13 @@
#ifndef DECLARATIVESURFACE_P_H
#define DECLARATIVESURFACE_P_H
-#include "datavisualizationglobal_p.h"
#include "abstractdeclarative_p.h"
-#include "surface3dcontroller_p.h"
#include "qsurface3dseries.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+#include <private/datavisualizationglobal_p.h>
+#include <private/surface3dcontroller_p.h>
+
+QT_BEGIN_NAMESPACE
class DeclarativeSurface : public AbstractDeclarative
{
@@ -55,9 +30,12 @@ class DeclarativeSurface : public AbstractDeclarative
Q_PROPERTY(QValue3DAxis *axisZ READ axisZ WRITE setAxisZ NOTIFY axisZChanged)
Q_PROPERTY(QSurface3DSeries *selectedSeries READ selectedSeries NOTIFY selectedSeriesChanged)
Q_PROPERTY(QQmlListProperty<QSurface3DSeries> seriesList READ seriesList)
- Q_PROPERTY(bool flipHorizontalGrid READ flipHorizontalGrid WRITE setFlipHorizontalGrid NOTIFY flipHorizontalGridChanged REVISION 1)
+ Q_PROPERTY(bool flipHorizontalGrid READ flipHorizontalGrid WRITE setFlipHorizontalGrid NOTIFY flipHorizontalGridChanged REVISION(1, 2))
Q_CLASSINFO("DefaultProperty", "seriesList")
+ QML_NAMED_ELEMENT(Surface3D)
+ QML_ADDED_IN_VERSION(1, 0)
+
public:
explicit DeclarativeSurface(QQuickItem *parent = 0);
~DeclarativeSurface();
@@ -71,8 +49,8 @@ public:
QQmlListProperty<QSurface3DSeries> seriesList();
static void appendSeriesFunc(QQmlListProperty<QSurface3DSeries> *list, QSurface3DSeries *series);
- static int countSeriesFunc(QQmlListProperty<QSurface3DSeries> *list);
- static QSurface3DSeries *atSeriesFunc(QQmlListProperty<QSurface3DSeries> *list, int index);
+ static qsizetype countSeriesFunc(QQmlListProperty<QSurface3DSeries> *list);
+ static QSurface3DSeries *atSeriesFunc(QQmlListProperty<QSurface3DSeries> *list, qsizetype index);
static void clearSeriesFunc(QQmlListProperty<QSurface3DSeries> *list);
Q_INVOKABLE void addSeries(QSurface3DSeries *series);
Q_INVOKABLE void removeSeries(QSurface3DSeries *series);
@@ -82,21 +60,21 @@ public:
bool flipHorizontalGrid() const;
public Q_SLOTS:
- void handleAxisXChanged(QAbstract3DAxis *axis);
- void handleAxisYChanged(QAbstract3DAxis *axis);
- void handleAxisZChanged(QAbstract3DAxis *axis);
+ void handleAxisXChanged(QAbstract3DAxis *axis) override;
+ void handleAxisYChanged(QAbstract3DAxis *axis) override;
+ void handleAxisZChanged(QAbstract3DAxis *axis) override;
Q_SIGNALS:
void axisXChanged(QValue3DAxis *axis);
void axisYChanged(QValue3DAxis *axis);
void axisZChanged(QValue3DAxis *axis);
void selectedSeriesChanged(QSurface3DSeries *series);
- Q_REVISION(1) void flipHorizontalGridChanged(bool flip);
+ Q_REVISION(1, 2) void flipHorizontalGridChanged(bool flip);
private:
Surface3DController *m_surfaceController;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml2/declarativetheme.cpp b/src/datavisualizationqml/declarativetheme.cpp
index c3d283bf..02f3becc 100644
--- a/src/datavisualizationqml2/declarativetheme.cpp
+++ b/src/datavisualizationqml/declarativetheme.cpp
@@ -1,35 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include "declarativetheme_p.h"
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
DeclarativeTheme3D::DeclarativeTheme3D(QObject *parent)
: Q3DTheme(parent),
@@ -362,13 +338,13 @@ void DeclarativeTheme3D::appendBaseColorsFunc(QQmlListProperty<DeclarativeColor>
reinterpret_cast<DeclarativeTheme3D *>(list->data)->addColor(color);
}
-int DeclarativeTheme3D::countBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list)
+qsizetype DeclarativeTheme3D::countBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list)
{
return reinterpret_cast<DeclarativeTheme3D *>(list->data)->colorList().size();
}
DeclarativeColor *DeclarativeTheme3D::atBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list,
- int index)
+ qsizetype index)
{
return reinterpret_cast<DeclarativeTheme3D *>(list->data)->colorList().at(index);
}
@@ -393,13 +369,13 @@ void DeclarativeTheme3D::appendBaseGradientsFunc(QQmlListProperty<ColorGradient>
reinterpret_cast<DeclarativeTheme3D *>(list->data)->addGradient(gradient);
}
-int DeclarativeTheme3D::countBaseGradientsFunc(QQmlListProperty<ColorGradient> *list)
+qsizetype DeclarativeTheme3D::countBaseGradientsFunc(QQmlListProperty<ColorGradient> *list)
{
return reinterpret_cast<DeclarativeTheme3D *>(list->data)->gradientList().size();
}
ColorGradient *DeclarativeTheme3D::atBaseGradientsFunc(QQmlListProperty<ColorGradient> *list,
- int index)
+ qsizetype index)
{
return reinterpret_cast<DeclarativeTheme3D *>(list->data)->gradientList().at(index);
}
@@ -409,4 +385,4 @@ void DeclarativeTheme3D::clearBaseGradientsFunc(QQmlListProperty<ColorGradient>
reinterpret_cast<DeclarativeTheme3D *>(list->data)->clearGradients();
}
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativetheme_p.h b/src/datavisualizationqml/declarativetheme_p.h
index 6934cbd6..8bc2f049 100644
--- a/src/datavisualizationqml2/declarativetheme_p.h
+++ b/src/datavisualizationqml/declarativetheme_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -40,14 +14,16 @@
#ifndef DECLARATIVETHEME_P_H
#define DECLARATIVETHEME_P_H
-#include "datavisualizationglobal_p.h"
+#include <private/datavisualizationglobal_p.h>
+#include <private/q3dtheme_p.h>
+
#include "declarativecolor_p.h"
#include "colorgradient_p.h"
-#include "q3dtheme_p.h"
-#include <QtQml/QQmlParserStatus>
+#include <QtQml/qqml.h>
+#include <QtQml/qqmlparserstatus.h>
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
+QT_BEGIN_NAMESPACE
class DeclarativeTheme3D : public Q3DTheme, public QQmlParserStatus
{
@@ -59,6 +35,8 @@ class DeclarativeTheme3D : public Q3DTheme, public QQmlParserStatus
Q_PROPERTY(ColorGradient *singleHighlightGradient READ singleHighlightGradient WRITE setSingleHighlightGradient NOTIFY singleHighlightGradientChanged)
Q_PROPERTY(ColorGradient *multiHighlightGradient READ multiHighlightGradient WRITE setMultiHighlightGradient NOTIFY multiHighlightGradientChanged)
Q_CLASSINFO("DefaultProperty", "themeChildren")
+ QML_NAMED_ELEMENT(Theme3D)
+ QML_ADDED_IN_VERSION(1, 0)
public:
DeclarativeTheme3D(QObject *parent = 0);
@@ -70,15 +48,17 @@ public:
QQmlListProperty<DeclarativeColor> baseColors();
static void appendBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list,
DeclarativeColor *color);
- static int countBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list);
- static DeclarativeColor *atBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list, int index);
+ static qsizetype countBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list);
+ static DeclarativeColor *atBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list,
+ qsizetype index);
static void clearBaseColorsFunc(QQmlListProperty<DeclarativeColor> *list);
QQmlListProperty<ColorGradient> baseGradients();
static void appendBaseGradientsFunc(QQmlListProperty<ColorGradient> *list,
ColorGradient *gradient);
- static int countBaseGradientsFunc(QQmlListProperty<ColorGradient> *list);
- static ColorGradient *atBaseGradientsFunc(QQmlListProperty<ColorGradient> *list, int index);
+ static qsizetype countBaseGradientsFunc(QQmlListProperty<ColorGradient> *list);
+ static ColorGradient *atBaseGradientsFunc(QQmlListProperty<ColorGradient> *list,
+ qsizetype index);
static void clearBaseGradientsFunc(QQmlListProperty<ColorGradient> *list);
void setSingleHighlightGradient(ColorGradient *gradient);
@@ -88,8 +68,8 @@ public:
ColorGradient *multiHighlightGradient() const;
// From QQmlParserStatus
- virtual void classBegin();
- virtual void componentComplete();
+ void classBegin() override;
+ void componentComplete() override;
Q_SIGNALS:
void singleHighlightGradientChanged(ColorGradient *gradient);
@@ -132,6 +112,6 @@ private:
bool m_dummyColors;
};
-QT_END_NAMESPACE_DATAVISUALIZATION
+QT_END_NAMESPACE
#endif
diff --git a/src/datavisualizationqml2/designer/Bars3DSpecifics.qml b/src/datavisualizationqml/designer/Bars3DSpecifics.qml
index cd1e76b4..d509fd84 100644
--- a/src/datavisualizationqml2/designer/Bars3DSpecifics.qml
+++ b/src/datavisualizationqml/designer/Bars3DSpecifics.qml
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.0
import HelperWidgets 2.0
diff --git a/src/datavisualizationqml2/designer/Scatter3DSpecifics.qml b/src/datavisualizationqml/designer/Scatter3DSpecifics.qml
index b864fb16..ffc79d44 100644
--- a/src/datavisualizationqml2/designer/Scatter3DSpecifics.qml
+++ b/src/datavisualizationqml/designer/Scatter3DSpecifics.qml
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.0
import HelperWidgets 2.0
diff --git a/src/datavisualizationqml2/designer/Surface3DSpecifics.qml b/src/datavisualizationqml/designer/Surface3DSpecifics.qml
index 90c2f763..33ca7d75 100644
--- a/src/datavisualizationqml2/designer/Surface3DSpecifics.qml
+++ b/src/datavisualizationqml/designer/Surface3DSpecifics.qml
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.0
import HelperWidgets 2.0
diff --git a/src/datavisualizationqml/designer/default/Bars3D.qml b/src/datavisualizationqml/designer/default/Bars3D.qml
new file mode 100644
index 00000000..8c56b67c
--- /dev/null
+++ b/src/datavisualizationqml/designer/default/Bars3D.qml
@@ -0,0 +1,23 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick 2.0
+import QtDataVisualization 1.2
+
+Bars3D {
+ width: 300
+ height: 300
+ Bar3DSeries {
+ ItemModelBarDataProxy {
+ itemModel: ListModel {
+ ListElement{ row: "row 1"; column: "column 1"; value: "1"; }
+ ListElement{ row: "row 1"; column: "column 2"; value: "2"; }
+ ListElement{ row: "row 1"; column: "column 3"; value: "3"; }
+ }
+
+ rowRole: "row"
+ columnRole: "column"
+ valueRole: "value"
+ }
+ }
+}
diff --git a/src/datavisualizationqml/designer/default/Scatter3D.qml b/src/datavisualizationqml/designer/default/Scatter3D.qml
new file mode 100644
index 00000000..5a6cd261
--- /dev/null
+++ b/src/datavisualizationqml/designer/default/Scatter3D.qml
@@ -0,0 +1,23 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick 2.0
+import QtDataVisualization 1.2
+
+Scatter3D {
+ width: 300
+ height: 300
+ Scatter3DSeries {
+ ItemModelScatterDataProxy {
+ itemModel: ListModel {
+ ListElement{ x: "1"; y: "2"; z: "3"; }
+ ListElement{ x: "2"; y: "3"; z: "4"; }
+ ListElement{ x: "3"; y: "4"; z: "1"; }
+ }
+
+ xPosRole: "x"
+ yPosRole: "y"
+ zPosRole: "z"
+ }
+ }
+}
diff --git a/src/datavisualizationqml/designer/default/Surface3D.qml b/src/datavisualizationqml/designer/default/Surface3D.qml
new file mode 100644
index 00000000..24561890
--- /dev/null
+++ b/src/datavisualizationqml/designer/default/Surface3D.qml
@@ -0,0 +1,24 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick 2.0
+import QtDataVisualization 1.2
+
+Surface3D {
+ width: 300
+ height: 300
+ Surface3DSeries {
+ ItemModelSurfaceDataProxy {
+ itemModel: ListModel {
+ ListElement{ row: "1"; column: "1"; y: "1"; }
+ ListElement{ row: "1"; column: "2"; y: "2"; }
+ ListElement{ row: "2"; column: "1"; y: "3"; }
+ ListElement{ row: "2"; column: "2"; y: "4"; }
+ }
+
+ rowRole: "row"
+ columnRole: "column"
+ yPosRole: "y"
+ }
+ }
+}
diff --git a/src/datavisualizationqml2/designer/images/bars3d-icon.png b/src/datavisualizationqml/designer/images/bars3d-icon.png
index 7f380789..7f380789 100644
--- a/src/datavisualizationqml2/designer/images/bars3d-icon.png
+++ b/src/datavisualizationqml/designer/images/bars3d-icon.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/bars3d-icon16.png b/src/datavisualizationqml/designer/images/bars3d-icon16.png
index e85ff502..e85ff502 100644
--- a/src/datavisualizationqml2/designer/images/bars3d-icon16.png
+++ b/src/datavisualizationqml/designer/images/bars3d-icon16.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/scatter3d-icon.png b/src/datavisualizationqml/designer/images/scatter3d-icon.png
index e1ac5c1f..e1ac5c1f 100644
--- a/src/datavisualizationqml2/designer/images/scatter3d-icon.png
+++ b/src/datavisualizationqml/designer/images/scatter3d-icon.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/scatter3d-icon16.png b/src/datavisualizationqml/designer/images/scatter3d-icon16.png
index 75b2db18..75b2db18 100644
--- a/src/datavisualizationqml2/designer/images/scatter3d-icon16.png
+++ b/src/datavisualizationqml/designer/images/scatter3d-icon16.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/surface3d-icon.png b/src/datavisualizationqml/designer/images/surface3d-icon.png
index 956c675e..956c675e 100644
--- a/src/datavisualizationqml2/designer/images/surface3d-icon.png
+++ b/src/datavisualizationqml/designer/images/surface3d-icon.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/surface3d-icon16.png b/src/datavisualizationqml/designer/images/surface3d-icon16.png
index 6caa643e..6caa643e 100644
--- a/src/datavisualizationqml2/designer/images/surface3d-icon16.png
+++ b/src/datavisualizationqml/designer/images/surface3d-icon16.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/qtdatavisualization.metainfo b/src/datavisualizationqml/designer/qtdatavisualization.metainfo
index 60b2b2c2..60b2b2c2 100644
--- a/src/datavisualizationqml2/designer/qtdatavisualization.metainfo
+++ b/src/datavisualizationqml/designer/qtdatavisualization.metainfo
diff --git a/src/datavisualizationqml2/enumtostringmap.cpp b/src/datavisualizationqml/enumtostringmap.cpp
index d683c0a1..c411f7a9 100644
--- a/src/datavisualizationqml2/enumtostringmap.cpp
+++ b/src/datavisualizationqml/enumtostringmap.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "enumtostringmap_p.h"
@@ -393,7 +367,7 @@ EnumToStringMap::EnumToStringMap() :
m_map[GL_FRAMEBUFFER_UNSUPPORTED] = "FRAMEBUFFER_UNSUPPORTED";
m_map[GL_FRAMEBUFFER_BINDING] = "FRAMEBUFFER_BINDING";
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
m_map[GL_RENDERBUFFER_BINDING] = "RENDERBUFFER_BINDING";
#else
m_map[GL_RENDERBUFFER] = "RENDERBUFFER_BINDING";
diff --git a/src/datavisualizationqml/enumtostringmap_p.h b/src/datavisualizationqml/enumtostringmap_p.h
new file mode 100644
index 00000000..b8be3f18
--- /dev/null
+++ b/src/datavisualizationqml/enumtostringmap_p.h
@@ -0,0 +1,39 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+//
+// 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 ENUMTOSTRINGMAP_P_H
+#define ENUMTOSTRINGMAP_P_H
+
+//#define VERBOSE_STATE_STORE
+
+#ifdef VERBOSE_STATE_STORE
+
+#include <QtGui/qopengl.h>
+#include <QMap>
+#include <QString>
+#include <private/qglobal_p.h>
+
+class EnumToStringMap
+{
+public:
+ static EnumToStringMap *newInstance();
+ static void deleteInstance();
+ QString lookUp(const GLuint value) const;
+
+private:
+ EnumToStringMap();
+ QMap<int, QString> m_map;
+ QString m_unknown;
+};
+#endif
+#endif
diff --git a/src/datavisualizationqml/foreigntypes_p.h b/src/datavisualizationqml/foreigntypes_p.h
new file mode 100644
index 00000000..0b92d862
--- /dev/null
+++ b/src/datavisualizationqml/foreigntypes_p.h
@@ -0,0 +1,122 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+//
+// 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 FOREIGNTYPES_P_H
+#define FOREIGNTYPES_P_H
+
+#include <QtQml/qqml.h>
+
+#include <QtCore/qabstractitemmodel.h>
+
+#include <QtDataVisualization/q3dcamera.h>
+#include <QtDataVisualization/q3dinputhandler.h>
+#include <QtDataVisualization/q3dlight.h>
+#include <QtDataVisualization/q3dobject.h>
+#include <QtDataVisualization/q3dscene.h>
+#include <QtDataVisualization/q3dtheme.h>
+#include <QtDataVisualization/qabstract3daxis.h>
+#include <QtDataVisualization/qabstract3dinputhandler.h>
+#include <QtDataVisualization/qabstract3dseries.h>
+#include <QtDataVisualization/qabstractdataproxy.h>
+#include <QtDataVisualization/qbar3dseries.h>
+#include <QtDataVisualization/qbardataproxy.h>
+#include <QtDataVisualization/qcategory3daxis.h>
+#include <QtDataVisualization/qcustom3ditem.h>
+#include <QtDataVisualization/qcustom3dlabel.h>
+#include <QtDataVisualization/qcustom3dvolume.h>
+#include <QtDataVisualization/qheightmapsurfacedataproxy.h>
+#include <QtDataVisualization/qitemmodelbardataproxy.h>
+#include <QtDataVisualization/qitemmodelscatterdataproxy.h>
+#include <QtDataVisualization/qitemmodelsurfacedataproxy.h>
+#include <QtDataVisualization/qlogvalue3daxisformatter.h>
+#include <QtDataVisualization/qscatter3dseries.h>
+#include <QtDataVisualization/qscatterdataproxy.h>
+#include <QtDataVisualization/qsurface3dseries.h>
+#include <QtDataVisualization/qsurfacedataproxy.h>
+#include <QtDataVisualization/qtouch3dinputhandler.h>
+#include <QtDataVisualization/qvalue3daxis.h>
+#include <QtDataVisualization/qvalue3daxisformatter.h>
+#include <QtCore/private/qglobal_p.h>
+
+QT_BEGIN_NAMESPACE
+
+#define DEFINE_FOREIGN_BASE_ATTRIBUTES(type, name, minor) \
+ Q_GADGET \
+ QML_NAMED_ELEMENT(name) \
+ QML_FOREIGN(type) \
+ QML_ADDED_IN_VERSION(1, minor) \
+
+#define DEFINE_FOREIGN_UNCREATABLE_TYPE(type, name) \
+ struct type##DataVisForeign \
+ { \
+ DEFINE_FOREIGN_BASE_ATTRIBUTES(type, name, 0) \
+ QML_UNCREATABLE("Trying to create uncreatable: " #name ".") \
+ };
+
+#define DEFINE_FOREIGN_CREATABLE_TYPE(type, name, minor) \
+ struct type##DataVisForeign \
+ { \
+ DEFINE_FOREIGN_BASE_ATTRIBUTES(type, name, minor) \
+ };
+
+#define DEFINE_FOREIGN_REPLACED_TYPE(type, name, better) \
+ struct type##DataVisForeign \
+ { \
+ DEFINE_FOREIGN_BASE_ATTRIBUTES(type, name, 0) \
+ QML_UNCREATABLE("Trying to create uncreatable: " #name ", use " #better " instead.") \
+ };
+
+struct Q3DSceneForeign
+{
+ Q_GADGET
+ QML_ANONYMOUS
+ QML_ADDED_IN_VERSION(1, 0)
+ QML_FOREIGN(Q3DScene)
+};
+
+DEFINE_FOREIGN_CREATABLE_TYPE(Q3DCamera, Camera3D, 0)
+DEFINE_FOREIGN_CREATABLE_TYPE(Q3DLight, Light3D, 0)
+DEFINE_FOREIGN_CREATABLE_TYPE(QCategory3DAxis, CategoryAxis3D, 0)
+DEFINE_FOREIGN_CREATABLE_TYPE(QHeightMapSurfaceDataProxy, HeightMapSurfaceDataProxy, 0)
+DEFINE_FOREIGN_CREATABLE_TYPE(QItemModelBarDataProxy, ItemModelBarDataProxy, 0)
+DEFINE_FOREIGN_CREATABLE_TYPE(QItemModelScatterDataProxy, ItemModelScatterDataProxy, 0)
+DEFINE_FOREIGN_CREATABLE_TYPE(QItemModelSurfaceDataProxy, ItemModelSurfaceDataProxy, 0)
+DEFINE_FOREIGN_CREATABLE_TYPE(QValue3DAxis, ValueAxis3D, 0)
+
+DEFINE_FOREIGN_CREATABLE_TYPE(QCustom3DItem, Custom3DItem, 1)
+DEFINE_FOREIGN_CREATABLE_TYPE(QCustom3DLabel, Custom3DLabel, 1)
+DEFINE_FOREIGN_CREATABLE_TYPE(QLogValue3DAxisFormatter, LogValueAxis3DFormatter, 1)
+DEFINE_FOREIGN_CREATABLE_TYPE(QValue3DAxisFormatter, ValueAxis3DFormatter, 1)
+
+DEFINE_FOREIGN_CREATABLE_TYPE(Q3DInputHandler, InputHandler3D, 2)
+DEFINE_FOREIGN_CREATABLE_TYPE(QCustom3DVolume, Custom3DVolume, 2)
+DEFINE_FOREIGN_CREATABLE_TYPE(QTouch3DInputHandler, TouchInputHandler3D, 2)
+
+DEFINE_FOREIGN_REPLACED_TYPE(Q3DTheme, Q3DTheme, Theme3D)
+DEFINE_FOREIGN_REPLACED_TYPE(QBar3DSeries, QBar3DSeries, Bar3DSeries)
+DEFINE_FOREIGN_REPLACED_TYPE(QScatter3DSeries, QScatter3DSeries, Scatter3DSeries)
+DEFINE_FOREIGN_REPLACED_TYPE(QSurface3DSeries, QSurface3DSeries, Surface3DSeries)
+
+DEFINE_FOREIGN_UNCREATABLE_TYPE(Q3DObject, Object3D)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QAbstract3DAxis, AbstractAxis3D)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QAbstract3DInputHandler, AbstractInputHandler3D)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QAbstract3DSeries, Abstract3DSeries)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QAbstractDataProxy, AbstractDataProxy)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QAbstractItemModel, AbstractItemModel)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QBarDataProxy, BarDataProxy)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QScatterDataProxy, ScatterDataProxy)
+DEFINE_FOREIGN_UNCREATABLE_TYPE(QSurfaceDataProxy, SurfaceDataProxy)
+
+QT_END_NAMESPACE
+
+#endif // FOREIGNTYPES_P_H
diff --git a/src/datavisualizationqml2/glstatestore.cpp b/src/datavisualizationqml/glstatestore.cpp
index 0d24f3f9..573835a3 100644
--- a/src/datavisualizationqml2/glstatestore.cpp
+++ b/src/datavisualizationqml/glstatestore.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "glstatestore_p.h"
#include <QDebug>
@@ -87,7 +61,7 @@ void GLStateStore::storeGLState()
printCurrentState(true);
#endif
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &m_drawFramebuffer);
glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &m_readFramebuffer);
glGetIntegerv(GL_RENDERBUFFER_BINDING, &m_renderbuffer);
@@ -144,7 +118,7 @@ void GLStateStore::printCurrentState(bool in)
if (file->isOpen()) {
QDebug msg(file);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
GLint drawFramebuffer;
GLint readFramebuffer;
GLint renderbuffer;
@@ -183,7 +157,7 @@ void GLStateStore::printCurrentState(bool in)
GLfloat polygonOffsetUnits;
glGetBooleanv(GL_DEPTH_WRITEMASK, &isDepthWriteEnabled);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFramebuffer);
glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &readFramebuffer);
glGetIntegerv(GL_RENDERBUFFER_BINDING, &renderbuffer);
@@ -226,7 +200,7 @@ void GLStateStore::printCurrentState(bool in)
color.setRgbF(clearColor[0], clearColor[1], clearColor[2]);
color.setAlphaF(clearColor[3]);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
msg << "---" << endl;
msg << " GL_DRAW_FRAMEBUFFER_BINDING "<< drawFramebuffer << endl;
msg << " GL_READ_FRAMEBUFFER_BINDING "<< readFramebuffer << endl;
@@ -278,7 +252,7 @@ void GLStateStore::printCurrentState(bool in)
void GLStateStore::restoreGLState()
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
glBindFramebuffer(GL_READ_FRAMEBUFFER, m_readFramebuffer);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_drawFramebuffer);
glBindRenderbuffer(GL_RENDERBUFFER_BINDING, m_renderbuffer);
@@ -353,7 +327,7 @@ void GLStateStore::restoreGLState()
void GLStateStore::initGLDefaultState()
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
m_drawFramebuffer = 0;
m_readFramebuffer = 0;
m_renderbuffer = 0;
diff --git a/src/datavisualizationqml2/glstatestore_p.h b/src/datavisualizationqml/glstatestore_p.h
index 830f5e64..b34a4c0d 100644
--- a/src/datavisualizationqml2/glstatestore_p.h
+++ b/src/datavisualizationqml/glstatestore_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -63,7 +37,7 @@ public:
GLint m_scissorBox[4];
GLboolean m_isScissorTestEnabled;
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
GLint m_drawFramebuffer;
GLint m_readFramebuffer;
GLint m_renderbuffer;
diff --git a/src/datavisualizationqml2/colorgradient.cpp b/src/datavisualizationqml2/colorgradient.cpp
deleted file mode 100644
index edcca2ec..00000000
--- a/src/datavisualizationqml2/colorgradient.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "colorgradient_p.h"
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-ColorGradientStop::ColorGradientStop(QObject *parent)
- : QObject(parent)
-{
-}
-
-qreal ColorGradientStop::position() const
-{
- return m_position;
-}
-
-void ColorGradientStop::setPosition(qreal position)
-{
- m_position = position;
- updateGradient();
- emit positionChanged(position);
-}
-
-QColor ColorGradientStop::color() const
-{
- return m_color;
-}
-
-void ColorGradientStop::setColor(const QColor &color)
-{
- m_color = color;
- updateGradient();
- emit colorChanged(color);
-}
-
-void ColorGradientStop::updateGradient()
-{
- if (ColorGradient *grad = qobject_cast<ColorGradient*>(parent()))
- grad->doUpdate();
-}
-
-ColorGradient::ColorGradient(QObject *parent)
-: QObject(parent)
-{
-}
-
-ColorGradient::~ColorGradient()
-{
-}
-
-QQmlListProperty<ColorGradientStop> ColorGradient::stops()
-{
- return QQmlListProperty<ColorGradientStop>(this, &m_stops);
-}
-
-void ColorGradient::doUpdate()
-{
- emit updated();
-}
-
-QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualizationqml2/colorgradient_p.h b/src/datavisualizationqml2/colorgradient_p.h
deleted file mode 100644
index 6973ac4b..00000000
--- a/src/datavisualizationqml2/colorgradient_p.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//
-// 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 COLORGRADIENT_P_H
-#define COLORGRADIENT_P_H
-
-#include "datavisualizationglobal_p.h"
-#include <QtGui/QColor>
-#include <QtQml/QQmlListProperty>
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-class ColorGradientStop : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged)
- Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
-
-public:
- ColorGradientStop(QObject *parent = 0);
-
- qreal position() const;
- void setPosition(qreal position);
-
- QColor color() const;
- void setColor(const QColor &color);
-
-Q_SIGNALS:
- void positionChanged(qreal position);
- void colorChanged(QColor color);
-
-private:
- void updateGradient();
-
-private:
- qreal m_position;
- QColor m_color;
-};
-
-class ColorGradient : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QQmlListProperty<ColorGradientStop> stops READ stops)
- Q_CLASSINFO("DefaultProperty", "stops")
-
-public:
- ColorGradient(QObject *parent = 0);
- ~ColorGradient();
-
- QQmlListProperty<ColorGradientStop> stops();
-
- void doUpdate();
- QList<ColorGradientStop *> m_stops;
-
-Q_SIGNALS:
- void updated();
-};
-
-QT_END_NAMESPACE_DATAVISUALIZATION
-
-#endif
diff --git a/src/datavisualizationqml2/datavisualizationqml2.pro b/src/datavisualizationqml2/datavisualizationqml2.pro
deleted file mode 100644
index 8f5fcb68..00000000
--- a/src/datavisualizationqml2/datavisualizationqml2.pro
+++ /dev/null
@@ -1,55 +0,0 @@
-TARGET = datavisualizationqml2
-CXX_MODULE = datavisualization
-QT += opengl qml quick datavisualization
-osx: QT += gui-private
-TARGETPATH = QtDataVisualization
-
-include($$PWD/designer/designer.pri)
-
-INCLUDEPATH += ../../include \
- ../../include/QtDataVisualization \
- ../datavisualization/engine \
- ../datavisualization/global \
- ../datavisualization/data \
- ../datavisualization/theme \
- ../datavisualization/axis \
- ../datavisualization/input
-
-SOURCES += \
- datavisualizationqml2_plugin.cpp \
- declarativebars.cpp \
- declarativescatter.cpp \
- declarativesurface.cpp \
- abstractdeclarative.cpp \
- colorgradient.cpp \
- declarativeseries.cpp \
- declarativetheme.cpp \
- declarativecolor.cpp \
- declarativescene.cpp \
- declarativerendernode.cpp \
- glstatestore.cpp \
- enumtostringmap.cpp
-
-HEADERS += \
- datavisualizationqml2_plugin.h \
- declarativebars_p.h \
- declarativescatter_p.h \
- declarativesurface_p.h \
- abstractdeclarative_p.h \
- colorgradient_p.h \
- declarativeseries_p.h \
- declarativetheme_p.h \
- declarativecolor_p.h \
- declarativescene_p.h \
- declarativerendernode_p.h \
- glstatestore_p.h \
- enumtostringmap_p.h
-
-IMPORT_VERSION = 1.$$QT_MINOR_VERSION
-QMAKE_QMLPLUGINDUMP_FLAGS += -defaultplatform
-load(qml_plugin)
-
-win32 {
- QMAKE_TARGET_PRODUCT = "Qt Data Visualization (Qt $$QT_VERSION)"
- QMAKE_TARGET_DESCRIPTION = "3D Data Visualization QML plugin for Qt."
-}
diff --git a/src/datavisualizationqml2/datavisualizationqml2_plugin.cpp b/src/datavisualizationqml2/datavisualizationqml2_plugin.cpp
deleted file mode 100644
index 5b515a04..00000000
--- a/src/datavisualizationqml2/datavisualizationqml2_plugin.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "datavisualizationqml2_plugin.h"
-
-#include <QtQml>
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-void QtDataVisualizationQml2Plugin::registerTypes(const char *uri)
-{
- // @uri QtDataVisualization
-
- // QtDataVisualization 1.0
-
- qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 0, "AbstractItemModel",
- QLatin1String("Trying to create uncreatable: AbstractItemModel."));
- qmlRegisterUncreatableType<QAbstract3DAxis>(uri, 1, 0, "AbstractAxis3D",
- QLatin1String("Trying to create uncreatable: AbstractAxis."));
- qmlRegisterUncreatableType<QAbstractDataProxy>(uri, 1, 0, "AbstractDataProxy",
- QLatin1String("Trying to create uncreatable: AbstractDataProxy."));
- qmlRegisterUncreatableType<QBarDataProxy>(uri, 1, 0, "BarDataProxy",
- QLatin1String("Trying to create uncreatable: BarDataProxy."));
- qmlRegisterUncreatableType<QScatterDataProxy>(uri, 1, 0, "ScatterDataProxy",
- QLatin1String("Trying to create uncreatable: ScatterDataProxy."));
- qmlRegisterUncreatableType<QSurfaceDataProxy>(uri, 1, 0, "SurfaceDataProxy",
- QLatin1String("Trying to create uncreatable: SurfaceDataProxy."));
- qmlRegisterUncreatableType<AbstractDeclarative>(uri, 1, 0, "AbstractGraph3D",
- QLatin1String("Trying to create uncreatable: AbstractGraph3D."));
- qmlRegisterUncreatableType<Declarative3DScene>(uri, 1, 0, "Scene3D",
- QLatin1String("Trying to create uncreatable: Scene3D."));
- qmlRegisterUncreatableType<QAbstract3DSeries>(uri, 1, 0, "Abstract3DSeries",
- QLatin1String("Trying to create uncreatable: Abstract3DSeries."));
- qmlRegisterUncreatableType<QBar3DSeries>(uri, 1, 0, "QBar3DSeries",
- QLatin1String("Trying to create uncreatable: QBar3DSeries, use Bar3DSeries instead."));
- qmlRegisterUncreatableType<QScatter3DSeries>(uri, 1, 0, "QScatter3DSeries",
- QLatin1String("Trying to create uncreatable: QScatter3DSeries, use Scatter3DSeries instead."));
- qmlRegisterUncreatableType<QSurface3DSeries>(uri, 1, 0, "QSurface3DSeries",
- QLatin1String("Trying to create uncreatable: QSurface3DSeries, use Surface3DSeries instead."));
- qmlRegisterUncreatableType<Q3DTheme>(uri, 1, 0, "Q3DTheme",
- QLatin1String("Trying to create uncreatable: Q3DTheme, use Theme3D instead."));
- qmlRegisterUncreatableType<QAbstract3DInputHandler>(uri, 1, 0, "AbstractInputHandler3D",
- QLatin1String("Trying to create uncreatable: AbstractInputHandler3D."));
- qmlRegisterUncreatableType<Q3DObject>(uri, 1, 0, "Object3D",
- QLatin1String("Trying to create uncreatable: Object3D."));
-
- qmlRegisterType<DeclarativeBars>(uri, 1, 0, "Bars3D");
- qmlRegisterType<DeclarativeScatter>(uri, 1, 0, "Scatter3D");
- qmlRegisterType<DeclarativeSurface>(uri, 1, 0, "Surface3D");
-
- qmlRegisterType<QValue3DAxis>(uri, 1, 0, "ValueAxis3D");
- qmlRegisterType<QCategory3DAxis>(uri, 1, 0, "CategoryAxis3D");
-
- qmlRegisterType<Q3DCamera>(uri, 1, 0, "Camera3D");
- qmlRegisterType<Q3DLight>(uri, 1, 0, "Light3D");
-
- qmlRegisterType<QItemModelBarDataProxy>(uri, 1, 0, "ItemModelBarDataProxy");
- qmlRegisterType<QItemModelScatterDataProxy>(uri, 1, 0, "ItemModelScatterDataProxy");
- qmlRegisterType<QItemModelSurfaceDataProxy>(uri, 1, 0, "ItemModelSurfaceDataProxy");
- qmlRegisterType<QHeightMapSurfaceDataProxy>(uri, 1, 0, "HeightMapSurfaceDataProxy");
-
- qmlRegisterType<ColorGradientStop>(uri, 1, 0, "ColorGradientStop");
- qmlRegisterType<ColorGradient>(uri, 1, 0, "ColorGradient");
-
- qmlRegisterType<DeclarativeColor>(uri, 1, 0, "ThemeColor");
- qmlRegisterType<DeclarativeTheme3D>(uri, 1, 0, "Theme3D");
-
- qmlRegisterType<DeclarativeBar3DSeries>(uri, 1, 0, "Bar3DSeries");
- qmlRegisterType<DeclarativeScatter3DSeries>(uri, 1, 0, "Scatter3DSeries");
- qmlRegisterType<DeclarativeSurface3DSeries>(uri, 1, 0, "Surface3DSeries");
-
- qRegisterMetaType<QAbstract3DGraph::ShadowQuality>("QAbstract3DGraph::ShadowQuality");
-
- // QtDataVisualization 1.1
-
- // New revisions
- qmlRegisterUncreatableType<QAbstract3DAxis, 1>(uri, 1, 1, "AbstractAxis3D",
- QLatin1String("Trying to create uncreatable: AbstractAxis."));
- qmlRegisterUncreatableType<QAbstract3DSeries, 1>(uri, 1, 1, "Abstract3DSeries",
- QLatin1String("Trying to create uncreatable: Abstract3DSeries."));
- qmlRegisterUncreatableType<AbstractDeclarative, 1>(uri, 1, 1, "AbstractGraph3D",
- QLatin1String("Trying to create uncreatable: AbstractGraph3D."));
-
- qmlRegisterType<QValue3DAxis, 1>(uri, 1, 1, "ValueAxis3D");
- qmlRegisterType<QItemModelBarDataProxy, 1>(uri, 1, 1, "ItemModelBarDataProxy");
- qmlRegisterType<QItemModelSurfaceDataProxy, 1>(uri, 1, 1, "ItemModelSurfaceDataProxy");
- qmlRegisterType<QItemModelScatterDataProxy, 1>(uri, 1, 1, "ItemModelScatterDataProxy");
-
- // New types
- qmlRegisterType<QValue3DAxisFormatter>(uri, 1, 1, "ValueAxis3DFormatter");
- qmlRegisterType<QLogValue3DAxisFormatter>(uri, 1, 1, "LogValueAxis3DFormatter");
- qmlRegisterType<QCustom3DItem>(uri, 1, 1, "Custom3DItem");
- qmlRegisterType<QCustom3DLabel>(uri, 1, 1, "Custom3DLabel");
-
- // New metatypes
- qRegisterMetaType<QAbstract3DGraph::ElementType>("QAbstract3DGraph::ElementType");
-
- // QtDataVisualization 1.2
-
- // New revisions
- qmlRegisterUncreatableType<AbstractDeclarative, 2>(uri, 1, 2, "AbstractGraph3D",
- QLatin1String("Trying to create uncreatable: AbstractGraph3D."));
- qmlRegisterRevision<Q3DScene, 1>(uri, 1, 2);
- qmlRegisterUncreatableType<Declarative3DScene, 1>(uri, 1, 2, "Scene3D",
- QLatin1String("Trying to create uncreatable: Scene3D."));
- qmlRegisterType<DeclarativeSurface, 1>(uri, 1, 2, "Surface3D");
- qmlRegisterType<Q3DCamera, 1>(uri, 1, 2, "Camera3D");
- qmlRegisterType<QCustom3DItem, 1>(uri, 1, 2, "Custom3DItem");
- qmlRegisterType<DeclarativeBars, 1>(uri, 1, 2, "Bars3D");
-
- // New types
- qmlRegisterType<Q3DInputHandler>(uri, 1, 2, "InputHandler3D");
- qmlRegisterType<QTouch3DInputHandler>(uri, 1, 2, "TouchInputHandler3D");
- qmlRegisterType<QCustom3DVolume>(uri, 1, 2, "Custom3DVolume");
-
- // QtDataVisualization 1.3
-
- // New revisions
- qmlRegisterType<Q3DLight, 1>(uri, 1, 3, "Light3D");
-
- // The minor version used to be the current Qt 5 minor. For compatibility it is the last
- // Qt 5 release.
- qmlRegisterModule(uri, 1, 15);
-}
-
-QT_END_NAMESPACE_DATAVISUALIZATION
-
diff --git a/src/datavisualizationqml2/datavisualizationqml2_plugin.h b/src/datavisualizationqml2/datavisualizationqml2_plugin.h
deleted file mode 100644
index 5bc19b4d..00000000
--- a/src/datavisualizationqml2/datavisualizationqml2_plugin.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef DATAVISUALIZATIONQML2_PLUGIN_H
-#define DATAVISUALIZATIONQML2_PLUGIN_H
-
-#include "datavisualizationglobal_p.h"
-#include "declarativebars_p.h"
-#include "declarativescatter_p.h"
-#include "declarativesurface_p.h"
-#include "qitemmodelbardataproxy.h"
-#include "qitemmodelscatterdataproxy.h"
-#include "qitemmodelsurfacedataproxy.h"
-#include "qheightmapsurfacedataproxy.h"
-#include "qvalue3daxis.h"
-#include "qvalue3daxisformatter.h"
-#include "qlogvalue3daxisformatter.h"
-#include "qcategory3daxis.h"
-#include "q3dobject.h"
-#include "q3dcamera.h"
-#include "q3dscene.h"
-#include "q3dlight.h"
-#include "qabstract3dseries.h"
-#include "qbar3dseries.h"
-#include "qscatter3dseries.h"
-#include "qsurface3dseries.h"
-#include "declarativeseries_p.h"
-#include "q3dtheme.h"
-#include "declarativetheme_p.h"
-#include "q3dinputhandler.h"
-#include "qtouch3dinputhandler.h"
-#include "declarativecolor_p.h"
-#include "declarativescene_p.h"
-#include "qcustom3ditem.h"
-#include "qcustom3dlabel.h"
-#include "qcustom3dvolume.h"
-
-#include <QtQml/QQmlExtensionPlugin>
-
-using namespace QtDataVisualization;
-
-QML_DECLARE_TYPE(AbstractDeclarative)
-QML_DECLARE_TYPE(DeclarativeBars)
-QML_DECLARE_TYPE(DeclarativeScatter)
-QML_DECLARE_TYPE(DeclarativeSurface)
-
-QML_DECLARE_TYPE(QAbstractItemModel)
-
-QML_DECLARE_TYPE(QAbstract3DAxis)
-QML_DECLARE_TYPE(QCategory3DAxis)
-QML_DECLARE_TYPE(QValue3DAxis)
-QML_DECLARE_TYPE(QValue3DAxisFormatter)
-QML_DECLARE_TYPE(QLogValue3DAxisFormatter)
-
-QML_DECLARE_TYPE(Q3DScene)
-QML_DECLARE_TYPE(Declarative3DScene)
-QML_DECLARE_TYPE(Q3DObject)
-QML_DECLARE_TYPE(Q3DCamera)
-QML_DECLARE_TYPE(Q3DLight)
-
-QML_DECLARE_TYPE(QAbstractDataProxy)
-QML_DECLARE_TYPE(QBarDataProxy)
-QML_DECLARE_TYPE(QItemModelBarDataProxy)
-QML_DECLARE_TYPE(QScatterDataProxy)
-QML_DECLARE_TYPE(QItemModelScatterDataProxy)
-QML_DECLARE_TYPE(QSurfaceDataProxy)
-QML_DECLARE_TYPE(QItemModelSurfaceDataProxy)
-QML_DECLARE_TYPE(QHeightMapSurfaceDataProxy)
-
-QML_DECLARE_TYPE(QAbstract3DSeries)
-QML_DECLARE_TYPE(QBar3DSeries)
-QML_DECLARE_TYPE(QScatter3DSeries)
-QML_DECLARE_TYPE(QSurface3DSeries)
-QML_DECLARE_TYPE(DeclarativeBar3DSeries)
-QML_DECLARE_TYPE(DeclarativeScatter3DSeries)
-QML_DECLARE_TYPE(DeclarativeSurface3DSeries)
-
-QML_DECLARE_TYPE(ColorGradientStop)
-QML_DECLARE_TYPE(ColorGradient)
-
-QML_DECLARE_TYPE(DeclarativeColor)
-
-QML_DECLARE_TYPE(Q3DTheme)
-QML_DECLARE_TYPE(DeclarativeTheme3D)
-
-QML_DECLARE_TYPE(QAbstract3DInputHandler)
-QML_DECLARE_TYPE(Q3DInputHandler)
-QML_DECLARE_TYPE(QTouch3DInputHandler)
-
-QML_DECLARE_TYPE(QCustom3DItem)
-QML_DECLARE_TYPE(QCustom3DLabel)
-QML_DECLARE_TYPE(QCustom3DVolume)
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-class QtDataVisualizationQml2Plugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-
-public:
- QtDataVisualizationQml2Plugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { }
- void registerTypes(const char *uri);
-};
-
-QT_END_NAMESPACE_DATAVISUALIZATION
-
-#endif // DATAVISUALIZATIONQML2_PLUGIN_H
-
diff --git a/src/datavisualizationqml2/declarativecolor.cpp b/src/datavisualizationqml2/declarativecolor.cpp
deleted file mode 100644
index 0c0a1f6c..00000000
--- a/src/datavisualizationqml2/declarativecolor.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "declarativecolor_p.h"
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-DeclarativeColor::DeclarativeColor(QObject *parent)
- : QObject(parent)
-{
-}
-
-void DeclarativeColor::setColor(const QColor &color)
-{
- if (m_color != color) {
- m_color = color;
- emit colorChanged(color);
- }
-}
-
-QColor DeclarativeColor::color() const
-{
- return m_color;
-}
-
-QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualizationqml2/declarativecolor_p.h b/src/datavisualizationqml2/declarativecolor_p.h
deleted file mode 100644
index 1ea66530..00000000
--- a/src/datavisualizationqml2/declarativecolor_p.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//
-// 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 DECLARATIVECOLOR_P_H
-#define DECLARATIVECOLOR_P_H
-
-#include "datavisualizationglobal_p.h"
-#include <QtGui/QColor>
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-class DeclarativeColor : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
-
-public:
- DeclarativeColor(QObject *parent = 0);
-
- void setColor(const QColor &color);
- QColor color() const;
-
-Q_SIGNALS:
- void colorChanged(QColor color);
-
-private:
- QColor m_color;
-};
-
-QT_END_NAMESPACE_DATAVISUALIZATION
-
-#endif
diff --git a/src/datavisualizationqml2/declarativescene.cpp b/src/datavisualizationqml2/declarativescene.cpp
deleted file mode 100644
index 54bb52da..00000000
--- a/src/datavisualizationqml2/declarativescene.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "declarativescene_p.h"
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-Declarative3DScene::Declarative3DScene(QObject *parent)
- : Q3DScene(parent)
-{
- QObject::connect(this, &Q3DScene::selectionQueryPositionChanged, this,
- &Declarative3DScene::selectionQueryPositionChanged);
-}
-
-Declarative3DScene::~Declarative3DScene()
-{
-}
-
-void Declarative3DScene::setSelectionQueryPosition(const QPointF &point)
-{
- Q3DScene::setSelectionQueryPosition(point.toPoint());
-}
-
-QPointF Declarative3DScene::selectionQueryPosition() const
-{
- return QPointF(Q3DScene::selectionQueryPosition());
-}
-
-QPoint Declarative3DScene::invalidSelectionPoint() const
-{
- return Q3DScene::invalidSelectionPoint();
-}
-
-QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualizationqml2/declarativescene_p.h b/src/datavisualizationqml2/declarativescene_p.h
deleted file mode 100644
index b4c03e26..00000000
--- a/src/datavisualizationqml2/declarativescene_p.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//
-// 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 DECLARATIVESCENE_P_H
-#define DECLARATIVESCENE_P_H
-
-#include "datavisualizationglobal_p.h"
-#include "q3dscene.h"
-
-QT_BEGIN_NAMESPACE_DATAVISUALIZATION
-
-class Declarative3DScene : public Q3DScene
-{
- Q_OBJECT
- // This property is overloaded to use QPointF instead of QPoint to work around qml bug
- // where Qt.point(0, 0) can't be assigned due to error "Cannot assign QPointF to QPoint".
- Q_PROPERTY(QPointF selectionQueryPosition READ selectionQueryPosition WRITE setSelectionQueryPosition NOTIFY selectionQueryPositionChanged)
- // This is static method in parent class, overload as constant property for qml.
- Q_PROPERTY(QPoint invalidSelectionPoint READ invalidSelectionPoint CONSTANT)
-
-public:
- Declarative3DScene(QObject *parent = 0);
- virtual ~Declarative3DScene();
-
- void setSelectionQueryPosition(const QPointF &point);
- QPointF selectionQueryPosition() const;
- QPoint invalidSelectionPoint() const;
-
-Q_SIGNALS:
- void selectionQueryPositionChanged(const QPointF position);
-};
-
-QT_END_NAMESPACE_DATAVISUALIZATION
-
-#endif
diff --git a/src/datavisualizationqml2/designer/default/Bars3D.qml b/src/datavisualizationqml2/designer/default/Bars3D.qml
deleted file mode 100644
index 32f4c939..00000000
--- a/src/datavisualizationqml2/designer/default/Bars3D.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtDataVisualization 1.2
-
-Bars3D {
- width: 300
- height: 300
- Bar3DSeries {
- ItemModelBarDataProxy {
- itemModel: ListModel {
- ListElement{ row: "row 1"; column: "column 1"; value: "1"; }
- ListElement{ row: "row 1"; column: "column 2"; value: "2"; }
- ListElement{ row: "row 1"; column: "column 3"; value: "3"; }
- }
-
- rowRole: "row"
- columnRole: "column"
- valueRole: "value"
- }
- }
-}
diff --git a/src/datavisualizationqml2/designer/default/Scatter3D.qml b/src/datavisualizationqml2/designer/default/Scatter3D.qml
deleted file mode 100644
index 2c92d192..00000000
--- a/src/datavisualizationqml2/designer/default/Scatter3D.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtDataVisualization 1.2
-
-Scatter3D {
- width: 300
- height: 300
- Scatter3DSeries {
- ItemModelScatterDataProxy {
- itemModel: ListModel {
- ListElement{ x: "1"; y: "2"; z: "3"; }
- ListElement{ x: "2"; y: "3"; z: "4"; }
- ListElement{ x: "3"; y: "4"; z: "1"; }
- }
-
- xPosRole: "x"
- yPosRole: "y"
- zPosRole: "z"
- }
- }
-}
diff --git a/src/datavisualizationqml2/designer/default/Surface3D.qml b/src/datavisualizationqml2/designer/default/Surface3D.qml
deleted file mode 100644
index 66fd10fb..00000000
--- a/src/datavisualizationqml2/designer/default/Surface3D.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtDataVisualization 1.2
-
-Surface3D {
- width: 300
- height: 300
- Surface3DSeries {
- ItemModelSurfaceDataProxy {
- itemModel: ListModel {
- ListElement{ row: "1"; column: "1"; y: "1"; }
- ListElement{ row: "1"; column: "2"; y: "2"; }
- ListElement{ row: "2"; column: "1"; y: "3"; }
- ListElement{ row: "2"; column: "2"; y: "4"; }
- }
-
- rowRole: "row"
- columnRole: "column"
- yPosRole: "y"
- }
- }
-}
diff --git a/src/datavisualizationqml2/designer/designer.pri b/src/datavisualizationqml2/designer/designer.pri
deleted file mode 100644
index e22fb618..00000000
--- a/src/datavisualizationqml2/designer/designer.pri
+++ /dev/null
@@ -1,19 +0,0 @@
-QML_FILES += \
- $$PWD/Bars3DSpecifics.qml \
- $$PWD/Scatter3DSpecifics.qml \
- $$PWD/Surface3DSpecifics.qml \
- $$PWD/default/Bars3D.qml \
- $$PWD/default/Scatter3D.qml \
- $$PWD/default/Surface3D.qml
-
-QML_FILES += $$PWD/qtdatavisualization.metainfo
-
-# Images
-QML_FILES += \
- $$PWD/images/bars3d-icon.png \
- $$PWD/images/bars3d-icon16.png \
- $$PWD/images/scatter3d-icon.png \
- $$PWD/images/scatter3d-icon16.png \
- $$PWD/images/surface3d-icon.png \
- $$PWD/images/surface3d-icon16.png
-
diff --git a/src/datavisualizationqml2/enumtostringmap_p.h b/src/datavisualizationqml2/enumtostringmap_p.h
deleted file mode 100644
index ee613433..00000000
--- a/src/datavisualizationqml2/enumtostringmap_p.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//
-// 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 ENUMTOSTRINGMAP_P_H
-#define ENUMTOSTRINGMAP_P_H
-
-//#define VERBOSE_STATE_STORE
-
-#ifdef VERBOSE_STATE_STORE
-
-#include <QtGui/qopengl.h>
-#include <QMap>
-#include <QString>
-
-class EnumToStringMap
-{
-public:
- static EnumToStringMap *newInstance();
- static void deleteInstance();
- QString lookUp(const GLuint value) const;
-
-private:
- EnumToStringMap();
- QMap<int, QString> m_map;
- QString m_unknown;
-};
-#endif
-#endif
diff --git a/src/datavisualizationqml2/plugins.qmltypes b/src/datavisualizationqml2/plugins.qmltypes
deleted file mode 100644
index 69a48706..00000000
--- a/src/datavisualizationqml2/plugins.qmltypes
+++ /dev/null
@@ -1,2375 +0,0 @@
-import QtQuick.tooling 1.2
-
-// This file describes the plugin-supplied types contained in the library.
-// It is used for QML tooling purposes only.
-//
-// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -defaultplatform QtDataVisualization 1.14'
-
-Module {
- dependencies: ["QtQuick 2.0"]
- Component {
- name: "QAbstractItemModel"
- prototype: "QObject"
- exports: ["QtDataVisualization/AbstractItemModel 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "LayoutChangeHint"
- values: {
- "NoLayoutChangeHint": 0,
- "VerticalSortHint": 1,
- "HorizontalSortHint": 2
- }
- }
- Enum {
- name: "CheckIndexOption"
- values: {
- "NoOption": 0,
- "IndexIsValid": 1,
- "DoNotUseParent": 2,
- "ParentIsInvalid": 4
- }
- }
- Signal {
- name: "dataChanged"
- Parameter { name: "topLeft"; type: "QModelIndex" }
- Parameter { name: "bottomRight"; type: "QModelIndex" }
- Parameter { name: "roles"; type: "QVector<int>" }
- }
- Signal {
- name: "dataChanged"
- Parameter { name: "topLeft"; type: "QModelIndex" }
- Parameter { name: "bottomRight"; type: "QModelIndex" }
- }
- Signal {
- name: "headerDataChanged"
- Parameter { name: "orientation"; type: "Qt::Orientation" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "layoutChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
- }
- Signal {
- name: "layoutChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- }
- Signal { name: "layoutChanged" }
- Signal {
- name: "layoutAboutToBeChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- Parameter { name: "hint"; type: "QAbstractItemModel::LayoutChangeHint" }
- }
- Signal {
- name: "layoutAboutToBeChanged"
- Parameter { name: "parents"; type: "QList<QPersistentModelIndex>" }
- }
- Signal { name: "layoutAboutToBeChanged" }
- Signal {
- name: "rowsAboutToBeInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "rowsInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "rowsAboutToBeRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "rowsRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsAboutToBeInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsInserted"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsAboutToBeRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal {
- name: "columnsRemoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "first"; type: "int" }
- Parameter { name: "last"; type: "int" }
- }
- Signal { name: "modelAboutToBeReset" }
- Signal { name: "modelReset" }
- Signal {
- name: "rowsAboutToBeMoved"
- Parameter { name: "sourceParent"; type: "QModelIndex" }
- Parameter { name: "sourceStart"; type: "int" }
- Parameter { name: "sourceEnd"; type: "int" }
- Parameter { name: "destinationParent"; type: "QModelIndex" }
- Parameter { name: "destinationRow"; type: "int" }
- }
- Signal {
- name: "rowsMoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "start"; type: "int" }
- Parameter { name: "end"; type: "int" }
- Parameter { name: "destination"; type: "QModelIndex" }
- Parameter { name: "row"; type: "int" }
- }
- Signal {
- name: "columnsAboutToBeMoved"
- Parameter { name: "sourceParent"; type: "QModelIndex" }
- Parameter { name: "sourceStart"; type: "int" }
- Parameter { name: "sourceEnd"; type: "int" }
- Parameter { name: "destinationParent"; type: "QModelIndex" }
- Parameter { name: "destinationColumn"; type: "int" }
- }
- Signal {
- name: "columnsMoved"
- Parameter { name: "parent"; type: "QModelIndex" }
- Parameter { name: "start"; type: "int" }
- Parameter { name: "end"; type: "int" }
- Parameter { name: "destination"; type: "QModelIndex" }
- Parameter { name: "column"; type: "int" }
- }
- Method { name: "submit"; type: "bool" }
- Method { name: "revert" }
- Method {
- name: "hasIndex"
- type: "bool"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "hasIndex"
- type: "bool"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- }
- Method {
- name: "index"
- type: "QModelIndex"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "index"
- type: "QModelIndex"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- }
- Method {
- name: "parent"
- type: "QModelIndex"
- Parameter { name: "child"; type: "QModelIndex" }
- }
- Method {
- name: "sibling"
- type: "QModelIndex"
- Parameter { name: "row"; type: "int" }
- Parameter { name: "column"; type: "int" }
- Parameter { name: "idx"; type: "QModelIndex" }
- }
- Method {
- name: "rowCount"
- type: "int"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method { name: "rowCount"; type: "int" }
- Method {
- name: "columnCount"
- type: "int"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method { name: "columnCount"; type: "int" }
- Method {
- name: "hasChildren"
- type: "bool"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method { name: "hasChildren"; type: "bool" }
- Method {
- name: "data"
- type: "QVariant"
- Parameter { name: "index"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- }
- Method {
- name: "data"
- type: "QVariant"
- Parameter { name: "index"; type: "QModelIndex" }
- }
- Method {
- name: "setData"
- type: "bool"
- Parameter { name: "index"; type: "QModelIndex" }
- Parameter { name: "value"; type: "QVariant" }
- Parameter { name: "role"; type: "int" }
- }
- Method {
- name: "setData"
- type: "bool"
- Parameter { name: "index"; type: "QModelIndex" }
- Parameter { name: "value"; type: "QVariant" }
- }
- Method {
- name: "headerData"
- type: "QVariant"
- Parameter { name: "section"; type: "int" }
- Parameter { name: "orientation"; type: "Qt::Orientation" }
- Parameter { name: "role"; type: "int" }
- }
- Method {
- name: "headerData"
- type: "QVariant"
- Parameter { name: "section"; type: "int" }
- Parameter { name: "orientation"; type: "Qt::Orientation" }
- }
- Method {
- name: "fetchMore"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "canFetchMore"
- type: "bool"
- Parameter { name: "parent"; type: "QModelIndex" }
- }
- Method {
- name: "flags"
- type: "Qt::ItemFlags"
- Parameter { name: "index"; type: "QModelIndex" }
- }
- Method {
- name: "match"
- type: "QModelIndexList"
- Parameter { name: "start"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- Parameter { name: "value"; type: "QVariant" }
- Parameter { name: "hits"; type: "int" }
- Parameter { name: "flags"; type: "Qt::MatchFlags" }
- }
- Method {
- name: "match"
- type: "QModelIndexList"
- Parameter { name: "start"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- Parameter { name: "value"; type: "QVariant" }
- Parameter { name: "hits"; type: "int" }
- }
- Method {
- name: "match"
- type: "QModelIndexList"
- Parameter { name: "start"; type: "QModelIndex" }
- Parameter { name: "role"; type: "int" }
- Parameter { name: "value"; type: "QVariant" }
- }
- }
- Component {
- name: "QtDataVisualization::AbstractDeclarative"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: [
- "QtDataVisualization/AbstractGraph3D 1.0",
- "QtDataVisualization/AbstractGraph3D 1.1",
- "QtDataVisualization/AbstractGraph3D 1.2"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [0, 1, 2]
- Enum {
- name: "SelectionFlag"
- values: {
- "SelectionNone": 0,
- "SelectionItem": 1,
- "SelectionRow": 2,
- "SelectionItemAndRow": 3,
- "SelectionColumn": 4,
- "SelectionItemAndColumn": 5,
- "SelectionRowAndColumn": 6,
- "SelectionItemRowAndColumn": 7,
- "SelectionSlice": 8,
- "SelectionMultiSeries": 16
- }
- }
- Enum {
- name: "SelectionFlags"
- values: {
- "SelectionNone": 0,
- "SelectionItem": 1,
- "SelectionRow": 2,
- "SelectionItemAndRow": 3,
- "SelectionColumn": 4,
- "SelectionItemAndColumn": 5,
- "SelectionRowAndColumn": 6,
- "SelectionItemRowAndColumn": 7,
- "SelectionSlice": 8,
- "SelectionMultiSeries": 16
- }
- }
- Enum {
- name: "ShadowQuality"
- values: {
- "ShadowQualityNone": 0,
- "ShadowQualityLow": 1,
- "ShadowQualityMedium": 2,
- "ShadowQualityHigh": 3,
- "ShadowQualitySoftLow": 4,
- "ShadowQualitySoftMedium": 5,
- "ShadowQualitySoftHigh": 6
- }
- }
- Enum {
- name: "ElementType"
- values: {
- "ElementNone": 0,
- "ElementSeries": 1,
- "ElementAxisXLabel": 2,
- "ElementAxisYLabel": 3,
- "ElementAxisZLabel": 4,
- "ElementCustomItem": 5
- }
- }
- Enum {
- name: "RenderingMode"
- values: {
- "RenderDirectToBackground": 0,
- "RenderDirectToBackground_NoClear": 1,
- "RenderIndirect": 2
- }
- }
- Enum {
- name: "OptimizationHint"
- values: {
- "OptimizationDefault": 0,
- "OptimizationStatic": 1
- }
- }
- Enum {
- name: "OptimizationHints"
- values: {
- "OptimizationDefault": 0,
- "OptimizationStatic": 1
- }
- }
- Property { name: "selectionMode"; type: "SelectionFlags" }
- Property { name: "shadowQuality"; type: "ShadowQuality" }
- Property { name: "shadowsSupported"; type: "bool"; isReadonly: true }
- Property { name: "msaaSamples"; type: "int" }
- Property { name: "scene"; type: "Declarative3DScene"; isReadonly: true; isPointer: true }
- Property { name: "inputHandler"; type: "QAbstract3DInputHandler"; isPointer: true }
- Property { name: "theme"; type: "Q3DTheme"; isPointer: true }
- Property { name: "renderingMode"; type: "RenderingMode" }
- Property { name: "measureFps"; revision: 1; type: "bool" }
- Property { name: "currentFps"; revision: 1; type: "double"; isReadonly: true }
- Property {
- name: "customItemList"
- revision: 1
- type: "QCustom3DItem"
- isList: true
- isReadonly: true
- }
- Property { name: "orthoProjection"; revision: 1; type: "bool" }
- Property { name: "selectedElement"; revision: 1; type: "ElementType"; isReadonly: true }
- Property { name: "aspectRatio"; revision: 1; type: "double" }
- Property { name: "optimizationHints"; revision: 1; type: "OptimizationHints" }
- Property { name: "polar"; revision: 2; type: "bool" }
- Property { name: "radialLabelOffset"; revision: 2; type: "float" }
- Property { name: "horizontalAspectRatio"; revision: 2; type: "double" }
- Property { name: "reflection"; revision: 2; type: "bool" }
- Property { name: "reflectivity"; revision: 2; type: "double" }
- Property { name: "locale"; revision: 2; type: "QLocale" }
- Property { name: "queriedGraphPosition"; revision: 2; type: "QVector3D"; isReadonly: true }
- Property { name: "margin"; revision: 2; type: "double" }
- Signal {
- name: "selectionModeChanged"
- Parameter { name: "mode"; type: "AbstractDeclarative::SelectionFlags" }
- }
- Signal {
- name: "shadowQualityChanged"
- Parameter { name: "quality"; type: "AbstractDeclarative::ShadowQuality" }
- }
- Signal {
- name: "shadowsSupportedChanged"
- Parameter { name: "supported"; type: "bool" }
- }
- Signal {
- name: "msaaSamplesChanged"
- Parameter { name: "samples"; type: "int" }
- }
- Signal {
- name: "sceneChanged"
- Parameter { name: "scene"; type: "Q3DScene"; isPointer: true }
- }
- Signal {
- name: "inputHandlerChanged"
- Parameter { name: "inputHandler"; type: "QAbstract3DInputHandler"; isPointer: true }
- }
- Signal {
- name: "themeChanged"
- Parameter { name: "theme"; type: "Q3DTheme"; isPointer: true }
- }
- Signal {
- name: "renderingModeChanged"
- Parameter { name: "mode"; type: "AbstractDeclarative::RenderingMode" }
- }
- Signal {
- name: "measureFpsChanged"
- revision: 1
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "currentFpsChanged"
- revision: 1
- Parameter { name: "fps"; type: "double" }
- }
- Signal {
- name: "selectedElementChanged"
- revision: 1
- Parameter { name: "type"; type: "AbstractDeclarative::ElementType" }
- }
- Signal {
- name: "orthoProjectionChanged"
- revision: 1
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "aspectRatioChanged"
- revision: 1
- Parameter { name: "ratio"; type: "double" }
- }
- Signal {
- name: "optimizationHintsChanged"
- revision: 1
- Parameter { name: "hints"; type: "AbstractDeclarative::OptimizationHints" }
- }
- Signal {
- name: "polarChanged"
- revision: 2
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "radialLabelOffsetChanged"
- revision: 2
- Parameter { name: "offset"; type: "float" }
- }
- Signal {
- name: "horizontalAspectRatioChanged"
- revision: 2
- Parameter { name: "ratio"; type: "double" }
- }
- Signal {
- name: "reflectionChanged"
- revision: 2
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "reflectivityChanged"
- revision: 2
- Parameter { name: "reflectivity"; type: "double" }
- }
- Signal {
- name: "localeChanged"
- revision: 2
- Parameter { name: "locale"; type: "QLocale" }
- }
- Signal {
- name: "queriedGraphPositionChanged"
- revision: 2
- Parameter { name: "data"; type: "QVector3D" }
- }
- Signal {
- name: "marginChanged"
- revision: 2
- Parameter { name: "margin"; type: "double" }
- }
- Method {
- name: "handleAxisXChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisYChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisZChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "windowDestroyed"
- Parameter { name: "obj"; type: "QObject"; isPointer: true }
- }
- Method { name: "destroyContext" }
- Method { name: "clearSelection" }
- Method {
- name: "addCustomItem"
- revision: 1
- type: "int"
- Parameter { name: "item"; type: "QCustom3DItem"; isPointer: true }
- }
- Method { name: "removeCustomItems"; revision: 1 }
- Method {
- name: "removeCustomItem"
- revision: 1
- Parameter { name: "item"; type: "QCustom3DItem"; isPointer: true }
- }
- Method {
- name: "removeCustomItemAt"
- revision: 1
- Parameter { name: "position"; type: "QVector3D" }
- }
- Method {
- name: "releaseCustomItem"
- revision: 1
- Parameter { name: "item"; type: "QCustom3DItem"; isPointer: true }
- }
- Method { name: "selectedLabelIndex"; revision: 1; type: "int" }
- Method { name: "selectedAxis"; revision: 1; type: "QAbstract3DAxis*" }
- Method { name: "selectedCustomItemIndex"; revision: 1; type: "int" }
- Method { name: "selectedCustomItem"; revision: 1; type: "QCustom3DItem*" }
- }
- Component {
- name: "QtDataVisualization::ColorGradient"
- defaultProperty: "stops"
- prototype: "QObject"
- exports: ["QtDataVisualization/ColorGradient 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "stops"; type: "ColorGradientStop"; isList: true; isReadonly: true }
- Signal { name: "updated" }
- }
- Component {
- name: "QtDataVisualization::ColorGradientStop"
- prototype: "QObject"
- exports: ["QtDataVisualization/ColorGradientStop 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "position"; type: "double" }
- Property { name: "color"; type: "QColor" }
- Signal {
- name: "positionChanged"
- Parameter { name: "position"; type: "double" }
- }
- Signal {
- name: "colorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- }
- Component {
- name: "QtDataVisualization::Declarative3DScene"
- prototype: "QtDataVisualization::Q3DScene"
- exports: [
- "QtDataVisualization/Scene3D 1.0",
- "QtDataVisualization/Scene3D 1.2"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [0, 1]
- Property { name: "selectionQueryPosition"; type: "QPointF" }
- Property { name: "invalidSelectionPoint"; type: "QPoint"; isReadonly: true }
- Signal {
- name: "selectionQueryPositionChanged"
- Parameter { name: "position"; type: "QPointF" }
- }
- }
- Component {
- name: "QtDataVisualization::DeclarativeBar3DSeries"
- defaultProperty: "seriesChildren"
- prototype: "QtDataVisualization::QBar3DSeries"
- exports: ["QtDataVisualization/Bar3DSeries 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "selectedBar"; type: "QPointF" }
- Property { name: "invalidSelectionPosition"; type: "QPointF"; isReadonly: true }
- Property { name: "baseGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Signal {
- name: "selectedBarChanged"
- Parameter { name: "position"; type: "QPointF" }
- }
- Signal {
- name: "baseGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Signal {
- name: "singleHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Signal {
- name: "multiHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Method { name: "handleBaseGradientUpdate" }
- Method { name: "handleSingleHighlightGradientUpdate" }
- Method { name: "handleMultiHighlightGradientUpdate" }
- }
- Component {
- name: "QtDataVisualization::DeclarativeBars"
- defaultProperty: "seriesList"
- prototype: "QtDataVisualization::AbstractDeclarative"
- exports: [
- "QtDataVisualization/Bars3D 1.0",
- "QtDataVisualization/Bars3D 1.2"
- ]
- exportMetaObjectRevisions: [0, 1]
- Property { name: "rowAxis"; type: "QCategory3DAxis"; isPointer: true }
- Property { name: "valueAxis"; type: "QValue3DAxis"; isPointer: true }
- Property { name: "columnAxis"; type: "QCategory3DAxis"; isPointer: true }
- Property { name: "multiSeriesUniform"; type: "bool" }
- Property { name: "barThickness"; type: "float" }
- Property { name: "barSpacing"; type: "QSizeF" }
- Property { name: "barSpacingRelative"; type: "bool" }
- Property { name: "seriesList"; type: "QBar3DSeries"; isList: true; isReadonly: true }
- Property { name: "selectedSeries"; type: "QBar3DSeries"; isReadonly: true; isPointer: true }
- Property { name: "primarySeries"; type: "QBar3DSeries"; isPointer: true }
- Property { name: "floorLevel"; revision: 1; type: "float" }
- Signal {
- name: "rowAxisChanged"
- Parameter { name: "axis"; type: "QCategory3DAxis"; isPointer: true }
- }
- Signal {
- name: "valueAxisChanged"
- Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
- }
- Signal {
- name: "columnAxisChanged"
- Parameter { name: "axis"; type: "QCategory3DAxis"; isPointer: true }
- }
- Signal {
- name: "multiSeriesUniformChanged"
- Parameter { name: "uniform"; type: "bool" }
- }
- Signal {
- name: "barThicknessChanged"
- Parameter { name: "thicknessRatio"; type: "float" }
- }
- Signal {
- name: "barSpacingChanged"
- Parameter { name: "spacing"; type: "QSizeF" }
- }
- Signal {
- name: "barSpacingRelativeChanged"
- Parameter { name: "relative"; type: "bool" }
- }
- Signal {
- name: "meshFileNameChanged"
- Parameter { name: "filename"; type: "string" }
- }
- Signal {
- name: "primarySeriesChanged"
- Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
- }
- Signal {
- name: "selectedSeriesChanged"
- Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
- }
- Signal {
- name: "floorLevelChanged"
- revision: 1
- Parameter { name: "level"; type: "float" }
- }
- Method {
- name: "handleAxisXChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisYChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisZChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "addSeries"
- Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
- }
- Method {
- name: "removeSeries"
- Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
- }
- Method {
- name: "insertSeries"
- Parameter { name: "index"; type: "int" }
- Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::DeclarativeColor"
- prototype: "QObject"
- exports: ["QtDataVisualization/ThemeColor 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "color"; type: "QColor" }
- Signal {
- name: "colorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- }
- Component {
- name: "QtDataVisualization::DeclarativeScatter"
- defaultProperty: "seriesList"
- prototype: "QtDataVisualization::AbstractDeclarative"
- exports: ["QtDataVisualization/Scatter3D 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "axisX"; type: "QValue3DAxis"; isPointer: true }
- Property { name: "axisY"; type: "QValue3DAxis"; isPointer: true }
- Property { name: "axisZ"; type: "QValue3DAxis"; isPointer: true }
- Property { name: "selectedSeries"; type: "QScatter3DSeries"; isReadonly: true; isPointer: true }
- Property { name: "seriesList"; type: "QScatter3DSeries"; isList: true; isReadonly: true }
- Signal {
- name: "axisXChanged"
- Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
- }
- Signal {
- name: "axisYChanged"
- Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
- }
- Signal {
- name: "axisZChanged"
- Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
- }
- Signal {
- name: "selectedSeriesChanged"
- Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
- }
- Method {
- name: "handleAxisXChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisYChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisZChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "addSeries"
- Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
- }
- Method {
- name: "removeSeries"
- Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::DeclarativeScatter3DSeries"
- defaultProperty: "seriesChildren"
- prototype: "QtDataVisualization::QScatter3DSeries"
- exports: ["QtDataVisualization/Scatter3DSeries 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "baseGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "invalidSelectionIndex"; type: "int"; isReadonly: true }
- Signal {
- name: "baseGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Signal {
- name: "singleHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Signal {
- name: "multiHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Method { name: "handleBaseGradientUpdate" }
- Method { name: "handleSingleHighlightGradientUpdate" }
- Method { name: "handleMultiHighlightGradientUpdate" }
- }
- Component {
- name: "QtDataVisualization::DeclarativeSurface"
- defaultProperty: "seriesList"
- prototype: "QtDataVisualization::AbstractDeclarative"
- exports: [
- "QtDataVisualization/Surface3D 1.0",
- "QtDataVisualization/Surface3D 1.2"
- ]
- exportMetaObjectRevisions: [0, 1]
- Property { name: "axisX"; type: "QValue3DAxis"; isPointer: true }
- Property { name: "axisY"; type: "QValue3DAxis"; isPointer: true }
- Property { name: "axisZ"; type: "QValue3DAxis"; isPointer: true }
- Property { name: "selectedSeries"; type: "QSurface3DSeries"; isReadonly: true; isPointer: true }
- Property { name: "seriesList"; type: "QSurface3DSeries"; isList: true; isReadonly: true }
- Property { name: "flipHorizontalGrid"; revision: 1; type: "bool" }
- Signal {
- name: "axisXChanged"
- Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
- }
- Signal {
- name: "axisYChanged"
- Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
- }
- Signal {
- name: "axisZChanged"
- Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
- }
- Signal {
- name: "selectedSeriesChanged"
- Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
- }
- Signal {
- name: "flipHorizontalGridChanged"
- revision: 1
- Parameter { name: "flip"; type: "bool" }
- }
- Method {
- name: "handleAxisXChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisYChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "handleAxisZChanged"
- Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
- }
- Method {
- name: "addSeries"
- Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
- }
- Method {
- name: "removeSeries"
- Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::DeclarativeSurface3DSeries"
- defaultProperty: "seriesChildren"
- prototype: "QtDataVisualization::QSurface3DSeries"
- exports: ["QtDataVisualization/Surface3DSeries 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "selectedPoint"; type: "QPointF" }
- Property { name: "invalidSelectionPosition"; type: "QPointF"; isReadonly: true }
- Property { name: "baseGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Signal {
- name: "selectedPointChanged"
- Parameter { name: "position"; type: "QPointF" }
- }
- Signal {
- name: "baseGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Signal {
- name: "singleHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Signal {
- name: "multiHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Method { name: "handleBaseGradientUpdate" }
- Method { name: "handleSingleHighlightGradientUpdate" }
- Method { name: "handleMultiHighlightGradientUpdate" }
- }
- Component {
- name: "QtDataVisualization::DeclarativeTheme3D"
- defaultProperty: "themeChildren"
- prototype: "QtDataVisualization::Q3DTheme"
- exports: ["QtDataVisualization/Theme3D 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "themeChildren"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "baseColors"; type: "DeclarativeColor"; isList: true; isReadonly: true }
- Property { name: "baseGradients"; type: "ColorGradient"; isList: true; isReadonly: true }
- Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
- Signal {
- name: "singleHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- Signal {
- name: "multiHighlightGradientChanged"
- Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::Q3DCamera"
- prototype: "QtDataVisualization::Q3DObject"
- exports: [
- "QtDataVisualization/Camera3D 1.0",
- "QtDataVisualization/Camera3D 1.2"
- ]
- exportMetaObjectRevisions: [0, 1]
- Enum {
- name: "CameraPreset"
- values: {
- "CameraPresetNone": -1,
- "CameraPresetFrontLow": 0,
- "CameraPresetFront": 1,
- "CameraPresetFrontHigh": 2,
- "CameraPresetLeftLow": 3,
- "CameraPresetLeft": 4,
- "CameraPresetLeftHigh": 5,
- "CameraPresetRightLow": 6,
- "CameraPresetRight": 7,
- "CameraPresetRightHigh": 8,
- "CameraPresetBehindLow": 9,
- "CameraPresetBehind": 10,
- "CameraPresetBehindHigh": 11,
- "CameraPresetIsometricLeft": 12,
- "CameraPresetIsometricLeftHigh": 13,
- "CameraPresetIsometricRight": 14,
- "CameraPresetIsometricRightHigh": 15,
- "CameraPresetDirectlyAbove": 16,
- "CameraPresetDirectlyAboveCW45": 17,
- "CameraPresetDirectlyAboveCCW45": 18,
- "CameraPresetFrontBelow": 19,
- "CameraPresetLeftBelow": 20,
- "CameraPresetRightBelow": 21,
- "CameraPresetBehindBelow": 22,
- "CameraPresetDirectlyBelow": 23
- }
- }
- Property { name: "xRotation"; type: "float" }
- Property { name: "yRotation"; type: "float" }
- Property { name: "zoomLevel"; type: "float" }
- Property { name: "cameraPreset"; type: "CameraPreset" }
- Property { name: "wrapXRotation"; type: "bool" }
- Property { name: "wrapYRotation"; type: "bool" }
- Property { name: "target"; revision: 1; type: "QVector3D" }
- Property { name: "minZoomLevel"; revision: 1; type: "float" }
- Property { name: "maxZoomLevel"; revision: 1; type: "float" }
- Signal {
- name: "xRotationChanged"
- Parameter { name: "rotation"; type: "float" }
- }
- Signal {
- name: "yRotationChanged"
- Parameter { name: "rotation"; type: "float" }
- }
- Signal {
- name: "zoomLevelChanged"
- Parameter { name: "zoomLevel"; type: "float" }
- }
- Signal {
- name: "cameraPresetChanged"
- Parameter { name: "preset"; type: "Q3DCamera::CameraPreset" }
- }
- Signal {
- name: "wrapXRotationChanged"
- Parameter { name: "isEnabled"; type: "bool" }
- }
- Signal {
- name: "wrapYRotationChanged"
- Parameter { name: "isEnabled"; type: "bool" }
- }
- Signal {
- name: "targetChanged"
- revision: 1
- Parameter { name: "target"; type: "QVector3D" }
- }
- Signal {
- name: "minZoomLevelChanged"
- revision: 1
- Parameter { name: "zoomLevel"; type: "float" }
- }
- Signal {
- name: "maxZoomLevelChanged"
- revision: 1
- Parameter { name: "zoomLevel"; type: "float" }
- }
- }
- Component {
- name: "QtDataVisualization::Q3DInputHandler"
- prototype: "QtDataVisualization::QAbstract3DInputHandler"
- exports: ["QtDataVisualization/InputHandler3D 1.2"]
- exportMetaObjectRevisions: [0]
- Property { name: "rotationEnabled"; type: "bool" }
- Property { name: "zoomEnabled"; type: "bool" }
- Property { name: "selectionEnabled"; type: "bool" }
- Property { name: "zoomAtTargetEnabled"; type: "bool" }
- Signal {
- name: "rotationEnabledChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "zoomEnabledChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "selectionEnabledChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "zoomAtTargetEnabledChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- }
- Component {
- name: "QtDataVisualization::Q3DLight"
- prototype: "QtDataVisualization::Q3DObject"
- exports: [
- "QtDataVisualization/Light3D 1.0",
- "QtDataVisualization/Light3D 1.3"
- ]
- exportMetaObjectRevisions: [0, 1]
- Property { name: "autoPosition"; revision: 1; type: "bool" }
- Signal {
- name: "autoPositionChanged"
- revision: 1
- Parameter { name: "autoPosition"; type: "bool" }
- }
- }
- Component {
- name: "QtDataVisualization::Q3DObject"
- prototype: "QObject"
- exports: ["QtDataVisualization/Object3D 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "parentScene"; type: "Q3DScene"; isReadonly: true; isPointer: true }
- Property { name: "position"; type: "QVector3D" }
- Signal {
- name: "positionChanged"
- Parameter { name: "position"; type: "QVector3D" }
- }
- }
- Component {
- name: "QtDataVisualization::Q3DScene"
- prototype: "QObject"
- Property { name: "viewport"; type: "QRect"; isReadonly: true }
- Property { name: "primarySubViewport"; type: "QRect" }
- Property { name: "secondarySubViewport"; type: "QRect" }
- Property { name: "selectionQueryPosition"; type: "QPoint" }
- Property { name: "secondarySubviewOnTop"; type: "bool" }
- Property { name: "slicingActive"; type: "bool" }
- Property { name: "activeCamera"; type: "Q3DCamera"; isPointer: true }
- Property { name: "activeLight"; type: "Q3DLight"; isPointer: true }
- Property { name: "devicePixelRatio"; type: "float" }
- Property { name: "graphPositionQuery"; revision: 1; type: "QPoint" }
- Signal {
- name: "viewportChanged"
- Parameter { name: "viewport"; type: "QRect" }
- }
- Signal {
- name: "primarySubViewportChanged"
- Parameter { name: "subViewport"; type: "QRect" }
- }
- Signal {
- name: "secondarySubViewportChanged"
- Parameter { name: "subViewport"; type: "QRect" }
- }
- Signal {
- name: "secondarySubviewOnTopChanged"
- Parameter { name: "isSecondaryOnTop"; type: "bool" }
- }
- Signal {
- name: "slicingActiveChanged"
- Parameter { name: "isSlicingActive"; type: "bool" }
- }
- Signal {
- name: "activeCameraChanged"
- Parameter { name: "camera"; type: "Q3DCamera"; isPointer: true }
- }
- Signal {
- name: "activeLightChanged"
- Parameter { name: "light"; type: "Q3DLight"; isPointer: true }
- }
- Signal {
- name: "devicePixelRatioChanged"
- Parameter { name: "pixelRatio"; type: "float" }
- }
- Signal {
- name: "selectionQueryPositionChanged"
- Parameter { name: "position"; type: "QPoint" }
- }
- Signal {
- name: "graphPositionQueryChanged"
- revision: 1
- Parameter { name: "position"; type: "QPoint" }
- }
- }
- Component {
- name: "QtDataVisualization::Q3DTheme"
- prototype: "QObject"
- exports: ["QtDataVisualization/Q3DTheme 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "ColorStyle"
- values: {
- "ColorStyleUniform": 0,
- "ColorStyleObjectGradient": 1,
- "ColorStyleRangeGradient": 2
- }
- }
- Enum {
- name: "Theme"
- values: {
- "ThemeQt": 0,
- "ThemePrimaryColors": 1,
- "ThemeDigia": 2,
- "ThemeStoneMoss": 3,
- "ThemeArmyBlue": 4,
- "ThemeRetro": 5,
- "ThemeEbony": 6,
- "ThemeIsabelle": 7,
- "ThemeUserDefined": 8
- }
- }
- Property { name: "type"; type: "Theme" }
- Property { name: "baseColors"; type: "QList<QColor>" }
- Property { name: "backgroundColor"; type: "QColor" }
- Property { name: "windowColor"; type: "QColor" }
- Property { name: "labelTextColor"; type: "QColor" }
- Property { name: "labelBackgroundColor"; type: "QColor" }
- Property { name: "gridLineColor"; type: "QColor" }
- Property { name: "singleHighlightColor"; type: "QColor" }
- Property { name: "multiHighlightColor"; type: "QColor" }
- Property { name: "lightColor"; type: "QColor" }
- Property { name: "baseGradients"; type: "QList<QLinearGradient>" }
- Property { name: "singleHighlightGradient"; type: "QLinearGradient" }
- Property { name: "multiHighlightGradient"; type: "QLinearGradient" }
- Property { name: "lightStrength"; type: "float" }
- Property { name: "ambientLightStrength"; type: "float" }
- Property { name: "highlightLightStrength"; type: "float" }
- Property { name: "labelBorderEnabled"; type: "bool" }
- Property { name: "font"; type: "QFont" }
- Property { name: "backgroundEnabled"; type: "bool" }
- Property { name: "gridEnabled"; type: "bool" }
- Property { name: "labelBackgroundEnabled"; type: "bool" }
- Property { name: "colorStyle"; type: "ColorStyle" }
- Signal {
- name: "typeChanged"
- Parameter { name: "themeType"; type: "Q3DTheme::Theme" }
- }
- Signal {
- name: "baseColorsChanged"
- Parameter { name: "colors"; type: "QList<QColor>" }
- }
- Signal {
- name: "backgroundColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "windowColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "labelTextColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "labelBackgroundColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "gridLineColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "singleHighlightColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "multiHighlightColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "lightColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "baseGradientsChanged"
- Parameter { name: "gradients"; type: "QList<QLinearGradient>" }
- }
- Signal {
- name: "singleHighlightGradientChanged"
- Parameter { name: "gradient"; type: "QLinearGradient" }
- }
- Signal {
- name: "multiHighlightGradientChanged"
- Parameter { name: "gradient"; type: "QLinearGradient" }
- }
- Signal {
- name: "lightStrengthChanged"
- Parameter { name: "strength"; type: "float" }
- }
- Signal {
- name: "ambientLightStrengthChanged"
- Parameter { name: "strength"; type: "float" }
- }
- Signal {
- name: "highlightLightStrengthChanged"
- Parameter { name: "strength"; type: "float" }
- }
- Signal {
- name: "labelBorderEnabledChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "fontChanged"
- Parameter { name: "font"; type: "QFont" }
- }
- Signal {
- name: "backgroundEnabledChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "gridEnabledChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "labelBackgroundEnabledChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "colorStyleChanged"
- Parameter { name: "style"; type: "Q3DTheme::ColorStyle" }
- }
- }
- Component {
- name: "QtDataVisualization::QAbstract3DAxis"
- prototype: "QObject"
- exports: [
- "QtDataVisualization/AbstractAxis3D 1.0",
- "QtDataVisualization/AbstractAxis3D 1.1"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [0, 1]
- Enum {
- name: "AxisOrientation"
- values: {
- "AxisOrientationNone": 0,
- "AxisOrientationX": 1,
- "AxisOrientationY": 2,
- "AxisOrientationZ": 4
- }
- }
- Enum {
- name: "AxisType"
- values: {
- "AxisTypeNone": 0,
- "AxisTypeCategory": 1,
- "AxisTypeValue": 2
- }
- }
- Property { name: "title"; type: "string" }
- Property { name: "labels"; type: "QStringList" }
- Property { name: "orientation"; type: "AxisOrientation"; isReadonly: true }
- Property { name: "type"; type: "AxisType"; isReadonly: true }
- Property { name: "min"; type: "float" }
- Property { name: "max"; type: "float" }
- Property { name: "autoAdjustRange"; type: "bool" }
- Property { name: "labelAutoRotation"; revision: 1; type: "float" }
- Property { name: "titleVisible"; revision: 1; type: "bool" }
- Property { name: "titleFixed"; revision: 1; type: "bool" }
- Signal {
- name: "titleChanged"
- Parameter { name: "newTitle"; type: "string" }
- }
- Signal {
- name: "orientationChanged"
- Parameter { name: "orientation"; type: "QAbstract3DAxis::AxisOrientation" }
- }
- Signal {
- name: "minChanged"
- Parameter { name: "value"; type: "float" }
- }
- Signal {
- name: "maxChanged"
- Parameter { name: "value"; type: "float" }
- }
- Signal {
- name: "rangeChanged"
- Parameter { name: "min"; type: "float" }
- Parameter { name: "max"; type: "float" }
- }
- Signal {
- name: "autoAdjustRangeChanged"
- Parameter { name: "autoAdjust"; type: "bool" }
- }
- Signal {
- name: "labelAutoRotationChanged"
- revision: 1
- Parameter { name: "angle"; type: "float" }
- }
- Signal {
- name: "titleVisibilityChanged"
- revision: 1
- Parameter { name: "visible"; type: "bool" }
- }
- Signal {
- name: "titleFixedChanged"
- revision: 1
- Parameter { name: "fixed"; type: "bool" }
- }
- }
- Component {
- name: "QtDataVisualization::QAbstract3DInputHandler"
- prototype: "QObject"
- exports: ["QtDataVisualization/AbstractInputHandler3D 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "InputView"
- values: {
- "InputViewNone": 0,
- "InputViewOnPrimary": 1,
- "InputViewOnSecondary": 2
- }
- }
- Property { name: "inputView"; type: "InputView" }
- Property { name: "inputPosition"; type: "QPoint" }
- Property { name: "scene"; type: "Q3DScene"; isPointer: true }
- Signal {
- name: "positionChanged"
- Parameter { name: "position"; type: "QPoint" }
- }
- Signal {
- name: "inputViewChanged"
- Parameter { name: "view"; type: "QAbstract3DInputHandler::InputView" }
- }
- Signal {
- name: "sceneChanged"
- Parameter { name: "scene"; type: "Q3DScene"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::QAbstract3DSeries"
- prototype: "QObject"
- exports: [
- "QtDataVisualization/Abstract3DSeries 1.0",
- "QtDataVisualization/Abstract3DSeries 1.1"
- ]
- isCreatable: false
- exportMetaObjectRevisions: [0, 1]
- Enum {
- name: "SeriesType"
- values: {
- "SeriesTypeNone": 0,
- "SeriesTypeBar": 1,
- "SeriesTypeScatter": 2,
- "SeriesTypeSurface": 4
- }
- }
- Enum {
- name: "Mesh"
- values: {
- "MeshUserDefined": 0,
- "MeshBar": 1,
- "MeshCube": 2,
- "MeshPyramid": 3,
- "MeshCone": 4,
- "MeshCylinder": 5,
- "MeshBevelBar": 6,
- "MeshBevelCube": 7,
- "MeshSphere": 8,
- "MeshMinimal": 9,
- "MeshArrow": 10,
- "MeshPoint": 11
- }
- }
- Property { name: "type"; type: "SeriesType"; isReadonly: true }
- Property { name: "itemLabelFormat"; type: "string" }
- Property { name: "visible"; type: "bool" }
- Property { name: "mesh"; type: "Mesh" }
- Property { name: "meshSmooth"; type: "bool" }
- Property { name: "meshRotation"; type: "QQuaternion" }
- Property { name: "userDefinedMesh"; type: "string" }
- Property { name: "colorStyle"; type: "QtDataVisualization::Q3DTheme::ColorStyle" }
- Property { name: "baseColor"; type: "QColor" }
- Property { name: "baseGradient"; type: "QLinearGradient" }
- Property { name: "singleHighlightColor"; type: "QColor" }
- Property { name: "singleHighlightGradient"; type: "QLinearGradient" }
- Property { name: "multiHighlightColor"; type: "QColor" }
- Property { name: "multiHighlightGradient"; type: "QLinearGradient" }
- Property { name: "name"; type: "string" }
- Property { name: "itemLabel"; revision: 1; type: "string"; isReadonly: true }
- Property { name: "itemLabelVisible"; revision: 1; type: "bool" }
- Signal {
- name: "itemLabelFormatChanged"
- Parameter { name: "format"; type: "string" }
- }
- Signal {
- name: "visibilityChanged"
- Parameter { name: "visible"; type: "bool" }
- }
- Signal {
- name: "meshChanged"
- Parameter { name: "mesh"; type: "QAbstract3DSeries::Mesh" }
- }
- Signal {
- name: "meshSmoothChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "meshRotationChanged"
- Parameter { name: "rotation"; type: "QQuaternion" }
- }
- Signal {
- name: "userDefinedMeshChanged"
- Parameter { name: "fileName"; type: "string" }
- }
- Signal {
- name: "colorStyleChanged"
- Parameter { name: "style"; type: "Q3DTheme::ColorStyle" }
- }
- Signal {
- name: "baseColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "baseGradientChanged"
- Parameter { name: "gradient"; type: "QLinearGradient" }
- }
- Signal {
- name: "singleHighlightColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "singleHighlightGradientChanged"
- Parameter { name: "gradient"; type: "QLinearGradient" }
- }
- Signal {
- name: "multiHighlightColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "multiHighlightGradientChanged"
- Parameter { name: "gradient"; type: "QLinearGradient" }
- }
- Signal {
- name: "nameChanged"
- Parameter { name: "name"; type: "string" }
- }
- Signal {
- name: "itemLabelChanged"
- revision: 1
- Parameter { name: "label"; type: "string" }
- }
- Signal {
- name: "itemLabelVisibilityChanged"
- revision: 1
- Parameter { name: "visible"; type: "bool" }
- }
- Method {
- name: "setMeshAxisAndAngle"
- Parameter { name: "axis"; type: "QVector3D" }
- Parameter { name: "angle"; type: "float" }
- }
- }
- Component {
- name: "QtDataVisualization::QAbstractDataProxy"
- prototype: "QObject"
- exports: ["QtDataVisualization/AbstractDataProxy 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "DataType"
- values: {
- "DataTypeNone": 0,
- "DataTypeBar": 1,
- "DataTypeScatter": 2,
- "DataTypeSurface": 4
- }
- }
- Property { name: "type"; type: "DataType"; isReadonly: true }
- }
- Component {
- name: "QtDataVisualization::QBar3DSeries"
- prototype: "QtDataVisualization::QAbstract3DSeries"
- exports: ["QtDataVisualization/QBar3DSeries 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "dataProxy"; type: "QBarDataProxy"; isPointer: true }
- Property { name: "selectedBar"; type: "QPoint" }
- Property { name: "meshAngle"; type: "float" }
- Signal {
- name: "dataProxyChanged"
- Parameter { name: "proxy"; type: "QBarDataProxy"; isPointer: true }
- }
- Signal {
- name: "selectedBarChanged"
- Parameter { name: "position"; type: "QPoint" }
- }
- Signal {
- name: "meshAngleChanged"
- Parameter { name: "angle"; type: "float" }
- }
- }
- Component {
- name: "QtDataVisualization::QBarDataProxy"
- prototype: "QtDataVisualization::QAbstractDataProxy"
- exports: ["QtDataVisualization/BarDataProxy 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "rowCount"; type: "int"; isReadonly: true }
- Property { name: "rowLabels"; type: "QStringList" }
- Property { name: "columnLabels"; type: "QStringList" }
- Property { name: "series"; type: "QBar3DSeries"; isReadonly: true; isPointer: true }
- Signal { name: "arrayReset" }
- Signal {
- name: "rowsAdded"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "rowsChanged"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "rowsRemoved"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "rowsInserted"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "itemChanged"
- Parameter { name: "rowIndex"; type: "int" }
- Parameter { name: "columnIndex"; type: "int" }
- }
- Signal {
- name: "rowCountChanged"
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "seriesChanged"
- Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::QCategory3DAxis"
- prototype: "QtDataVisualization::QAbstract3DAxis"
- exports: ["QtDataVisualization/CategoryAxis3D 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "labels"; type: "QStringList" }
- }
- Component {
- name: "QtDataVisualization::QCustom3DItem"
- prototype: "QObject"
- exports: [
- "QtDataVisualization/Custom3DItem 1.1",
- "QtDataVisualization/Custom3DItem 1.2"
- ]
- exportMetaObjectRevisions: [0, 1]
- Property { name: "meshFile"; type: "string" }
- Property { name: "textureFile"; type: "string" }
- Property { name: "position"; type: "QVector3D" }
- Property { name: "positionAbsolute"; type: "bool" }
- Property { name: "scaling"; type: "QVector3D" }
- Property { name: "rotation"; type: "QQuaternion" }
- Property { name: "visible"; type: "bool" }
- Property { name: "shadowCasting"; type: "bool" }
- Property { name: "scalingAbsolute"; revision: 1; type: "bool" }
- Signal {
- name: "meshFileChanged"
- Parameter { name: "meshFile"; type: "string" }
- }
- Signal {
- name: "textureFileChanged"
- Parameter { name: "textureFile"; type: "string" }
- }
- Signal {
- name: "positionChanged"
- Parameter { name: "position"; type: "QVector3D" }
- }
- Signal {
- name: "positionAbsoluteChanged"
- Parameter { name: "positionAbsolute"; type: "bool" }
- }
- Signal {
- name: "scalingChanged"
- Parameter { name: "scaling"; type: "QVector3D" }
- }
- Signal {
- name: "rotationChanged"
- Parameter { name: "rotation"; type: "QQuaternion" }
- }
- Signal {
- name: "visibleChanged"
- Parameter { name: "visible"; type: "bool" }
- }
- Signal {
- name: "shadowCastingChanged"
- Parameter { name: "shadowCasting"; type: "bool" }
- }
- Signal {
- name: "scalingAbsoluteChanged"
- revision: 1
- Parameter { name: "scalingAbsolute"; type: "bool" }
- }
- Method {
- name: "setRotationAxisAndAngle"
- Parameter { name: "axis"; type: "QVector3D" }
- Parameter { name: "angle"; type: "float" }
- }
- }
- Component {
- name: "QtDataVisualization::QCustom3DLabel"
- prototype: "QtDataVisualization::QCustom3DItem"
- exports: ["QtDataVisualization/Custom3DLabel 1.1"]
- exportMetaObjectRevisions: [0]
- Property { name: "text"; type: "string" }
- Property { name: "font"; type: "QFont" }
- Property { name: "textColor"; type: "QColor" }
- Property { name: "backgroundColor"; type: "QColor" }
- Property { name: "borderEnabled"; type: "bool" }
- Property { name: "backgroundEnabled"; type: "bool" }
- Property { name: "facingCamera"; type: "bool" }
- Signal {
- name: "textChanged"
- Parameter { name: "text"; type: "string" }
- }
- Signal {
- name: "fontChanged"
- Parameter { name: "font"; type: "QFont" }
- }
- Signal {
- name: "textColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "backgroundColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "borderEnabledChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "backgroundEnabledChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "facingCameraChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- }
- Component {
- name: "QtDataVisualization::QCustom3DVolume"
- prototype: "QtDataVisualization::QCustom3DItem"
- exports: ["QtDataVisualization/Custom3DVolume 1.2"]
- exportMetaObjectRevisions: [0]
- Property { name: "textureWidth"; type: "int" }
- Property { name: "textureHeight"; type: "int" }
- Property { name: "textureDepth"; type: "int" }
- Property { name: "sliceIndexX"; type: "int" }
- Property { name: "sliceIndexY"; type: "int" }
- Property { name: "sliceIndexZ"; type: "int" }
- Property { name: "colorTable"; type: "QVector<QRgb>" }
- Property { name: "textureData"; type: "QVector<uchar>"; isPointer: true }
- Property { name: "alphaMultiplier"; type: "float" }
- Property { name: "preserveOpacity"; type: "bool" }
- Property { name: "useHighDefShader"; type: "bool" }
- Property { name: "drawSlices"; type: "bool" }
- Property { name: "drawSliceFrames"; type: "bool" }
- Property { name: "sliceFrameColor"; type: "QColor" }
- Property { name: "sliceFrameWidths"; type: "QVector3D" }
- Property { name: "sliceFrameGaps"; type: "QVector3D" }
- Property { name: "sliceFrameThicknesses"; type: "QVector3D" }
- Signal {
- name: "textureWidthChanged"
- Parameter { name: "value"; type: "int" }
- }
- Signal {
- name: "textureHeightChanged"
- Parameter { name: "value"; type: "int" }
- }
- Signal {
- name: "textureDepthChanged"
- Parameter { name: "value"; type: "int" }
- }
- Signal {
- name: "sliceIndexXChanged"
- Parameter { name: "value"; type: "int" }
- }
- Signal {
- name: "sliceIndexYChanged"
- Parameter { name: "value"; type: "int" }
- }
- Signal {
- name: "sliceIndexZChanged"
- Parameter { name: "value"; type: "int" }
- }
- Signal {
- name: "textureDataChanged"
- Parameter { name: "data"; type: "QVector<uchar>"; isPointer: true }
- }
- Signal {
- name: "textureFormatChanged"
- Parameter { name: "format"; type: "QImage::Format" }
- }
- Signal {
- name: "alphaMultiplierChanged"
- Parameter { name: "mult"; type: "float" }
- }
- Signal {
- name: "preserveOpacityChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "useHighDefShaderChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "drawSlicesChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "drawSliceFramesChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "sliceFrameColorChanged"
- Parameter { name: "color"; type: "QColor" }
- }
- Signal {
- name: "sliceFrameWidthsChanged"
- Parameter { name: "values"; type: "QVector3D" }
- }
- Signal {
- name: "sliceFrameGapsChanged"
- Parameter { name: "values"; type: "QVector3D" }
- }
- Signal {
- name: "sliceFrameThicknessesChanged"
- Parameter { name: "values"; type: "QVector3D" }
- }
- }
- Component {
- name: "QtDataVisualization::QHeightMapSurfaceDataProxy"
- prototype: "QtDataVisualization::QSurfaceDataProxy"
- exports: ["QtDataVisualization/HeightMapSurfaceDataProxy 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "heightMap"; type: "QImage" }
- Property { name: "heightMapFile"; type: "string" }
- Property { name: "minXValue"; type: "float" }
- Property { name: "maxXValue"; type: "float" }
- Property { name: "minZValue"; type: "float" }
- Property { name: "maxZValue"; type: "float" }
- Signal {
- name: "heightMapChanged"
- Parameter { name: "image"; type: "QImage" }
- }
- Signal {
- name: "heightMapFileChanged"
- Parameter { name: "filename"; type: "string" }
- }
- Signal {
- name: "minXValueChanged"
- Parameter { name: "value"; type: "float" }
- }
- Signal {
- name: "maxXValueChanged"
- Parameter { name: "value"; type: "float" }
- }
- Signal {
- name: "minZValueChanged"
- Parameter { name: "value"; type: "float" }
- }
- Signal {
- name: "maxZValueChanged"
- Parameter { name: "value"; type: "float" }
- }
- }
- Component {
- name: "QtDataVisualization::QItemModelBarDataProxy"
- prototype: "QtDataVisualization::QBarDataProxy"
- exports: [
- "QtDataVisualization/ItemModelBarDataProxy 1.0",
- "QtDataVisualization/ItemModelBarDataProxy 1.1"
- ]
- exportMetaObjectRevisions: [0, 1]
- Enum {
- name: "MultiMatchBehavior"
- values: {
- "MMBFirst": 0,
- "MMBLast": 1,
- "MMBAverage": 2,
- "MMBCumulative": 3
- }
- }
- Property { name: "itemModel"; type: "QAbstractItemModel"; isPointer: true }
- Property { name: "rowRole"; type: "string" }
- Property { name: "columnRole"; type: "string" }
- Property { name: "valueRole"; type: "string" }
- Property { name: "rotationRole"; type: "string" }
- Property { name: "rowCategories"; type: "QStringList" }
- Property { name: "columnCategories"; type: "QStringList" }
- Property { name: "useModelCategories"; type: "bool" }
- Property { name: "autoRowCategories"; type: "bool" }
- Property { name: "autoColumnCategories"; type: "bool" }
- Property { name: "rowRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "columnRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "valueRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "rotationRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "rowRoleReplace"; revision: 1; type: "string" }
- Property { name: "columnRoleReplace"; revision: 1; type: "string" }
- Property { name: "valueRoleReplace"; revision: 1; type: "string" }
- Property { name: "rotationRoleReplace"; revision: 1; type: "string" }
- Property { name: "multiMatchBehavior"; revision: 1; type: "MultiMatchBehavior" }
- Signal {
- name: "itemModelChanged"
- Parameter { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
- }
- Signal {
- name: "rowRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "columnRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "valueRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "rotationRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "useModelCategoriesChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "autoRowCategoriesChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "autoColumnCategoriesChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "rowRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "columnRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "valueRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "rotationRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "rowRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "columnRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "valueRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "rotationRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "multiMatchBehaviorChanged"
- revision: 1
- Parameter { name: "behavior"; type: "MultiMatchBehavior" }
- }
- Method {
- name: "rowCategoryIndex"
- type: "int"
- Parameter { name: "category"; type: "string" }
- }
- Method {
- name: "columnCategoryIndex"
- type: "int"
- Parameter { name: "category"; type: "string" }
- }
- }
- Component {
- name: "QtDataVisualization::QItemModelScatterDataProxy"
- prototype: "QtDataVisualization::QScatterDataProxy"
- exports: [
- "QtDataVisualization/ItemModelScatterDataProxy 1.0",
- "QtDataVisualization/ItemModelScatterDataProxy 1.1"
- ]
- exportMetaObjectRevisions: [0, 1]
- Property { name: "itemModel"; type: "QAbstractItemModel"; isPointer: true }
- Property { name: "xPosRole"; type: "string" }
- Property { name: "yPosRole"; type: "string" }
- Property { name: "zPosRole"; type: "string" }
- Property { name: "rotationRole"; type: "string" }
- Property { name: "xPosRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "yPosRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "zPosRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "rotationRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "xPosRoleReplace"; revision: 1; type: "string" }
- Property { name: "yPosRoleReplace"; revision: 1; type: "string" }
- Property { name: "zPosRoleReplace"; revision: 1; type: "string" }
- Property { name: "rotationRoleReplace"; revision: 1; type: "string" }
- Signal {
- name: "itemModelChanged"
- Parameter { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
- }
- Signal {
- name: "xPosRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "yPosRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "zPosRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "rotationRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "xPosRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "yPosRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "zPosRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "rotationRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "rotationRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "xPosRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "yPosRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "zPosRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- }
- Component {
- name: "QtDataVisualization::QItemModelSurfaceDataProxy"
- prototype: "QtDataVisualization::QSurfaceDataProxy"
- exports: [
- "QtDataVisualization/ItemModelSurfaceDataProxy 1.0",
- "QtDataVisualization/ItemModelSurfaceDataProxy 1.1"
- ]
- exportMetaObjectRevisions: [0, 1]
- Enum {
- name: "MultiMatchBehavior"
- values: {
- "MMBFirst": 0,
- "MMBLast": 1,
- "MMBAverage": 2,
- "MMBCumulativeY": 3
- }
- }
- Property { name: "itemModel"; type: "QAbstractItemModel"; isPointer: true }
- Property { name: "rowRole"; type: "string" }
- Property { name: "columnRole"; type: "string" }
- Property { name: "xPosRole"; type: "string" }
- Property { name: "yPosRole"; type: "string" }
- Property { name: "zPosRole"; type: "string" }
- Property { name: "rowCategories"; type: "QStringList" }
- Property { name: "columnCategories"; type: "QStringList" }
- Property { name: "useModelCategories"; type: "bool" }
- Property { name: "autoRowCategories"; type: "bool" }
- Property { name: "autoColumnCategories"; type: "bool" }
- Property { name: "rowRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "columnRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "xPosRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "yPosRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "zPosRolePattern"; revision: 1; type: "QRegExp" }
- Property { name: "rowRoleReplace"; revision: 1; type: "string" }
- Property { name: "columnRoleReplace"; revision: 1; type: "string" }
- Property { name: "xPosRoleReplace"; revision: 1; type: "string" }
- Property { name: "yPosRoleReplace"; revision: 1; type: "string" }
- Property { name: "zPosRoleReplace"; revision: 1; type: "string" }
- Property { name: "multiMatchBehavior"; revision: 1; type: "MultiMatchBehavior" }
- Signal {
- name: "itemModelChanged"
- Parameter { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
- }
- Signal {
- name: "rowRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "columnRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "xPosRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "yPosRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "zPosRoleChanged"
- Parameter { name: "role"; type: "string" }
- }
- Signal {
- name: "useModelCategoriesChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "autoRowCategoriesChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "autoColumnCategoriesChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "rowRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "columnRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "xPosRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "yPosRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "zPosRolePatternChanged"
- revision: 1
- Parameter { name: "pattern"; type: "QRegExp" }
- }
- Signal {
- name: "rowRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "columnRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "xPosRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "yPosRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "zPosRoleReplaceChanged"
- revision: 1
- Parameter { name: "replace"; type: "string" }
- }
- Signal {
- name: "multiMatchBehaviorChanged"
- revision: 1
- Parameter { name: "behavior"; type: "MultiMatchBehavior" }
- }
- Method {
- name: "rowCategoryIndex"
- type: "int"
- Parameter { name: "category"; type: "string" }
- }
- Method {
- name: "columnCategoryIndex"
- type: "int"
- Parameter { name: "category"; type: "string" }
- }
- }
- Component {
- name: "QtDataVisualization::QLogValue3DAxisFormatter"
- prototype: "QtDataVisualization::QValue3DAxisFormatter"
- exports: ["QtDataVisualization/LogValueAxis3DFormatter 1.1"]
- exportMetaObjectRevisions: [0]
- Property { name: "base"; type: "double" }
- Property { name: "autoSubGrid"; type: "bool" }
- Property { name: "showEdgeLabels"; type: "bool" }
- Signal {
- name: "baseChanged"
- Parameter { name: "base"; type: "double" }
- }
- Signal {
- name: "autoSubGridChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- Signal {
- name: "showEdgeLabelsChanged"
- Parameter { name: "enabled"; type: "bool" }
- }
- }
- Component {
- name: "QtDataVisualization::QScatter3DSeries"
- prototype: "QtDataVisualization::QAbstract3DSeries"
- exports: ["QtDataVisualization/QScatter3DSeries 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "dataProxy"; type: "QScatterDataProxy"; isPointer: true }
- Property { name: "selectedItem"; type: "int" }
- Property { name: "itemSize"; type: "float" }
- Signal {
- name: "dataProxyChanged"
- Parameter { name: "proxy"; type: "QScatterDataProxy"; isPointer: true }
- }
- Signal {
- name: "selectedItemChanged"
- Parameter { name: "index"; type: "int" }
- }
- Signal {
- name: "itemSizeChanged"
- Parameter { name: "size"; type: "float" }
- }
- }
- Component {
- name: "QtDataVisualization::QScatterDataProxy"
- prototype: "QtDataVisualization::QAbstractDataProxy"
- exports: ["QtDataVisualization/ScatterDataProxy 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "itemCount"; type: "int"; isReadonly: true }
- Property { name: "series"; type: "QScatter3DSeries"; isReadonly: true; isPointer: true }
- Signal { name: "arrayReset" }
- Signal {
- name: "itemsAdded"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "itemsChanged"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "itemsRemoved"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "itemsInserted"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "itemCountChanged"
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "seriesChanged"
- Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::QSurface3DSeries"
- prototype: "QtDataVisualization::QAbstract3DSeries"
- exports: ["QtDataVisualization/QSurface3DSeries 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Enum {
- name: "DrawFlag"
- values: {
- "DrawWireframe": 1,
- "DrawSurface": 2,
- "DrawSurfaceAndWireframe": 3
- }
- }
- Enum {
- name: "DrawFlags"
- values: {
- "DrawWireframe": 1,
- "DrawSurface": 2,
- "DrawSurfaceAndWireframe": 3
- }
- }
- Property { name: "dataProxy"; type: "QSurfaceDataProxy"; isPointer: true }
- Property { name: "selectedPoint"; type: "QPoint" }
- Property { name: "flatShadingEnabled"; type: "bool" }
- Property { name: "flatShadingSupported"; type: "bool"; isReadonly: true }
- Property { name: "drawMode"; type: "DrawFlags" }
- Property { name: "texture"; type: "QImage" }
- Property { name: "textureFile"; type: "string" }
- Signal {
- name: "dataProxyChanged"
- Parameter { name: "proxy"; type: "QSurfaceDataProxy"; isPointer: true }
- }
- Signal {
- name: "selectedPointChanged"
- Parameter { name: "position"; type: "QPoint" }
- }
- Signal {
- name: "flatShadingEnabledChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "flatShadingSupportedChanged"
- Parameter { name: "enable"; type: "bool" }
- }
- Signal {
- name: "drawModeChanged"
- Parameter { name: "mode"; type: "QSurface3DSeries::DrawFlags" }
- }
- Signal {
- name: "textureChanged"
- Parameter { name: "image"; type: "QImage" }
- }
- Signal {
- name: "textureFileChanged"
- Parameter { name: "filename"; type: "string" }
- }
- }
- Component {
- name: "QtDataVisualization::QSurfaceDataProxy"
- prototype: "QtDataVisualization::QAbstractDataProxy"
- exports: ["QtDataVisualization/SurfaceDataProxy 1.0"]
- isCreatable: false
- exportMetaObjectRevisions: [0]
- Property { name: "rowCount"; type: "int"; isReadonly: true }
- Property { name: "columnCount"; type: "int"; isReadonly: true }
- Property { name: "series"; type: "QSurface3DSeries"; isReadonly: true; isPointer: true }
- Signal { name: "arrayReset" }
- Signal {
- name: "rowsAdded"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "rowsChanged"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "rowsRemoved"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "rowsInserted"
- Parameter { name: "startIndex"; type: "int" }
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "itemChanged"
- Parameter { name: "rowIndex"; type: "int" }
- Parameter { name: "columnIndex"; type: "int" }
- }
- Signal {
- name: "rowCountChanged"
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "columnCountChanged"
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "seriesChanged"
- Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
- }
- }
- Component {
- name: "QtDataVisualization::QTouch3DInputHandler"
- prototype: "QtDataVisualization::Q3DInputHandler"
- exports: ["QtDataVisualization/TouchInputHandler3D 1.2"]
- exportMetaObjectRevisions: [0]
- }
- Component {
- name: "QtDataVisualization::QValue3DAxis"
- prototype: "QtDataVisualization::QAbstract3DAxis"
- exports: [
- "QtDataVisualization/ValueAxis3D 1.0",
- "QtDataVisualization/ValueAxis3D 1.1"
- ]
- exportMetaObjectRevisions: [0, 1]
- Property { name: "segmentCount"; type: "int" }
- Property { name: "subSegmentCount"; type: "int" }
- Property { name: "labelFormat"; type: "string" }
- Property { name: "formatter"; revision: 1; type: "QValue3DAxisFormatter"; isPointer: true }
- Property { name: "reversed"; revision: 1; type: "bool" }
- Signal {
- name: "segmentCountChanged"
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "subSegmentCountChanged"
- Parameter { name: "count"; type: "int" }
- }
- Signal {
- name: "labelFormatChanged"
- Parameter { name: "format"; type: "string" }
- }
- Signal {
- name: "formatterChanged"
- revision: 1
- Parameter { name: "formatter"; type: "QValue3DAxisFormatter"; isPointer: true }
- }
- Signal {
- name: "reversedChanged"
- revision: 1
- Parameter { name: "enable"; type: "bool" }
- }
- }
- Component {
- name: "QtDataVisualization::QValue3DAxisFormatter"
- prototype: "QObject"
- exports: ["QtDataVisualization/ValueAxis3DFormatter 1.1"]
- exportMetaObjectRevisions: [0]
- }
-}
diff --git a/src/datavisualizationqml2/qmldir b/src/datavisualizationqml2/qmldir
deleted file mode 100644
index bbd17868..00000000
--- a/src/datavisualizationqml2/qmldir
+++ /dev/null
@@ -1,4 +0,0 @@
-module QtDataVisualization
-plugin datavisualizationqml2
-classname QtDataVisualizationQml2Plugin
-
diff --git a/src/src.pro b/src/src.pro
deleted file mode 100644
index 3547745d..00000000
--- a/src/src.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = subdirs
-CONFIG += ordered
-SUBDIRS += datavisualization
-
-qtHaveModule(quick): SUBDIRS += datavisualizationqml2