summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/datavisualization/CMakeLists.txt37
-rw-r--r--src/datavisualization/axis/qabstract3daxis.cpp30
-rw-r--r--src/datavisualization/axis/qabstract3daxis.h32
-rw-r--r--src/datavisualization/axis/qabstract3daxis_p.h30
-rw-r--r--src/datavisualization/axis/qcategory3daxis.cpp30
-rw-r--r--src/datavisualization/axis/qcategory3daxis.h32
-rw-r--r--src/datavisualization/axis/qcategory3daxis_p.h30
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter.cpp30
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter.h32
-rw-r--r--src/datavisualization/axis/qlogvalue3daxisformatter_p.h30
-rw-r--r--src/datavisualization/axis/qvalue3daxis.cpp30
-rw-r--r--src/datavisualization/axis/qvalue3daxis.h32
-rw-r--r--src/datavisualization/axis/qvalue3daxis_p.h30
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter.cpp30
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter.h32
-rw-r--r--src/datavisualization/axis/qvalue3daxisformatter_p.h30
-rw-r--r--src/datavisualization/configure.cmake3
-rw-r--r--src/datavisualization/data/abstractitemmodelhandler.cpp30
-rw-r--r--src/datavisualization/data/abstractitemmodelhandler_p.h32
-rw-r--r--src/datavisualization/data/abstractrenderitem.cpp30
-rw-r--r--src/datavisualization/data/abstractrenderitem_p.h30
-rw-r--r--src/datavisualization/data/baritemmodelhandler.cpp32
-rw-r--r--src/datavisualization/data/baritemmodelhandler_p.h30
-rw-r--r--src/datavisualization/data/barrenderitem.cpp30
-rw-r--r--src/datavisualization/data/barrenderitem_p.h30
-rw-r--r--src/datavisualization/data/customrenderitem.cpp33
-rw-r--r--src/datavisualization/data/customrenderitem_p.h32
-rw-r--r--src/datavisualization/data/labelitem.cpp30
-rw-r--r--src/datavisualization/data/labelitem_p.h30
-rw-r--r--src/datavisualization/data/qabstract3dseries.cpp30
-rw-r--r--src/datavisualization/data/qabstract3dseries.h32
-rw-r--r--src/datavisualization/data/qabstract3dseries_p.h30
-rw-r--r--src/datavisualization/data/qabstractdataproxy.cpp30
-rw-r--r--src/datavisualization/data/qabstractdataproxy.h32
-rw-r--r--src/datavisualization/data/qabstractdataproxy_p.h30
-rw-r--r--src/datavisualization/data/qbar3dseries.cpp73
-rw-r--r--src/datavisualization/data/qbar3dseries.h37
-rw-r--r--src/datavisualization/data/qbar3dseries_p.h34
-rw-r--r--src/datavisualization/data/qbardataitem.cpp30
-rw-r--r--src/datavisualization/data/qbardataitem.h32
-rw-r--r--src/datavisualization/data/qbardataitem_p.h30
-rw-r--r--src/datavisualization/data/qbardataproxy.cpp30
-rw-r--r--src/datavisualization/data/qbardataproxy.h32
-rw-r--r--src/datavisualization/data/qbardataproxy_p.h30
-rw-r--r--src/datavisualization/data/qcustom3ditem.cpp37
-rw-r--r--src/datavisualization/data/qcustom3ditem.h33
-rw-r--r--src/datavisualization/data/qcustom3ditem_p.h30
-rw-r--r--src/datavisualization/data/qcustom3dlabel.cpp30
-rw-r--r--src/datavisualization/data/qcustom3dlabel.h32
-rw-r--r--src/datavisualization/data/qcustom3dlabel_p.h30
-rw-r--r--src/datavisualization/data/qcustom3dvolume.cpp30
-rw-r--r--src/datavisualization/data/qcustom3dvolume.h32
-rw-r--r--src/datavisualization/data/qcustom3dvolume_p.h30
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy.cpp256
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy.h44
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy_p.h36
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy.cpp32
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy.h32
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy_p.h30
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy.cpp32
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy.h32
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy_p.h30
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy.cpp32
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy.h32
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy_p.h30
-rw-r--r--src/datavisualization/data/qscatter3dseries.cpp30
-rw-r--r--src/datavisualization/data/qscatter3dseries.h32
-rw-r--r--src/datavisualization/data/qscatter3dseries_p.h30
-rw-r--r--src/datavisualization/data/qscatterdataitem.cpp30
-rw-r--r--src/datavisualization/data/qscatterdataitem.h32
-rw-r--r--src/datavisualization/data/qscatterdataitem_p.h30
-rw-r--r--src/datavisualization/data/qscatterdataproxy.cpp30
-rw-r--r--src/datavisualization/data/qscatterdataproxy.h32
-rw-r--r--src/datavisualization/data/qscatterdataproxy_p.h30
-rw-r--r--src/datavisualization/data/qsurface3dseries.cpp64
-rw-r--r--src/datavisualization/data/qsurface3dseries.h40
-rw-r--r--src/datavisualization/data/qsurface3dseries_p.h32
-rw-r--r--src/datavisualization/data/qsurfacedataitem.cpp30
-rw-r--r--src/datavisualization/data/qsurfacedataitem.h32
-rw-r--r--src/datavisualization/data/qsurfacedataitem_p.h30
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.cpp110
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.h32
-rw-r--r--src/datavisualization/data/qsurfacedataproxy_p.h30
-rw-r--r--src/datavisualization/data/scatteritemmodelhandler.cpp32
-rw-r--r--src/datavisualization/data/scatteritemmodelhandler_p.h30
-rw-r--r--src/datavisualization/data/scatterrenderitem.cpp30
-rw-r--r--src/datavisualization/data/scatterrenderitem_p.h30
-rw-r--r--src/datavisualization/data/surfaceitemmodelhandler.cpp32
-rw-r--r--src/datavisualization/data/surfaceitemmodelhandler_p.h30
-rw-r--r--src/datavisualization/doc/qtdatavis3d.qdocconf58
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp30
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp30
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp30
-rw-r--r--src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp30
-rw-r--r--src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp30
-rw-r--r--src/datavisualization/doc/snippets/doc_src_qtdatavisualization.cpp30
-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.qdoc36
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-bars3d.qdoc43
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-color.qdoc30
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-colorgradient.qdoc30
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc34
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-surface3d.qdoc34
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization.qdoc52
-rw-r--r--src/datavisualization/engine/abstract3dcontroller.cpp53
-rw-r--r--src/datavisualization/engine/abstract3dcontroller_p.h36
-rw-r--r--src/datavisualization/engine/abstract3drenderer.cpp47
-rw-r--r--src/datavisualization/engine/abstract3drenderer_p.h32
-rw-r--r--src/datavisualization/engine/abstractdeclarativeinterface.cpp11
-rw-r--r--src/datavisualization/engine/abstractdeclarativeinterface_p.h31
-rw-r--r--src/datavisualization/engine/axisrendercache.cpp32
-rw-r--r--src/datavisualization/engine/axisrendercache_p.h30
-rw-r--r--src/datavisualization/engine/bars3dcontroller.cpp55
-rw-r--r--src/datavisualization/engine/bars3dcontroller_p.h41
-rw-r--r--src/datavisualization/engine/bars3drenderer.cpp78
-rw-r--r--src/datavisualization/engine/bars3drenderer_p.h35
-rw-r--r--src/datavisualization/engine/barseriesrendercache.cpp30
-rw-r--r--src/datavisualization/engine/barseriesrendercache_p.h30
-rw-r--r--src/datavisualization/engine/drawer.cpp38
-rw-r--r--src/datavisualization/engine/drawer_p.h30
-rw-r--r--src/datavisualization/engine/meshes.qrc33
-rw-r--r--src/datavisualization/engine/q3dbars.cpp67
-rw-r--r--src/datavisualization/engine/q3dbars.h37
-rw-r--r--src/datavisualization/engine/q3dbars_p.h30
-rw-r--r--src/datavisualization/engine/q3dcamera.cpp30
-rw-r--r--src/datavisualization/engine/q3dcamera.h32
-rw-r--r--src/datavisualization/engine/q3dcamera_p.h32
-rw-r--r--src/datavisualization/engine/q3dlight.cpp30
-rw-r--r--src/datavisualization/engine/q3dlight.h32
-rw-r--r--src/datavisualization/engine/q3dlight_p.h30
-rw-r--r--src/datavisualization/engine/q3dobject.cpp30
-rw-r--r--src/datavisualization/engine/q3dobject.h32
-rw-r--r--src/datavisualization/engine/q3dobject_p.h30
-rw-r--r--src/datavisualization/engine/q3dscatter.cpp40
-rw-r--r--src/datavisualization/engine/q3dscatter.h32
-rw-r--r--src/datavisualization/engine/q3dscatter_p.h30
-rw-r--r--src/datavisualization/engine/q3dscene.cpp30
-rw-r--r--src/datavisualization/engine/q3dscene.h32
-rw-r--r--src/datavisualization/engine/q3dscene_p.h32
-rw-r--r--src/datavisualization/engine/q3dsurface.cpp40
-rw-r--r--src/datavisualization/engine/q3dsurface.h32
-rw-r--r--src/datavisualization/engine/q3dsurface_p.h30
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.cpp53
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.h41
-rw-r--r--src/datavisualization/engine/qabstract3dgraph_p.h30
-rw-r--r--src/datavisualization/engine/scatter3dcontroller.cpp32
-rw-r--r--src/datavisualization/engine/scatter3dcontroller_p.h32
-rw-r--r--src/datavisualization/engine/scatter3drenderer.cpp34
-rw-r--r--src/datavisualization/engine/scatter3drenderer_p.h32
-rw-r--r--src/datavisualization/engine/scatterseriesrendercache.cpp30
-rw-r--r--src/datavisualization/engine/scatterseriesrendercache_p.h30
-rw-r--r--src/datavisualization/engine/selectionpointer.cpp36
-rw-r--r--src/datavisualization/engine/selectionpointer_p.h30
-rw-r--r--src/datavisualization/engine/seriesrendercache.cpp30
-rw-r--r--src/datavisualization/engine/seriesrendercache_p.h30
-rw-r--r--src/datavisualization/engine/shaders.qrc43
-rw-r--r--src/datavisualization/engine/surface3dcontroller.cpp32
-rw-r--r--src/datavisualization/engine/surface3dcontroller_p.h32
-rw-r--r--src/datavisualization/engine/surface3drenderer.cpp32
-rw-r--r--src/datavisualization/engine/surface3drenderer_p.h32
-rw-r--r--src/datavisualization/engine/surfaceseriesrendercache.cpp34
-rw-r--r--src/datavisualization/engine/surfaceseriesrendercache_p.h30
-rw-r--r--src/datavisualization/global/datavisualizationglobal_p.h30
-rw-r--r--src/datavisualization/global/qdatavisualizationglobal.h41
-rw-r--r--src/datavisualization/input/q3dinputhandler.cpp32
-rw-r--r--src/datavisualization/input/q3dinputhandler.h32
-rw-r--r--src/datavisualization/input/q3dinputhandler_p.h30
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler.cpp30
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler.h32
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler_p.h30
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler.cpp40
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler.h32
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler_p.h30
-rw-r--r--src/datavisualization/theme/q3dtheme.cpp54
-rw-r--r--src/datavisualization/theme/q3dtheme.h34
-rw-r--r--src/datavisualization/theme/q3dtheme_p.h32
-rw-r--r--src/datavisualization/theme/thememanager.cpp30
-rw-r--r--src/datavisualization/theme/thememanager_p.h30
-rw-r--r--src/datavisualization/utils/abstractobjecthelper.cpp30
-rw-r--r--src/datavisualization/utils/abstractobjecthelper_p.h30
-rw-r--r--src/datavisualization/utils/camerahelper.cpp30
-rw-r--r--src/datavisualization/utils/camerahelper_p.h30
-rw-r--r--src/datavisualization/utils/meshloader.cpp34
-rw-r--r--src/datavisualization/utils/meshloader_p.h30
-rw-r--r--src/datavisualization/utils/objecthelper.cpp116
-rw-r--r--src/datavisualization/utils/objecthelper_p.h30
-rw-r--r--src/datavisualization/utils/qutils.h34
-rw-r--r--src/datavisualization/utils/scatterobjectbufferhelper.cpp64
-rw-r--r--src/datavisualization/utils/scatterobjectbufferhelper_p.h31
-rw-r--r--src/datavisualization/utils/scatterpointbufferhelper.cpp30
-rw-r--r--src/datavisualization/utils/scatterpointbufferhelper_p.h30
-rw-r--r--src/datavisualization/utils/shaderhelper.cpp30
-rw-r--r--src/datavisualization/utils/shaderhelper_p.h30
-rw-r--r--src/datavisualization/utils/surfaceobject.cpp33
-rw-r--r--src/datavisualization/utils/surfaceobject_p.h35
-rw-r--r--src/datavisualization/utils/texturehelper.cpp30
-rw-r--r--src/datavisualization/utils/texturehelper_p.h30
-rw-r--r--src/datavisualization/utils/utils.cpp30
-rw-r--r--src/datavisualization/utils/utils_p.h30
-rw-r--r--src/datavisualization/utils/vertexindexer.cpp31
-rw-r--r--src/datavisualization/utils/vertexindexer_p.h30
-rw-r--r--src/datavisualizationqml/CMakeLists.txt12
-rw-r--r--src/datavisualizationqml/abstractdeclarative.cpp54
-rw-r--r--src/datavisualizationqml/abstractdeclarative_p.h39
-rw-r--r--src/datavisualizationqml/colorgradient.cpp30
-rw-r--r--src/datavisualizationqml/colorgradient_p.h32
-rw-r--r--src/datavisualizationqml/declarativebars.cpp45
-rw-r--r--src/datavisualizationqml/declarativebars_p.h41
-rw-r--r--src/datavisualizationqml/declarativecolor.cpp30
-rw-r--r--src/datavisualizationqml/declarativecolor_p.h32
-rw-r--r--src/datavisualizationqml/declarativerendernode.cpp30
-rw-r--r--src/datavisualizationqml/declarativerendernode_p.h30
-rw-r--r--src/datavisualizationqml/declarativescatter.cpp30
-rw-r--r--src/datavisualizationqml/declarativescatter_p.h30
-rw-r--r--src/datavisualizationqml/declarativescene.cpp30
-rw-r--r--src/datavisualizationqml/declarativescene_p.h32
-rw-r--r--src/datavisualizationqml/declarativeseries.cpp131
-rw-r--r--src/datavisualizationqml/declarativeseries_p.h53
-rw-r--r--src/datavisualizationqml/declarativesurface.cpp30
-rw-r--r--src/datavisualizationqml/declarativesurface_p.h30
-rw-r--r--src/datavisualizationqml/declarativetheme.cpp32
-rw-r--r--src/datavisualizationqml/declarativetheme_p.h30
-rw-r--r--src/datavisualizationqml/designer/Bars3DSpecifics.qml30
-rw-r--r--src/datavisualizationqml/designer/Scatter3DSpecifics.qml30
-rw-r--r--src/datavisualizationqml/designer/Surface3DSpecifics.qml30
-rw-r--r--src/datavisualizationqml/designer/default/Bars3D.qml30
-rw-r--r--src/datavisualizationqml/designer/default/Scatter3D.qml30
-rw-r--r--src/datavisualizationqml/designer/default/Surface3D.qml30
-rw-r--r--src/datavisualizationqml/enumtostringmap.cpp30
-rw-r--r--src/datavisualizationqml/enumtostringmap_p.h31
-rw-r--r--src/datavisualizationqml/foreigntypes_p.h37
-rw-r--r--src/datavisualizationqml/glstatestore.cpp30
-rw-r--r--src/datavisualizationqml/glstatestore_p.h30
236 files changed, 1577 insertions, 6758 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8f9835d4..0bd4f3cb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
add_subdirectory(datavisualization)
if(TARGET Qt::Quick)
add_subdirectory(datavisualizationqml)
diff --git a/src/datavisualization/CMakeLists.txt b/src/datavisualization/CMakeLists.txt
index d0607248..27f82340 100644
--- a/src/datavisualization/CMakeLists.txt
+++ b/src/datavisualization/CMakeLists.txt
@@ -1,3 +1,6 @@
+# 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."
@@ -34,6 +37,7 @@ qt_internal_add_module(DataVisualization
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
@@ -76,6 +80,20 @@ qt_internal_add_module(DataVisualization
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
@@ -84,13 +102,11 @@ qt_internal_add_module(DataVisualization
input
theme
utils
- ../datavisualizationqml
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
Qt::OpenGL
- Qt::Qml
- Qt::Quick
+ GENERATE_CPP_EXPORTS
)
set_source_files_properties("engine/meshes/arrowFlat.obj"
@@ -371,7 +387,7 @@ set(shader_resource_files
"engine/shaders/texture_ES2.frag"
)
-qt_internal_add_resource(DataVisualization "shaders"
+qt_internal_add_resource(DataVisualization "datavisualizationshaders"
PREFIX
"/shaders"
BASE
@@ -380,7 +396,7 @@ qt_internal_add_resource(DataVisualization "shaders"
${shader_resource_files}
)
-qt_internal_add_resource(DataVisualization "meshes"
+qt_internal_add_resource(DataVisualization "datavisualizationmeshes"
PREFIX
"/defaultMeshes"
BASE
@@ -397,6 +413,17 @@ qt_internal_extend_target(DataVisualization CONDITION MACOS
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/qabstract3daxis.cpp b/src/datavisualization/axis/qabstract3daxis.cpp
index 94a42521..62bbb2a3 100644
--- a/src/datavisualization/axis/qabstract3daxis.cpp
+++ b/src/datavisualization/axis/qabstract3daxis.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/axis/qabstract3daxis.h b/src/datavisualization/axis/qabstract3daxis.h
index 0ff405dd..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
@@ -39,7 +13,7 @@ QT_BEGIN_NAMESPACE
class QAbstract3DAxisPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstract3DAxis : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstract3DAxis : public QObject
{
Q_OBJECT
Q_ENUMS(AxisOrientation)
diff --git a/src/datavisualization/axis/qabstract3daxis_p.h b/src/datavisualization/axis/qabstract3daxis_p.h
index 76e376f7..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
diff --git a/src/datavisualization/axis/qcategory3daxis.cpp b/src/datavisualization/axis/qcategory3daxis.cpp
index e47706c0..a8cdec4d 100644
--- a/src/datavisualization/axis/qcategory3daxis.cpp
+++ b/src/datavisualization/axis/qcategory3daxis.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/axis/qcategory3daxis.h b/src/datavisualization/axis/qcategory3daxis.h
index e394b4a3..5497c39b 100644
--- a/src/datavisualization/axis/qcategory3daxis.h
+++ b/src/datavisualization/axis/qcategory3daxis.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 QCATEGORY3DAXIS_H
#define QCATEGORY3DAXIS_H
@@ -36,7 +10,7 @@ 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)
diff --git a/src/datavisualization/axis/qcategory3daxis_p.h b/src/datavisualization/axis/qcategory3daxis_p.h
index 842c07e6..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
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter.cpp b/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
index 37cf22db..adb485ce 100644
--- a/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter.h b/src/datavisualization/axis/qlogvalue3daxisformatter.h
index 8f0e67a5..1f4fc70a 100644
--- a/src/datavisualization/axis/qlogvalue3daxisformatter.h
+++ b/src/datavisualization/axis/qlogvalue3daxisformatter.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 QLOGVALUE3DAXISFORMATTER_H
#define QLOGVALUE3DAXISFORMATTER_H
@@ -36,7 +10,7 @@ QT_BEGIN_NAMESPACE
class QLogValue3DAxisFormatterPrivate;
-class QT_DATAVISUALIZATION_EXPORT QLogValue3DAxisFormatter : public QValue3DAxisFormatter
+class Q_DATAVISUALIZATION_EXPORT QLogValue3DAxisFormatter : public QValue3DAxisFormatter
{
Q_OBJECT
diff --git a/src/datavisualization/axis/qlogvalue3daxisformatter_p.h b/src/datavisualization/axis/qlogvalue3daxisformatter_p.h
index 6b129030..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
diff --git a/src/datavisualization/axis/qvalue3daxis.cpp b/src/datavisualization/axis/qvalue3daxis.cpp
index ebc548f2..1358c92b 100644
--- a/src/datavisualization/axis/qvalue3daxis.cpp
+++ b/src/datavisualization/axis/qvalue3daxis.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/axis/qvalue3daxis.h b/src/datavisualization/axis/qvalue3daxis.h
index b1fce675..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
@@ -37,7 +11,7 @@ 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)
diff --git a/src/datavisualization/axis/qvalue3daxis_p.h b/src/datavisualization/axis/qvalue3daxis_p.h
index 1e9cbfbf..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
diff --git a/src/datavisualization/axis/qvalue3daxisformatter.cpp b/src/datavisualization/axis/qvalue3daxisformatter.cpp
index 26786f9d..db210059 100644
--- a/src/datavisualization/axis/qvalue3daxisformatter.cpp
+++ b/src/datavisualization/axis/qvalue3daxisformatter.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/axis/qvalue3daxisformatter.h b/src/datavisualization/axis/qvalue3daxisformatter.h
index 43a61fd8..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
@@ -42,7 +16,7 @@ QT_BEGIN_NAMESPACE
class QValue3DAxisFormatterPrivate;
class QValue3DAxis;
-class QT_DATAVISUALIZATION_EXPORT QValue3DAxisFormatter : public QObject
+class Q_DATAVISUALIZATION_EXPORT QValue3DAxisFormatter : public QObject
{
Q_OBJECT
protected:
diff --git a/src/datavisualization/axis/qvalue3daxisformatter_p.h b/src/datavisualization/axis/qvalue3daxisformatter_p.h
index 9bc7b555..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
diff --git a/src/datavisualization/configure.cmake b/src/datavisualization/configure.cmake
index aff14785..a7d05099 100644
--- a/src/datavisualization/configure.cmake
+++ b/src/datavisualization/configure.cmake
@@ -1,3 +1,6 @@
+# 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)
diff --git a/src/datavisualization/data/abstractitemmodelhandler.cpp b/src/datavisualization/data/abstractitemmodelhandler.cpp
index c8c5bf25..99d983be 100644
--- a/src/datavisualization/data/abstractitemmodelhandler.cpp
+++ b/src/datavisualization/data/abstractitemmodelhandler.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 "abstractitemmodelhandler_p.h"
diff --git a/src/datavisualization/data/abstractitemmodelhandler_p.h b/src/datavisualization/data/abstractitemmodelhandler_p.h
index fb215244..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
@@ -91,6 +65,8 @@ private:
Q_DISABLE_COPY(AbstractItemModelHandler)
};
+static constexpr int noRoleIndex = -1;
+
QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/data/abstractrenderitem.cpp b/src/datavisualization/data/abstractrenderitem.cpp
index 25b656b6..e3811fd1 100644
--- a/src/datavisualization/data/abstractrenderitem.cpp
+++ b/src/datavisualization/data/abstractrenderitem.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 "abstractrenderitem_p.h"
diff --git a/src/datavisualization/data/abstractrenderitem_p.h b/src/datavisualization/data/abstractrenderitem_p.h
index f1fcaf13..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
diff --git a/src/datavisualization/data/baritemmodelhandler.cpp b/src/datavisualization/data/baritemmodelhandler.cpp
index 8864948a..4a8c8faa 100644
--- a/src/datavisualization/data/baritemmodelhandler.cpp
+++ b/src/datavisualization/data/baritemmodelhandler.cpp
@@ -1,38 +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 "baritemmodelhandler_p.h"
QT_BEGIN_NAMESPACE
-static const int noRoleIndex = -1;
-
BarItemModelHandler::BarItemModelHandler(QItemModelBarDataProxy *proxy, QObject *parent)
: AbstractItemModelHandler(parent),
m_proxy(proxy),
diff --git a/src/datavisualization/data/baritemmodelhandler_p.h b/src/datavisualization/data/baritemmodelhandler_p.h
index dbb95967..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
diff --git a/src/datavisualization/data/barrenderitem.cpp b/src/datavisualization/data/barrenderitem.cpp
index 3fa423d9..43d2de5a 100644
--- a/src/datavisualization/data/barrenderitem.cpp
+++ b/src/datavisualization/data/barrenderitem.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 "barrenderitem_p.h"
diff --git a/src/datavisualization/data/barrenderitem_p.h b/src/datavisualization/data/barrenderitem_p.h
index d46e0848..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
diff --git a/src/datavisualization/data/customrenderitem.cpp b/src/datavisualization/data/customrenderitem.cpp
index 68e84c44..9873bcf5 100644
--- a/src/datavisualization/data/customrenderitem.cpp
+++ b/src/datavisualization/data/customrenderitem.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 "customrenderitem_p.h"
@@ -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)
diff --git a/src/datavisualization/data/customrenderitem_p.h b/src/datavisualization/data/customrenderitem_p.h
index 196e6aa0..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
@@ -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; }
diff --git a/src/datavisualization/data/labelitem.cpp b/src/datavisualization/data/labelitem.cpp
index 337c8008..f8e1600b 100644
--- a/src/datavisualization/data/labelitem.cpp
+++ b/src/datavisualization/data/labelitem.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 "labelitem_p.h"
diff --git a/src/datavisualization/data/labelitem_p.h b/src/datavisualization/data/labelitem_p.h
index c090c9c0..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
diff --git a/src/datavisualization/data/qabstract3dseries.cpp b/src/datavisualization/data/qabstract3dseries.cpp
index a196ed66..0a8613c0 100644
--- a/src/datavisualization/data/qabstract3dseries.cpp
+++ b/src/datavisualization/data/qabstract3dseries.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 "qabstract3dseries_p.h"
#include "qabstractdataproxy_p.h"
diff --git a/src/datavisualization/data/qabstract3dseries.h b/src/datavisualization/data/qabstract3dseries.h
index c9f355e1..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
@@ -41,7 +15,7 @@ QT_BEGIN_NAMESPACE
class QAbstract3DSeriesPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstract3DSeries : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstract3DSeries : public QObject
{
Q_OBJECT
Q_ENUMS(SeriesType)
diff --git a/src/datavisualization/data/qabstract3dseries_p.h b/src/datavisualization/data/qabstract3dseries_p.h
index d4ad11c9..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
diff --git a/src/datavisualization/data/qabstractdataproxy.cpp b/src/datavisualization/data/qabstractdataproxy.cpp
index 248b9f4a..3d80f101 100644
--- a/src/datavisualization/data/qabstractdataproxy.cpp
+++ b/src/datavisualization/data/qabstractdataproxy.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qabstractdataproxy.h b/src/datavisualization/data/qabstractdataproxy.h
index 89d73bce..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
@@ -38,7 +12,7 @@ QT_BEGIN_NAMESPACE
class QAbstractDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstractDataProxy : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstractDataProxy : public QObject
{
Q_OBJECT
Q_ENUMS(DataType)
diff --git a/src/datavisualization/data/qabstractdataproxy_p.h b/src/datavisualization/data/qabstractdataproxy_p.h
index 6ab33661..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
diff --git a/src/datavisualization/data/qbar3dseries.cpp b/src/datavisualization/data/qbar3dseries.cpp
index afc3b3ba..770bf831 100644
--- a/src/datavisualization/data/qbar3dseries.cpp
+++ b/src/datavisualization/data/qbar3dseries.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
@@ -147,6 +121,18 @@ QT_BEGIN_NAMESPACE
*/
/*!
+ * \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);
}
+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 c3a71205..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
@@ -38,12 +12,13 @@ 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();
diff --git a/src/datavisualization/data/qbar3dseries_p.h b/src/datavisualization/data/qbar3dseries_p.h
index 0f5bb43a..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
@@ -62,11 +36,15 @@ public:
void connectSignals();
+ void setRowColors(const QList<QColor> &colors);
+
private:
QBar3DSeries *qptr();
QPoint m_selectedBar;
+ QList<QColor> m_rowColors;
+
private:
friend class QBar3DSeries;
};
diff --git a/src/datavisualization/data/qbardataitem.cpp b/src/datavisualization/data/qbardataitem.cpp
index e1a04c83..7406a6b8 100644
--- a/src/datavisualization/data/qbardataitem.cpp
+++ b/src/datavisualization/data/qbardataitem.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qbardataitem.h b/src/datavisualization/data/qbardataitem.h
index 11a8e471..0e1a271e 100644
--- a/src/datavisualization/data/qbardataitem.h
+++ b/src/datavisualization/data/qbardataitem.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 QBARDATAITEM_H
#define QBARDATAITEM_H
@@ -36,7 +10,7 @@ QT_BEGIN_NAMESPACE
class QBarDataItemPrivate;
-class QT_DATAVISUALIZATION_EXPORT QBarDataItem
+class Q_DATAVISUALIZATION_EXPORT QBarDataItem
{
public:
QBarDataItem();
diff --git a/src/datavisualization/data/qbardataitem_p.h b/src/datavisualization/data/qbardataitem_p.h
index 000bafdb..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
diff --git a/src/datavisualization/data/qbardataproxy.cpp b/src/datavisualization/data/qbardataproxy.cpp
index 36832137..49cda8cd 100644
--- a/src/datavisualization/data/qbardataproxy.cpp
+++ b/src/datavisualization/data/qbardataproxy.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qbardataproxy.h b/src/datavisualization/data/qbardataproxy.h
index 80e5f063..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
@@ -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
diff --git a/src/datavisualization/data/qbardataproxy_p.h b/src/datavisualization/data/qbardataproxy_p.h
index 7b2cf22b..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
diff --git a/src/datavisualization/data/qcustom3ditem.cpp b/src/datavisualization/data/qcustom3ditem.cpp
index 07e3c809..a657823c 100644
--- a/src/datavisualization/data/qcustom3ditem.cpp
+++ b/src/datavisualization/data/qcustom3ditem.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
@@ -58,7 +32,9 @@ QT_BEGIN_NAMESPACE
/*! \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)
{
diff --git a/src/datavisualization/data/qcustom3ditem.h b/src/datavisualization/data/qcustom3ditem.h
index 8d6d905f..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
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)
diff --git a/src/datavisualization/data/qcustom3ditem_p.h b/src/datavisualization/data/qcustom3ditem_p.h
index d97c98c4..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
diff --git a/src/datavisualization/data/qcustom3dlabel.cpp b/src/datavisualization/data/qcustom3dlabel.cpp
index 72379dd8..4a440ab9 100644
--- a/src/datavisualization/data/qcustom3dlabel.cpp
+++ b/src/datavisualization/data/qcustom3dlabel.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qcustom3dlabel.h b/src/datavisualization/data/qcustom3dlabel.h
index 9ca68fe9..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
@@ -41,7 +15,7 @@ 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)
diff --git a/src/datavisualization/data/qcustom3dlabel_p.h b/src/datavisualization/data/qcustom3dlabel_p.h
index f607ac1b..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
diff --git a/src/datavisualization/data/qcustom3dvolume.cpp b/src/datavisualization/data/qcustom3dvolume.cpp
index df944a58..3357bf43 100644
--- a/src/datavisualization/data/qcustom3dvolume.cpp
+++ b/src/datavisualization/data/qcustom3dvolume.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qcustom3dvolume.h b/src/datavisualization/data/qcustom3dvolume.h
index 886019d0..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
@@ -39,7 +13,7 @@ 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)
diff --git a/src/datavisualization/data/qcustom3dvolume_p.h b/src/datavisualization/data/qcustom3dvolume_p.h
index f68473a4..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
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
index fd4ffcbb..4dee6d23 100644
--- a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qheightmapsurfacedataproxy.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 "qheightmapsurfacedataproxy_p.h"
@@ -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));
}
}
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.h b/src/datavisualization/data/qheightmapsurfacedataproxy.h
index f9f9a23c..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
@@ -38,7 +12,7 @@ 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);
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy_p.h b/src/datavisualization/data/qheightmapsurfacedataproxy_p.h
index 7dc2f41d..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
@@ -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,6 +48,9 @@ private:
float m_maxXValue;
float m_minZValue;
float m_maxZValue;
+ float m_minYValue;
+ float m_maxYValue;
+ bool m_autoScaleY;
friend class QHeightMapSurfaceDataProxy;
};
diff --git a/src/datavisualization/data/qitemmodelbardataproxy.cpp b/src/datavisualization/data/qitemmodelbardataproxy.cpp
index c5e7c3c0..74e23cc9 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelbardataproxy.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 "qitemmodelbardataproxy_p.h"
#include "baritemmodelhandler_p.h"
@@ -81,7 +55,7 @@ QT_BEGIN_NAMESPACE
* 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}
*/
diff --git a/src/datavisualization/data/qitemmodelbardataproxy.h b/src/datavisualization/data/qitemmodelbardataproxy.h
index 501d77fe..1b372a3c 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy.h
+++ b/src/datavisualization/data/qitemmodelbardataproxy.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 QITEMMODELBARDATAPROXY_H
#define QITEMMODELBARDATAPROXY_H
@@ -38,7 +12,7 @@ QT_BEGIN_NAMESPACE
class QItemModelBarDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QItemModelBarDataProxy : public QBarDataProxy
+class Q_DATAVISUALIZATION_EXPORT QItemModelBarDataProxy : public QBarDataProxy
{
Q_OBJECT
Q_ENUMS(MultiMatchBehavior)
diff --git a/src/datavisualization/data/qitemmodelbardataproxy_p.h b/src/datavisualization/data/qitemmodelbardataproxy_p.h
index 4cd6e79d..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
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
index c1ac496f..63392cc0 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy.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 "qitemmodelscatterdataproxy_p.h"
#include "scatteritemmodelhandler_p.h"
@@ -64,7 +38,7 @@ QT_BEGIN_NAMESPACE
* 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}
*/
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.h b/src/datavisualization/data/qitemmodelscatterdataproxy.h
index 5d66b12e..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
@@ -39,7 +13,7 @@ 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)
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy_p.h b/src/datavisualization/data/qitemmodelscatterdataproxy_p.h
index dd957f0d..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
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
index 701f9cca..75fe3691 100644
--- a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
@@ -87,7 +61,7 @@ QT_BEGIN_NAMESPACE
* 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}
*/
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.h b/src/datavisualization/data/qitemmodelsurfacedataproxy.h
index 7a3abbb9..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
@@ -39,7 +13,7 @@ QT_BEGIN_NAMESPACE
class QItemModelSurfaceDataProxyPrivate;
-class QT_DATAVISUALIZATION_EXPORT QItemModelSurfaceDataProxy : public QSurfaceDataProxy
+class Q_DATAVISUALIZATION_EXPORT QItemModelSurfaceDataProxy : public QSurfaceDataProxy
{
Q_OBJECT
Q_ENUMS(MultiMatchBehavior)
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h b/src/datavisualization/data/qitemmodelsurfacedataproxy_p.h
index dc9f96cb..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
diff --git a/src/datavisualization/data/qscatter3dseries.cpp b/src/datavisualization/data/qscatter3dseries.cpp
index ec84ee96..3e0ea45b 100644
--- a/src/datavisualization/data/qscatter3dseries.cpp
+++ b/src/datavisualization/data/qscatter3dseries.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qscatter3dseries.h b/src/datavisualization/data/qscatter3dseries.h
index e94aed85..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
@@ -37,7 +11,7 @@ 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)
diff --git a/src/datavisualization/data/qscatter3dseries_p.h b/src/datavisualization/data/qscatter3dseries_p.h
index 16f20886..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
diff --git a/src/datavisualization/data/qscatterdataitem.cpp b/src/datavisualization/data/qscatterdataitem.cpp
index db06573b..f55b45bf 100644
--- a/src/datavisualization/data/qscatterdataitem.cpp
+++ b/src/datavisualization/data/qscatterdataitem.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qscatterdataitem.h b/src/datavisualization/data/qscatterdataitem.h
index 6fe749d0..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
@@ -37,7 +11,7 @@ QT_BEGIN_NAMESPACE
class QScatterDataItemPrivate;
-class QT_DATAVISUALIZATION_EXPORT QScatterDataItem
+class Q_DATAVISUALIZATION_EXPORT QScatterDataItem
{
public:
QScatterDataItem();
diff --git a/src/datavisualization/data/qscatterdataitem_p.h b/src/datavisualization/data/qscatterdataitem_p.h
index 4fcfa58a..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
diff --git a/src/datavisualization/data/qscatterdataproxy.cpp b/src/datavisualization/data/qscatterdataproxy.cpp
index b6d1d0cc..3e793430 100644
--- a/src/datavisualization/data/qscatterdataproxy.cpp
+++ b/src/datavisualization/data/qscatterdataproxy.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qscatterdataproxy.h b/src/datavisualization/data/qscatterdataproxy.h
index 790e37c3..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
@@ -42,7 +16,7 @@ class QScatter3DSeries;
typedef QList<QScatterDataItem> QScatterDataArray;
-class QT_DATAVISUALIZATION_EXPORT QScatterDataProxy : public QAbstractDataProxy
+class Q_DATAVISUALIZATION_EXPORT QScatterDataProxy : public QAbstractDataProxy
{
Q_OBJECT
diff --git a/src/datavisualization/data/qscatterdataproxy_p.h b/src/datavisualization/data/qscatterdataproxy_p.h
index 17d967ff..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
diff --git a/src/datavisualization/data/qsurface3dseries.cpp b/src/datavisualization/data/qsurface3dseries.cpp
index 94241dbc..9ac4a1de 100644
--- a/src/datavisualization/data/qsurface3dseries.cpp
+++ b/src/datavisualization/data/qsurface3dseries.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 "qsurface3dseries_p.h"
#include "surface3dcontroller_p.h"
@@ -165,6 +139,12 @@ QT_BEGIN_NAMESPACE
* 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());
}
+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 eadc6622..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
@@ -37,7 +11,7 @@ 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;
};
+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 16a8cb23..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
@@ -60,6 +34,7 @@ public:
void setFlatShadingEnabled(bool enabled);
void setDrawMode(QSurface3DSeries::DrawFlags mode);
void setTexture(const QImage &texture);
+ void setWireframeColor(const QColor &color);
private:
QSurface3DSeries *qptr();
@@ -69,6 +44,7 @@ private:
QSurface3DSeries::DrawFlags m_drawMode;
QImage m_texture;
QString m_textureFile;
+ QColor m_wireframeColor;
private:
friend class QSurface3DSeries;
diff --git a/src/datavisualization/data/qsurfacedataitem.cpp b/src/datavisualization/data/qsurfacedataitem.cpp
index b35713f7..5d977c0f 100644
--- a/src/datavisualization/data/qsurfacedataitem.cpp
+++ b/src/datavisualization/data/qsurfacedataitem.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
diff --git a/src/datavisualization/data/qsurfacedataitem.h b/src/datavisualization/data/qsurfacedataitem.h
index a4685e3d..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
@@ -37,7 +11,7 @@ QT_BEGIN_NAMESPACE
class QSurfaceDataItemPrivate;
-class QT_DATAVISUALIZATION_EXPORT QSurfaceDataItem
+class Q_DATAVISUALIZATION_EXPORT QSurfaceDataItem
{
public:
QSurfaceDataItem();
diff --git a/src/datavisualization/data/qsurfacedataitem_p.h b/src/datavisualization/data/qsurfacedataitem_p.h
index 6a738f33..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
diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp
index 7601d021..afb91c3f 100644
--- a/src/datavisualization/data/qsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qsurfacedataproxy.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** 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"
@@ -552,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;
}
}
@@ -569,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);
diff --git a/src/datavisualization/data/qsurfacedataproxy.h b/src/datavisualization/data/qsurfacedataproxy.h
index 0b652d97..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
@@ -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
diff --git a/src/datavisualization/data/qsurfacedataproxy_p.h b/src/datavisualization/data/qsurfacedataproxy_p.h
index 2e772508..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
diff --git a/src/datavisualization/data/scatteritemmodelhandler.cpp b/src/datavisualization/data/scatteritemmodelhandler.cpp
index 4c51e04a..8aa4ba7d 100644
--- a/src/datavisualization/data/scatteritemmodelhandler.cpp
+++ b/src/datavisualization/data/scatteritemmodelhandler.cpp
@@ -1,38 +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 "scatteritemmodelhandler_p.h"
QT_BEGIN_NAMESPACE
-static const int noRoleIndex = -1;
-
ScatterItemModelHandler::ScatterItemModelHandler(QItemModelScatterDataProxy *proxy, QObject *parent)
: AbstractItemModelHandler(parent),
m_proxy(proxy),
diff --git a/src/datavisualization/data/scatteritemmodelhandler_p.h b/src/datavisualization/data/scatteritemmodelhandler_p.h
index e1a0b77b..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
diff --git a/src/datavisualization/data/scatterrenderitem.cpp b/src/datavisualization/data/scatterrenderitem.cpp
index 6fea125b..b8c8a4d5 100644
--- a/src/datavisualization/data/scatterrenderitem.cpp
+++ b/src/datavisualization/data/scatterrenderitem.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 "scatterrenderitem_p.h"
diff --git a/src/datavisualization/data/scatterrenderitem_p.h b/src/datavisualization/data/scatterrenderitem_p.h
index 5810c8ba..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
diff --git a/src/datavisualization/data/surfaceitemmodelhandler.cpp b/src/datavisualization/data/surfaceitemmodelhandler.cpp
index 271fa299..bdec0308 100644
--- a/src/datavisualization/data/surfaceitemmodelhandler.cpp
+++ b/src/datavisualization/data/surfaceitemmodelhandler.cpp
@@ -1,38 +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 "surfaceitemmodelhandler_p.h"
QT_BEGIN_NAMESPACE
-static const int noRoleIndex = -1;
-
SurfaceItemModelHandler::SurfaceItemModelHandler(QItemModelSurfaceDataProxy *proxy, QObject *parent)
: AbstractItemModelHandler(parent),
m_proxy(proxy),
diff --git a/src/datavisualization/data/surfaceitemmodelhandler_p.h b/src/datavisualization/data/surfaceitemmodelhandler_p.h
index 68ec1994..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
diff --git a/src/datavisualization/doc/qtdatavis3d.qdocconf b/src/datavisualization/doc/qtdatavis3d.qdocconf
index bc4690ad..952cac3e 100644
--- a/src/datavisualization/doc/qtdatavis3d.qdocconf
+++ b/src/datavisualization/doc/qtdatavis3d.qdocconf
@@ -1,10 +1,11 @@
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 \
@@ -17,37 +18,32 @@ imagedirs += ../images \
depends = qtcore qtgui qtqml qtquick qtdoc qtcmake 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 = doc: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 = doc: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
+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/Textured Surface Example"
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp
index 53c3f515..2f10a988 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dbars_construction.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
//! [3]
#include <QtDataVisualization>
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp
index 975b0d4e..5bf508f3 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dscatter_construction.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
//! [3]
#include <QtDataVisualization>
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp b/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp
index 94fde08f..3946ede6 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dsurface_construction.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
//! [5]
#include <QtDataVisualization>
diff --git a/src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp b/src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp
index ed798ae4..a192976d 100644
--- a/src/datavisualization/doc/snippets/doc_src_q3dtheme.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_q3dtheme.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
#include <QtDataVisualization/Q3DBars>
#include <QtDataVisualization/Q3DTheme>
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 7d41cac4..fa4e5178 100644
--- a/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_qtdatavisualization.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]
#include <QtDataVisualization>
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 b433f262..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:
+ \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 df2143a3..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
@@ -190,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.
@@ -302,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 9fd5107c..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
@@ -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 57a4f983..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
*/
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-scatter3d.qdoc
index 78350c78..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}
*/
@@ -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 f494edba..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}
*/
@@ -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 33448065..5b91c2da 100644
--- a/src/datavisualization/doc/src/qtdatavisualization.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization.qdoc
@@ -1,34 +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$
-**
-****************************************************************************/
+// 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.
@@ -49,7 +27,6 @@
/*!
\group datavisualization_examples
- \ingroup all-examples
\title Qt Data Visualization Examples
\brief Examples for the Qt Data Visualization.
@@ -59,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
@@ -133,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
@@ -165,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
@@ -183,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
@@ -212,7 +190,7 @@
*/
/*!
- \page qtdatavisualization_known_issues.html
+ \page qtdatavisualization-known-issues.html
\title Qt Data Visualization Known Issues
\list
@@ -222,7 +200,7 @@
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.
diff --git a/src/datavisualization/engine/abstract3dcontroller.cpp b/src/datavisualization/engine/abstract3dcontroller.cpp
index 5ed62ca9..f7d7f206 100644
--- a/src/datavisualization/engine/abstract3dcontroller.cpp
+++ b/src/datavisualization/engine/abstract3dcontroller.cpp
@@ -1,33 +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$
-**
-****************************************************************************/
-
-#include "abstractdeclarative_p.h"
+// 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"
@@ -179,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;
@@ -1017,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()
@@ -1544,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;
}
@@ -1574,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;
}
@@ -1613,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);
@@ -1629,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);
@@ -1660,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);
diff --git a/src/datavisualization/engine/abstract3dcontroller_p.h b/src/datavisualization/engine/abstract3dcontroller_p.h
index 2aee01ef..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
@@ -57,6 +31,7 @@ QT_FORWARD_DECLARE_CLASS(QOpenGLFramebufferObject)
QT_BEGIN_NAMESPACE
+class AbstractDeclarativeInterface;
class AbstractDeclarative;
class Abstract3DRenderer;
class QAbstract3DSeries;
@@ -165,7 +140,7 @@ struct Abstract3DChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Abstract3DController : public QObject
+class Q_DATAVISUALIZATION_EXPORT Abstract3DController : public QObject
{
Q_OBJECT
@@ -227,7 +202,7 @@ protected:
qreal m_margin;
QMutex m_renderMutex;
- AbstractDeclarative *m_qml = nullptr;
+ AbstractDeclarativeInterface *m_qml = nullptr;
explicit Abstract3DController(QRect initialViewport, Q3DScene *scene, QObject *parent = 0);
@@ -243,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);
diff --git a/src/datavisualization/engine/abstract3drenderer.cpp b/src/datavisualization/engine/abstract3drenderer.cpp
index 9b8bc13a..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"
@@ -749,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
@@ -1153,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());
@@ -1466,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
@@ -1657,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());
diff --git a/src/datavisualization/engine/abstract3drenderer_p.h b/src/datavisualization/engine/abstract3drenderer_p.h
index 160225be..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
@@ -50,6 +24,8 @@
#include "seriesrendercache_p.h"
#include "customrenderitem_p.h"
+#include <QtCore/qpointer.h>
+
QT_FORWARD_DECLARE_CLASS(QOffscreenSurface)
QT_BEGIN_NAMESPACE
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 d6b0e24c..1218eec2 100644
--- a/src/datavisualization/engine/axisrendercache.cpp
+++ b/src/datavisualization/engine/axisrendercache.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 "axisrendercache_p.h"
diff --git a/src/datavisualization/engine/axisrendercache_p.h b/src/datavisualization/engine/axisrendercache_p.h
index 076fbe56..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
diff --git a/src/datavisualization/engine/bars3dcontroller.cpp b/src/datavisualization/engine/bars3dcontroller.cpp
index 2a007360..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"
@@ -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;
diff --git a/src/datavisualization/engine/bars3dcontroller_p.h b/src/datavisualization/engine/bars3dcontroller_p.h
index e57263a1..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
@@ -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;
@@ -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();
@@ -159,6 +139,7 @@ public Q_SLOTS:
void handleItemChanged(int rowIndex, int columnIndex);
void handleDataRowLabelsChanged();
void handleDataColumnLabelsChanged();
+ void handleRowColorsChanged();
Q_SIGNALS:
void primarySeriesChanged(QBar3DSeries *series);
diff --git a/src/datavisualization/engine/bars3drenderer.cpp b/src/datavisualization/engine/bars3drenderer.cpp
index 3f36f8d1..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"
@@ -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;
}
}
@@ -2464,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)
{
@@ -2596,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;
@@ -2659,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)
{
diff --git a/src/datavisualization/engine/bars3drenderer_p.h b/src/datavisualization/engine/bars3drenderer_p.h
index 6c96c3e2..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
@@ -57,7 +31,7 @@ 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
@@ -144,6 +119,7 @@ public Q_SLOTS:
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; }
@@ -186,6 +162,7 @@ private:
void updateDepthBuffer() override;
void calculateSceneScalingFactors();
void calculateHeightAdjustment();
+ void calculateSeriesStartPosition();
Abstract3DController::SelectionType isSelected(int row, int bar,
const BarSeriesRenderCache *cache);
QPoint selectionColorToArrayPosition(const QVector4D &selectionColor);
diff --git a/src/datavisualization/engine/barseriesrendercache.cpp b/src/datavisualization/engine/barseriesrendercache.cpp
index 5935309c..da3655a9 100644
--- a/src/datavisualization/engine/barseriesrendercache.cpp
+++ b/src/datavisualization/engine/barseriesrendercache.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 "barseriesrendercache_p.h"
diff --git a/src/datavisualization/engine/barseriesrendercache_p.h b/src/datavisualization/engine/barseriesrendercache_p.h
index c725bcfe..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
diff --git a/src/datavisualization/engine/drawer.cpp b/src/datavisualization/engine/drawer.cpp
index e83a1715..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,8 +18,8 @@ class StaticLibInitializer
public:
StaticLibInitializer()
{
- Q_INIT_RESOURCE(shaders);
- Q_INIT_RESOURCE(meshes);
+ Q_INIT_RESOURCE(datavisualizationshaders);
+ Q_INIT_RESOURCE(datavisualizationmeshes);
}
};
StaticLibInitializer staticLibInitializer;
@@ -197,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());
diff --git a/src/datavisualization/engine/drawer_p.h b/src/datavisualization/engine/drawer_p.h
index 425c0e24..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
diff --git a/src/datavisualization/engine/meshes.qrc b/src/datavisualization/engine/meshes.qrc
deleted file mode 100644
index 5cca4c41..00000000
--- a/src/datavisualization/engine/meshes.qrc
+++ /dev/null
@@ -1,33 +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>
-</RCC>
diff --git a/src/datavisualization/engine/q3dbars.cpp b/src/datavisualization/engine/q3dbars.cpp
index 53519a4d..a5204b24 100644
--- a/src/datavisualization/engine/q3dbars.cpp
+++ b/src/datavisualization/engine/q3dbars.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 "q3dbars_p.h"
@@ -88,7 +62,7 @@ QT_BEGIN_NAMESPACE
*
* 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.
diff --git a/src/datavisualization/engine/q3dbars.h b/src/datavisualization/engine/q3dbars.h
index 5b782931..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
@@ -39,13 +13,14 @@ 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);
diff --git a/src/datavisualization/engine/q3dbars_p.h b/src/datavisualization/engine/q3dbars_p.h
index 08ac2803..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
diff --git a/src/datavisualization/engine/q3dcamera.cpp b/src/datavisualization/engine/q3dcamera.cpp
index 6a0d224e..69839fdc 100644
--- a/src/datavisualization/engine/q3dcamera.cpp
+++ b/src/datavisualization/engine/q3dcamera.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 "q3dcamera_p.h"
#include "utils_p.h"
diff --git a/src/datavisualization/engine/q3dcamera.h b/src/datavisualization/engine/q3dcamera.h
index a758afba..1c59bc13 100644
--- a/src/datavisualization/engine/q3dcamera.h
+++ b/src/datavisualization/engine/q3dcamera.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 Q3DCAMERA_H
#define Q3DCAMERA_H
@@ -36,7 +10,7 @@ QT_BEGIN_NAMESPACE
class Q3DCameraPrivate;
-class QT_DATAVISUALIZATION_EXPORT Q3DCamera : public Q3DObject
+class Q_DATAVISUALIZATION_EXPORT Q3DCamera : public Q3DObject
{
Q_OBJECT
Q_ENUMS(CameraPreset)
diff --git a/src/datavisualization/engine/q3dcamera_p.h b/src/datavisualization/engine/q3dcamera_p.h
index 944e408e..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
@@ -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:
diff --git a/src/datavisualization/engine/q3dlight.cpp b/src/datavisualization/engine/q3dlight.cpp
index 144f2a10..86afbe01 100644
--- a/src/datavisualization/engine/q3dlight.cpp
+++ b/src/datavisualization/engine/q3dlight.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 "q3dlight_p.h"
diff --git a/src/datavisualization/engine/q3dlight.h b/src/datavisualization/engine/q3dlight.h
index 94067ac4..ceae12bf 100644
--- a/src/datavisualization/engine/q3dlight.h
+++ b/src/datavisualization/engine/q3dlight.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 Q3DLIGHT_H
#define Q3DLIGHT_H
@@ -36,7 +10,7 @@ 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, 3))
diff --git a/src/datavisualization/engine/q3dlight_p.h b/src/datavisualization/engine/q3dlight_p.h
index 54802a35..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
diff --git a/src/datavisualization/engine/q3dobject.cpp b/src/datavisualization/engine/q3dobject.cpp
index 5e7b039a..c9e417dd 100644
--- a/src/datavisualization/engine/q3dobject.cpp
+++ b/src/datavisualization/engine/q3dobject.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 "q3dobject_p.h"
#include "q3dscene_p.h"
diff --git a/src/datavisualization/engine/q3dobject.h b/src/datavisualization/engine/q3dobject.h
index 2b93e3aa..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
@@ -41,7 +15,7 @@ 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)
diff --git a/src/datavisualization/engine/q3dobject_p.h b/src/datavisualization/engine/q3dobject_p.h
index 4b25cb7d..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
diff --git a/src/datavisualization/engine/q3dscatter.cpp b/src/datavisualization/engine/q3dscatter.cpp
index 37834322..07c86110 100644
--- a/src/datavisualization/engine/q3dscatter.cpp
+++ b/src/datavisualization/engine/q3dscatter.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 "q3dscatter.h"
#include "q3dscatter_p.h"
@@ -77,7 +53,7 @@ QT_BEGIN_NAMESPACE
* 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
{
diff --git a/src/datavisualization/engine/q3dscatter.h b/src/datavisualization/engine/q3dscatter.h
index 3a163aef..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
@@ -38,7 +12,7 @@ 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)
diff --git a/src/datavisualization/engine/q3dscatter_p.h b/src/datavisualization/engine/q3dscatter_p.h
index 5a534b08..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
diff --git a/src/datavisualization/engine/q3dscene.cpp b/src/datavisualization/engine/q3dscene.cpp
index 1c1d4954..143983e7 100644
--- a/src/datavisualization/engine/q3dscene.cpp
+++ b/src/datavisualization/engine/q3dscene.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 "q3dscene_p.h"
#include "q3dcamera_p.h"
diff --git a/src/datavisualization/engine/q3dscene.h b/src/datavisualization/engine/q3dscene.h
index 4e29c32d..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
@@ -40,7 +14,7 @@ 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)
diff --git a/src/datavisualization/engine/q3dscene_p.h b/src/datavisualization/engine/q3dscene_p.h
index 434ed9c7..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
@@ -77,7 +51,7 @@ struct Q3DSceneChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Q3DScenePrivate : public QObject
+class Q_DATAVISUALIZATION_EXPORT Q3DScenePrivate : public QObject
{
Q_OBJECT
public:
diff --git a/src/datavisualization/engine/q3dsurface.cpp b/src/datavisualization/engine/q3dsurface.cpp
index 0c3e401d..2b456814 100644
--- a/src/datavisualization/engine/q3dsurface.cpp
+++ b/src/datavisualization/engine/q3dsurface.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 "q3dsurface.h"
#include "q3dsurface_p.h"
@@ -91,7 +67,7 @@ QT_BEGIN_NAMESPACE
* 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
{
diff --git a/src/datavisualization/engine/q3dsurface.h b/src/datavisualization/engine/q3dsurface.h
index ae1d67d4..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
@@ -38,7 +12,7 @@ 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)
diff --git a/src/datavisualization/engine/q3dsurface_p.h b/src/datavisualization/engine/q3dsurface_p.h
index db2ade45..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
diff --git a/src/datavisualization/engine/qabstract3dgraph.cpp b/src/datavisualization/engine/qabstract3dgraph.cpp
index 6e17937e..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,7 +15,7 @@
#include <QtGui/QPainter>
#include <QtOpenGL/QOpenGLFramebufferObject>
#include <QtGui/QOffscreenSurface>
-#if defined(Q_OS_OSX)
+#if defined(Q_OS_MACOS)
#include <qpa/qplatformnativeinterface.h>
#endif
@@ -110,6 +84,8 @@ QT_BEGIN_NAMESPACE
\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.
*/
@@ -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}.
*
diff --git a/src/datavisualization/engine/qabstract3dgraph.h b/src/datavisualization/engine/qabstract3dgraph.h
index fd8610fa..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
@@ -43,12 +17,11 @@ 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);
diff --git a/src/datavisualization/engine/qabstract3dgraph_p.h b/src/datavisualization/engine/qabstract3dgraph_p.h
index 9eff32ee..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
diff --git a/src/datavisualization/engine/scatter3dcontroller.cpp b/src/datavisualization/engine/scatter3dcontroller.cpp
index f78aa387..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"
diff --git a/src/datavisualization/engine/scatter3dcontroller_p.h b/src/datavisualization/engine/scatter3dcontroller_p.h
index 257eb056..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
@@ -60,7 +34,7 @@ struct Scatter3DChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Scatter3DController : public Abstract3DController
+class Q_DATAVISUALIZATION_EXPORT Scatter3DController : public Abstract3DController
{
Q_OBJECT
diff --git a/src/datavisualization/engine/scatter3drenderer.cpp b/src/datavisualization/engine/scatter3drenderer.cpp
index cb0e780d..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"
@@ -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();
diff --git a/src/datavisualization/engine/scatter3drenderer_p.h b/src/datavisualization/engine/scatter3drenderer_p.h
index ce43aa9e..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
@@ -54,7 +28,7 @@ class Q3DScene;
class ScatterSeriesRenderCache;
class QScatterDataItem;
-class QT_DATAVISUALIZATION_EXPORT Scatter3DRenderer : public Abstract3DRenderer
+class Q_DATAVISUALIZATION_EXPORT Scatter3DRenderer : public Abstract3DRenderer
{
Q_OBJECT
diff --git a/src/datavisualization/engine/scatterseriesrendercache.cpp b/src/datavisualization/engine/scatterseriesrendercache.cpp
index dbe9fad6..2447076e 100644
--- a/src/datavisualization/engine/scatterseriesrendercache.cpp
+++ b/src/datavisualization/engine/scatterseriesrendercache.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 "scatterseriesrendercache_p.h"
#include "scatterobjectbufferhelper_p.h"
diff --git a/src/datavisualization/engine/scatterseriesrendercache_p.h b/src/datavisualization/engine/scatterseriesrendercache_p.h
index 32752fc1..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
diff --git a/src/datavisualization/engine/selectionpointer.cpp b/src/datavisualization/engine/selectionpointer.cpp
index 4f7d2bf0..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"
@@ -36,7 +10,7 @@
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,
diff --git a/src/datavisualization/engine/selectionpointer_p.h b/src/datavisualization/engine/selectionpointer_p.h
index bdb1d24c..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
diff --git a/src/datavisualization/engine/seriesrendercache.cpp b/src/datavisualization/engine/seriesrendercache.cpp
index 8fd1a7e1..4794f605 100644
--- a/src/datavisualization/engine/seriesrendercache.cpp
+++ b/src/datavisualization/engine/seriesrendercache.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 "seriesrendercache_p.h"
#include "abstract3drenderer_p.h"
diff --git a/src/datavisualization/engine/seriesrendercache_p.h b/src/datavisualization/engine/seriesrendercache_p.h
index 09547523..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
diff --git a/src/datavisualization/engine/shaders.qrc b/src/datavisualization/engine/shaders.qrc
deleted file mode 100644
index 452f303e..00000000
--- a/src/datavisualization/engine/shaders.qrc
+++ /dev/null
@@ -1,43 +0,0 @@
-<RCC>
- <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/surface3dcontroller.cpp b/src/datavisualization/engine/surface3dcontroller.cpp
index d79e8162..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"
diff --git a/src/datavisualization/engine/surface3dcontroller_p.h b/src/datavisualization/engine/surface3dcontroller_p.h
index 0c2e31ff..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
@@ -65,7 +39,7 @@ struct Surface3DChangeBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Surface3DController : public Abstract3DController
+class Q_DATAVISUALIZATION_EXPORT Surface3DController : public Abstract3DController
{
Q_OBJECT
diff --git a/src/datavisualization/engine/surface3drenderer.cpp b/src/datavisualization/engine/surface3drenderer.cpp
index 0f977490..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"
diff --git a/src/datavisualization/engine/surface3drenderer_p.h b/src/datavisualization/engine/surface3drenderer_p.h
index 957f44d2..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
@@ -50,7 +24,7 @@ QT_BEGIN_NAMESPACE
class ShaderHelper;
class Q3DScene;
-class QT_DATAVISUALIZATION_EXPORT Surface3DRenderer : public Abstract3DRenderer
+class Q_DATAVISUALIZATION_EXPORT Surface3DRenderer : public Abstract3DRenderer
{
Q_OBJECT
diff --git a/src/datavisualization/engine/surfaceseriesrendercache.cpp b/src/datavisualization/engine/surfaceseriesrendercache.cpp
index 918d0fb6..94b92ff5 100644
--- a/src/datavisualization/engine/surfaceseriesrendercache.cpp
+++ b/src/datavisualization/engine/surfaceseriesrendercache.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 "surfaceseriesrendercache_p.h"
#include "surface3drenderer_p.h"
@@ -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;
diff --git a/src/datavisualization/engine/surfaceseriesrendercache_p.h b/src/datavisualization/engine/surfaceseriesrendercache_p.h
index c8e89c8d..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
diff --git a/src/datavisualization/global/datavisualizationglobal_p.h b/src/datavisualization/global/datavisualizationglobal_p.h
index 2302105a..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
diff --git a/src/datavisualization/global/qdatavisualizationglobal.h b/src/datavisualization/global/qdatavisualizationglobal.h
index 841ac7e4..5a67d1c1 100644
--- a/src/datavisualization/global/qdatavisualizationglobal.h
+++ b/src/datavisualization/global/qdatavisualizationglobal.h
@@ -1,36 +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
#ifndef QDATAVISUALIZATIONGLOBAL_H
#define QDATAVISUALIZATIONGLOBAL_H
#include <QtCore/qglobal.h>
+#include <QtDataVisualization/qtdatavisualizationexports.h>
QT_BEGIN_NAMESPACE
@@ -44,16 +19,6 @@ QT_BEGIN_NAMESPACE
*/
#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
-
QT_END_NAMESPACE
#endif
diff --git a/src/datavisualization/input/q3dinputhandler.cpp b/src/datavisualization/input/q3dinputhandler.cpp
index ce205bf6..f62aaf70 100644
--- a/src/datavisualization/input/q3dinputhandler.cpp
+++ b/src/datavisualization/input/q3dinputhandler.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 "datavisualizationglobal_p.h"
#include "q3dinputhandler_p.h"
@@ -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
diff --git a/src/datavisualization/input/q3dinputhandler.h b/src/datavisualization/input/q3dinputhandler.h
index 6e6d1845..be977385 100644
--- a/src/datavisualization/input/q3dinputhandler.h
+++ b/src/datavisualization/input/q3dinputhandler.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 Q3DINPUTHANDLER_H
#define Q3DINPUTHANDLER_H
@@ -36,7 +10,7 @@ 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)
diff --git a/src/datavisualization/input/q3dinputhandler_p.h b/src/datavisualization/input/q3dinputhandler_p.h
index addd65fa..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
diff --git a/src/datavisualization/input/qabstract3dinputhandler.cpp b/src/datavisualization/input/qabstract3dinputhandler.cpp
index d439b793..bb19e7f9 100644
--- a/src/datavisualization/input/qabstract3dinputhandler.cpp
+++ b/src/datavisualization/input/qabstract3dinputhandler.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 "qabstract3dinputhandler_p.h"
diff --git a/src/datavisualization/input/qabstract3dinputhandler.h b/src/datavisualization/input/qabstract3dinputhandler.h
index c6e358c3..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
@@ -42,7 +16,7 @@ QT_BEGIN_NAMESPACE
class QAbstract3DInputHandlerPrivate;
-class QT_DATAVISUALIZATION_EXPORT QAbstract3DInputHandler : public QObject
+class Q_DATAVISUALIZATION_EXPORT QAbstract3DInputHandler : public QObject
{
Q_OBJECT
Q_ENUMS(InputView)
diff --git a/src/datavisualization/input/qabstract3dinputhandler_p.h b/src/datavisualization/input/qabstract3dinputhandler_p.h
index c6fe14b3..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
diff --git a/src/datavisualization/input/qtouch3dinputhandler.cpp b/src/datavisualization/input/qtouch3dinputhandler.cpp
index 5254d044..35b79a9f 100644
--- a/src/datavisualization/input/qtouch3dinputhandler.cpp
+++ b/src/datavisualization/input/qtouch3dinputhandler.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 "qtouch3dinputhandler_p.h"
#include <QtCore/QTimer>
@@ -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;
/*!
@@ -121,12 +95,12 @@ void QTouch3DInputHandler::touchEvent(QTouchEvent *event)
QList<QTouchEvent::TouchPoint> points;
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).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) {
+ } else if (points.size() == 1) {
QPointF pointerPos = points.at(0).position();
if (event->type() == QEvent::TouchBegin) {
// Flush input state
@@ -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);
diff --git a/src/datavisualization/input/qtouch3dinputhandler.h b/src/datavisualization/input/qtouch3dinputhandler.h
index 51f2e073..ba7c5ba4 100644
--- a/src/datavisualization/input/qtouch3dinputhandler.h
+++ b/src/datavisualization/input/qtouch3dinputhandler.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_H
#define QTOUCH3DINPUTHANDLER_H
@@ -36,7 +10,7 @@ QT_BEGIN_NAMESPACE
class QTouch3DInputHandlerPrivate;
-class QT_DATAVISUALIZATION_EXPORT QTouch3DInputHandler : public Q3DInputHandler
+class Q_DATAVISUALIZATION_EXPORT QTouch3DInputHandler : public Q3DInputHandler
{
Q_OBJECT
diff --git a/src/datavisualization/input/qtouch3dinputhandler_p.h b/src/datavisualization/input/qtouch3dinputhandler_p.h
index fd94c12a..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
diff --git a/src/datavisualization/theme/q3dtheme.cpp b/src/datavisualization/theme/q3dtheme.cpp
index 25f2f7c1..0b56210b 100644
--- a/src/datavisualization/theme/q3dtheme.cpp
+++ b/src/datavisualization/theme/q3dtheme.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 "q3dtheme_p.h"
#include "thememanager_p.h"
@@ -335,6 +309,8 @@ QT_BEGIN_NAMESPACE
* \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
* 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
* \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
* 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
* \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);
+ }
}
}
diff --git a/src/datavisualization/theme/q3dtheme.h b/src/datavisualization/theme/q3dtheme.h
index 4023bc16..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
@@ -40,7 +14,7 @@ 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,
diff --git a/src/datavisualization/theme/q3dtheme_p.h b/src/datavisualization/theme/q3dtheme_p.h
index d11b8146..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
@@ -96,7 +70,7 @@ struct Q3DThemeDirtyBitField {
}
};
-class QT_DATAVISUALIZATION_EXPORT Q3DThemePrivate : public QObject
+class Q_DATAVISUALIZATION_EXPORT Q3DThemePrivate : public QObject
{
Q_OBJECT
public:
diff --git a/src/datavisualization/theme/thememanager.cpp b/src/datavisualization/theme/thememanager.cpp
index e109e4f1..8dfd6a72 100644
--- a/src/datavisualization/theme/thememanager.cpp
+++ b/src/datavisualization/theme/thememanager.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 "thememanager_p.h"
#include "q3dtheme_p.h"
diff --git a/src/datavisualization/theme/thememanager_p.h b/src/datavisualization/theme/thememanager_p.h
index a04a0d49..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
diff --git a/src/datavisualization/utils/abstractobjecthelper.cpp b/src/datavisualization/utils/abstractobjecthelper.cpp
index 2510a65b..a99bdfac 100644
--- a/src/datavisualization/utils/abstractobjecthelper.cpp
+++ b/src/datavisualization/utils/abstractobjecthelper.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 "abstractobjecthelper_p.h"
diff --git a/src/datavisualization/utils/abstractobjecthelper_p.h b/src/datavisualization/utils/abstractobjecthelper_p.h
index 2a51d001..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
diff --git a/src/datavisualization/utils/camerahelper.cpp b/src/datavisualization/utils/camerahelper.cpp
index 05ba7c98..1a8c8823 100644
--- a/src/datavisualization/utils/camerahelper.cpp
+++ b/src/datavisualization/utils/camerahelper.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 "camerahelper_p.h"
diff --git a/src/datavisualization/utils/camerahelper_p.h b/src/datavisualization/utils/camerahelper_p.h
index 26c7ee38..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
diff --git a/src/datavisualization/utils/meshloader.cpp b/src/datavisualization/utils/meshloader.cpp
index 274d4a13..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"
@@ -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();
diff --git a/src/datavisualization/utils/meshloader_p.h b/src/datavisualization/utils/meshloader_p.h
index 7479f19e..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
diff --git a/src/datavisualization/utils/objecthelper.cpp b/src/datavisualization/utils/objecthelper.cpp
index f8fa01de..6053b255 100644
--- a/src/datavisualization/utils/objecthelper.cpp
+++ b/src/datavisualization/utils/objecthelper.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"
#include "vertexindexer_p.h"
@@ -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
diff --git a/src/datavisualization/utils/objecthelper_p.h b/src/datavisualization/utils/objecthelper_p.h
index d642bc3b..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
diff --git a/src/datavisualization/utils/qutils.h b/src/datavisualization/utils/qutils.h
index dc72835e..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
@@ -38,9 +12,7 @@
QT_BEGIN_NAMESPACE
-#ifdef Q_OS_MACOS
-#pragma clang diagnostic ignored "-Wunused-function"
-#endif
+[[maybe_unused]]
static inline QSurfaceFormat qDefaultSurfaceFormat(bool antialias)
{
bool isES = false;
diff --git a/src/datavisualization/utils/scatterobjectbufferhelper.cpp b/src/datavisualization/utils/scatterobjectbufferhelper.cpp
index 0efd8572..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"
@@ -35,7 +9,7 @@
QT_BEGIN_NAMESPACE
-const GLfloat itemScaler = 3.0f;
+const GLfloat ScatterObjectBufferHelper::itemScaler = 3.0f;
ScatterObjectBufferHelper::ScatterObjectBufferHelper()
: m_scaleY(0.0f)
@@ -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++;
}
diff --git a/src/datavisualization/utils/scatterobjectbufferhelper_p.h b/src/datavisualization/utils/scatterobjectbufferhelper_p.h
index 2f9dfd7d..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
@@ -63,6 +37,7 @@ private:
const QList<QVector3D> &indexed_vertices);
float m_scaleY;
+ static const GLfloat itemScaler;
};
QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/scatterpointbufferhelper.cpp b/src/datavisualization/utils/scatterpointbufferhelper.cpp
index 9600a386..ccb5dd13 100644
--- a/src/datavisualization/utils/scatterpointbufferhelper.cpp
+++ b/src/datavisualization/utils/scatterpointbufferhelper.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 "scatterpointbufferhelper_p.h"
#include <QtGui/QVector2D>
diff --git a/src/datavisualization/utils/scatterpointbufferhelper_p.h b/src/datavisualization/utils/scatterpointbufferhelper_p.h
index 0240b529..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
diff --git a/src/datavisualization/utils/shaderhelper.cpp b/src/datavisualization/utils/shaderhelper.cpp
index 31535225..7de9592d 100644
--- a/src/datavisualization/utils/shaderhelper.cpp
+++ b/src/datavisualization/utils/shaderhelper.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 "shaderhelper_p.h"
diff --git a/src/datavisualization/utils/shaderhelper_p.h b/src/datavisualization/utils/shaderhelper_p.h
index e00e16c7..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
diff --git a/src/datavisualization/utils/surfaceobject.cpp b/src/datavisualization/utils/surfaceobject.cpp
index 6734ac86..30635e6c 100644
--- a/src/datavisualization/utils/surfaceobject.cpp
+++ b/src/datavisualization/utils/surfaceobject.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 "surfaceobject_p.h"
#include "surface3drenderer_p.h"
@@ -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);
diff --git a/src/datavisualization/utils/surfaceobject_p.h b/src/datavisualization/utils/surfaceobject_p.h
index 4532a671..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,11 +14,11 @@
#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
@@ -95,6 +69,8 @@ public:
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,6 +105,7 @@ private:
bool m_returnTextureBuffer = false;
SurfaceObject::DataDimensions m_dataDimension;
SurfaceObject::DataDimensions m_oldDataDimension = DataDimensions(-1);
+ QColor m_wireframeColor;
};
QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/texturehelper.cpp b/src/datavisualization/utils/texturehelper.cpp
index bc1bc4c6..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"
diff --git a/src/datavisualization/utils/texturehelper_p.h b/src/datavisualization/utils/texturehelper_p.h
index 20c6beea..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
diff --git a/src/datavisualization/utils/utils.cpp b/src/datavisualization/utils/utils.cpp
index 7d5a4c08..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"
diff --git a/src/datavisualization/utils/utils_p.h b/src/datavisualization/utils/utils_p.h
index afeed6d3..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
diff --git a/src/datavisualization/utils/vertexindexer.cpp b/src/datavisualization/utils/vertexindexer.cpp
index a96a7756..65316c63 100644
--- a/src/datavisualization/utils/vertexindexer.cpp
+++ b/src/datavisualization/utils/vertexindexer.cpp
@@ -1,35 +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 "vertexindexer_p.h"
#include <QtCore/qmath.h>
+#include <QtCore/qmap.h>
QT_BEGIN_NAMESPACE
diff --git a/src/datavisualization/utils/vertexindexer_p.h b/src/datavisualization/utils/vertexindexer_p.h
index 2f4809bf..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
diff --git a/src/datavisualizationqml/CMakeLists.txt b/src/datavisualizationqml/CMakeLists.txt
index e185e9de..110a5ef0 100644
--- a/src/datavisualizationqml/CMakeLists.txt
+++ b/src/datavisualizationqml/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
set(qml_files
"designer/Bars3DSpecifics.qml"
"designer/Scatter3DSpecifics.qml"
@@ -41,17 +44,20 @@ qt_internal_add_qml_module(DataVisualizationQml
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}
- PUBLIC_LIBRARIES
- Qt::Core
+ LIBRARIES
+ Qt::CorePrivate
Qt::Gui
Qt::OpenGL
Qt::Qml
Qt::Quick
- DataVisualizationPrivate
+ Qt::DataVisualizationPrivate
+ NO_GENERATE_CPP_EXPORTS
)
qt_internal_extend_target(DataVisualizationQml CONDITION MACOS
diff --git a/src/datavisualizationqml/abstractdeclarative.cpp b/src/datavisualizationqml/abstractdeclarative.cpp
index 81a889a0..af19d46f 100644
--- a/src/datavisualizationqml/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
@@ -50,6 +24,7 @@ static QHash<AbstractDeclarative *, QQuickWindow *> graphWindowList;
AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
QQuickItem(parent),
+ AbstractDeclarativeInterface(),
m_controller(0),
m_contextWindow(0),
m_renderMode(RenderIndirect),
@@ -68,6 +43,9 @@ AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
// Set contents to false in case we are in qml designer to make component look nice
m_runningInDesigner = QGuiApplication::applicationDisplayName() == QLatin1String("Qml2Puppet");
setFlag(ItemHasContents, !m_runningInDesigner);
+
+ // Accept touchevents
+ setAcceptTouchEvents(true);
}
AbstractDeclarative::~AbstractDeclarative()
@@ -86,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;
@@ -182,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);
@@ -442,7 +428,7 @@ void AbstractDeclarative::handleWindowChanged(QQuickWindow *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);
@@ -579,7 +565,7 @@ void AbstractDeclarative::render()
QOpenGLFunctions *funcs = QOpenGLContext::currentContext()->functions();
- if (isVisible()) {
+ if (funcs && isVisible()) {
funcs->glDepthMask(GL_TRUE);
funcs->glEnable(GL_DEPTH_TEST);
funcs->glDepthFunc(GL_LESS);
@@ -661,8 +647,8 @@ 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));
diff --git a/src/datavisualizationqml/abstractdeclarative_p.h b/src/datavisualizationqml/abstractdeclarative_p.h
index 3b9d4d96..090738c5 100644
--- a/src/datavisualizationqml/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
@@ -44,6 +18,7 @@
#include <private/datavisualizationglobal_p.h>
#include <private/abstract3dcontroller_p.h>
+#include <QtDataVisualization/private/abstractdeclarativeinterface_p.h>
#include <QtQuick/QQuickItem>
#include <QtCore/QPointer>
@@ -55,7 +30,7 @@ class GLStateStore;
QT_BEGIN_NAMESPACE
-class AbstractDeclarative : public QQuickItem
+class AbstractDeclarative : public QQuickItem, public AbstractDeclarativeInterface
{
Q_OBJECT
Q_PROPERTY(SelectionFlags selectionMode READ selectionMode WRITE setSelectionMode NOTIFY selectionModeChanged)
@@ -135,6 +110,8 @@ public:
Q_ENUM(ShadowQuality)
Q_ENUM(RenderingMode)
Q_ENUM(ElementType)
+ Q_ENUM(SelectionFlag)
+ Q_ENUM(OptimizationHint)
Q_FLAGS(SelectionFlag SelectionFlags)
Q_FLAGS(OptimizationHint OptimizationHints)
@@ -168,6 +145,8 @@ public:
Q_INVOKABLE virtual void clearSelection();
+ Q_REVISION(6, 3) Q_INVOKABLE virtual bool hasSeries(QAbstract3DSeries *series);
+
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);
@@ -237,7 +216,7 @@ public:
QMutex *mutex() { return &m_mutex; }
- bool isReady() { return isComponentComplete(); }
+ bool isReady() const override { return isComponentComplete(); }
public Q_SLOTS:
virtual void handleAxisXChanged(QAbstract3DAxis *axis) = 0;
diff --git a/src/datavisualizationqml/colorgradient.cpp b/src/datavisualizationqml/colorgradient.cpp
index 3f6881b0..c00c43aa 100644
--- a/src/datavisualizationqml/colorgradient.cpp
+++ b/src/datavisualizationqml/colorgradient.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 "colorgradient_p.h"
diff --git a/src/datavisualizationqml/colorgradient_p.h b/src/datavisualizationqml/colorgradient_p.h
index ec21cd2f..5e5d0e51 100644
--- a/src/datavisualizationqml/colorgradient_p.h
+++ b/src/datavisualizationqml/colorgradient_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
@@ -67,7 +41,7 @@ public:
Q_SIGNALS:
void positionChanged(qreal position);
- void colorChanged(QColor color);
+ void colorChanged(const QColor &color);
private:
void updateGradient();
diff --git a/src/datavisualizationqml/declarativebars.cpp b/src/datavisualizationqml/declarativebars.cpp
index fe90e159..1cba987a 100644
--- a/src/datavisualizationqml/declarativebars.cpp
+++ b/src/datavisualizationqml/declarativebars.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 "declarativebars_p.h"
#include <QtCore/QMutexLocker>
@@ -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();
diff --git a/src/datavisualizationqml/declarativebars_p.h b/src/datavisualizationqml/declarativebars_p.h
index acf1a030..82653ab2 100644
--- a/src/datavisualizationqml/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
@@ -56,6 +30,7 @@ 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)
@@ -82,12 +57,15 @@ 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 qsizetype countSeriesFunc(QQmlListProperty<QBar3DSeries> *list);
@@ -114,9 +92,10 @@ 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, 2) void floorLevelChanged(float level);
diff --git a/src/datavisualizationqml/declarativecolor.cpp b/src/datavisualizationqml/declarativecolor.cpp
index 177c0fbe..979c3f1e 100644
--- a/src/datavisualizationqml/declarativecolor.cpp
+++ b/src/datavisualizationqml/declarativecolor.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 "declarativecolor_p.h"
diff --git a/src/datavisualizationqml/declarativecolor_p.h b/src/datavisualizationqml/declarativecolor_p.h
index d197fcf6..426d674d 100644
--- a/src/datavisualizationqml/declarativecolor_p.h
+++ b/src/datavisualizationqml/declarativecolor_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
@@ -61,7 +35,7 @@ public:
QColor color() const;
Q_SIGNALS:
- void colorChanged(QColor color);
+ void colorChanged(const QColor &color);
private:
QColor m_color;
diff --git a/src/datavisualizationqml/declarativerendernode.cpp b/src/datavisualizationqml/declarativerendernode.cpp
index f99e1375..5a9f466c 100644
--- a/src/datavisualizationqml/declarativerendernode.cpp
+++ b/src/datavisualizationqml/declarativerendernode.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 "declarativerendernode_p.h"
#include "abstractdeclarative_p.h"
diff --git a/src/datavisualizationqml/declarativerendernode_p.h b/src/datavisualizationqml/declarativerendernode_p.h
index 28cb0538..2f6d22ec 100644
--- a/src/datavisualizationqml/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
diff --git a/src/datavisualizationqml/declarativescatter.cpp b/src/datavisualizationqml/declarativescatter.cpp
index 1417bc6d..1e3795a0 100644
--- a/src/datavisualizationqml/declarativescatter.cpp
+++ b/src/datavisualizationqml/declarativescatter.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 "declarativescatter_p.h"
#include <QtCore/QMutexLocker>
diff --git a/src/datavisualizationqml/declarativescatter_p.h b/src/datavisualizationqml/declarativescatter_p.h
index 18848e0b..4b020b76 100644
--- a/src/datavisualizationqml/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
diff --git a/src/datavisualizationqml/declarativescene.cpp b/src/datavisualizationqml/declarativescene.cpp
index f4e5ae00..75508994 100644
--- a/src/datavisualizationqml/declarativescene.cpp
+++ b/src/datavisualizationqml/declarativescene.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 "declarativescene_p.h"
diff --git a/src/datavisualizationqml/declarativescene_p.h b/src/datavisualizationqml/declarativescene_p.h
index 26591d43..ba38b5e8 100644
--- a/src/datavisualizationqml/declarativescene_p.h
+++ b/src/datavisualizationqml/declarativescene_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
@@ -68,7 +42,7 @@ public:
QPoint invalidSelectionPoint() const;
Q_SIGNALS:
- void selectionQueryPositionChanged(const QPointF position);
+ void selectionQueryPositionChanged(const QPointF &position);
};
QT_END_NAMESPACE
diff --git a/src/datavisualizationqml/declarativeseries.cpp b/src/datavisualizationqml/declarativeseries.cpp
index 38263a32..65c2cc76 100644
--- a/src/datavisualizationqml/declarativeseries.cpp
+++ b/src/datavisualizationqml/declarativeseries.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 "declarativeseries_p.h"
#include <QtCore/QMetaMethod>
@@ -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),
diff --git a/src/datavisualizationqml/declarativeseries_p.h b/src/datavisualizationqml/declarativeseries_p.h
index 115e67e0..13b1eda3 100644
--- a/src/datavisualizationqml/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
@@ -44,6 +18,7 @@
#include "qscatter3dseries.h"
#include "qsurface3dseries.h"
#include "colorgradient_p.h"
+#include "declarativecolor_p.h"
#include <private/datavisualizationglobal_p.h>
#include <QtQml/qqml.h>
@@ -68,6 +43,7 @@ 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)
@@ -91,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);
@@ -106,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
@@ -195,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);
diff --git a/src/datavisualizationqml/declarativesurface.cpp b/src/datavisualizationqml/declarativesurface.cpp
index d422992a..cff80e98 100644
--- a/src/datavisualizationqml/declarativesurface.cpp
+++ b/src/datavisualizationqml/declarativesurface.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 "declarativesurface_p.h"
#include <QtCore/QMutexLocker>
diff --git a/src/datavisualizationqml/declarativesurface_p.h b/src/datavisualizationqml/declarativesurface_p.h
index 71f3c470..4634834a 100644
--- a/src/datavisualizationqml/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
diff --git a/src/datavisualizationqml/declarativetheme.cpp b/src/datavisualizationqml/declarativetheme.cpp
index 282f14b1..02f3becc 100644
--- a/src/datavisualizationqml/declarativetheme.cpp
+++ b/src/datavisualizationqml/declarativetheme.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 "declarativetheme_p.h"
diff --git a/src/datavisualizationqml/declarativetheme_p.h b/src/datavisualizationqml/declarativetheme_p.h
index ea59641d..8bc2f049 100644
--- a/src/datavisualizationqml/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
diff --git a/src/datavisualizationqml/designer/Bars3DSpecifics.qml b/src/datavisualizationqml/designer/Bars3DSpecifics.qml
index cd1e76b4..d509fd84 100644
--- a/src/datavisualizationqml/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/datavisualizationqml/designer/Scatter3DSpecifics.qml b/src/datavisualizationqml/designer/Scatter3DSpecifics.qml
index b864fb16..ffc79d44 100644
--- a/src/datavisualizationqml/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/datavisualizationqml/designer/Surface3DSpecifics.qml b/src/datavisualizationqml/designer/Surface3DSpecifics.qml
index 90c2f763..33ca7d75 100644
--- a/src/datavisualizationqml/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
index 32f4c939..8c56b67c 100644
--- a/src/datavisualizationqml/designer/default/Bars3D.qml
+++ b/src/datavisualizationqml/designer/default/Bars3D.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 QtDataVisualization 1.2
diff --git a/src/datavisualizationqml/designer/default/Scatter3D.qml b/src/datavisualizationqml/designer/default/Scatter3D.qml
index 2c92d192..5a6cd261 100644
--- a/src/datavisualizationqml/designer/default/Scatter3D.qml
+++ b/src/datavisualizationqml/designer/default/Scatter3D.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 QtDataVisualization 1.2
diff --git a/src/datavisualizationqml/designer/default/Surface3D.qml b/src/datavisualizationqml/designer/default/Surface3D.qml
index 66fd10fb..24561890 100644
--- a/src/datavisualizationqml/designer/default/Surface3D.qml
+++ b/src/datavisualizationqml/designer/default/Surface3D.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 QtDataVisualization 1.2
diff --git a/src/datavisualizationqml/enumtostringmap.cpp b/src/datavisualizationqml/enumtostringmap.cpp
index e10e8bc0..c411f7a9 100644
--- a/src/datavisualizationqml/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"
diff --git a/src/datavisualizationqml/enumtostringmap_p.h b/src/datavisualizationqml/enumtostringmap_p.h
index ee613433..b8be3f18 100644
--- a/src/datavisualizationqml/enumtostringmap_p.h
+++ b/src/datavisualizationqml/enumtostringmap_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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -47,6 +21,7 @@
#include <QtGui/qopengl.h>
#include <QMap>
#include <QString>
+#include <private/qglobal_p.h>
class EnumToStringMap
{
diff --git a/src/datavisualizationqml/foreigntypes_p.h b/src/datavisualizationqml/foreigntypes_p.h
index 9bf9b1c7..0b92d862 100644
--- a/src/datavisualizationqml/foreigntypes_p.h
+++ b/src/datavisualizationqml/foreigntypes_p.h
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 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) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//
// W A R N I N G
@@ -72,6 +46,7 @@
#include <QtDataVisualization/qtouch3dinputhandler.h>
#include <QtDataVisualization/qvalue3daxis.h>
#include <QtDataVisualization/qvalue3daxisformatter.h>
+#include <QtCore/private/qglobal_p.h>
QT_BEGIN_NAMESPACE
@@ -82,20 +57,20 @@ QT_BEGIN_NAMESPACE
QML_ADDED_IN_VERSION(1, minor) \
#define DEFINE_FOREIGN_UNCREATABLE_TYPE(type, name) \
- struct type##Foreign \
+ 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##Foreign \
+ struct type##DataVisForeign \
{ \
DEFINE_FOREIGN_BASE_ATTRIBUTES(type, name, minor) \
};
#define DEFINE_FOREIGN_REPLACED_TYPE(type, name, better) \
- struct type##Foreign \
+ struct type##DataVisForeign \
{ \
DEFINE_FOREIGN_BASE_ATTRIBUTES(type, name, 0) \
QML_UNCREATABLE("Trying to create uncreatable: " #name ", use " #better " instead.") \
diff --git a/src/datavisualizationqml/glstatestore.cpp b/src/datavisualizationqml/glstatestore.cpp
index dfb4266f..573835a3 100644
--- a/src/datavisualizationqml/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>
diff --git a/src/datavisualizationqml/glstatestore_p.h b/src/datavisualizationqml/glstatestore_p.h
index f5aa0bdd..b34a4c0d 100644
--- a/src/datavisualizationqml/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