summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2014-03-13 09:52:15 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2014-03-13 09:56:57 +0200
commit13cec785e301dff3cf8baf46be38a7f8f1412eb4 (patch)
treeaa095d786101e3ee14448674bae5da272f838c03
parentd6e8b26e2e5441750f342da4f78c6aa1be1ea452 (diff)
parent61c614240da9a2ecb5458e2796186339cbfd8762 (diff)
Merge branch 'develop'
-rw-r--r--README6
-rw-r--r--examples/datavisualization/audiolevels/audiolevels.pro6
-rw-r--r--examples/datavisualization/bars/bars.pro4
-rw-r--r--examples/datavisualization/bars/doc/src/bars.qdoc2
-rw-r--r--examples/datavisualization/custominput/custominput.pro4
-rw-r--r--examples/datavisualization/customproxy/customproxy.pro4
-rw-r--r--examples/datavisualization/customproxy/main.cpp2
-rw-r--r--examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc2
-rw-r--r--examples/datavisualization/itemmodel/itemmodel.pro4
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/main.qml3
-rw-r--r--examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml3
-rw-r--r--examples/datavisualization/qmllegend/qml/qmllegend/main.qml21
-rw-r--r--examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml6
-rw-r--r--examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml2
-rw-r--r--examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml3
-rw-r--r--examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml25
-rw-r--r--examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml3
-rw-r--r--examples/datavisualization/rotations/rotations.pro4
-rw-r--r--examples/datavisualization/rotations/scatterdatamodifier.cpp4
-rw-r--r--examples/datavisualization/scatter/doc/src/scatter.qdoc2
-rw-r--r--examples/datavisualization/scatter/scatter.pro4
-rw-r--r--examples/datavisualization/surface/doc/src/surface.qdoc2
-rw-r--r--examples/datavisualization/surface/surface.pro4
-rw-r--r--src/datavisualization/axis/qabstract3daxis.cpp4
-rw-r--r--src/datavisualization/axis/qcategory3daxis.cpp4
-rw-r--r--src/datavisualization/axis/qvalue3daxis.cpp2
-rw-r--r--src/datavisualization/data/qabstract3dseries.cpp42
-rw-r--r--src/datavisualization/data/qbardataproxy.cpp8
-rw-r--r--src/datavisualization/data/qheightmapsurfacedataproxy.cpp19
-rw-r--r--src/datavisualization/data/qitemmodelbardataproxy.cpp36
-rw-r--r--src/datavisualization/data/qitemmodelscatterdataproxy.cpp16
-rw-r--r--src/datavisualization/data/qitemmodelsurfacedataproxy.cpp50
-rw-r--r--src/datavisualization/data/qscatterdataproxy.cpp1
-rw-r--r--src/datavisualization/data/qsurface3dseries.cpp28
-rw-r--r--src/datavisualization/data/qsurface3dseries.h2
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.cpp2
-rw-r--r--src/datavisualization/datavisualization.pro9
-rw-r--r--src/datavisualization/doc/qtdatavisualization.qdocconf58
-rw-r--r--src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp2
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-index.qdoc1
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc6
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization.qdoc3
-rw-r--r--src/datavisualization/engine/abstract3dcontroller.cpp19
-rw-r--r--src/datavisualization/engine/abstract3dcontroller_p.h2
-rw-r--r--src/datavisualization/engine/bars3dcontroller.cpp4
-rw-r--r--src/datavisualization/engine/bars3drenderer.cpp127
-rw-r--r--src/datavisualization/engine/q3dcamera.cpp10
-rw-r--r--src/datavisualization/engine/q3dcamera.h10
-rw-r--r--src/datavisualization/engine/q3dcamera_p.h2
-rw-r--r--src/datavisualization/engine/q3dobject.cpp2
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.cpp16
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.h1
-rw-r--r--src/datavisualization/input/qabstract3dinputhandler.cpp2
-rw-r--r--src/datavisualization/input/qtouch3dinputhandler.cpp7
-rw-r--r--src/datavisualization/theme/q3dtheme.cpp15
-rw-r--r--src/datavisualizationqml2/abstractdeclarative.cpp104
-rw-r--r--src/datavisualizationqml2/abstractdeclarative_p.h26
-rw-r--r--src/datavisualizationqml2/datavisualizationqml2.pro11
-rw-r--r--src/datavisualizationqml2/designer/Bars3DSpecifics.qml190
-rw-r--r--src/datavisualizationqml2/designer/Scatter3DSpecifics.qml7
-rw-r--r--src/datavisualizationqml2/designer/Surface3DSpecifics.qml166
-rw-r--r--src/datavisualizationqml2/designer/default/Bars3D.qml38
-rw-r--r--src/datavisualizationqml2/designer/default/Scatter3D.qml38
-rw-r--r--src/datavisualizationqml2/designer/default/Surface3D.qml39
-rw-r--r--src/datavisualizationqml2/designer/designer.pri5
-rw-r--r--src/datavisualizationqml2/designer/images/bars3d-icon.pngbin784 -> 1352 bytes
-rw-r--r--src/datavisualizationqml2/designer/images/bars3d-icon16.pngbin440 -> 1232 bytes
-rw-r--r--src/datavisualizationqml2/designer/images/scatter3d-icon.pngbin880 -> 1271 bytes
-rw-r--r--src/datavisualizationqml2/designer/images/scatter3d-icon16.pngbin474 -> 1146 bytes
-rw-r--r--src/datavisualizationqml2/designer/images/surface3d-icon.pngbin941 -> 1413 bytes
-rw-r--r--src/datavisualizationqml2/designer/images/surface3d-icon16.pngbin545 -> 1231 bytes
-rw-r--r--src/datavisualizationqml2/designer/qtdatavisualization.metainfo6
-rw-r--r--src/datavisualizationqml2/enumtostringmap.cpp395
-rw-r--r--src/datavisualizationqml2/enumtostringmap_p.h53
-rw-r--r--src/datavisualizationqml2/glstatestore.cpp377
-rw-r--r--src/datavisualizationqml2/glstatestore_p.h95
-rw-r--r--src/datavisualizationqml2/plugins.qmltypes1387
-rw-r--r--tests/kinectsurface/surfacedata.cpp6
-rw-r--r--tests/multigraphs/data.cpp6
-rw-r--r--tests/qmlmultiwindow/main.cpp47
-rw-r--r--tests/qmlmultiwindow/qml/qmlmultiwindow/Data.qml48
-rw-r--r--tests/qmlmultiwindow/qml/qmlmultiwindow/NewButton.qml52
-rw-r--r--tests/qmlmultiwindow/qml/qmlmultiwindow/main.qml258
-rw-r--r--tests/qmlmultiwindow/qmlmultiwindow.pro12
-rw-r--r--tests/qmlmultiwindow/qmlmultiwindow.qrc7
-rw-r--r--tests/tests.pro3
86 files changed, 3661 insertions, 345 deletions
diff --git a/README b/README
index d17987d0..0f9f25b2 100644
--- a/README
+++ b/README
@@ -10,6 +10,8 @@ System Requirements
- Qt 5.2 or newer
- OpenGL 2.1 or newer (recommended) or OpenGL ES2 (reduced feature set)
+- Manipulating Qt Data Visualization graphs with QML Designer requires
+ Qt Creator 3.1 or newer
Building
========
@@ -76,8 +78,8 @@ Known Issues
- Anti-aliasing doesn't work with OpenGL ES2 (including Angle builds in Windows).
- Surfaces with non-straight rows and columns do not always render properly.
- Q3DLight class (and Light3D QML item) are currently not usable for anything.
-- Q3DScene::secondarySubviewOnTop property has currently no effect.
+- Changing any of Q3DScene properties affecting subviewports currently has no effect.
- The color style Q3DTheme::ColorStyleObjectGradient doesn't work for surface graphs.
- Scatter "point" meshes do not support gradients, they always use the base color.
- Widget based examples layout incorrectly in iOS.
-- QML implementation doesn't use a shared context on OSX.
+- Reparenting a graph to an item in another QQuickWindow is not supported.
diff --git a/examples/datavisualization/audiolevels/audiolevels.pro b/examples/datavisualization/audiolevels/audiolevels.pro
index 73a68471..62565b7f 100644
--- a/examples/datavisualization/audiolevels/audiolevels.pro
+++ b/examples/datavisualization/audiolevels/audiolevels.pro
@@ -1,3 +1,9 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
+requires(qtHaveModule(multimedia))
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/examples/datavisualization/bars/bars.pro b/examples/datavisualization/bars/bars.pro
index f2a1a2be..b432c0b9 100644
--- a/examples/datavisualization/bars/bars.pro
+++ b/examples/datavisualization/bars/bars.pro
@@ -1,3 +1,7 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/examples/datavisualization/bars/doc/src/bars.qdoc b/examples/datavisualization/bars/doc/src/bars.qdoc
index 58f6bdc4..361078bb 100644
--- a/examples/datavisualization/bars/doc/src/bars.qdoc
+++ b/examples/datavisualization/bars/doc/src/bars.qdoc
@@ -44,7 +44,7 @@
\snippet bars/main.cpp 0
- The call to QWidget::createWindowContainer is required, as all data visualization types
+ The call to QWidget::createWindowContainer is required, as all data visualization graph classes
(Q3DBars, Q3DScatter, Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
as a widget any other way.
diff --git a/examples/datavisualization/custominput/custominput.pro b/examples/datavisualization/custominput/custominput.pro
index 532a3f41..4c5526a4 100644
--- a/examples/datavisualization/custominput/custominput.pro
+++ b/examples/datavisualization/custominput/custominput.pro
@@ -1,3 +1,7 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/examples/datavisualization/customproxy/customproxy.pro b/examples/datavisualization/customproxy/customproxy.pro
index cb9daccf..2f39aae5 100644
--- a/examples/datavisualization/customproxy/customproxy.pro
+++ b/examples/datavisualization/customproxy/customproxy.pro
@@ -1,3 +1,7 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/examples/datavisualization/customproxy/main.cpp b/examples/datavisualization/customproxy/main.cpp
index 4ec67f4b..c9a907f6 100644
--- a/examples/datavisualization/customproxy/main.cpp
+++ b/examples/datavisualization/customproxy/main.cpp
@@ -27,7 +27,7 @@ int main(int argc, char **argv)
Q3DBars *rainfall = new Q3DBars;
rainfall->setFlags(rainfall->flags() ^ Qt::FramelessWindowHint);
- rainfall->resize(1280, 800);
+ rainfall->resize(1000, 800);
rainfall->setPosition(QPoint(10, 30));
rainfall->show();
diff --git a/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc b/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc
index a3e7a5c5..b414225f 100644
--- a/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc
+++ b/examples/datavisualization/itemmodel/doc/src/itemmodel.qdoc
@@ -41,7 +41,7 @@
\snippet itemmodel/main.cpp 0
- The call to QWidget::createWindowContainer is required, as all data visualization types
+ The call to QWidget::createWindowContainer is required, as all data visualization graph classes
(Q3DBars, Q3DScatter, and Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
as a widget any other way.
diff --git a/examples/datavisualization/itemmodel/itemmodel.pro b/examples/datavisualization/itemmodel/itemmodel.pro
index c4caa3f2..d7f52780 100644
--- a/examples/datavisualization/itemmodel/itemmodel.pro
+++ b/examples/datavisualization/itemmodel/itemmodel.pro
@@ -1,3 +1,7 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
index 3711a504..0df8d8ae 100644
--- a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
@@ -210,8 +210,9 @@ Rectangle {
id: shadowToggle
Layout.fillWidth: true
Layout.fillHeight: true
- text: "Hide Shadows"
+ text: barGraph.shadowsSupported ? "Hide Shadows" : "Shadows not supported"
clip: true
+ enabled: barGraph.shadowsSupported
onClicked: {
if (barGraph.shadowQuality == AbstractGraph3D.ShadowQualityNone) {
barGraph.shadowQuality = AbstractGraph3D.ShadowQualityMedium;
diff --git a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
index e81dd749..bdabb420 100644
--- a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
+++ b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
@@ -190,7 +190,8 @@ Rectangle {
id: shadowToggle
Layout.fillHeight: true
Layout.minimumWidth: parent.width / 3 // 3 buttons divided equally in the layout
- text: "Hide Shadows"
+ text: scatterGraph.shadowsSupported ? "Hide Shadows" : "Shadows not supported"
+ enabled: scatterGraph.shadowsSupported
onClicked: {
if (scatterGraph.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
diff --git a/examples/datavisualization/qmllegend/qml/qmllegend/main.qml b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
index 6999a67b..f7e2d803 100644
--- a/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
+++ b/examples/datavisualization/qmllegend/qml/qmllegend/main.qml
@@ -45,10 +45,7 @@ Rectangle {
Item {
id: dataView
- anchors.top: buttonLayout.bottom
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
+ anchors.fill: parent
Bars3D {
id: barGraph
@@ -99,12 +96,18 @@ Rectangle {
Rectangle {
property int legendLocation: 3
+ // Make the height and width fractional of main view height and width.
+ // Reverse the relation if screen is in portrait - this makes legend look the same
+ // if the orientation is rotated.
+ property int fractionalHeight: mainView.width > mainView.height ? mainView.height / 5 : mainView.width / 5
+ property int fractionalWidth: mainView.width > mainView.height ? mainView.width / 5 : mainView.height / 5
id: legendPanel
- width: 200
- height: 100
+ width: fractionalWidth > 150 ? fractionalWidth : 150
+ // Adjust legendpanel height to avoid gaps between layouted items.
+ height: fractionalHeight > 99 ? fractionalHeight - fractionalHeight % 3 : 99
border.color: barGraph.theme.labelTextColor
- border.width: 2
+ border.width: 3
color: "#00000000" // Transparent
//! [0]
@@ -152,7 +155,7 @@ Rectangle {
when: legendPanel.legendLocation === 1
AnchorChanges {
target: legendPanel
- anchors.top: dataView.top
+ anchors.top: buttonLayout.bottom
anchors.bottom: undefined
anchors.left: dataView.left
anchors.right: undefined
@@ -163,7 +166,7 @@ Rectangle {
when: legendPanel.legendLocation === 2
AnchorChanges {
target: legendPanel
- anchors.top: dataView.top
+ anchors.top: buttonLayout.bottom
anchors.bottom: undefined
anchors.left: undefined
anchors.right: dataView.right
diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
index 46ff2067..9f0227ae 100644
--- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
+++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
@@ -190,9 +190,9 @@ Rectangle {
surfaceGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
scatterGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
barGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
- surfaceGraph.scene.activeCamera.zoomLevel = 100
- scatterGraph.scene.activeCamera.zoomLevel = 100
- barGraph.scene.activeCamera.zoomLevel = 100
+ surfaceGraph.scene.activeCamera.zoomLevel = 100.0
+ scatterGraph.scene.activeCamera.zoomLevel = 100.0
+ barGraph.scene.activeCamera.zoomLevel = 100.0
}
function toggleMeshStyle() {
diff --git a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
index eeaeab40..81884154 100644
--- a/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
+++ b/examples/datavisualization/qmloscilloscope/qml/qmloscilloscope/main.qml
@@ -239,7 +239,7 @@ Item {
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Show Flat"
+ text: surfaceSeries.flatShadingSupported ? "Show Flat" : "Flat not supported"
enabled: surfaceSeries.flatShadingSupported
onClicked: {
diff --git a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
index 69cb2834..6664dcfd 100644
--- a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
+++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
@@ -139,7 +139,8 @@ Rectangle {
id: shadowToggle
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Hide Shadows"
+ text: scatterGraph.shadowsSupported ? "Hide Shadows" : "Shadows not supported"
+ enabled: scatterGraph.shadowsSupported
onClicked: {
if (scatterGraph.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualitySoftLow;
diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
index c38c3146..6eef6cc4 100644
--- a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
+++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
@@ -93,10 +93,7 @@ Rectangle {
yPosRole: "height"
}
//! [6]
-
- onFlatShadingSupportedChanged: {
- flatShadingToggle.text = "Flat not supported"
- }
+ onDrawModeChanged: checkState()
}
//! [4]
Surface3DSeries {
@@ -113,6 +110,8 @@ Rectangle {
minXValue: 67
maxXValue: 97
}
+
+ onDrawModeChanged: checkState()
}
//! [4]
}
@@ -135,11 +134,9 @@ Rectangle {
if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe) {
surfaceSeries.drawMode &= ~Surface3DSeries.DrawWireframe;
heightSeries.drawMode &= ~Surface3DSeries.DrawWireframe;
- text = "Show Surface Grid"
} else {
surfaceSeries.drawMode |= Surface3DSeries.DrawWireframe;
heightSeries.drawMode |= Surface3DSeries.DrawWireframe;
- text = "Hide Surface Grid"
}
}
//! [1]
@@ -155,11 +152,9 @@ Rectangle {
if (surfaceSeries.drawMode & Surface3DSeries.DrawSurface) {
surfaceSeries.drawMode &= ~Surface3DSeries.DrawSurface;
heightSeries.drawMode &= ~Surface3DSeries.DrawSurface;
- text = "Show Surface"
} else {
surfaceSeries.drawMode |= Surface3DSeries.DrawSurface;
heightSeries.drawMode |= Surface3DSeries.DrawSurface;
- text = "Hide Surface"
}
}
//! [8]
@@ -169,7 +164,7 @@ Rectangle {
id: flatShadingToggle
Layout.fillWidth: true
Layout.fillHeight: true
- text: "Show Flat"
+ text: surfaceSeries.flatShadingSupported ? "Show Flat" : "Flat not supported"
enabled: surfaceSeries.flatShadingSupported
//! [2]
onClicked: {
@@ -242,4 +237,16 @@ Rectangle {
//! [3]
}
}
+
+ function checkState() {
+ if (surfaceSeries.drawMode & Surface3DSeries.DrawSurface)
+ surfaceToggle.text = "Hide Surface"
+ else
+ surfaceToggle.text = "Show Surface"
+
+ if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe)
+ surfaceGridToggle.text = "Hide Surface Grid"
+ else
+ surfaceGridToggle.text = "Show Surface Grid"
+ }
}
diff --git a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
index 0be991bc..1c15d919 100644
--- a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
+++ b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
@@ -217,9 +217,10 @@ Item {
NewButton {
id: shadowButton
- text: "Show Shadows"
Layout.fillWidth: true
Layout.minimumHeight: 40
+ text: surfaceLayers.shadowsSupported ? "Show Shadows" : "Shadows not supported"
+ enabled: surfaceLayers.shadowsSupported
onClicked: {
if (surfaceLayers.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityLow
diff --git a/examples/datavisualization/rotations/rotations.pro b/examples/datavisualization/rotations/rotations.pro
index fbad4271..e4541692 100644
--- a/examples/datavisualization/rotations/rotations.pro
+++ b/examples/datavisualization/rotations/rotations.pro
@@ -1,3 +1,7 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/examples/datavisualization/rotations/scatterdatamodifier.cpp b/examples/datavisualization/rotations/scatterdatamodifier.cpp
index 90af63ab..c4b439b1 100644
--- a/examples/datavisualization/rotations/scatterdatamodifier.cpp
+++ b/examples/datavisualization/rotations/scatterdatamodifier.cpp
@@ -111,13 +111,13 @@ void ScatterDataModifier::generateData()
float xCenter = ellipse_a * qCos(horizontalAngle);
float zCenter = ellipse_a * qSin(horizontalAngle);
- // Rotate - arrow always tangential to origo
+ // Rotate - arrow always tangential to origin
//! [0]
QQuaternion yRotation = QQuaternion::fromAxisAndAngle(0.0f, 1.0f, 0.0f, horizontalAngle * radiansToDegrees);
//! [0]
for (float j = 0; j < m_arrowsPerLine; j++) {
- // Calculate point on ellipse centered on origo and parallel to x-axis
+ // Calculate point on ellipse centered on origin and parallel to x-axis
float verticalAngle = ((doublePi * j) / m_arrowsPerLine) + m_angleOffset;
float xUnrotated = ellipse_a * qCos(verticalAngle);
float y = ellipse_b * qSin(verticalAngle);
diff --git a/examples/datavisualization/scatter/doc/src/scatter.qdoc b/examples/datavisualization/scatter/doc/src/scatter.qdoc
index 3c9d72bc..c1eb9598 100644
--- a/examples/datavisualization/scatter/doc/src/scatter.qdoc
+++ b/examples/datavisualization/scatter/doc/src/scatter.qdoc
@@ -43,7 +43,7 @@
\snippet scatter/main.cpp 0
- The call to QWidget::createWindowContainer is required, as all data visualization types
+ The call to QWidget::createWindowContainer is required, as all data visualization graph classes
(Q3DBars, Q3DScatter, and Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
as a widget any other way.
diff --git a/examples/datavisualization/scatter/scatter.pro b/examples/datavisualization/scatter/scatter.pro
index 7f676caa..8e8514b9 100644
--- a/examples/datavisualization/scatter/scatter.pro
+++ b/examples/datavisualization/scatter/scatter.pro
@@ -1,3 +1,7 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/examples/datavisualization/surface/doc/src/surface.qdoc b/examples/datavisualization/surface/doc/src/surface.qdoc
index 14a04668..31b41c59 100644
--- a/examples/datavisualization/surface/doc/src/surface.qdoc
+++ b/examples/datavisualization/surface/doc/src/surface.qdoc
@@ -46,7 +46,7 @@
\snippet surface/main.cpp 0
- The call to QWidget::createWindowContainer is required, as all data visualization types
+ The call to QWidget::createWindowContainer is required, as all data visualization graph classes
(Q3DBars, Q3DScatter, and Q3DSurface) inherit QWindow. Any class inheriting QWindow cannot be used
as a widget any other way.
diff --git a/examples/datavisualization/surface/surface.pro b/examples/datavisualization/surface/surface.pro
index 2858f875..fb70025f 100644
--- a/examples/datavisualization/surface/surface.pro
+++ b/examples/datavisualization/surface/surface.pro
@@ -1,3 +1,7 @@
+android|ios {
+ error( "This example is not supported for android or ios." )
+}
+
!include( ../examples.pri ) {
error( "Couldn't find the examples.pri file!" )
}
diff --git a/src/datavisualization/axis/qabstract3daxis.cpp b/src/datavisualization/axis/qabstract3daxis.cpp
index 39b1230e..3a327caa 100644
--- a/src/datavisualization/axis/qabstract3daxis.cpp
+++ b/src/datavisualization/axis/qabstract3daxis.cpp
@@ -129,7 +129,7 @@ QAbstract3DAxis::~QAbstract3DAxis()
/*!
* \property QAbstract3DAxis::orientation
*
- * Defines the orientation of the axis, one of \c QAbstract3DAxis::AxisOrientation.
+ * Defines the orientation of the axis, one of AxisOrientation.
*/
QAbstract3DAxis::AxisOrientation QAbstract3DAxis::orientation() const
{
@@ -139,7 +139,7 @@ QAbstract3DAxis::AxisOrientation QAbstract3DAxis::orientation() const
/*!
* \property QAbstract3DAxis::type
*
- * Defines the type of the axis, one of \c QAbstract3DAxis::AxisType.
+ * Defines the type of the axis, one of AxisType.
*/
QAbstract3DAxis::AxisType QAbstract3DAxis::type() const
{
diff --git a/src/datavisualization/axis/qcategory3daxis.cpp b/src/datavisualization/axis/qcategory3daxis.cpp
index c1d5777a..c11a65eb 100644
--- a/src/datavisualization/axis/qcategory3daxis.cpp
+++ b/src/datavisualization/axis/qcategory3daxis.cpp
@@ -75,8 +75,8 @@ QCategory3DAxis::~QCategory3DAxis()
/*!
* \property QCategory3DAxis::labels
*
- * Defines labels for axis applied to categories. If there are fewer labels than categories, the
- * remaining ones do not have a label. If category labels are not defined explicitly, labels are
+ * Defines \a labels for axis applied to categories. If there are fewer labels than categories, the
+ * remaining ones do not have a label. If category \a labels are not defined explicitly, labels are
* generated from the data row (or column) labels of the primary series of the graph.
*/
QStringList QCategory3DAxis::labels() const
diff --git a/src/datavisualization/axis/qvalue3daxis.cpp b/src/datavisualization/axis/qvalue3daxis.cpp
index 52f1e599..0d53291d 100644
--- a/src/datavisualization/axis/qvalue3daxis.cpp
+++ b/src/datavisualization/axis/qvalue3daxis.cpp
@@ -147,7 +147,7 @@ int QValue3DAxis::subSegmentCount() const
/*!
* \property QValue3DAxis::labelFormat
*
- * Defines the label format to be used for the labels on this axis. Supported specifiers are:
+ * Defines the label \a format to be used for the labels on this axis. Supported specifiers are:
* \c {d, i, o, x, X, f, F, e, E, g, G, c}. See QString::sprintf() for additional details.
*
* Usage example:
diff --git a/src/datavisualization/data/qabstract3dseries.cpp b/src/datavisualization/data/qabstract3dseries.cpp
index 4d201c45..e593a1d9 100644
--- a/src/datavisualization/data/qabstract3dseries.cpp
+++ b/src/datavisualization/data/qabstract3dseries.cpp
@@ -126,7 +126,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty Abstract3DSeries.Mesh Abstract3DSeries::mesh
*
- * Sets the mesh of the items in the series, or the selection pointer in case of
+ * Sets the \a mesh of the items in the series, or the selection pointer in case of
* Surface3DSeries. If the \a mesh is \l{QAbstract3DSeries::MeshUserDefined}{Abstract3DSeries.MeshUserDefined},
* then the userDefinedMesh property must also be set for items to render properly.
* The default value depends on the graph type.
@@ -138,7 +138,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* If \a enable is \c true, smooth versions of predefined meshes set via mesh property are used.
* This property doesn't affect custom meshes used when mesh is
* \l{QAbstract3DSeries::MeshUserDefined}{Abstract3DSeries.MeshUserDefined}.
- * Defaults to \c false.
+ * Defaults to \c{false}.
*/
/*!
@@ -173,7 +173,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty Color Abstract3DSeries::baseColor
*
- * Sets the base \c color of the series.
+ * Sets the base \a color of the series.
* See \l{Theme3D::baseColors}{Theme3D.baseColors}
* documentation for more information.
*
@@ -183,7 +183,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty ColorGradient Abstract3DSeries::baseGradient
*
- * Sets the base \c gradient of the series.
+ * Sets the base \a gradient of the series.
* See \l{Theme3D::baseGradients}{Theme3D.baseGradients}
* documentation for more information.
*
@@ -193,7 +193,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty Color Abstract3DSeries::singleHighlightColor
*
- * Sets the single item highlight \c color of the series.
+ * Sets the single item highlight \a color of the series.
* See \l{Theme3D::singleHighlightColor}{Theme3D.singleHighlightColor}
* documentation for more information.
*
@@ -203,7 +203,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty ColorGradient Abstract3DSeries::singleHighlightGradient
*
- * Sets the single item highlight \c gradient of the series.
+ * Sets the single item highlight \a gradient of the series.
* See \l{Theme3D::singleHighlightGradient}{Theme3D.singleHighlightGradient}
* documentation for more information.
*
@@ -213,7 +213,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty Color Abstract3DSeries::multiHighlightColor
*
- * Sets the multiple item highlight \c color of the series.
+ * Sets the multiple item highlight \a color of the series.
* See \l{Theme3D::multiHighlightColor}{Theme3D.multiHighlightColor}
* documentation for more information.
*
@@ -223,7 +223,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty ColorGradient Abstract3DSeries::multiHighlightGradient
*
- * Sets the multiple item highlight \c gradient of the series.
+ * Sets the multiple item highlight \a gradient of the series.
* See \l{Theme3D::multiHighlightGradient}{Theme3D.multiHighlightGradient}
* documentation for more information.
*
@@ -299,7 +299,7 @@ QString QAbstract3DSeries::itemLabelFormat() const
* \property QAbstract3DSeries::visible
*
* Sets the visibility of the series. If \a visible is false, the series is not rendered.
- * Defaults to true.
+ * Defaults to \c{true}.
*/
void QAbstract3DSeries::setVisible(bool visible)
{
@@ -317,7 +317,7 @@ bool QAbstract3DSeries::isVisible() const
/*!
* \property QAbstract3DSeries::mesh
*
- * Sets the mesh of the items in the series, or the selection pointer in case of
+ * Sets the \a mesh of the items in the series, or the selection pointer in case of
* QSurface3DSeries. If the \a mesh is MeshUserDefined, then the userDefinedMesh property
* must also be set for items to render properly. The default value depends on the graph type.
*/
@@ -343,7 +343,7 @@ QAbstract3DSeries::Mesh QAbstract3DSeries::mesh() const
*
* If \a enable is \c true, smooth versions of predefined meshes set via mesh property are used.
* This property doesn't affect custom meshes used when mesh is MeshUserDefined.
- * Defaults to \c false.
+ * Defaults to \c{false}.
*/
void QAbstract3DSeries::setMeshSmooth(bool enable)
{
@@ -436,8 +436,8 @@ Q3DTheme::ColorStyle QAbstract3DSeries::colorStyle() const
/*!
* \property QAbstract3DSeries::baseColor
*
- * Sets the base \c color of the series.
- * See Q3DTheme::baseColor documentation for more information.
+ * Sets the base \a color of the series.
+ * See Q3DTheme::baseColors documentation for more information.
*
* \sa colorStyle
*/
@@ -458,8 +458,8 @@ QColor QAbstract3DSeries::baseColor() const
/*!
* \property QAbstract3DSeries::baseGradient
*
- * Sets the base \c gradient of the series.
- * See Q3DTheme::baseGradient documentation for more information.
+ * Sets the base \a gradient of the series.
+ * See Q3DTheme::baseGradients documentation for more information.
*
* \sa colorStyle
*/
@@ -480,7 +480,7 @@ QLinearGradient QAbstract3DSeries::baseGradient() const
/*!
* \property QAbstract3DSeries::singleHighlightColor
*
- * Sets the single item highlight \c color of the series.
+ * Sets the single item highlight \a color of the series.
* See Q3DTheme::singleHighlightColor documentation for more information.
*
* \sa colorStyle
@@ -502,7 +502,7 @@ QColor QAbstract3DSeries::singleHighlightColor() const
/*!
* \property QAbstract3DSeries::singleHighlightGradient
*
- * Sets the single item highlight \c gradient of the series.
+ * Sets the single item highlight \a gradient of the series.
* See Q3DTheme::singleHighlightGradient documentation for more information.
*
* \sa colorStyle
@@ -524,7 +524,7 @@ QLinearGradient QAbstract3DSeries::singleHighlightGradient() const
/*!
* \property QAbstract3DSeries::multiHighlightColor
*
- * Sets the multiple item highlight \c color of the series.
+ * Sets the multiple item highlight \a color of the series.
* See Q3DTheme::multiHighlightColor documentation for more information.
*
* \sa colorStyle
@@ -546,7 +546,7 @@ QColor QAbstract3DSeries::multiHighlightColor() const
/*!
* \property QAbstract3DSeries::multiHighlightGradient
*
- * Sets the multiple item highlight \c gradient of the series.
+ * Sets the multiple item highlight \a gradient of the series.
* See Q3DTheme::multiHighlightGradient documentation for more information.
*
* \sa colorStyle
@@ -568,8 +568,8 @@ QLinearGradient QAbstract3DSeries::multiHighlightGradient() const
/*!
* \property QAbstract3DSeries::name
*
- * Sets the series name.
- * Series name can be used in item label format with tag \c{@seriesName}.
+ * Sets the series \a name.
+ * Series \a name can be used in item label format with tag \c{@seriesName}.
*
* \sa itemLabelFormat
*/
diff --git a/src/datavisualization/data/qbardataproxy.cpp b/src/datavisualization/data/qbardataproxy.cpp
index d2553f32..1c1170ff 100644
--- a/src/datavisualization/data/qbardataproxy.cpp
+++ b/src/datavisualization/data/qbardataproxy.cpp
@@ -49,12 +49,14 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \typedef QtDataVisualization::QBarDataRow
+ * \relates QBarDataProxy
*
* A vector of \l {QBarDataItem}s.
*/
/*!
* \typedef QtDataVisualization::QBarDataArray
+ * \relates QBarDataProxy
*
* A list of pointers to \l {QBarDataRow}s.
*/
@@ -358,7 +360,7 @@ void QBarDataProxy::removeRows(int rowIndex, int removeCount, bool removeLabels)
/*!
* \property QBarDataProxy::rowCount
*
- * Row count in the array.
+ * Row \a count in the array.
*/
int QBarDataProxy::rowCount() const
{
@@ -368,7 +370,7 @@ int QBarDataProxy::rowCount() const
/*!
* \property QBarDataProxy::rowLabels
*
- * Optional row labels for the array. Indexes in this array match row indexes in data array.
+ * Optional row \a labels for the array. Indexes in this array match row indexes in data array.
* If the list is shorter than row count, all rows will not get labels.
*/
QStringList QBarDataProxy::rowLabels() const
@@ -387,7 +389,7 @@ void QBarDataProxy::setRowLabels(const QStringList &labels)
/*!
* \property QBarDataProxy::columnLabels
*
- * Optional column labels for the array. Indexes in this array match column indexes in rows.
+ * Optional column \a labels for the array. Indexes in this array match column indexes in rows.
* If the list is shorter than the longest row, all columns will not get labels.
*/
QStringList QBarDataProxy::columnLabels() const
diff --git a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
index 1aead1d7..56fcf5d1 100644
--- a/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qheightmapsurfacedataproxy.cpp
@@ -31,7 +31,7 @@ const float defaultMaxValue = 10.0f;
* \since Qt Data Visualization 1.0
*
* QHeightMapSurfaceDataProxy takes care of surface related height map data handling. It provides a
- * way for giving the surface plot a height map to be visualized.
+ * way to give a height map to be visualized as a surface plot.
*
* Since height maps do not contain values for X or Z axes, those values need to be given
* separately using minXValue, maxXValue, minZValue, and maxZValue properties. X-value corresponds
@@ -51,7 +51,7 @@ const float defaultMaxValue = 10.0f;
* \brief Base proxy type for Surface3D.
*
* HeightMapSurfaceDataProxy takes care of surface related height map data handling. It provides a
- * way for giving the surface plot a height map to be visualized.
+ * way to give a height map to be visualized as a surface plot.
*
* For more complete description, see QHeightMapSurfaceDataProxy.
*
@@ -123,7 +123,7 @@ QHeightMapSurfaceDataProxy::QHeightMapSurfaceDataProxy(QObject *parent) :
/*!
* Constructs QHeightMapSurfaceDataProxy with the given \a image and \a parent. Height map is set
- * by calling setHeighMap() with \a image.
+ * by calling setHeightMap() with \a image.
*
* \sa heightMap
*/
@@ -164,16 +164,17 @@ QHeightMapSurfaceDataProxy::~QHeightMapSurfaceDataProxy()
/*!
* \property QHeightMapSurfaceDataProxy::heightMap
*
- * A height map to be visualized. Setting this property replaces current data with height map data.
+ * A height map \a image to be visualized. Setting this property replaces current data with height
+ * map data.
*
- * There are several formats the image can be given in, but if it is not in a directly usable
+ * There are several formats the \a image can be given in, but if it is not in a directly usable
* format, a conversion is made. \note If the result seems wrong, the automatic conversion failed
- * and you should try converting the image yourself before setting it. Preferred format is
+ * and you should try converting the \a image yourself before setting it. Preferred format is
* QImage::Format_RGB32 in grayscale.
*
- * The height of the image is read from the red component of the pixels if the image is in grayscale,
- * otherwise it is an average calculated from red, green, and blue components of the pixels. Using
- * grayscale images may improve data conversion speed for large images.
+ * The height of the \a image is read from the red component of the pixels if the \a image is in
+ * grayscale, otherwise it is an average calculated from red, green, and blue components of the
+ * pixels. Using grayscale images may improve data conversion speed for large images.
*
* Not recommended formats: all mono formats (for example QImage::Format_Mono).
*
diff --git a/src/datavisualization/data/qitemmodelbardataproxy.cpp b/src/datavisualization/data/qitemmodelbardataproxy.cpp
index 0e880c77..2281e33f 100644
--- a/src/datavisualization/data/qitemmodelbardataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelbardataproxy.cpp
@@ -84,7 +84,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
- * \qmlproperty list ItemModelBarDataProxy::itemModel
+ * \qmlproperty model ItemModelBarDataProxy::itemModel
* The item model.
*/
@@ -110,36 +110,36 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
- * \qmlproperty list ItemModelBarDataProxy::rowCategories
+ * \qmlproperty list<String> ItemModelBarDataProxy::rowCategories
* The row categories of the mapping. Only items with row roles that are found in this list are
* included when the data is resolved. The rows are ordered in the same order as they are in this list.
*/
/*!
- * \qmlproperty list ItemModelBarDataProxy::columnCategories
+ * \qmlproperty list<String> ItemModelBarDataProxy::columnCategories
* The column categories of the mapping. Only items with column roles that are found in this list are
* included when the data is resolved. The columns are ordered in the same order as they are in this list.
*/
/*!
- * \qmlproperty list ItemModelBarDataProxy::useModelCategories
+ * \qmlproperty bool ItemModelBarDataProxy::useModelCategories
* When set to true, the mapping ignores row and column roles and categories, and uses
* the rows and columns from the model instead. Row and column headers are used for row and column
- * labels. Defaults to false.
+ * labels. Defaults to \c{false}.
*/
/*!
- * \qmlproperty list ItemModelBarDataProxy::autoRowCategories
+ * \qmlproperty bool ItemModelBarDataProxy::autoRowCategories
* When set to true, the mapping ignores any explicitly set row categories
* and overwrites them with automatically generated ones whenever the
- * data from the model is resolved. Defaults to true.
+ * data from the model is resolved. Defaults to \c{true}.
*/
/*!
- * \qmlproperty list ItemModelBarDataProxy::autoColumnCategories
+ * \qmlproperty bool ItemModelBarDataProxy::autoColumnCategories
* When set to true, the mapping ignores any explicitly set column categories
* and overwrites them with automatically generated ones whenever the
- * data from model is resolved. Defaults to true.
+ * data from model is resolved. Defaults to \c{true}.
*/
/*!
@@ -300,7 +300,7 @@ const QAbstractItemModel *QItemModelBarDataProxy::itemModel() const
/*!
* \property QItemModelBarDataProxy::rowRole
*
- * Defines the row role for the mapping.
+ * Defines the row \a role for the mapping.
*/
void QItemModelBarDataProxy::setRowRole(const QString &role)
{
@@ -318,7 +318,7 @@ QString QItemModelBarDataProxy::rowRole() const
/*!
* \property QItemModelBarDataProxy::columnRole
*
- * Defines the column role for the mapping.
+ * Defines the column \a role for the mapping.
*/
void QItemModelBarDataProxy::setColumnRole(const QString &role)
{
@@ -336,7 +336,7 @@ QString QItemModelBarDataProxy::columnRole() const
/*!
* \property QItemModelBarDataProxy::valueRole
*
- * Defines the value role for the mapping.
+ * Defines the value \a role for the mapping.
*/
void QItemModelBarDataProxy::setValueRole(const QString &role)
{
@@ -354,7 +354,7 @@ QString QItemModelBarDataProxy::valueRole() const
/*!
* \property QItemModelBarDataProxy::rotationRole
*
- * Defines the rotation role for the mapping.
+ * Defines the rotation \a role for the mapping.
*/
void QItemModelBarDataProxy::setRotationRole(const QString &role)
{
@@ -372,7 +372,7 @@ QString QItemModelBarDataProxy::rotationRole() const
/*!
* \property QItemModelBarDataProxy::rowCategories
*
- * Defines the row categories for the mapping.
+ * Defines the row \a categories for the mapping.
*/
void QItemModelBarDataProxy::setRowCategories(const QStringList &categories)
{
@@ -390,7 +390,7 @@ QStringList QItemModelBarDataProxy::rowCategories() const
/*!
* \property QItemModelBarDataProxy::columnCategories
*
- * Defines the column categories for the mapping.
+ * Defines the column \a categories for the mapping.
*/
void QItemModelBarDataProxy::setColumnCategories(const QStringList &categories)
{
@@ -409,7 +409,7 @@ QStringList QItemModelBarDataProxy::columnCategories() const
* \property QItemModelBarDataProxy::useModelCategories
*
* When set to true, the mapping ignores row and column roles and categories, and uses
- * the rows and columns from the model instead. Defaults to false.
+ * the rows and columns from the model instead. Defaults to \c{false}.
*/
void QItemModelBarDataProxy::setUseModelCategories(bool enable)
{
@@ -429,7 +429,7 @@ bool QItemModelBarDataProxy::useModelCategories() const
*
* When set to true, the mapping ignores any explicitly set row categories
* and overwrites them with automatically generated ones whenever the
- * data from model is resolved. Defaults to true.
+ * data from model is resolved. Defaults to \c{true}.
*/
void QItemModelBarDataProxy::setAutoRowCategories(bool enable)
{
@@ -449,7 +449,7 @@ bool QItemModelBarDataProxy::autoRowCategories() const
*
* When set to true, the mapping ignores any explicitly set column categories
* and overwrites them with automatically generated ones whenever the
- * data from model is resolved. Defaults to true.
+ * data from model is resolved. Defaults to \c{true}.
*/
void QItemModelBarDataProxy::setAutoColumnCategories(bool enable)
{
diff --git a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
index a5287abc..16a7b8b5 100644
--- a/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelscatterdataproxy.cpp
@@ -72,7 +72,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
- * \qmlproperty list ItemModelScatterDataProxy::itemModel
+ * \qmlproperty model ItemModelScatterDataProxy::itemModel
* The item model.
*/
@@ -190,7 +190,7 @@ const QAbstractItemModel *QItemModelScatterDataProxy::itemModel() const
/*!
* \property QItemModelScatterDataProxy::xPosRole
*
- * Defines the X position role for the mapping.
+ * Defines the X position \a role for the mapping.
*/
void QItemModelScatterDataProxy::setXPosRole(const QString &role)
{
@@ -208,7 +208,7 @@ QString QItemModelScatterDataProxy::xPosRole() const
/*!
* \property QItemModelScatterDataProxy::yPosRole
*
- * Defines the Y position role for the mapping.
+ * Defines the Y position \a role for the mapping.
*/
void QItemModelScatterDataProxy::setYPosRole(const QString &role)
{
@@ -226,7 +226,7 @@ QString QItemModelScatterDataProxy::yPosRole() const
/*!
* \property QItemModelScatterDataProxy::zPosRole
*
- * Defines the Z position role for the mapping.
+ * Defines the Z position \a role for the mapping.
*/
void QItemModelScatterDataProxy::setZPosRole(const QString &role)
{
@@ -244,12 +244,12 @@ QString QItemModelScatterDataProxy::zPosRole() const
/*!
* \property QItemModelScatterDataProxy::rotationRole
*
- * Defines the rotation role for the mapping.
+ * Defines the rotation \a role for the mapping.
*
* The model may supply the value for rotation as either variant that is directly convertible
- * to QQuartenion, or as one of the string representations: \c{"scalar,x,y,z"} or \c{"@angle,x,y,z"}. The first
- * will construct the quaternion directly with given values, and the second one will construct
- * the quaternion using QQuaternion::fromAxisAndAngle() method.
+ * to QQuaternion, or as one of the string representations: \c{"scalar,x,y,z"} or \c{"@angle,x,y,z"}.
+ * The first will construct the quaternion directly with given values, and the second one will
+ * construct the quaternion using QQuaternion::fromAxisAndAngle() method.
*/
void QItemModelScatterDataProxy::setRotationRole(const QString &role)
{
diff --git a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
index f15a8923..440ce2d6 100644
--- a/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qitemmodelsurfacedataproxy.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*
* 2) For models that do not have data already neatly sorted into rows and columns, such as
* QAbstractListModel based models, you can define a role from the model to map for each of row,
- * column and value.
+ * column and Y-position.
*
* 3) If you do not want to include all data contained in the model, or the autogenerated rows and
* columns are not ordered as you wish, you can specify which rows and columns should be included
@@ -89,7 +89,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
- * \qmlproperty list ItemModelSurfaceDataProxy::itemModel
+ * \qmlproperty model ItemModelSurfaceDataProxy::itemModel
* The item model.
*/
@@ -109,7 +109,8 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty string ItemModelSurfaceDataProxy::xPosRole
- * The X position role of the mapping.
+ * The X position role of the mapping. If this role is not defined, columnRole is used to
+ * determine the X-coordinate value of resolved QSurfaceDataItems.
*/
/*!
@@ -119,41 +120,42 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \qmlproperty string ItemModelSurfaceDataProxy::zPosRole
- * The Z position role of the mapping.
+ * The Z position role of the mapping. If this role is not defined, rowRole is used to
+ * determine the Z-coordinate value of resolved QSurfaceDataItems.
*/
/*!
- * \qmlproperty list ItemModelSurfaceDataProxy::rowCategories
+ * \qmlproperty list<String> ItemModelSurfaceDataProxy::rowCategories
* The row categories of the mapping. Only items with row roles that are found in this list are
* included when data is resolved. The rows are ordered in the same order as they are in this list.
*/
/*!
- * \qmlproperty list ItemModelSurfaceDataProxy::columnCategories
+ * \qmlproperty list<String> ItemModelSurfaceDataProxy::columnCategories
* The column categories of the mapping. Only items with column roles that are found in this list are
* included when data is resolved. The columns are ordered in the same order as they are in this list.
*/
/*!
- * \qmlproperty list ItemModelSurfaceDataProxy::useModelCategories
+ * \qmlproperty bool ItemModelSurfaceDataProxy::useModelCategories
* When set to true, the mapping ignores row and column roles and categories, and uses
- * the rows and columns from the model instead. Defaults to false.
+ * the rows and columns from the model instead. Defaults to \c{false}.
*/
/*!
- * \qmlproperty list ItemModelSurfaceDataProxy::autoRowCategories
+ * \qmlproperty bool ItemModelSurfaceDataProxy::autoRowCategories
* When set to true, the mapping ignores any explicitly set row categories
* and overwrites them with automatically generated ones whenever the
* data from model is resolved. Proxy minimum and maximum row values are also
- * autogenerated from data when this is set to true. Defaults to true.
+ * autogenerated from data when this is set to true. Defaults to \c{true}.
*/
/*!
- * \qmlproperty list ItemModelSurfaceDataProxy::autoColumnCategories
+ * \qmlproperty bool ItemModelSurfaceDataProxy::autoColumnCategories
* When set to true, the mapping ignores any explicitly set column categories
* and overwrites them with automatically generated ones whenever the
* data from model is resolved. Proxy minimum and maximum column values are also
- * autogenerated from data when this is set to true. Defaults to true.
+ * autogenerated from data when this is set to true. Defaults to \c{true}.
*/
/*!
@@ -329,7 +331,7 @@ const QAbstractItemModel *QItemModelSurfaceDataProxy::itemModel() const
/*!
* \property QItemModelSurfaceDataProxy::rowRole
*
- * Defines the row role for the mapping.
+ * Defines the row \a role for the mapping.
*/
void QItemModelSurfaceDataProxy::setRowRole(const QString &role)
{
@@ -347,7 +349,7 @@ QString QItemModelSurfaceDataProxy::rowRole() const
/*!
* \property QItemModelSurfaceDataProxy::columnRole
*
- * Defines the column role for the mapping.
+ * Defines the column \a role for the mapping.
*/
void QItemModelSurfaceDataProxy::setColumnRole(const QString &role)
{
@@ -365,7 +367,9 @@ QString QItemModelSurfaceDataProxy::columnRole() const
/*!
* \property QItemModelSurfaceDataProxy::xPosRole
*
- * Defines the X position role for the mapping.
+ * Defines the X position \a role for the mapping.
+ * If this role is not defined, columnRole is used to determine the X-coordinate
+ * value of resolved QSurfaceDataItems.
*/
void QItemModelSurfaceDataProxy::setXPosRole(const QString &role)
{
@@ -383,7 +387,7 @@ QString QItemModelSurfaceDataProxy::xPosRole() const
/*!
* \property QItemModelSurfaceDataProxy::yPosRole
*
- * Defines the Y position role for the mapping.
+ * Defines the Y position \a role for the mapping.
*/
void QItemModelSurfaceDataProxy::setYPosRole(const QString &role)
{
@@ -401,7 +405,9 @@ QString QItemModelSurfaceDataProxy::yPosRole() const
/*!
* \property QItemModelSurfaceDataProxy::zPosRole
*
- * Defines the Z position role for the mapping.
+ * Defines the Z position \a role for the mapping.
+ * If this role is not defined, rowRole is used to determine the Z-coordinate
+ * value of resolved QSurfaceDataItems.
*/
void QItemModelSurfaceDataProxy::setZPosRole(const QString &role)
{
@@ -419,7 +425,7 @@ QString QItemModelSurfaceDataProxy::zPosRole() const
/*!
* \property QItemModelSurfaceDataProxy::rowCategories
*
- * Defines the row categories for the mapping.
+ * Defines the row \a categories for the mapping.
*/
void QItemModelSurfaceDataProxy::setRowCategories(const QStringList &categories)
{
@@ -437,7 +443,7 @@ QStringList QItemModelSurfaceDataProxy::rowCategories() const
/*!
* \property QItemModelSurfaceDataProxy::columnCategories
*
- * Defines the column categories for the mapping.
+ * Defines the column \a categories for the mapping.
*/
void QItemModelSurfaceDataProxy::setColumnCategories(const QStringList &categories)
{
@@ -456,7 +462,7 @@ QStringList QItemModelSurfaceDataProxy::columnCategories() const
* \property QItemModelSurfaceDataProxy::useModelCategories
*
* When set to true, the mapping ignores row and column roles and categories, and uses
- * the rows and columns from the model instead. Defaults to false.
+ * the rows and columns from the model instead. Defaults to \c{false}.
*/
void QItemModelSurfaceDataProxy::setUseModelCategories(bool enable)
{
@@ -476,7 +482,7 @@ bool QItemModelSurfaceDataProxy::useModelCategories() const
*
* When set to true, the mapping ignores any explicitly set row categories
* and overwrites them with automatically generated ones whenever the
- * data from model is resolved. Defaults to true.
+ * data from model is resolved. Defaults to \c{true}.
*/
void QItemModelSurfaceDataProxy::setAutoRowCategories(bool enable)
{
@@ -496,7 +502,7 @@ bool QItemModelSurfaceDataProxy::autoRowCategories() const
*
* When set to true, the mapping ignores any explicitly set column categories
* and overwrites them with automatically generated ones whenever the
- * data from model is resolved. Defaults to true.
+ * data from model is resolved. Defaults to \c{true}.
*/
void QItemModelSurfaceDataProxy::setAutoColumnCategories(bool enable)
{
diff --git a/src/datavisualization/data/qscatterdataproxy.cpp b/src/datavisualization/data/qscatterdataproxy.cpp
index dbbb4384..84bb57e7 100644
--- a/src/datavisualization/data/qscatterdataproxy.cpp
+++ b/src/datavisualization/data/qscatterdataproxy.cpp
@@ -37,6 +37,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \typedef QtDataVisualization::QScatterDataArray
+ * \relates QScatterDataProxy
*
* A vector of \l {QScatterDataItem}s.
*/
diff --git a/src/datavisualization/data/qsurface3dseries.cpp b/src/datavisualization/data/qsurface3dseries.cpp
index b7e15014..72967bae 100644
--- a/src/datavisualization/data/qsurface3dseries.cpp
+++ b/src/datavisualization/data/qsurface3dseries.cpp
@@ -125,12 +125,6 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
- * \qmlproperty bool Surface3DSeries::surfaceGridEnabled
- *
- * Sets surface grid to \a enabled. It is preset to \c true by default.
- */
-
-/*!
* \qmlproperty bool Surface3DSeries::flatShadingSupported
*
* Flat shading for surfaces requires at least GLSL version 1.2 with GL_EXT_gpu_shader4 extension.
@@ -140,6 +134,13 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
+ * \qmlproperty DrawFlag Surface3DSeries::drawMode
+ *
+ * Sets the drawing \a mode to one of \l{QSurface3DSeries::DrawFlag}{Surface3DSeries.DrawFlag}.
+ * Clearing all flags is not allowed.
+ */
+
+/*!
* \enum QSurface3DSeries::DrawFlag
*
* Drawing mode of the surface. Values of this enumeration can be combined with OR operator.
@@ -283,9 +284,9 @@ bool QSurface3DSeries::isFlatShadingSupported() const
/*!
* \property QSurface3DSeries::drawMode
*
- * Sets the drawing \a mode to one of QSurface3DSeries::DrawFlag.
+ * Sets the drawing \a mode to one of DrawFlag. Clearing all flags is not allowed.
*/
-void QSurface3DSeries::setDrawMode(QSurface3DSeries::DrawFlags mode)
+void QSurface3DSeries::setDrawMode(DrawFlags mode)
{
if (dptr()->m_drawMode != mode) {
dptr()->setDrawMode(mode);
@@ -389,9 +390,14 @@ void QSurface3DSeriesPrivate::setFlatShadingEnabled(bool enabled)
void QSurface3DSeriesPrivate::setDrawMode(QSurface3DSeries::DrawFlags mode)
{
- m_drawMode = mode;
- if (m_controller)
- m_controller->markSeriesVisualsDirty();
+ if (mode.testFlag(QSurface3DSeries::DrawWireframe)
+ || mode.testFlag(QSurface3DSeries::DrawSurface)) {
+ m_drawMode = mode;
+ if (m_controller)
+ m_controller->markSeriesVisualsDirty();
+ } else {
+ qWarning("You may not clear all draw flags. Mode not changed.");
+ }
}
QT_END_NAMESPACE_DATAVISUALIZATION
diff --git a/src/datavisualization/data/qsurface3dseries.h b/src/datavisualization/data/qsurface3dseries.h
index 8347104e..64df7202 100644
--- a/src/datavisualization/data/qsurface3dseries.h
+++ b/src/datavisualization/data/qsurface3dseries.h
@@ -58,7 +58,7 @@ public:
void setFlatShadingEnabled(bool enabled);
bool isFlatShadingEnabled() const;
- void setDrawMode(QSurface3DSeries::DrawFlags mode);
+ void setDrawMode(DrawFlags mode);
QSurface3DSeries::DrawFlags drawMode() const;
bool isFlatShadingSupported() const;
diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp
index 34cea326..2e66bb5b 100644
--- a/src/datavisualization/data/qsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qsurfacedataproxy.cpp
@@ -58,12 +58,14 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
/*!
* \typedef QtDataVisualization::QSurfaceDataRow
+ * \relates QSurfaceDataProxy
*
* A vector of \l {QSurfaceDataItem}s.
*/
/*!
* \typedef QtDataVisualization::QSurfaceDataArray
+ * \relates QSurfaceDataProxy
*
* A list of pointers to \l {QSurfaceDataRow}s.
*/
diff --git a/src/datavisualization/datavisualization.pro b/src/datavisualization/datavisualization.pro
index ff87a2cd..44f0f60c 100644
--- a/src/datavisualization/datavisualization.pro
+++ b/src/datavisualization/datavisualization.pro
@@ -1,6 +1,11 @@
# Target can't start with 'Qt' as it gets major version number inserted into it in that case,
-# which we don't want.
-TARGET = DataVisualization
+# which we don't want. Exception is mac bundles, where the target name must match the module name
+mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
+ TARGET = QtDataVisualization
+} else {
+ TARGET = DataVisualization
+}
+message($$QT_CONFIG)
QT = core gui
DEFINES += QT_DATAVISUALIZATION_LIBRARY
diff --git a/src/datavisualization/doc/qtdatavisualization.qdocconf b/src/datavisualization/doc/qtdatavisualization.qdocconf
index 8bf5a012..5c871b5a 100644
--- a/src/datavisualization/doc/qtdatavisualization.qdocconf
+++ b/src/datavisualization/doc/qtdatavisualization.qdocconf
@@ -16,40 +16,42 @@ imagedirs += ../images \
images
sourcedirs += ..
+examplesinstallpath = datavisualization
+
indexes += $QT_INSTALL_DOCS/qtcore/qtcore.index \
$QT_INSTALL_DOCS/qtgui/qtgui.index \
$QT_INSTALL_DOCS/qtqml/qtqml.index \
$QT_INSTALL_DOCS/qtquick/qtquick.index \
$QT_INSTALL_DOCS/qtmultimedia/qtmultimedia.index
-qhp.projects = qtdatavisualization
-
-qhp.qtdatavisualization.file = qtdatavisualization.qhp
-qhp.qtdatavisualization.namespace = com.digia.qtdatavisualization.100
-qhp.qtdatavisualization.virtualFolder = qtdatavisualization
-qhp.qtdatavisualization.indexTitle = Qt Data Visualization
-qhp.qtdatavisualization.indexRoot =
-
-qhp.qtdatavisualization.filterAttributes = qtdatavisualization 1.0.0 qtrefdoc
-qhp.qtdatavisualization.customFilters.Qt.name = QtDataVisualization 1.0.0
-qhp.qtdatavisualization.customFilters.Qt.filterAttributes = qtdatavisualization 1.0.0
-qhp.qtdatavisualization.subprojects = gettingstarted examples classes types
-qhp.qtdatavisualization.subprojects.gettingstarted.title = Getting Started
-qhp.qtdatavisualization.subprojects.gettingstarted.indexTitle = Qt Data Visualization Getting Started
-qhp.qtdatavisualization.subprojects.gettingstarted.selectors = fake:page
-qhp.qtdatavisualization.subprojects.gettingstarted.sortPages = true
-qhp.qtdatavisualization.subprojects.examples.title = Examples
-qhp.qtdatavisualization.subprojects.examples.indexTitle = Qt Data Visualization Examples
-qhp.qtdatavisualization.subprojects.examples.selectors = fake:example
-qhp.qtdatavisualization.subprojects.examples.sortPages = true
-qhp.qtdatavisualization.subprojects.classes.title = C++ Classes
-qhp.qtdatavisualization.subprojects.classes.indexTitle = Qt Data Visualization C++ Classes
-qhp.qtdatavisualization.subprojects.classes.selectors = class
-qhp.qtdatavisualization.subprojects.classes.sortPages = true
-qhp.qtdatavisualization.subprojects.types.title = QML Types
-qhp.qtdatavisualization.subprojects.types.indexTitle = Qt Data Visualization QML Types
-qhp.qtdatavisualization.subprojects.types.selectors = fake:qmlclass
-qhp.qtdatavisualization.subprojects.types.sortPages = true
+qhp.projects = QtDataVisualization
+
+qhp.QtDataVisualization.file = qtdatavisualization.qhp
+qhp.QtDataVisualization.namespace = com.digia.qtdatavisualization.100
+qhp.QtDataVisualization.virtualFolder = qtdatavisualization
+qhp.QtDataVisualization.indexTitle = Qt Data Visualization
+qhp.QtDataVisualization.indexRoot =
+
+qhp.QtDataVisualization.filterAttributes = qtdatavisualization 1.0.0 qtrefdoc
+qhp.QtDataVisualization.customFilters.Qt.name = QtDataVisualization 1.0.0
+qhp.QtDataVisualization.customFilters.Qt.filterAttributes = qtdatavisualization 1.0.0
+qhp.QtDataVisualization.subprojects = gettingstarted examples classes types
+qhp.QtDataVisualization.subprojects.gettingstarted.title = Getting Started
+qhp.QtDataVisualization.subprojects.gettingstarted.indexTitle = Qt Data Visualization Getting Started
+qhp.QtDataVisualization.subprojects.gettingstarted.selectors = fake:page
+qhp.QtDataVisualization.subprojects.gettingstarted.sortPages = true
+qhp.QtDataVisualization.subprojects.examples.title = Examples
+qhp.QtDataVisualization.subprojects.examples.indexTitle = Qt Data Visualization Examples
+qhp.QtDataVisualization.subprojects.examples.selectors = fake:example
+qhp.QtDataVisualization.subprojects.examples.sortPages = true
+qhp.QtDataVisualization.subprojects.classes.title = C++ Classes
+qhp.QtDataVisualization.subprojects.classes.indexTitle = Qt Data Visualization C++ Classes
+qhp.QtDataVisualization.subprojects.classes.selectors = class
+qhp.QtDataVisualization.subprojects.classes.sortPages = true
+qhp.QtDataVisualization.subprojects.types.title = QML Types
+qhp.QtDataVisualization.subprojects.types.indexTitle = Qt Data Visualization QML Types
+qhp.QtDataVisualization.subprojects.types.selectors = fake:qmlclass
+qhp.QtDataVisualization.subprojects.types.sortPages = true
navigation.landingpage = Qt Data Visualization
navigation.cppclassespage = Qt Data Visualization C++ Classes
diff --git a/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp b/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp
index 8c38ca82..0c54c2fe 100644
--- a/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp
+++ b/src/datavisualization/doc/snippets/doc_src_qmldatavisualization.cpp
@@ -110,7 +110,7 @@ Item {
// Mapping model roles to surface series rows, columns, and values.
rowRole: "longitude"
columnRole: "latitude"
- valueRole: "pop_density"
+ yPosRole: "pop_density"
}
}
}
diff --git a/src/datavisualization/doc/src/qtdatavisualization-index.qdoc b/src/datavisualization/doc/src/qtdatavisualization-index.qdoc
index d593c1e9..2190dbc3 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-index.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-index.qdoc
@@ -33,7 +33,6 @@
\li QML2 support
\li Customizable axes for data - control viewable data window with axis ranges
\li Customizable input handling
- \li Customizable scene handling
\li Customizable themes
\endlist
diff --git a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
index 5b251768..891cc5c1 100644
--- a/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization-qml-abstractdeclarative.qdoc
@@ -45,6 +45,12 @@
*/
/*!
+ \qmlproperty bool AbstractGraph3D::shadowsSupported
+ This read-only property indicates if shadows are supported with the
+ current configuration or not. OpenGL ES2 configurations do not support shadows.
+ */
+
+/*!
\qmlproperty Scene3D AbstractGraph3D::scene
Read only Q3DScene that can be used to access e.g. camera object.
*/
diff --git a/src/datavisualization/doc/src/qtdatavisualization.qdoc b/src/datavisualization/doc/src/qtdatavisualization.qdoc
index e68a1086..8d1d1c32 100644
--- a/src/datavisualization/doc/src/qtdatavisualization.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization.qdoc
@@ -50,6 +50,7 @@
/*!
\group datavisualization_examples
+ \ingroup all-examples
\title Qt Data Visualization Examples
\brief Examples for the Qt Data Visualization.
@@ -138,7 +139,7 @@
\section1 Running examples
Qt Data Visualization examples are found under the \c examples subdirectory. To build and run a
- single example, for example, the qmlsurface example, navigate to the example directory and enter the
+ single example, in this case qmlsurface, navigate to the example directory and enter the
following commands:
\snippet doc_src_qtdatavisualization.cpp 8
diff --git a/src/datavisualization/engine/abstract3dcontroller.cpp b/src/datavisualization/engine/abstract3dcontroller.cpp
index d2b59c58..ec18a850 100644
--- a/src/datavisualization/engine/abstract3dcontroller.cpp
+++ b/src/datavisualization/engine/abstract3dcontroller.cpp
@@ -81,13 +81,19 @@ Abstract3DController::Abstract3DController(QRect initialViewport, Q3DScene *scen
Abstract3DController::~Abstract3DController()
{
+ destroyRenderer();
+ delete m_scene;
+ delete m_themeManager;
+}
+
+void Abstract3DController::destroyRenderer()
+{
// Renderer can be in another thread, don't delete it directly in that case
if (m_renderer && m_renderer->thread() != QThread::currentThread())
m_renderer->deleteLater();
else
delete m_renderer;
- delete m_scene;
- delete m_themeManager;
+ m_renderer = 0;
}
/**
@@ -724,6 +730,15 @@ QAbstract3DGraph::ShadowQuality Abstract3DController::shadowQuality() const
return m_shadowQuality;
}
+bool Abstract3DController::shadowsSupported() const
+{
+#if defined(QT_OPENGL_ES_2)
+ return false;
+#else
+ return true;
+#endif
+}
+
bool Abstract3DController::isSlicingActive() const
{
return m_scene->isSlicingActive();
diff --git a/src/datavisualization/engine/abstract3dcontroller_p.h b/src/datavisualization/engine/abstract3dcontroller_p.h
index f9b6588d..06be450e 100644
--- a/src/datavisualization/engine/abstract3dcontroller_p.h
+++ b/src/datavisualization/engine/abstract3dcontroller_p.h
@@ -161,6 +161,7 @@ public:
virtual ~Abstract3DController();
inline bool isInitialized() { return (m_renderer != 0); }
+ virtual void destroyRenderer();
virtual void synchDataToRenderer();
virtual void render(const GLuint defaultFboHandle = 0);
virtual void initializeOpenGL() = 0;
@@ -201,6 +202,7 @@ public:
virtual void setShadowQuality(QAbstract3DGraph::ShadowQuality quality);
virtual QAbstract3DGraph::ShadowQuality shadowQuality() const;
+ virtual bool shadowsSupported() const;
bool isSlicingActive() const;
void setSlicingActive(bool isSlicing);
diff --git a/src/datavisualization/engine/bars3dcontroller.cpp b/src/datavisualization/engine/bars3dcontroller.cpp
index 442601eb..91240259 100644
--- a/src/datavisualization/engine/bars3dcontroller.cpp
+++ b/src/datavisualization/engine/bars3dcontroller.cpp
@@ -509,8 +509,8 @@ void Bars3DController::adjustAxisRanges()
bool adjustY = (valueAxis && categoryAxisX && categoryAxisZ && valueAxis->isAutoAdjustRange());
if (adjustZ || adjustX || adjustY) {
- int maxRowCount = 1;
- int maxColumnCount = 1;
+ int maxRowCount = 0;
+ int maxColumnCount = 0;
float minValue = 0.0f;
float maxValue = 0.0f;
diff --git a/src/datavisualization/engine/bars3drenderer.cpp b/src/datavisualization/engine/bars3drenderer.cpp
index be1be0dc..78d80e47 100644
--- a/src/datavisualization/engine/bars3drenderer.cpp
+++ b/src/datavisualization/engine/bars3drenderer.cpp
@@ -1652,6 +1652,70 @@ void Bars3DRenderer::drawScene(GLuint defaultFboHandle)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_POLYGON_OFFSET_FILL);
+ // Y Labels
+ int labelNbr = 0;
+ GLfloat heightStep = m_axisCacheY.segmentStep();
+ GLfloat startLine = 0.0f;
+ int labelCount = m_axisCacheY.labels().size();
+ if (m_hasNegativeValues) {
+ if (m_noZeroInRange)
+ startLine = m_axisCacheY.min() - m_axisCacheY.max();
+ else
+ startLine = m_axisCacheY.min();
+ }
+ GLfloat labelPos = startLine;
+ GLfloat labelMarginXTrans = labelMargin;
+ GLfloat labelMarginZTrans = labelMargin;
+ GLfloat labelXTrans = rowScaleFactor;
+ GLfloat labelZTrans = columnScaleFactor;
+ QVector3D backLabelRotation(0.0f, -90.0f, 0.0f);
+ QVector3D sideLabelRotation(0.0f, 0.0f, 0.0f);
+ Qt::AlignmentFlag backAlignment = Qt::AlignLeft;
+ Qt::AlignmentFlag sideAlignment = Qt::AlignLeft;
+ if (!m_xFlipped) {
+ labelXTrans = -labelXTrans;
+ labelMarginXTrans = -labelMargin;
+ backLabelRotation.setY(90.0f);
+ sideAlignment = Qt::AlignRight;
+ }
+ if (m_zFlipped) {
+ labelZTrans = -labelZTrans;
+ labelMarginZTrans = -labelMargin;
+ backAlignment = Qt::AlignRight;
+ sideLabelRotation.setY(180.f);
+ }
+ QVector3D backLabelTrans = QVector3D(labelXTrans, 0.0f,
+ labelZTrans + labelMarginZTrans);
+ QVector3D sideLabelTrans = QVector3D(-labelXTrans - labelMarginXTrans,
+ 0.0f, -labelZTrans);
+
+ for (int i = 0; i < labelCount; i++) {
+ if (m_axisCacheY.labelItems().size() > labelNbr) {
+ backLabelTrans.setY(2.0f * labelPos / m_heightNormalizer);
+ sideLabelTrans.setY(backLabelTrans.y());
+
+ glPolygonOffset(GLfloat(i) / -10.0f, 1.0f);
+
+ const LabelItem &axisLabelItem = *m_axisCacheY.labelItems().at(labelNbr);
+
+ // Back wall
+ m_dummyBarRenderItem.setTranslation(backLabelTrans);
+ m_drawer->drawLabel(m_dummyBarRenderItem, axisLabelItem, viewMatrix, projectionMatrix,
+ zeroVector, backLabelRotation, 0, m_cachedSelectionMode,
+ m_labelShader, m_labelObj, activeCamera,
+ true, true, Drawer::LabelMid, backAlignment);
+
+ // Side wall
+ m_dummyBarRenderItem.setTranslation(sideLabelTrans);
+ m_drawer->drawLabel(m_dummyBarRenderItem, axisLabelItem, viewMatrix, projectionMatrix,
+ zeroVector, sideLabelRotation, 0, m_cachedSelectionMode,
+ m_labelShader, m_labelObj, activeCamera,
+ true, true, Drawer::LabelMid, sideAlignment);
+ }
+ labelNbr++;
+ labelPos += heightStep;
+ }
+
// Calculate the positions for row and column labels and store them
GLfloat labelYAdjustment = 0.005f;
GLfloat scaledRowWidth = rowScaleFactor;
@@ -1733,69 +1797,6 @@ void Bars3DRenderer::drawScene(GLuint defaultFboHandle)
}
}
- // Y Labels
- int labelNbr = 0;
- GLfloat heightStep = m_axisCacheY.segmentStep();
- GLfloat startLine = 0.0f;
- int labelCount = m_axisCacheY.labels().size();
- if (m_hasNegativeValues) {
- if (m_noZeroInRange)
- startLine = m_axisCacheY.min() - m_axisCacheY.max();
- else
- startLine = m_axisCacheY.min();
- }
- GLfloat labelPos = startLine;
- GLfloat labelMarginXTrans = labelMargin;
- GLfloat labelMarginZTrans = labelMargin;
- GLfloat labelXTrans = rowScaleFactor;
- GLfloat labelZTrans = columnScaleFactor;
- QVector3D backLabelRotation(0.0f, -90.0f, 0.0f);
- QVector3D sideLabelRotation(0.0f, 0.0f, 0.0f);
- Qt::AlignmentFlag backAlignment = Qt::AlignLeft;
- Qt::AlignmentFlag sideAlignment = Qt::AlignLeft;
- if (!m_xFlipped) {
- labelXTrans = -labelXTrans;
- labelMarginXTrans = -labelMargin;
- backLabelRotation.setY(90.0f);
- sideAlignment = Qt::AlignRight;
- }
- if (m_zFlipped) {
- labelZTrans = -labelZTrans;
- labelMarginZTrans = -labelMargin;
- backAlignment = Qt::AlignRight;
- sideLabelRotation.setY(180.f);
- }
- QVector3D backLabelTrans = QVector3D(labelXTrans, 0.0f,
- labelZTrans + labelMarginZTrans);
- QVector3D sideLabelTrans = QVector3D(-labelXTrans - labelMarginXTrans,
- 0.0f, -labelZTrans);
-
- for (int i = 0; i < labelCount; i++) {
- if (m_axisCacheY.labelItems().size() > labelNbr) {
- backLabelTrans.setY(2.0f * labelPos / m_heightNormalizer);
- sideLabelTrans.setY(backLabelTrans.y());
-
- glPolygonOffset(GLfloat(i) / -10.0f, 1.0f);
-
- const LabelItem &axisLabelItem = *m_axisCacheY.labelItems().at(labelNbr);
-
- // Back wall
- m_dummyBarRenderItem.setTranslation(backLabelTrans);
- m_drawer->drawLabel(m_dummyBarRenderItem, axisLabelItem, viewMatrix, projectionMatrix,
- zeroVector, backLabelRotation, 0, m_cachedSelectionMode,
- m_labelShader, m_labelObj, activeCamera,
- true, true, Drawer::LabelMid, backAlignment);
-
- // Side wall
- m_dummyBarRenderItem.setTranslation(sideLabelTrans);
- m_drawer->drawLabel(m_dummyBarRenderItem, axisLabelItem, viewMatrix, projectionMatrix,
- zeroVector, sideLabelRotation, 0, m_cachedSelectionMode,
- m_labelShader, m_labelObj, activeCamera,
- true, true, Drawer::LabelMid, sideAlignment);
- }
- labelNbr++;
- labelPos += heightStep;
- }
glDisable(GL_POLYGON_OFFSET_FILL);
// Handle selected bar label generation
diff --git a/src/datavisualization/engine/q3dcamera.cpp b/src/datavisualization/engine/q3dcamera.cpp
index c7342aa9..50f2e319 100644
--- a/src/datavisualization/engine/q3dcamera.cpp
+++ b/src/datavisualization/engine/q3dcamera.cpp
@@ -403,12 +403,12 @@ void Q3DCamera::setCameraPreset(CameraPreset preset)
* This property contains the the camera zoom level in percentage. \c 100.0f means there is no zoom
* in or out set in the camera.
*/
-int Q3DCamera::zoomLevel() const
+float Q3DCamera::zoomLevel() const
{
return d_ptr->m_zoomLevel;
}
-void Q3DCamera::setZoomLevel(int zoomLevel)
+void Q3DCamera::setZoomLevel(float zoomLevel)
{
if (d_ptr->m_zoomLevel != zoomLevel) {
d_ptr->m_zoomLevel = zoomLevel;
@@ -479,9 +479,9 @@ Q3DCameraPrivate::Q3DCameraPrivate(Q3DCamera *q) :
m_minYRotation(0.0f),
m_maxXRotation(180.0f),
m_maxYRotation(90.0f),
+ m_zoomLevel(100.0f),
m_wrapXRotation(true),
m_wrapYRotation(false),
- m_zoomLevel(100),
m_activePreset(Q3DCamera::CameraPresetNone)
{
}
@@ -642,7 +642,7 @@ void Q3DCameraPrivate::updateViewMatrix(float zoomAdjustment)
if (!m_isViewMatrixUpdateActive)
return;
- int zoom = m_zoomLevel * zoomAdjustment;
+ GLfloat zoom = m_zoomLevel * zoomAdjustment;
QMatrix4x4 viewMatrix;
// Apply to view matrix
@@ -656,7 +656,7 @@ void Q3DCameraPrivate::updateViewMatrix(float zoomAdjustment)
// y rotation is always "clean"
viewMatrix.rotate(m_yRotation, 1.0f, 0.0f, 0.0f);
// handle zoom by scaling
- viewMatrix.scale((GLfloat)zoom / 100.0f);
+ viewMatrix.scale(zoom / 100.0f);
// Compensate for translation (if d_ptr->m_target is off origin)
viewMatrix.translate(-m_target.x(), -m_target.y(), -m_target.z());
diff --git a/src/datavisualization/engine/q3dcamera.h b/src/datavisualization/engine/q3dcamera.h
index 87602e5c..277035f4 100644
--- a/src/datavisualization/engine/q3dcamera.h
+++ b/src/datavisualization/engine/q3dcamera.h
@@ -31,7 +31,7 @@ class QT_DATAVISUALIZATION_EXPORT Q3DCamera : public Q3DObject
Q_ENUMS(CameraPreset)
Q_PROPERTY(float xRotation READ xRotation WRITE setXRotation NOTIFY xRotationChanged)
Q_PROPERTY(float yRotation READ yRotation WRITE setYRotation NOTIFY yRotationChanged)
- Q_PROPERTY(int zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY zoomLevelChanged)
+ Q_PROPERTY(float zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY zoomLevelChanged)
Q_PROPERTY(CameraPreset cameraPreset READ cameraPreset WRITE setCameraPreset NOTIFY cameraPresetChanged)
Q_PROPERTY(bool wrapXRotation READ wrapXRotation WRITE setWrapXRotation NOTIFY wrapXRotationChanged)
Q_PROPERTY(bool wrapYRotation READ wrapYRotation WRITE setWrapYRotation NOTIFY wrapYRotationChanged)
@@ -84,15 +84,15 @@ public:
CameraPreset cameraPreset() const;
void setCameraPreset(CameraPreset preset);
- int zoomLevel() const;
- void setZoomLevel(int zoomLevel);
+ float zoomLevel() const;
+ void setZoomLevel(float zoomLevel);
- void setCameraPosition(float horizontal, float vertical, float distance = 100.0f);
+ void setCameraPosition(float horizontal, float vertical, float zoom = 100.0f);
signals:
void xRotationChanged(float rotation);
void yRotationChanged(float rotation);
- void zoomLevelChanged(int zoomLevel);
+ void zoomLevelChanged(float zoomLevel);
void cameraPresetChanged(CameraPreset preset);
void wrapXRotationChanged(bool isEnabled);
void wrapYRotationChanged(bool isEnabled);
diff --git a/src/datavisualization/engine/q3dcamera_p.h b/src/datavisualization/engine/q3dcamera_p.h
index 884229e3..01e7a508 100644
--- a/src/datavisualization/engine/q3dcamera_p.h
+++ b/src/datavisualization/engine/q3dcamera_p.h
@@ -96,9 +96,9 @@ public:
GLfloat m_minYRotation;
GLfloat m_maxXRotation;
GLfloat m_maxYRotation;
+ GLfloat m_zoomLevel;
bool m_wrapXRotation;
bool m_wrapYRotation;
- int m_zoomLevel;
Q3DCamera::CameraPreset m_activePreset;
friend class Bars3DRenderer;
diff --git a/src/datavisualization/engine/q3dobject.cpp b/src/datavisualization/engine/q3dobject.cpp
index cda4a370..05edf287 100644
--- a/src/datavisualization/engine/q3dobject.cpp
+++ b/src/datavisualization/engine/q3dobject.cpp
@@ -33,7 +33,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
*/
/*!
- * Constructs a new 3D object with position set to origo by default. An
+ * Constructs a new 3D object with position set to origin by default. An
* optional \a parent parameter can be given and is then passed to QObject constructor.
*/
Q3DObject::Q3DObject(QObject *parent) :
diff --git a/src/datavisualization/engine/qabstract3dgraph.cpp b/src/datavisualization/engine/qabstract3dgraph.cpp
index f2102b29..bde5b585 100644
--- a/src/datavisualization/engine/qabstract3dgraph.cpp
+++ b/src/datavisualization/engine/qabstract3dgraph.cpp
@@ -317,7 +317,7 @@ QAbstract3DGraph::SelectionFlags QAbstract3DGraph::selectionMode() const
* \c ShadowQualityMedium by default.
*
* \note If setting ShadowQuality of a certain level fails, a level is lowered
- * until it is successful and shadowQualityChanged signal is emitted for each time the change is
+ * until it is successful and \c shadowQualityChanged signal is emitted for each time the change is
* done.
*/
void QAbstract3DGraph::setShadowQuality(ShadowQuality quality)
@@ -331,9 +331,18 @@ QAbstract3DGraph::ShadowQuality QAbstract3DGraph::shadowQuality() const
}
/*!
+ * \return true if shadows are supported with the current configuration.
+ * OpenGL ES2 configurations do not support shadows.
+ */
+bool QAbstract3DGraph::shadowsSupported() const
+{
+ return d_ptr->m_visualController->shadowsSupported();
+}
+
+/*!
* \property QAbstract3DGraph::scene
*
- * This property contains the read only Q3DScene that can be used to access for example a camera object.
+ * This property contains the read only Q3DScene that can be used to access, for example, a camera object.
*/
Q3DScene *QAbstract3DGraph::scene() const
{
@@ -450,6 +459,9 @@ QAbstract3DGraphPrivate::QAbstract3DGraphPrivate(QAbstract3DGraph *q)
QAbstract3DGraphPrivate::~QAbstract3DGraphPrivate()
{
+ if (m_context)
+ m_context->makeCurrent(q_ptr);
+
delete m_visualController;
}
diff --git a/src/datavisualization/engine/qabstract3dgraph.h b/src/datavisualization/engine/qabstract3dgraph.h
index adf67912..f11bbd90 100644
--- a/src/datavisualization/engine/qabstract3dgraph.h
+++ b/src/datavisualization/engine/qabstract3dgraph.h
@@ -89,6 +89,7 @@ public:
void setShadowQuality(ShadowQuality quality);
ShadowQuality shadowQuality() const;
+ virtual bool shadowsSupported() const;
Q3DScene *scene() const;
diff --git a/src/datavisualization/input/qabstract3dinputhandler.cpp b/src/datavisualization/input/qabstract3dinputhandler.cpp
index 5360eb38..9e1e314c 100644
--- a/src/datavisualization/input/qabstract3dinputhandler.cpp
+++ b/src/datavisualization/input/qabstract3dinputhandler.cpp
@@ -139,7 +139,7 @@ void QAbstract3DInputHandler::wheelEvent(QWheelEvent *event)
* \property QAbstract3DInputHandler::inputView
*
* Current enumerated input view based on the view of the processed input events.
- * When the view changes inputViewChanged() is emitted.
+ * When the view changes \c inputViewChanged signal is emitted.
*/
QAbstract3DInputHandler::InputView QAbstract3DInputHandler::inputView() const
{
diff --git a/src/datavisualization/input/qtouch3dinputhandler.cpp b/src/datavisualization/input/qtouch3dinputhandler.cpp
index da84b33f..d40fbf5a 100644
--- a/src/datavisualization/input/qtouch3dinputhandler.cpp
+++ b/src/datavisualization/input/qtouch3dinputhandler.cpp
@@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
const float maxTapAndHoldJitter = 20.0f;
const int maxPinchJitter = 10;
-#if defined (Q_OS_ANDROID)
+#if defined (Q_OS_ANDROID) || defined(Q_OS_IOS)
const int maxSelectionJitter = 10;
#else
const int maxSelectionJitter = 5;
@@ -102,6 +102,8 @@ void QTouch3DInputHandler::touchEvent(QTouchEvent *event)
} else if (points.count() == 1) {
QPointF pointerPos = points.at(0).pos();
if (event->type() == QEvent::TouchBegin) {
+ // Flush input state
+ d_ptr->m_inputState = QAbstract3DInputHandlerPrivate::InputStateNone;
if (scene()->isSlicingActive()) {
if (scene()->isPointInPrimarySubView(pointerPos.toPoint()))
setInputView(InputViewOnPrimary);
@@ -123,7 +125,8 @@ void QTouch3DInputHandler::touchEvent(QTouchEvent *event)
setInputView(InputViewNone);
d_ptr->m_holdTimer->stop();
// Handle possible selection
- if (QAbstract3DInputHandlerPrivate::InputStatePinching != d_ptr->m_inputState)
+ if (!scene()->isSlicingActive()
+ && QAbstract3DInputHandlerPrivate::InputStatePinching != d_ptr->m_inputState)
d_ptr->handleSelection(pointerPos);
} else if (event->type() == QEvent::TouchUpdate) {
if (!scene()->isSlicingActive()) {
diff --git a/src/datavisualization/theme/q3dtheme.cpp b/src/datavisualization/theme/q3dtheme.cpp
index a3703779..83da96f8 100644
--- a/src/datavisualization/theme/q3dtheme.cpp
+++ b/src/datavisualization/theme/q3dtheme.cpp
@@ -56,20 +56,21 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* \li List of colors for the objects in the graph. Colors are applied to series one by one.
* If there are more series than colors, the color list is reused from the start.
* The colors in this property are used if colorStyle is ColorStyleUniform. This can be
- * overridden by setting the baseColor explicitly in series.
+ * overridden by setting the \l{QAbstract3DSeries::baseColor}{baseColor} explicitly in series.
* \li Qt::black
* \row
* \li baseGradients
* \li List of gradients for the objects in the graph. Gradients are applied to series one by
* one. If there are more series than gradients, the gradient list is reused from the start.
* The gradients in this property are used if colorStyle is ColorStyleObjectGradient or
- * ColorStyleRangeGradient. This can be overridden by setting the baseGradient explicitly
- * in series.
+ * ColorStyleRangeGradient. This can be overridden by setting the
+ * \l{QAbstract3DSeries::baseGradient}{baseGradient} explicitly in series.
* \li QLinearGradient(). Essentially fully black.
* \row
* \li colorStyle
* \li The color style of the objects in the graph. See ColorStyle for detailed description of
- * the styles. This can be overridden by setting the colorStyle explicitly in series.
+ * the styles. This can be overridden by setting the
+ * \l{QAbstract3DSeries::colorStyle}{colorStyle} explicitly in series.
* \li ColorStyleUniform
* \row
* \li \l font
@@ -170,15 +171,15 @@ QT_BEGIN_NAMESPACE_DATAVISUALIZATION
* Color styles.
*
* \value ColorStyleUniform
- * Objects are rendered in a single color. The color used is specified in baseColor,
+ * Objects are rendered in a single color. The color used is specified in baseColors,
* singleHighlightColor and multiHighlightColor properties.
* \value ColorStyleObjectGradient
* Objects are colored using a full gradient for each object regardless of object height. The
- * gradient used is specified in baseGradient, singleHighlightGradient and
+ * gradient used is specified in baseGradients, singleHighlightGradient and
* multiHighlightGradient properties.
* \value ColorStyleRangeGradient
* Objects are colored using a portion of the full gradient determined by the object's
- * height and its position on the Y-axis. The gradient used is specified in baseGradient,
+ * height and its position on the Y-axis. The gradient used is specified in baseGradients,
* singleHighlightGradient and multiHighlightGradient properties.
*/
diff --git a/src/datavisualizationqml2/abstractdeclarative.cpp b/src/datavisualizationqml2/abstractdeclarative.cpp
index ce74d541..56cad310 100644
--- a/src/datavisualizationqml2/abstractdeclarative.cpp
+++ b/src/datavisualizationqml2/abstractdeclarative.cpp
@@ -21,7 +21,6 @@
#include "declarativetheme_p.h"
#include "declarativerendernode_p.h"
-#include <QtCore/QThread>
#include <QtGui/QGuiApplication>
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -33,8 +32,6 @@ static QHash<QQuickWindow *, bool> windowClearList;
AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
QQuickItem(parent),
m_controller(0),
- m_context(0),
- m_qtContext(0),
m_contextWindow(0),
m_renderMode(RenderIndirect),
#if defined(QT_OPENGL_ES_2)
@@ -43,23 +40,43 @@ AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
m_samples(4),
#endif
m_windowSamples(0),
- m_initialisedSize(0, 0)
+ m_initialisedSize(0, 0),
+#ifdef USE_SHARED_CONTEXT
+ m_context(0),
+#else
+ m_stateStore(0),
+#endif
+ m_qtContext(0),
+ m_mainThread(QThread::currentThread()),
+ m_contextThread(0)
{
connect(this, &QQuickItem::windowChanged, this, &AbstractDeclarative::handleWindowChanged);
setAntialiasing(m_samples > 0);
// Set contents to false in case we are in qml designer to make component look nice
- setFlag(ItemHasContents, QGuiApplication::applicationDisplayName() != "Qml2Puppet");
+ m_runningInDesigner = QGuiApplication::applicationDisplayName() == "Qml2Puppet";
+ setFlag(ItemHasContents, !m_runningInDesigner);
}
AbstractDeclarative::~AbstractDeclarative()
{
-#if !defined(Q_OS_MAC)
+#ifdef USE_SHARED_CONTEXT
// Context can be in another thread, don't delete it directly in that case
- if (m_context && m_context->thread() != QThread::currentThread())
- m_context->deleteLater();
- else
+ if (m_contextThread && m_contextThread != m_mainThread) {
+ if (m_context)
+ m_context->deleteLater();
+ m_context = 0;
+ } else {
delete m_context;
+ }
+#else
+ if (m_contextThread && m_contextThread != m_mainThread) {
+ if (m_stateStore)
+ m_stateStore->deleteLater();
+ m_stateStore = 0;
+ } else {
+ delete m_stateStore;
+ }
#endif
disconnect(this, 0, this, 0);
@@ -97,7 +114,7 @@ void AbstractDeclarative::setRenderingMode(AbstractDeclarative::RenderingMode mo
break;
case RenderIndirect:
m_initialisedSize = QSize(0, 0);
- setFlag(ItemHasContents, true);
+ setFlag(ItemHasContents, !m_runningInDesigner);
update();
if (win) {
QObject::disconnect(win, &QQuickWindow::beforeRendering, this,
@@ -123,7 +140,7 @@ AbstractDeclarative::RenderingMode AbstractDeclarative::renderingMode() const
QSGNode *AbstractDeclarative::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
{
QSize boundingSize = boundingRect().size().toSize() * m_controller->scene()->devicePixelRatio();
- if (boundingSize.width() <= 0 || boundingSize.height() <= 0
+ if (m_runningInDesigner || boundingSize.width() <= 0 || boundingSize.height() <= 0
|| m_controller.isNull() || !window()) {
delete oldNode;
return 0;
@@ -186,6 +203,11 @@ AbstractDeclarative::ShadowQuality AbstractDeclarative::shadowQuality() const
return ShadowQuality(m_controller->shadowQuality());
}
+bool AbstractDeclarative::shadowsSupported() const
+{
+ return m_controller->shadowsSupported();
+}
+
void AbstractDeclarative::setSharedController(Abstract3DController *controller)
{
Q_ASSERT(controller);
@@ -216,28 +238,62 @@ void AbstractDeclarative::setSharedController(Abstract3DController *controller)
void AbstractDeclarative::activateOpenGLContext(QQuickWindow *window)
{
-#if !defined(Q_OS_MAC)
- if (!m_context || m_contextWindow != window) {
- m_contextWindow = window;
+#ifdef USE_SHARED_CONTEXT
+ // We can assume we are not in middle of AbstractDeclarative destructor when we are here,
+ // since m_context creation is always done when this function is called from
+ // synchDataToRenderer(), which blocks main thread -> no need to mutex.
+ if (!m_context || !m_qtContext || m_contextWindow != window) {
+ QOpenGLContext *currentContext = QOpenGLContext::currentContext();
+
+ // Note: Changing graph to different window when using multithreaded renderer will break!
+
delete m_context;
- m_qtContext = QOpenGLContext::currentContext();
+
+ m_contextThread = QThread::currentThread();
+ m_contextWindow = window;
+ m_qtContext = currentContext;
+
m_context = new QOpenGLContext();
- m_context->setFormat(window->requestedFormat());
+ m_context->setFormat(m_qtContext->format());
m_context->setShareContext(m_qtContext);
m_context->create();
+
+ m_context->makeCurrent(window);
+ m_controller->initializeOpenGL();
+ } else {
+ m_context->makeCurrent(window);
}
- m_context->makeCurrent(window);
#else
- Q_UNUSED(window)
+ // Shared contexts don't work properly in some platforms, so just store the
+ // context state on those
+ if (!m_stateStore || !m_qtContext || m_contextWindow != window) {
+ QOpenGLContext *currentContext = QOpenGLContext::currentContext();
+
+ // Note: Changing graph to different window when using multithreaded renderer will break!
+
+ delete m_stateStore;
+
+ m_contextThread = QThread::currentThread();
+ m_contextWindow = window;
+ m_qtContext = currentContext;
+
+ m_stateStore = new GLStateStore(QOpenGLContext::currentContext());
+
+ m_stateStore->storeGLState();
+ m_controller->initializeOpenGL();
+ } else {
+ m_stateStore->storeGLState();
+ }
#endif
}
void AbstractDeclarative::doneOpenGLContext(QQuickWindow *window)
{
-#if !defined(Q_OS_MAC)
+#ifdef USE_SHARED_CONTEXT
m_qtContext->makeCurrent(window);
#else
Q_UNUSED(window)
+ m_stateStore->restoreGLState();
#endif
}
@@ -248,7 +304,6 @@ void AbstractDeclarative::synchDataToRenderer()
QQuickWindow *win = window();
activateOpenGLContext(win);
- m_controller->initializeOpenGL();
m_controller->synchDataToRenderer();
doneOpenGLContext(win);
}
@@ -355,12 +410,13 @@ void AbstractDeclarative::updateWindowParameters()
if (directRender) {
// Origin mapping is needed when rendering directly to background
QPointF point = QQuickItem::mapToScene(QPointF(0.0, 0.0));
- scene->d_ptr->setViewport(QRect(point.x(), point.y(), m_cachedGeometry.width(),
- m_cachedGeometry.height()));
+ scene->d_ptr->setViewport(QRect(point.x() + 0.5f, point.y() + 0.5f,
+ m_cachedGeometry.width() + 0.5f,
+ m_cachedGeometry.height() + 0.5f));
} else {
// No translation needed when rendering to FBO
- scene->d_ptr->setViewport(QRect(0.0, 0.0, m_cachedGeometry.width(),
- m_cachedGeometry.height()));
+ scene->d_ptr->setViewport(QRect(0.0, 0.0, m_cachedGeometry.width() + 0.5f,
+ m_cachedGeometry.height() + 0.5f));
}
}
}
diff --git a/src/datavisualizationqml2/abstractdeclarative_p.h b/src/datavisualizationqml2/abstractdeclarative_p.h
index d44a154d..0a18dc25 100644
--- a/src/datavisualizationqml2/abstractdeclarative_p.h
+++ b/src/datavisualizationqml2/abstractdeclarative_p.h
@@ -38,6 +38,15 @@
#include <QtQuick/QQuickItem>
#include <QtQuick/QQuickWindow>
#include <QtCore/QPointer>
+#include <QtCore/QThread>
+
+#if !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
+#define USE_SHARED_CONTEXT
+#endif
+
+#ifndef USE_SHARED_CONTEXT
+#include "glstatestore_p.h"
+#endif
QT_BEGIN_NAMESPACE_DATAVISUALIZATION
@@ -51,6 +60,7 @@ class AbstractDeclarative : public QQuickItem
Q_FLAGS(SelectionFlag SelectionFlags)
Q_PROPERTY(SelectionFlags selectionMode READ selectionMode WRITE setSelectionMode NOTIFY selectionModeChanged)
Q_PROPERTY(ShadowQuality shadowQuality READ shadowQuality WRITE setShadowQuality NOTIFY shadowQualityChanged)
+ Q_PROPERTY(bool shadowsSupported READ shadowsSupported NOTIFY shadowsSupportedChanged)
Q_PROPERTY(int msaaSamples READ msaaSamples WRITE setMsaaSamples NOTIFY msaaSamplesChanged)
Q_PROPERTY(Declarative3DScene* scene READ scene NOTIFY sceneChanged)
Q_PROPERTY(QAbstract3DInputHandler* inputHandler READ inputHandler WRITE setInputHandler NOTIFY inputHandlerChanged)
@@ -101,6 +111,8 @@ public:
virtual void setShadowQuality(ShadowQuality quality);
virtual AbstractDeclarative::ShadowQuality shadowQuality() const;
+ virtual bool shadowsSupported() const;
+
virtual void setMsaaSamples(int samples);
virtual int msaaSamples() const;
@@ -149,6 +161,7 @@ protected:
signals:
void selectionModeChanged(SelectionFlags mode);
void shadowQualityChanged(ShadowQuality quality);
+ void shadowsSupportedChanged(bool supported);
void msaaSamplesChanged(int samples);
void sceneChanged(Q3DScene *scene);
void inputHandlerChanged(QAbstract3DInputHandler *inputHandler);
@@ -158,13 +171,20 @@ signals:
private:
QPointer<Abstract3DController> m_controller;
QRectF m_cachedGeometry;
- QOpenGLContext *m_context;
- QOpenGLContext *m_qtContext;
- QQuickWindow *m_contextWindow;
+ QPointer<QQuickWindow> m_contextWindow;
AbstractDeclarative::RenderingMode m_renderMode;
int m_samples;
int m_windowSamples;
QSize m_initialisedSize;
+#ifdef USE_SHARED_CONTEXT
+ QOpenGLContext *m_context;
+#else
+ GLStateStore *m_stateStore;
+#endif
+ QPointer<QOpenGLContext> m_qtContext;
+ QThread *m_mainThread;
+ QThread *m_contextThread;
+ bool m_runningInDesigner;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(AbstractDeclarative::SelectionFlags)
diff --git a/src/datavisualizationqml2/datavisualizationqml2.pro b/src/datavisualizationqml2/datavisualizationqml2.pro
index df6c647d..7c65d69e 100644
--- a/src/datavisualizationqml2/datavisualizationqml2.pro
+++ b/src/datavisualizationqml2/datavisualizationqml2.pro
@@ -26,7 +26,9 @@ SOURCES += \
declarativetheme.cpp \
declarativecolor.cpp \
declarativescene.cpp \
- declarativerendernode.cpp
+ declarativerendernode.cpp \
+ glstatestore.cpp \
+ enumtostringmap.cpp
HEADERS += \
datavisualizationqml2_plugin.h \
@@ -39,7 +41,9 @@ HEADERS += \
declarativetheme_p.h \
declarativecolor_p.h \
declarativescene_p.h \
- declarativerendernode_p.h
+ declarativerendernode_p.h \
+ glstatestore_p.h \
+ enumtostringmap_p.h
OTHER_FILES = qmldir
@@ -56,3 +60,6 @@ load(qml_plugin)
QMAKE_EXTRA_TARGETS += copy_qmldir
PRE_TARGETDEPS += $$copy_qmldir.target
}
+
+QML_FILES += \
+ $$PWD/plugins.qmltypes
diff --git a/src/datavisualizationqml2/designer/Bars3DSpecifics.qml b/src/datavisualizationqml2/designer/Bars3DSpecifics.qml
index ce07f88c..e52320ac 100644
--- a/src/datavisualizationqml2/designer/Bars3DSpecifics.qml
+++ b/src/datavisualizationqml2/designer/Bars3DSpecifics.qml
@@ -19,6 +19,7 @@
import QtQuick 2.0
import HelperWidgets 2.0
import QtQuick.Layouts 1.0
+import QtQuick.Controls 1.1 as Controls
Column {
anchors.left: parent.left
@@ -48,11 +49,11 @@ Column {
}
SecondColumnLayout {
SpinBox {
- backendValue: backendValues.barThickness // Why does this export value as string?
- minimumValue: 0.001
- maximumValue: 10.0
- stepSize: 0.001
- decimals: 3
+ backendValue: backendValues.barThickness
+ minimumValue: 0.01
+ maximumValue: 100.0
+ stepSize: 0.01
+ decimals: 2
Layout.fillWidth: true
}
}
@@ -64,7 +65,7 @@ Column {
SecondColumnLayout {
SpinBox {
prefix: "col: "
- backendValue: backendValues.barSpacing.width // Does not work
+ backendValue: backendValues.barSpacing_width
minimumValue: 0.0
maximumValue: 10.0
stepSize: 0.01
@@ -73,7 +74,7 @@ Column {
}
SpinBox {
prefix: "row: "
- backendValue: backendValues.barSpacing.height // Does not work
+ backendValue: backendValues.barSpacing_height
minimumValue: 0.0
maximumValue: 10.0
stepSize: 0.01
@@ -100,9 +101,10 @@ Column {
SecondColumnLayout {
ComboBox {
backendValue: backendValues.renderingMode
- model: ["RenderIndirect", "RenderDirectoToBackground",
- "RenderDirectoToBackground_NoClear"]
+ model: ["RenderIndirect", "RenderDirectToBackground",
+ "RenderDirectToBackground_NoClear"]
Layout.fillWidth: true
+ scope: "AbstractGraph3D"
}
}
Label {
@@ -129,6 +131,7 @@ Column {
"ShadowQualityHigh", "ShadowQualitySoftLow", "ShadowQualitySoftMedium",
"ShadowQualitySoftHigh"]
Layout.fillWidth: true
+ scope: "AbstractGraph3D"
}
}
Label {
@@ -137,31 +140,152 @@ Column {
Layout.fillWidth: true
}
SecondColumnLayout {
- ComboBox {
- backendValue: backendValues.selectionMode
- model: [
- "SelectionNone",
- "SelectionItem",
- "SelectionRow",
- "SelectionItemAndRow",
- "SelectionColumn",
- "SelectionItemAndColumn",
- "SelectionRowAndColumn",
- "SelectionItemRowAndColumn",
- "SelectionRow | SelectionSlice",
- "SelectionItemAndRow | SelectionSlice",
- "SelectionColumn | SelectionSlice",
- "SelectionItemAndColumn | SelectionSlice",
- "SelectionRow | SelectionMultiSeries",
- "SelectionItemAndRow | SelectionMultiSeries",
- "SelectionColumn | SelectionMultiSeries",
- "SelectionItemAndColumn | SelectionMultiSeries",
- "SelectionRow | SelectionSlice | SelectionMultiSeries",
- "SelectionItemAndRow | SelectionSlice | SelectionMultiSeries",
- "SelectionColumn | SelectionSlice | SelectionMultiSeries",
- "SelectionItemAndColumn | SelectionSlice | SelectionMultiSeries"
- ]
+ id: selectionLayout
+ property bool isInModel: backendValue.isInModel;
+ property bool isInSubState: backendValue.isInSubState;
+ property bool selectionChangedFlag: selectionChanged
+ property variant backendValue: backendValues.selectionMode
+ property variant valueFromBackend: backendValue.value
+ property string enumScope: "AbstractGraph3D"
+ property string enumSeparator: " | "
+ property int checkedCount: 0
+ property bool selectionItem: false
+ property bool selectionRow: false
+ property bool selectionColumn: false
+ property bool selectionSlice: false
+ property bool selectionMulti: false
+
+ function checkValue(checkedVariable, variableText, expressionBase) {
+ var expressionStr = expressionBase
+ if (checkedVariable) {
+ if (expressionStr !== "") {
+ expressionStr += enumSeparator
+ }
+ expressionStr += enumScope
+ expressionStr += "."
+ expressionStr += variableText
+ checkedCount++
+ }
+ return expressionStr
+ }
+
+ function composeSelectionMode() {
+ var expressionStr = ""
+ checkedCount = 0
+ expressionStr = checkValue(selectionItem, "SelectionItem", expressionStr)
+ expressionStr = checkValue(selectionRow, "SelectionRow", expressionStr)
+ expressionStr = checkValue(selectionColumn, "SelectionColumn", expressionStr)
+ expressionStr = checkValue(selectionSlice, "SelectionSlice", expressionStr)
+ expressionStr = checkValue(selectionMulti, "SelectionMultiSeries", expressionStr)
+
+ if (checkedCount === 0)
+ backendValue.expression = enumScope + ".SelectionNone"
+ else
+ backendValue.expression = expressionStr
+ }
+
+ function evaluate() {
+ if (backendValue.value === undefined)
+ return
+
+ selectionItem = (backendValue.expression.indexOf("SelectionItem") !== -1)
+ selectionRow = (backendValue.expression.indexOf("SelectionRow") !== -1)
+ selectionColumn = (backendValue.expression.indexOf("SelectionColumn") !== -1)
+ selectionSlice = (backendValue.expression.indexOf("SelectionSlice") !== -1)
+ selectionMulti = (backendValue.expression.indexOf("SelectionMultiSeries") !== -1)
+
+ selectionItemBox.checked = selectionItem
+ selectionRowBox.checked = selectionRow
+ selectionColumnBox.checked = selectionColumn
+ selectionSliceBox.checked = selectionSlice
+ selectionMultiSeriesBox.checked = selectionMulti
+ }
+
+ onSelectionChangedFlagChanged: evaluate()
+
+ onIsInModelChanged: evaluate()
+
+ onIsInSubStateChanged: evaluate()
+
+ onBackendValueChanged: evaluate()
+
+ onValueFromBackendChanged: evaluate()
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ Controls.CheckBox {
+ id: selectionItemBox
+ style: checkBox.style
+ text: "SelectionItem"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionItem = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionRowBox
+ style: checkBox.style
+ text: "SelectionRow"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionRow = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionColumnBox
+ style: checkBox.style
+ text: "SelectionColumn"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionColumn = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionSliceBox
+ style: checkBox.style
+ text: "SelectionSlice"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionSlice = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionMultiSeriesBox
+ style: checkBox.style
+ text: "SelectionMultiSeries"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionMulti = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ }
+ }
+ // Kept for debugging
+ Label { }
+ SecondColumnLayout {
+ TextEdit {
+ id: debugLabel
Layout.fillWidth: true
+ wrapMode: TextEdit.WordWrap
+ textFormat: TextEdit.RichText
+ width: 400
+ visible: false
+ }
+ }
+ Controls.CheckBox {
+ property color textColor: colorLogic.textColor
+ id: checkBox
+ style: CustomCheckBoxStyle {}
+ visible: false
+ ColorLogic {
+ id: colorLogic
+ backendValue: backendValues.selectionMode
}
}
}
diff --git a/src/datavisualizationqml2/designer/Scatter3DSpecifics.qml b/src/datavisualizationqml2/designer/Scatter3DSpecifics.qml
index 9ba6bf00..b9a9ef97 100644
--- a/src/datavisualizationqml2/designer/Scatter3DSpecifics.qml
+++ b/src/datavisualizationqml2/designer/Scatter3DSpecifics.qml
@@ -38,9 +38,10 @@ Column {
SecondColumnLayout {
ComboBox {
backendValue: backendValues.renderingMode
- model: ["RenderIndirect", "RenderDirectoToBackground",
- "RenderDirectoToBackground_NoClear"]
+ model: ["RenderIndirect", "RenderDirectToBackground",
+ "RenderDirectToBackground_NoClear"]
Layout.fillWidth: true
+ scope: "AbstractGraph3D"
}
}
Label {
@@ -67,6 +68,7 @@ Column {
"ShadowQualityHigh", "ShadowQualitySoftLow", "ShadowQualitySoftMedium",
"ShadowQualitySoftHigh"]
Layout.fillWidth: true
+ scope: "AbstractGraph3D"
}
}
Label {
@@ -79,6 +81,7 @@ Column {
backendValue: backendValues.selectionMode
model: ["SelectionNone", "SelectionItem"]
Layout.fillWidth: true
+ scope: "AbstractGraph3D"
}
}
}
diff --git a/src/datavisualizationqml2/designer/Surface3DSpecifics.qml b/src/datavisualizationqml2/designer/Surface3DSpecifics.qml
index edd109e0..74470e4b 100644
--- a/src/datavisualizationqml2/designer/Surface3DSpecifics.qml
+++ b/src/datavisualizationqml2/designer/Surface3DSpecifics.qml
@@ -19,6 +19,7 @@
import QtQuick 2.0
import HelperWidgets 2.0
import QtQuick.Layouts 1.0
+import QtQuick.Controls 1.1 as Controls
Column {
anchors.left: parent.left
@@ -38,9 +39,10 @@ Column {
SecondColumnLayout {
ComboBox {
backendValue: backendValues.renderingMode
- model: ["RenderIndirect", "RenderDirectoToBackground",
- "RenderDirectoToBackground_NoClear"]
+ model: ["RenderIndirect", "RenderDirectToBackground",
+ "RenderDirectToBackground_NoClear"]
Layout.fillWidth: true
+ scope: "AbstractGraph3D"
}
}
Label {
@@ -67,6 +69,7 @@ Column {
"ShadowQualityHigh", "ShadowQualitySoftLow", "ShadowQualitySoftMedium",
"ShadowQualitySoftHigh"]
Layout.fillWidth: true
+ scope: "AbstractGraph3D"
}
}
Label {
@@ -75,21 +78,152 @@ Column {
Layout.fillWidth: true
}
SecondColumnLayout {
- ComboBox {
- backendValue: backendValues.selectionMode
- model: [
- "SelectionNone",
- "SelectionItem",
- "SelectionRow | SelectionSlice",
- "SelectionItemAndRow | SelectionSlice",
- "SelectionColumn | SelectionSlice",
- "SelectionItemAndColumn | SelectionSlice",
- "SelectionRow | SelectionSlice | SelectionMultiSeries",
- "SelectionItemAndRow | SelectionSlice | SelectionMultiSeries",
- "SelectionColumn | SelectionSlice | SelectionMultiSeries",
- "SelectionItemAndColumn | SelectionSlice | SelectionMultiSeries"
- ]
+ id: selectionLayout
+ property bool isInModel: backendValue.isInModel;
+ property bool isInSubState: backendValue.isInSubState;
+ property bool selectionChangedFlag: selectionChanged
+ property variant backendValue: backendValues.selectionMode
+ property variant valueFromBackend: backendValue.value
+ property string enumScope: "AbstractGraph3D"
+ property string enumSeparator: " | "
+ property int checkedCount: 0
+ property bool selectionItem: false
+ property bool selectionRow: false
+ property bool selectionColumn: false
+ property bool selectionSlice: false
+ property bool selectionMulti: false
+
+ function checkValue(checkedVariable, variableText, expressionBase) {
+ var expressionStr = expressionBase
+ if (checkedVariable) {
+ if (expressionStr !== "") {
+ expressionStr += enumSeparator
+ }
+ expressionStr += enumScope
+ expressionStr += "."
+ expressionStr += variableText
+ checkedCount++
+ }
+ return expressionStr
+ }
+
+ function composeSelectionMode() {
+ var expressionStr = ""
+ checkedCount = 0
+ expressionStr = checkValue(selectionItem, "SelectionItem", expressionStr)
+ expressionStr = checkValue(selectionRow, "SelectionRow", expressionStr)
+ expressionStr = checkValue(selectionColumn, "SelectionColumn", expressionStr)
+ expressionStr = checkValue(selectionSlice, "SelectionSlice", expressionStr)
+ expressionStr = checkValue(selectionMulti, "SelectionMultiSeries", expressionStr)
+
+ if (checkedCount === 0)
+ backendValue.expression = enumScope + ".SelectionNone"
+ else
+ backendValue.expression = expressionStr
+ }
+
+ function evaluate() {
+ if (backendValue.value === undefined)
+ return
+
+ selectionItem = (backendValue.expression.indexOf("SelectionItem") !== -1)
+ selectionRow = (backendValue.expression.indexOf("SelectionRow") !== -1)
+ selectionColumn = (backendValue.expression.indexOf("SelectionColumn") !== -1)
+ selectionSlice = (backendValue.expression.indexOf("SelectionSlice") !== -1)
+ selectionMulti = (backendValue.expression.indexOf("SelectionMultiSeries") !== -1)
+
+ selectionItemBox.checked = selectionItem
+ selectionRowBox.checked = selectionRow
+ selectionColumnBox.checked = selectionColumn
+ selectionSliceBox.checked = selectionSlice
+ selectionMultiSeriesBox.checked = selectionMulti
+ }
+
+ onSelectionChangedFlagChanged: evaluate()
+
+ onIsInModelChanged: evaluate()
+
+ onIsInSubStateChanged: evaluate()
+
+ onBackendValueChanged: evaluate()
+
+ onValueFromBackendChanged: evaluate()
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ Controls.CheckBox {
+ id: selectionItemBox
+ style: checkBox.style
+ text: "SelectionItem"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionItem = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionRowBox
+ style: checkBox.style
+ text: "SelectionRow"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionRow = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionColumnBox
+ style: checkBox.style
+ text: "SelectionColumn"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionColumn = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionSliceBox
+ style: checkBox.style
+ text: "SelectionSlice"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionSlice = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ Controls.CheckBox {
+ id: selectionMultiSeriesBox
+ style: checkBox.style
+ text: "SelectionMultiSeries"
+ Layout.fillWidth: true
+ onClicked: {
+ selectionLayout.selectionMulti = checked
+ selectionLayout.composeSelectionMode()
+ }
+ }
+ }
+ }
+ // Kept for debugging
+ Label { }
+ SecondColumnLayout {
+ TextEdit {
+ id: debugLabel
Layout.fillWidth: true
+ wrapMode: TextEdit.WordWrap
+ textFormat: TextEdit.RichText
+ width: 400
+ visible: false
+ }
+ }
+ Controls.CheckBox {
+ property color textColor: colorLogic.textColor
+ id: checkBox
+ style: CustomCheckBoxStyle {}
+ visible: false
+ ColorLogic {
+ id: colorLogic
+ backendValue: backendValues.selectionMode
}
}
}
diff --git a/src/datavisualizationqml2/designer/default/Bars3D.qml b/src/datavisualizationqml2/designer/default/Bars3D.qml
new file mode 100644
index 00000000..9f8c72e3
--- /dev/null
+++ b/src/datavisualizationqml2/designer/default/Bars3D.qml
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtDataVisualization 1.0
+
+Bars3D {
+ width: 300
+ height: 300
+ Bar3DSeries {
+ ItemModelBarDataProxy {
+ itemModel: ListModel {
+ ListElement{ row: "row 1"; column: "column 1"; value: "1"; }
+ ListElement{ row: "row 1"; column: "column 2"; value: "2"; }
+ ListElement{ row: "row 1"; column: "column 3"; value: "3"; }
+ }
+
+ rowRole: "row"
+ columnRole: "column"
+ valueRole: "value"
+ }
+ }
+}
diff --git a/src/datavisualizationqml2/designer/default/Scatter3D.qml b/src/datavisualizationqml2/designer/default/Scatter3D.qml
new file mode 100644
index 00000000..d38a9755
--- /dev/null
+++ b/src/datavisualizationqml2/designer/default/Scatter3D.qml
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtDataVisualization 1.0
+
+Scatter3D {
+ width: 300
+ height: 300
+ Scatter3DSeries {
+ ItemModelScatterDataProxy {
+ itemModel: ListModel {
+ ListElement{ x: "1"; y: "2"; z: "3"; }
+ ListElement{ x: "2"; y: "3"; z: "4"; }
+ ListElement{ x: "3"; y: "4"; z: "1"; }
+ }
+
+ xPosRole: "x"
+ yPosRole: "y"
+ zPosRole: "z"
+ }
+ }
+}
diff --git a/src/datavisualizationqml2/designer/default/Surface3D.qml b/src/datavisualizationqml2/designer/default/Surface3D.qml
new file mode 100644
index 00000000..fde097df
--- /dev/null
+++ b/src/datavisualizationqml2/designer/default/Surface3D.qml
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtDataVisualization 1.0
+
+Surface3D {
+ width: 300
+ height: 300
+ Surface3DSeries {
+ ItemModelSurfaceDataProxy {
+ itemModel: ListModel {
+ ListElement{ row: "1"; column: "1"; y: "1"; }
+ ListElement{ row: "1"; column: "2"; y: "2"; }
+ ListElement{ row: "2"; column: "1"; y: "3"; }
+ ListElement{ row: "2"; column: "2"; y: "4"; }
+ }
+
+ rowRole: "row"
+ columnRole: "column"
+ yPosRole: "y"
+ }
+ }
+}
diff --git a/src/datavisualizationqml2/designer/designer.pri b/src/datavisualizationqml2/designer/designer.pri
index db7c9b96..e22fb618 100644
--- a/src/datavisualizationqml2/designer/designer.pri
+++ b/src/datavisualizationqml2/designer/designer.pri
@@ -1,7 +1,10 @@
QML_FILES += \
$$PWD/Bars3DSpecifics.qml \
$$PWD/Scatter3DSpecifics.qml \
- $$PWD/Surface3DSpecifics.qml
+ $$PWD/Surface3DSpecifics.qml \
+ $$PWD/default/Bars3D.qml \
+ $$PWD/default/Scatter3D.qml \
+ $$PWD/default/Surface3D.qml
QML_FILES += $$PWD/qtdatavisualization.metainfo
diff --git a/src/datavisualizationqml2/designer/images/bars3d-icon.png b/src/datavisualizationqml2/designer/images/bars3d-icon.png
index 3312602e..7f380789 100644
--- a/src/datavisualizationqml2/designer/images/bars3d-icon.png
+++ b/src/datavisualizationqml2/designer/images/bars3d-icon.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/bars3d-icon16.png b/src/datavisualizationqml2/designer/images/bars3d-icon16.png
index b21c825e..e85ff502 100644
--- a/src/datavisualizationqml2/designer/images/bars3d-icon16.png
+++ b/src/datavisualizationqml2/designer/images/bars3d-icon16.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/scatter3d-icon.png b/src/datavisualizationqml2/designer/images/scatter3d-icon.png
index f8487a90..e1ac5c1f 100644
--- a/src/datavisualizationqml2/designer/images/scatter3d-icon.png
+++ b/src/datavisualizationqml2/designer/images/scatter3d-icon.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/scatter3d-icon16.png b/src/datavisualizationqml2/designer/images/scatter3d-icon16.png
index 6fb41943..75b2db18 100644
--- a/src/datavisualizationqml2/designer/images/scatter3d-icon16.png
+++ b/src/datavisualizationqml2/designer/images/scatter3d-icon16.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/surface3d-icon.png b/src/datavisualizationqml2/designer/images/surface3d-icon.png
index bc1e4ee0..956c675e 100644
--- a/src/datavisualizationqml2/designer/images/surface3d-icon.png
+++ b/src/datavisualizationqml2/designer/images/surface3d-icon.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/images/surface3d-icon16.png b/src/datavisualizationqml2/designer/images/surface3d-icon16.png
index 917dcdf9..6caa643e 100644
--- a/src/datavisualizationqml2/designer/images/surface3d-icon16.png
+++ b/src/datavisualizationqml2/designer/images/surface3d-icon16.png
Binary files differ
diff --git a/src/datavisualizationqml2/designer/qtdatavisualization.metainfo b/src/datavisualizationqml2/designer/qtdatavisualization.metainfo
index 0d7b14be..60b2b2c2 100644
--- a/src/datavisualizationqml2/designer/qtdatavisualization.metainfo
+++ b/src/datavisualizationqml2/designer/qtdatavisualization.metainfo
@@ -9,6 +9,8 @@ MetaInfo {
libraryIcon: "images/bars3d-icon.png"
version: "1.0"
requiredImport: "QtDataVisualization"
+
+ QmlSource { source: "default/Bars3D.qml" }
}
}
Type {
@@ -21,6 +23,8 @@ MetaInfo {
libraryIcon: "images/scatter3d-icon.png"
version: "1.0"
requiredImport: "QtDataVisualization"
+
+ QmlSource { source: "default/Scatter3D.qml" }
}
}
Type {
@@ -33,6 +37,8 @@ MetaInfo {
libraryIcon: "images/surface3d-icon.png"
version: "1.0"
requiredImport: "QtDataVisualization"
+
+ QmlSource { source: "default/Surface3D.qml" }
}
}
}
diff --git a/src/datavisualizationqml2/enumtostringmap.cpp b/src/datavisualizationqml2/enumtostringmap.cpp
new file mode 100644
index 00000000..249fbae3
--- /dev/null
+++ b/src/datavisualizationqml2/enumtostringmap.cpp
@@ -0,0 +1,395 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+#include "enumtostringmap_p.h"
+#include <QString>
+#include <QDebug>
+
+#ifdef VERBOSE_STATE_STORE
+
+static EnumToStringMap *theInstance = 0;
+static unsigned int theInstanceCount = 0;
+
+EnumToStringMap *EnumToStringMap::newInstance()
+{
+ if (theInstance) {
+ theInstanceCount++;
+ return theInstance;
+ }
+
+ theInstance = new EnumToStringMap();
+ theInstanceCount++;
+ return theInstance;
+}
+
+void EnumToStringMap::deleteInstance()
+{
+ theInstanceCount--;
+ if (theInstanceCount <= 0) {
+ delete theInstance;
+ theInstance = 0;
+ }
+}
+
+EnumToStringMap::EnumToStringMap() :
+ m_unknown("<unknown>")
+{
+ m_map[GL_ZERO] = "ZERO/null";
+
+ m_map[GL_DEPTH_BUFFER_BIT] = "DEPTH_BUFFER_BIT";
+ m_map[GL_STENCIL_BUFFER_BIT] = "STENCIL_BUFFER_BIT";
+ m_map[GL_COLOR_BUFFER_BIT] = "COLOR_BUFFER_BIT";
+
+ m_map[GL_STENCIL_BUFFER_BIT] = "STENCIL_BUFFER_BIT";
+ m_map[GL_COLOR_BUFFER_BIT] = "COLOR_BUFFER_BIT";
+
+ m_map[GL_POINTS] = "POINTS";
+ m_map[GL_LINES] = "LINES";
+ m_map[GL_LINE_LOOP] = "LINE_LOOP";
+ m_map[GL_LINE_STRIP] = "LINE_STRIP";
+ m_map[GL_TRIANGLES] = "TRIANGLES";
+ m_map[GL_TRIANGLE_STRIP] = "TRIANGLE_STRIP";
+ m_map[GL_TRIANGLE_FAN] = "TRIANGLE_FAN";
+
+ m_map[GL_SRC_COLOR] = "SRC_COLOR";
+ m_map[GL_ONE_MINUS_SRC_COLOR] = "ONE_MINUS_SRC_COLOR";
+ m_map[GL_SRC_ALPHA] = "SRC_ALPHA";
+ m_map[GL_ONE_MINUS_SRC_ALPHA] = "ONE_MINUS_SRC_ALPHA";
+ m_map[GL_DST_ALPHA] = "DST_ALPHA";
+ m_map[GL_ONE_MINUS_DST_ALPHA] = "ONE_MINUS_DST_ALPHA";
+
+ m_map[GL_DST_COLOR] = "DST_COLOR";
+ m_map[GL_ONE_MINUS_DST_COLOR] = "ONE_MINUS_DST_COLOR";
+ m_map[GL_SRC_ALPHA_SATURATE] = "SRC_ALPHA_SATURATE";
+
+ m_map[GL_FUNC_ADD] = "FUNC_ADD";
+ m_map[GL_BLEND_EQUATION] = "BLEND_EQUATION";
+ m_map[GL_BLEND_EQUATION_RGB] = "BLEND_EQUATION_RGB";
+ m_map[GL_BLEND_EQUATION_ALPHA] = "BLEND_EQUATION_ALPHA";
+
+ m_map[GL_FUNC_SUBTRACT] = "FUNC_SUBTRACT";
+ m_map[GL_FUNC_REVERSE_SUBTRACT] = "FUNC_REVERSE_SUBTRACT";
+
+ m_map[GL_BLEND_DST_RGB] = "BLEND_DST_RGB";
+ m_map[GL_BLEND_SRC_RGB] = "BLEND_SRC_RGB";
+ m_map[GL_BLEND_DST_ALPHA] = "BLEND_DST_ALPHA";
+ m_map[GL_BLEND_SRC_ALPHA] = "BLEND_SRC_ALPHA";
+ m_map[GL_CONSTANT_COLOR] = "CONSTANT_COLOR";
+ m_map[GL_ONE_MINUS_CONSTANT_COLOR] = "ONE_MINUS_CONSTANT_COLOR";
+ m_map[GL_CONSTANT_ALPHA] = "CONSTANT_ALPHA";
+ m_map[GL_ONE_MINUS_CONSTANT_ALPHA] = "ONE_MINUS_CONSTANT_ALPHA";
+ m_map[GL_BLEND_COLOR] = "BLEND_COLOR";
+
+ m_map[GL_ARRAY_BUFFER] = "ARRAY_BUFFER";
+ m_map[GL_ELEMENT_ARRAY_BUFFER] = "ELEMENT_ARRAY_BUFFER";
+ m_map[GL_ARRAY_BUFFER_BINDING] = "ARRAY_BUFFER_BINDING";
+ m_map[GL_ELEMENT_ARRAY_BUFFER_BINDING] = "ELEMENT_ARRAY_BUFFER_BINDING";
+
+ m_map[GL_STREAM_DRAW] = "STREAM_DRAW";
+ m_map[GL_STATIC_DRAW] = "STATIC_DRAW";
+ m_map[GL_DYNAMIC_DRAW] = "DYNAMIC_DRAW";
+
+ m_map[GL_BUFFER_SIZE] = "BUFFER_SIZE";
+ m_map[GL_BUFFER_USAGE] = "BUFFER_USAGE";
+
+ m_map[GL_CURRENT_VERTEX_ATTRIB] = "CURRENT_VERTEX_ATTRIB";
+
+ m_map[GL_FRONT] = "FRONT";
+ m_map[GL_BACK] = "BACK";
+ m_map[GL_FRONT_AND_BACK] = "FRONT_AND_BACK";
+
+ m_map[GL_CULL_FACE] = "CULL_FACE";
+ m_map[GL_BLEND] = "BLEND";
+ m_map[GL_DITHER] = "DITHER";
+ m_map[GL_STENCIL_TEST] = "STENCIL_TEST";
+ m_map[GL_DEPTH_TEST] = "DEPTH_TEST";
+ m_map[GL_SCISSOR_TEST] = "SCISSOR_TEST";
+ m_map[GL_POLYGON_OFFSET_FILL] = "POLYGON_OFFSET_FILL";
+ m_map[GL_SAMPLE_ALPHA_TO_COVERAGE] = "SAMPLE_ALPHA_TO_COVERAGE";
+ m_map[GL_SAMPLE_COVERAGE] = "SAMPLE_COVERAGE";
+
+ m_map[GL_NO_ERROR] = "NO_ERROR";
+ m_map[GL_INVALID_ENUM] = "INVALID_ENUM";
+ m_map[GL_INVALID_VALUE] = "INVALID_VALUE";
+ m_map[GL_INVALID_OPERATION] = "INVALID_OPERATION";
+ m_map[GL_OUT_OF_MEMORY] = "OUT_OF_MEMORY";
+
+ m_map[GL_CW] = "CW";
+ m_map[GL_CCW] = "CCW";
+
+ m_map[GL_LINE_WIDTH] = "LINE_WIDTH";
+ m_map[GL_ALIASED_POINT_SIZE_RANGE] = "ALIASED_POINT_SIZE_RANGE";
+ m_map[GL_ALIASED_LINE_WIDTH_RANGE] = "ALIASED_LINE_WIDTH_RANGE";
+ m_map[GL_CULL_FACE_MODE] = "CULL_FACE_MODE";
+ m_map[GL_FRONT_FACE] = "FRONT_FACE";
+ m_map[GL_DEPTH_RANGE] = "DEPTH_RANGE";
+ m_map[GL_DEPTH_WRITEMASK] = "DEPTH_WRITEMASK";
+ m_map[GL_DEPTH_CLEAR_VALUE] = "DEPTH_CLEAR_VALUE";
+ m_map[GL_DEPTH_FUNC] = "DEPTH_FUNC";
+ m_map[GL_STENCIL_CLEAR_VALUE] = "STENCIL_CLEAR_VALUE";
+ m_map[GL_STENCIL_FUNC] = "STENCIL_FUNC";
+ m_map[GL_STENCIL_FAIL] = "STENCIL_FAIL";
+ m_map[GL_STENCIL_PASS_DEPTH_FAIL] = "STENCIL_PASS_DEPTH_FAIL";
+ m_map[GL_STENCIL_PASS_DEPTH_PASS] = "STENCIL_PASS_DEPTH_PASS";
+ m_map[GL_STENCIL_REF] = "STENCIL_REF";
+ m_map[GL_STENCIL_VALUE_MASK] = "STENCIL_VALUE_MASK";
+ m_map[GL_STENCIL_WRITEMASK] = "STENCIL_WRITEMASK";
+ m_map[GL_STENCIL_BACK_FUNC] = "STENCIL_BACK_FUNC";
+ m_map[GL_STENCIL_BACK_FAIL] = "STENCIL_BACK_FAIL";
+ m_map[GL_STENCIL_BACK_PASS_DEPTH_FAIL] = "STENCIL_BACK_PASS_DEPTH_FAIL";
+ m_map[GL_STENCIL_BACK_PASS_DEPTH_PASS] = "STENCIL_BACK_PASS_DEPTH_PASS";
+ m_map[GL_STENCIL_BACK_REF] = "STENCIL_BACK_REF";
+ m_map[GL_STENCIL_BACK_VALUE_MASK] = "STENCIL_BACK_VALUE_MASK";
+ m_map[GL_STENCIL_BACK_WRITEMASK] = "STENCIL_BACK_WRITEMASK";
+ m_map[GL_VIEWPORT] = "VIEWPORT";
+ m_map[GL_SCISSOR_BOX] = "SCISSOR_BOX";
+
+ m_map[GL_COLOR_CLEAR_VALUE] = "COLOR_CLEAR_VALUE";
+ m_map[GL_COLOR_WRITEMASK] = "COLOR_WRITEMASK";
+ m_map[GL_UNPACK_ALIGNMENT] = "UNPACK_ALIGNMENT";
+ m_map[GL_PACK_ALIGNMENT] = "PACK_ALIGNMENT";
+ m_map[GL_MAX_TEXTURE_SIZE] = "MAX_TEXTURE_SIZE";
+ m_map[GL_MAX_VIEWPORT_DIMS] = "MAX_VIEWPORT_DIMS";
+ m_map[GL_SUBPIXEL_BITS] = "SUBPIXEL_BITS";
+ m_map[GL_RED_BITS] = "RED_BITS";
+ m_map[GL_GREEN_BITS] = "GREEN_BITS";
+ m_map[GL_BLUE_BITS] = "BLUE_BITS";
+ m_map[GL_ALPHA_BITS] = "ALPHA_BITS";
+ m_map[GL_DEPTH_BITS] = "DEPTH_BITS";
+ m_map[GL_STENCIL_BITS] = "STENCIL_BITS";
+ m_map[GL_POLYGON_OFFSET_UNITS] = "POLYGON_OFFSET_UNITS";
+
+ m_map[GL_POLYGON_OFFSET_FACTOR] = "POLYGON_OFFSET_FACTOR";
+ m_map[GL_TEXTURE_BINDING_2D] = "TEXTURE_BINDING_2D";
+ m_map[GL_SAMPLE_BUFFERS] = "SAMPLE_BUFFERS";
+ m_map[GL_SAMPLES] = "SAMPLES";
+ m_map[GL_SAMPLE_COVERAGE_VALUE] = "SAMPLE_COVERAGE_VALUE";
+ m_map[GL_SAMPLE_COVERAGE_INVERT] = "SAMPLE_COVERAGE_INVERT";
+
+ m_map[GL_COMPRESSED_TEXTURE_FORMATS] = "COMPRESSED_TEXTURE_FORMATS";
+
+ m_map[GL_DONT_CARE] = "DONT_CARE";
+ m_map[GL_FASTEST] = "FASTEST";
+ m_map[GL_NICEST] = "NICEST";
+
+ m_map[GL_GENERATE_MIPMAP_HINT] = "GENERATE_MIPMAP_HINT";
+
+ m_map[GL_BYTE] = "BYTE";
+ m_map[GL_UNSIGNED_BYTE] = "UNSIGNED_BYTE";
+ m_map[GL_SHORT] = "SHORT";
+ m_map[GL_UNSIGNED_SHORT] = "UNSIGNED_SHORT";
+ m_map[GL_INT] = "INT";
+ m_map[GL_UNSIGNED_INT] = "UNSIGNED_INT";
+ m_map[GL_FLOAT] = "FLOAT";
+
+ m_map[GL_DEPTH_COMPONENT] = "DEPTH_COMPONENT";
+ m_map[GL_ALPHA] = "ALPHA";
+ m_map[GL_RGB] = "RGB";
+ m_map[GL_RGBA] = "RGBA";
+ m_map[GL_LUMINANCE] = "LUMINANCE";
+ m_map[GL_LUMINANCE_ALPHA] = "LUMINANCE_ALPHA";
+
+ m_map[GL_UNSIGNED_SHORT_4_4_4_4] = "UNSIGNED_SHORT_4_4_4_4";
+ m_map[GL_UNSIGNED_SHORT_5_5_5_1] = "UNSIGNED_SHORT_5_5_5_1";
+ m_map[GL_UNSIGNED_SHORT_5_6_5] = "UNSIGNED_SHORT_5_6_5";
+
+ m_map[GL_FRAGMENT_SHADER] = "FRAGMENT_SHADER";
+ m_map[GL_VERTEX_SHADER] = "VERTEX_SHADER";
+ m_map[GL_MAX_VERTEX_ATTRIBS] = "MAX_VERTEX_ATTRIBS";
+ m_map[GL_MAX_VERTEX_UNIFORM_VECTORS] = "MAX_VERTEX_UNIFORM_VECTORS";
+ m_map[GL_MAX_VARYING_VECTORS] = "MAX_VARYING_VECTORS";
+ m_map[GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS] = "MAX_COMBINED_TEXTURE_IMAGE_UNITS";
+ m_map[GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS] = "MAX_VERTEX_TEXTURE_IMAGE_UNITS";
+ m_map[GL_MAX_TEXTURE_IMAGE_UNITS] = "MAX_TEXTURE_IMAGE_UNITS";
+ m_map[GL_MAX_FRAGMENT_UNIFORM_VECTORS] = "MAX_FRAGMENT_UNIFORM_VECTORS";
+ m_map[GL_SHADER_TYPE] = "SHADER_TYPE";
+ m_map[GL_DELETE_STATUS] = "DELETE_STATUS";
+ m_map[GL_LINK_STATUS] = "LINK_STATUS";
+ m_map[GL_VALIDATE_STATUS] = "VALIDATE_STATUS";
+ m_map[GL_ATTACHED_SHADERS] = "ATTACHED_SHADERS";
+ m_map[GL_ACTIVE_UNIFORMS] = "ACTIVE_UNIFORMS";
+ m_map[GL_ACTIVE_ATTRIBUTES] = "ACTIVE_ATTRIBUTES";
+ m_map[GL_SHADING_LANGUAGE_VERSION] = "SHADING_LANGUAGE_VERSION";
+ m_map[GL_CURRENT_PROGRAM] = "CURRENT_PROGRAM";
+
+ m_map[GL_NEVER] = "NEVER";
+ m_map[GL_LESS] = "LESS";
+ m_map[GL_EQUAL] = "EQUAL";
+ m_map[GL_LEQUAL] = "LEQUAL";
+ m_map[GL_GREATER] = "GREATER";
+ m_map[GL_NOTEQUAL] = "NOTEQUAL";
+ m_map[GL_GEQUAL] = "GEQUAL";
+ m_map[GL_ALWAYS] = "ALWAYS";
+
+ m_map[GL_KEEP] = "KEEP";
+ m_map[GL_REPLACE] = "REPLACE";
+ m_map[GL_INCR] = "INCR";
+ m_map[GL_DECR] = "DECR";
+ m_map[GL_INVERT] = "INVERT";
+ m_map[GL_INCR_WRAP] = "INCR_WRAP";
+ m_map[GL_DECR_WRAP] = "DECR_WRAP";
+
+ m_map[GL_VENDOR] = "VENDOR";
+ m_map[GL_RENDERER] = "RENDERER";
+ m_map[GL_VERSION] = "VERSION";
+
+ m_map[GL_NEAREST] = "NEAREST";
+ m_map[GL_LINEAR] = "LINEAR";
+
+ m_map[GL_NEAREST_MIPMAP_NEAREST] = "NEAREST_MIPMAP_NEAREST";
+ m_map[GL_LINEAR_MIPMAP_NEAREST] = "LINEAR_MIPMAP_NEAREST";
+ m_map[GL_NEAREST_MIPMAP_LINEAR] = "NEAREST_MIPMAP_LINEAR";
+ m_map[GL_LINEAR_MIPMAP_LINEAR] = "LINEAR_MIPMAP_LINEAR";
+
+ m_map[GL_TEXTURE_MAG_FILTER] = "TEXTURE_MAG_FILTER";
+ m_map[GL_TEXTURE_MIN_FILTER] = "TEXTURE_MIN_FILTER";
+ m_map[GL_TEXTURE_WRAP_S] = "TEXTURE_WRAP_S";
+ m_map[GL_TEXTURE_WRAP_T] = "TEXTURE_WRAP_T";
+
+ m_map[GL_TEXTURE_2D] = "TEXTURE_2D";
+ m_map[GL_TEXTURE] = "TEXTURE";
+
+ m_map[GL_TEXTURE_CUBE_MAP] = "TEXTURE_CUBE_MAP";
+ m_map[GL_TEXTURE_BINDING_CUBE_MAP] = "TEXTURE_BINDING_CUBE_MAP";
+ m_map[GL_TEXTURE_CUBE_MAP_POSITIVE_X] = "TEXTURE_CUBE_MAP_POSITIVE_X";
+ m_map[GL_TEXTURE_CUBE_MAP_NEGATIVE_X] = "TEXTURE_CUBE_MAP_NEGATIVE_X";
+ m_map[GL_TEXTURE_CUBE_MAP_POSITIVE_Y] = "TEXTURE_CUBE_MAP_POSITIVE_Y";
+ m_map[GL_TEXTURE_CUBE_MAP_NEGATIVE_Y] = "TEXTURE_CUBE_MAP_NEGATIVE_Y";
+ m_map[GL_TEXTURE_CUBE_MAP_POSITIVE_Z] = "TEXTURE_CUBE_MAP_POSITIVE_Z";
+ m_map[GL_TEXTURE_CUBE_MAP_NEGATIVE_Z] = "TEXTURE_CUBE_MAP_NEGATIVE_Z";
+ m_map[GL_MAX_CUBE_MAP_TEXTURE_SIZE] = "MAX_CUBE_MAP_TEXTURE_SIZE";
+
+ m_map[GL_TEXTURE0] = "TEXTURE0";
+ m_map[GL_TEXTURE1] = "TEXTURE1";
+ m_map[GL_TEXTURE2] = "TEXTURE2";
+ m_map[GL_TEXTURE3] = "TEXTURE3";
+ m_map[GL_TEXTURE4] = "TEXTURE4";
+ m_map[GL_TEXTURE5] = "TEXTURE5";
+ m_map[GL_TEXTURE6] = "TEXTURE6";
+ m_map[GL_TEXTURE7] = "TEXTURE7";
+ m_map[GL_TEXTURE8] = "TEXTURE8";
+ m_map[GL_TEXTURE9] = "TEXTURE9";
+ m_map[GL_TEXTURE10] = "TEXTURE10";
+ m_map[GL_TEXTURE11] = "TEXTURE11";
+ m_map[GL_TEXTURE12] = "TEXTURE12";
+ m_map[GL_TEXTURE13] = "TEXTURE13";
+ m_map[GL_TEXTURE14] = "TEXTURE14";
+ m_map[GL_TEXTURE15] = "TEXTURE15";
+ m_map[GL_TEXTURE16] = "TEXTURE16";
+ m_map[GL_TEXTURE17] = "TEXTURE17";
+ m_map[GL_TEXTURE18] = "TEXTURE18";
+ m_map[GL_TEXTURE19] = "TEXTURE19";
+ m_map[GL_TEXTURE20] = "TEXTURE20";
+ m_map[GL_TEXTURE21] = "TEXTURE21";
+ m_map[GL_TEXTURE22] = "TEXTURE22";
+ m_map[GL_TEXTURE23] = "TEXTURE23";
+ m_map[GL_TEXTURE24] = "TEXTURE24";
+ m_map[GL_TEXTURE25] = "TEXTURE25";
+ m_map[GL_TEXTURE26] = "TEXTURE26";
+ m_map[GL_TEXTURE27] = "TEXTURE27";
+ m_map[GL_TEXTURE28] = "TEXTURE28";
+ m_map[GL_TEXTURE29] = "TEXTURE29";
+ m_map[GL_TEXTURE30] = "TEXTURE30";
+ m_map[GL_TEXTURE31] = "TEXTURE31";
+ m_map[GL_ACTIVE_TEXTURE] = "ACTIVE_TEXTURE";
+
+ m_map[GL_REPEAT] = "REPEAT";
+ m_map[GL_CLAMP_TO_EDGE] = "CLAMP_TO_EDGE";
+ m_map[GL_MIRRORED_REPEAT] = "MIRRORED_REPEAT";
+
+ m_map[GL_FLOAT_VEC2] = "FLOAT_VEC2";
+ m_map[GL_FLOAT_VEC3] = "FLOAT_VEC3";
+ m_map[GL_FLOAT_VEC4] = "FLOAT_VEC4";
+ m_map[GL_INT_VEC2] = "INT_VEC2";
+ m_map[GL_INT_VEC3] = "INT_VEC3";
+ m_map[GL_INT_VEC4] = "INT_VEC4";
+ m_map[GL_BOOL] = "BOOL";
+ m_map[GL_BOOL_VEC2] = "BOOL_VEC2";
+ m_map[GL_BOOL_VEC3] = "BOOL_VEC3";
+ m_map[GL_BOOL_VEC4] = "BOOL_VEC4";
+ m_map[GL_FLOAT_MAT2] = "FLOAT_MAT2";
+ m_map[GL_FLOAT_MAT3] = "FLOAT_MAT3";
+ m_map[GL_FLOAT_MAT4] = "FLOAT_MAT4";
+ m_map[GL_SAMPLER_2D] = "SAMPLER_2D";
+ m_map[GL_SAMPLER_CUBE] = "SAMPLER_CUBE";
+
+ m_map[GL_VERTEX_ATTRIB_ARRAY_ENABLED] = "VERTEX_ATTRIB_ARRAY_ENABLED";
+ m_map[GL_VERTEX_ATTRIB_ARRAY_SIZE] = "VERTEX_ATTRIB_ARRAY_SIZE";
+ m_map[GL_VERTEX_ATTRIB_ARRAY_STRIDE] = "VERTEX_ATTRIB_ARRAY_STRIDE";
+ m_map[GL_VERTEX_ATTRIB_ARRAY_TYPE] = "VERTEX_ATTRIB_ARRAY_TYPE";
+ m_map[GL_VERTEX_ATTRIB_ARRAY_NORMALIZED] = "VERTEX_ATTRIB_ARRAY_NORMALIZED";
+ m_map[GL_VERTEX_ATTRIB_ARRAY_POINTER] = "VERTEX_ATTRIB_ARRAY_POINTER";
+ m_map[GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING] = "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING";
+
+ m_map[GL_COMPILE_STATUS] = "COMPILE_STATUS";
+
+ m_map[GL_LOW_FLOAT] = "LOW_FLOAT";
+ m_map[GL_MEDIUM_FLOAT] = "MEDIUM_FLOAT";
+ m_map[GL_HIGH_FLOAT] = "HIGH_FLOAT";
+ m_map[GL_LOW_INT] = "LOW_INT";
+ m_map[GL_MEDIUM_INT] = "MEDIUM_INT";
+ m_map[GL_HIGH_INT] = "HIGH_INT";
+
+ m_map[GL_FRAMEBUFFER] = "FRAMEBUFFER";
+ m_map[GL_RENDERBUFFER] = "RENDERBUFFER";
+
+ m_map[GL_RGBA4] = "RGBA4";
+ m_map[GL_RGB5_A1] = "RGB5_A1";
+ m_map[GL_RGB565] = "RGB565";
+ m_map[GL_DEPTH_COMPONENT16] = "DEPTH_COMPONENT16";
+ m_map[GL_STENCIL_INDEX] = "STENCIL_INDEX";
+ m_map[GL_STENCIL_INDEX8] = "STENCIL_INDEX8";
+
+ m_map[GL_RENDERBUFFER_WIDTH] = "RENDERBUFFER_WIDTH";
+ m_map[GL_RENDERBUFFER_HEIGHT] = "RENDERBUFFER_HEIGHT";
+ m_map[GL_RENDERBUFFER_INTERNAL_FORMAT] = "RENDERBUFFER_INTERNAL_FORMAT";
+ m_map[GL_RENDERBUFFER_RED_SIZE] = "RENDERBUFFER_RED_SIZE";
+ m_map[GL_RENDERBUFFER_GREEN_SIZE] = "RENDERBUFFER_GREEN_SIZE";
+ m_map[GL_RENDERBUFFER_BLUE_SIZE] = "RENDERBUFFER_BLUE_SIZE";
+ m_map[GL_RENDERBUFFER_ALPHA_SIZE] = "RENDERBUFFER_ALPHA_SIZE";
+ m_map[GL_RENDERBUFFER_DEPTH_SIZE] = "RENDERBUFFER_DEPTH_SIZE";
+ m_map[GL_RENDERBUFFER_STENCIL_SIZE] = "RENDERBUFFER_STENCIL_SIZE";
+
+ m_map[GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE] = "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE";
+ m_map[GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME] = "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME";
+ m_map[GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL] = "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL";
+ m_map[GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE] = "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE";
+
+ m_map[GL_COLOR_ATTACHMENT0] = "COLOR_ATTACHMENT0";
+ m_map[GL_DEPTH_ATTACHMENT] = "DEPTH_ATTACHMENT";
+ m_map[GL_STENCIL_ATTACHMENT] = "STENCIL_ATTACHMENT";
+
+ m_map[GL_FRAMEBUFFER_COMPLETE] = "FRAMEBUFFER_COMPLETE";
+ m_map[GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT] = "FRAMEBUFFER_INCOMPLETE_ATTACHMENT";
+ m_map[GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT] = "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";
+ m_map[GL_FRAMEBUFFER_UNSUPPORTED] = "FRAMEBUFFER_UNSUPPORTED";
+
+ m_map[GL_FRAMEBUFFER_BINDING] = "FRAMEBUFFER_BINDING";
+ m_map[GL_RENDERBUFFER_BINDING] = "RENDERBUFFER_BINDING";
+ m_map[GL_MAX_RENDERBUFFER_SIZE] = "MAX_RENDERBUFFER_SIZE";
+
+ m_map[GL_INVALID_FRAMEBUFFER_OPERATION] = "INVALID_FRAMEBUFFER_OPERATION";
+}
+
+QString EnumToStringMap::lookUp(const GLuint value) const
+{
+ if (m_map.contains(value))
+ return m_map[value];
+
+ return QString("0x0%1").arg(value, 0, 16);
+}
+#endif
diff --git a/src/datavisualizationqml2/enumtostringmap_p.h b/src/datavisualizationqml2/enumtostringmap_p.h
new file mode 100644
index 00000000..4ef9d32f
--- /dev/null
+++ b/src/datavisualizationqml2/enumtostringmap_p.h
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QtDataVisualization API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef ENUMTOSTRINGMAP_P_H
+#define ENUMTOSTRINGMAP_P_H
+
+//#define VERBOSE_STATE_STORE
+
+#ifdef VERBOSE_STATE_STORE
+
+#include <QtGui/qopengl.h>
+#include <QMap>
+#include <QString>
+
+class EnumToStringMap
+{
+public:
+ static EnumToStringMap *newInstance();
+ static void deleteInstance();
+ QString lookUp(const GLuint value) const;
+
+private:
+ EnumToStringMap();
+ QMap<int, QString> m_map;
+ QString m_unknown;
+};
+#endif
+#endif
diff --git a/src/datavisualizationqml2/glstatestore.cpp b/src/datavisualizationqml2/glstatestore.cpp
new file mode 100644
index 00000000..f053078b
--- /dev/null
+++ b/src/datavisualizationqml2/glstatestore.cpp
@@ -0,0 +1,377 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+#include "glstatestore_p.h"
+#include <QDebug>
+#include <QColor>
+#include <QFile>
+
+#ifdef VERBOSE_STATE_STORE
+static QFile *beforeFile = 0;
+static QFile *afterFile = 0;
+#endif
+
+GLStateStore::GLStateStore(QOpenGLContext *context, QObject *parent) :
+ QObject(parent),
+ QOpenGLFunctions(context)
+ #ifdef VERBOSE_STATE_STORE
+ , m_map(EnumToStringMap::newInstance())
+ #endif
+{
+ GLint maxVertexAttribs;
+ glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
+
+#ifdef VERBOSE_STATE_STORE
+ qDebug() << "GL_MAX_VERTEX_ATTRIBS: " << maxVertexAttribs;
+ if (!beforeFile) {
+ beforeFile = new QFile(QStringLiteral("state_before.txt"));
+ afterFile = new QFile(QStringLiteral("state_after.txt"));
+ beforeFile->open(QIODevice::WriteOnly);
+ afterFile->open(QIODevice::WriteOnly);
+ QDebug beforeInit(beforeFile);
+ QDebug afterInit(afterFile);
+ beforeInit << "GL states before 'context switch'" << endl;
+ afterInit << "GL states after 'context switch'" << endl;
+ }
+#endif
+
+ m_maxVertexAttribs = qMin(maxVertexAttribs, 2); // Datavis only uses 2 attribs max
+ m_vertexAttribArrayEnabledStates = new GLint[maxVertexAttribs];
+ m_vertexAttribArrayBoundBuffers = new GLint[maxVertexAttribs];
+ m_vertexAttribArraySizes = new GLint[maxVertexAttribs];
+ m_vertexAttribArrayTypes = new GLint[maxVertexAttribs];
+ m_vertexAttribArrayNormalized = new GLint[maxVertexAttribs];
+ m_vertexAttribArrayStrides = new GLint[maxVertexAttribs];
+ m_vertexAttribArrayOffsets = new GLint[maxVertexAttribs];
+
+ initGLDefaultState();
+}
+
+GLStateStore::~GLStateStore()
+{
+#ifdef VERBOSE_STATE_STORE
+ EnumToStringMap::deleteInstance();
+ m_map = 0;
+#endif
+ delete m_vertexAttribArrayEnabledStates;
+ delete m_vertexAttribArrayBoundBuffers;
+}
+
+void GLStateStore::storeGLState()
+{
+#ifdef VERBOSE_STATE_STORE
+ printCurrentState(true);
+#endif
+
+#if !defined(QT_OPENGL_ES_2)
+ glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &m_drawFramebuffer);
+ glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &m_readFramebuffer);
+#endif
+ glGetIntegerv(GL_RENDERBUFFER_BINDING, &m_renderbuffer);
+ glGetFloatv(GL_COLOR_CLEAR_VALUE, m_clearColor);
+ m_isBlendingEnabled = glIsEnabled(GL_BLEND);
+ m_isDepthTestEnabled = glIsEnabled(GL_DEPTH_TEST);
+ glGetBooleanv(GL_DEPTH_WRITEMASK, &m_isDepthWriteEnabled);
+ glGetFloatv(GL_DEPTH_CLEAR_VALUE, &m_clearDepth);
+ glGetIntegerv(GL_DEPTH_FUNC, &m_depthFunc);
+ glGetBooleanv(GL_POLYGON_OFFSET_FILL, &m_polygonOffsetFillEnabled);
+ glGetFloatv(GL_POLYGON_OFFSET_FACTOR, &m_polygonOffsetFactor);
+ glGetFloatv(GL_POLYGON_OFFSET_UNITS, &m_polygonOffsetUnits);
+
+ glGetIntegerv(GL_CURRENT_PROGRAM, &m_currentProgram);
+ glGetIntegerv(GL_ACTIVE_TEXTURE, &m_activeTexture);
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &m_texBinding2D);
+ glGetIntegerv(GL_FRONT_FACE, &m_frontFace);
+ m_isCullFaceEnabled = glIsEnabled(GL_CULL_FACE);
+ glGetIntegerv(GL_CULL_FACE_MODE, &m_cullFaceMode);
+ glGetIntegerv(GL_BLEND_EQUATION_RGB, &m_blendEquationRGB);
+ glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &m_blendEquationAlpha);
+ glGetIntegerv(GL_BLEND_DST_ALPHA, &m_blendDestAlpha);
+ glGetIntegerv(GL_BLEND_DST_RGB, &m_blendDestRGB);
+ glGetIntegerv(GL_BLEND_SRC_ALPHA, &m_blendSrcAlpha);
+ glGetIntegerv(GL_BLEND_SRC_RGB, &m_blendSrcRGB);
+ glGetIntegerv(GL_SCISSOR_BOX, m_scissorBox);
+ m_isScissorTestEnabled = glIsEnabled(GL_SCISSOR_TEST);
+
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &m_boundArrayBuffer);
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &m_boundElementArrayBuffer);
+
+ for (int i = 0; i < m_maxVertexAttribs;i++) {
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &m_vertexAttribArrayEnabledStates[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, &m_vertexAttribArrayBoundBuffers[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_SIZE, &m_vertexAttribArraySizes[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_TYPE, &m_vertexAttribArrayTypes[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &m_vertexAttribArrayNormalized[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_STRIDE, &m_vertexAttribArrayStrides[i]);
+ }
+}
+
+#ifdef VERBOSE_STATE_STORE
+void GLStateStore::printCurrentState(bool in)
+{
+ QFile *file;
+ if (in)
+ file = beforeFile;
+ else
+ file = afterFile;
+
+ if (file->isOpen()) {
+ QDebug msg(file);
+#if !defined(QT_OPENGL_ES_2)
+ GLint drawFramebuffer;
+ GLint readFramebuffer;
+#endif
+ GLint renderbuffer;
+ GLfloat clearColor[4];
+ GLfloat clearDepth;
+ GLboolean isBlendingEnabled = glIsEnabled(GL_BLEND);
+ GLboolean isDepthTestEnabled = glIsEnabled(GL_DEPTH_TEST);
+ GLint depthFunc;
+ GLboolean isDepthWriteEnabled;
+ GLint currentProgram;
+ GLint *vertexAttribArrayEnabledStates = new GLint[m_maxVertexAttribs];
+ GLint *vertexAttribArrayBoundBuffers = new GLint[m_maxVertexAttribs];
+ GLint *vertexAttribArraySizes = new GLint[m_maxVertexAttribs];
+ GLint *vertexAttribArrayTypes = new GLint[m_maxVertexAttribs];
+ GLint *vertexAttribArrayNormalized = new GLint[m_maxVertexAttribs];
+ GLint *vertexAttribArrayStrides = new GLint[m_maxVertexAttribs];
+ GLint activeTexture;
+ GLint texBinding2D;
+ GLint arrayBufferBinding;
+ GLint frontFace;
+ GLboolean isCullFaceEnabled = glIsEnabled(GL_CULL_FACE);
+ GLint cullFaceMode;
+ GLint blendEquationRGB;
+ GLint blendEquationAlpha;
+
+ GLint blendDestAlpha;
+ GLint blendDestRGB;
+ GLint blendSrcAlpha;
+ GLint blendSrcRGB;
+ GLint scissorBox[4];
+ GLboolean isScissorTestEnabled = glIsEnabled(GL_SCISSOR_TEST);
+ GLint boundElementArrayBuffer;
+ GLboolean polygonOffsetFillEnabled;
+ GLfloat polygonOffsetFactor;
+ GLfloat polygonOffsetUnits;
+
+ glGetBooleanv(GL_DEPTH_WRITEMASK, &isDepthWriteEnabled);
+#if !defined(QT_OPENGL_ES_2)
+ glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &drawFramebuffer);
+ glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &readFramebuffer);
+#endif
+ glGetIntegerv(GL_RENDERBUFFER_BINDING, &renderbuffer);
+ glGetFloatv(GL_COLOR_CLEAR_VALUE, clearColor);
+ glGetFloatv(GL_DEPTH_CLEAR_VALUE, &clearDepth);
+ glGetIntegerv(GL_DEPTH_FUNC, &depthFunc);
+ glGetBooleanv(GL_POLYGON_OFFSET_FILL, &polygonOffsetFillEnabled);
+ glGetFloatv(GL_POLYGON_OFFSET_FACTOR, &polygonOffsetFactor);
+ glGetFloatv(GL_POLYGON_OFFSET_UNITS, &polygonOffsetUnits);
+
+ glGetIntegerv(GL_CURRENT_PROGRAM, &currentProgram);
+ glGetIntegerv(GL_ACTIVE_TEXTURE, &activeTexture);
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &texBinding2D );
+ glGetIntegerv(GL_FRONT_FACE, &frontFace);
+ glGetIntegerv(GL_CULL_FACE_MODE, &cullFaceMode);
+ glGetIntegerv(GL_BLEND_EQUATION_RGB, &blendEquationRGB);
+ glGetIntegerv(GL_BLEND_EQUATION_ALPHA, &blendEquationAlpha);
+ glGetIntegerv(GL_BLEND_DST_ALPHA, &blendDestAlpha);
+ glGetIntegerv(GL_BLEND_DST_RGB, &blendDestRGB);
+ glGetIntegerv(GL_BLEND_SRC_ALPHA, &blendSrcAlpha);
+ glGetIntegerv(GL_BLEND_SRC_RGB, &blendSrcRGB);
+ glGetIntegerv(GL_SCISSOR_BOX, scissorBox);
+ glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &boundElementArrayBuffer);
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &arrayBufferBinding);
+
+ for (int i = 0; i < m_maxVertexAttribs;i++) {
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &vertexAttribArrayEnabledStates[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, &vertexAttribArrayBoundBuffers[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_SIZE, &vertexAttribArraySizes[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_TYPE, &vertexAttribArrayTypes[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &vertexAttribArrayNormalized[i]);
+ glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_STRIDE, &vertexAttribArrayStrides[i]);
+ }
+
+ QColor color;
+ color.setRgbF(clearColor[0], clearColor[1], clearColor[2]);
+ color.setAlphaF(clearColor[3]);
+
+#if !defined(QT_OPENGL_ES_2)
+ msg << "---" << endl;
+ msg << " GL_DRAW_FRAMEBUFFER_BINDING "<< drawFramebuffer << endl;
+ msg << " GL_READ_FRAMEBUFFER_BINDING "<< readFramebuffer << endl;
+#endif
+ msg << " GL_RENDERBUFFER_BINDING " << renderbuffer << endl;
+ msg << " GL_SCISSOR_TEST " << bool(isScissorTestEnabled) << endl;
+ msg << " GL_SCISSOR_BOX " << m_scissorBox[0] << m_scissorBox[1] << m_scissorBox[2]
+ << m_scissorBox[3] << endl;
+ msg << " GL_COLOR_CLEAR_VALUE "<< color << endl;
+ msg << " GL_DEPTH_CLEAR_VALUE "<< clearDepth << endl;
+ msg << " GL_BLEND "<< bool(isBlendingEnabled) << endl;
+ msg << " GL_BLEND_EQUATION_RGB" << m_map->lookUp(blendEquationRGB) << endl;
+ msg << " GL_BLEND_EQUATION_ALPHA" << m_map->lookUp(blendEquationAlpha) << endl;
+ msg << " GL_BLEND_DST_ALPHA" << m_map->lookUp(blendDestAlpha) << endl;
+ msg << " GL_BLEND_DST_RGB" << m_map->lookUp(blendDestRGB) << endl;
+ msg << " GL_BLEND_SRC_ALPHA" << m_map->lookUp(blendSrcAlpha) << endl;
+ msg << " GL_BLEND_SRC_RGB" << m_map->lookUp(blendSrcRGB) << endl;
+ msg << " GL_DEPTH_TEST "<< bool(isDepthTestEnabled) << endl;
+ msg << " GL_DEPTH_WRITEMASK "<< bool(isDepthWriteEnabled) << endl;
+ msg << " GL_POLYGON_OFFSET_FILL" << bool(polygonOffsetFillEnabled) << endl;
+ msg << " GL_POLYGON_OFFSET_FACTOR "<< polygonOffsetFactor << endl;
+ msg << " GL_POLYGON_OFFSET_UNITS "<< polygonOffsetUnits << endl;
+ msg << " GL_CULL_FACE "<< bool(isCullFaceEnabled) << endl;
+ msg << " GL_CULL_FACE_MODE "<< m_map->lookUp(cullFaceMode) << endl;
+ msg << " GL_DEPTH_FUNC "<< m_map->lookUp(depthFunc) << endl;
+ msg << " GL_FRONT_FACE "<< m_map->lookUp(frontFace) << endl;
+ msg << " GL_CURRENT_PROGRAM "<< currentProgram << endl;
+ msg << " GL_ACTIVE_TEXTURE "<< QString("0x%1").arg(activeTexture, 0, 16) << endl;
+ msg << " GL_TEXTURE_BINDING_2D "<< texBinding2D << endl;
+ msg << " GL_ELEMENT_ARRAY_BUFFER_BINDING "<< boundElementArrayBuffer << endl;
+ msg << " GL_ARRAY_BUFFER_BINDING "<< arrayBufferBinding << endl;
+ for (int i = 0; i < m_maxVertexAttribs;i++) {
+ msg << " GL_VERTEX_ATTRIB_ARRAY_ENABLED "<< i << " = "
+ << bool(vertexAttribArrayEnabledStates[i]) << endl;
+ msg << " GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"<< i << " = "
+ << vertexAttribArrayBoundBuffers[i] << endl;
+ msg << " GL_VERTEX_ATTRIB_ARRAY_SIZE"<< i << " = "
+ << vertexAttribArraySizes[i] << endl;
+ msg << " GL_VERTEX_ATTRIB_ARRAY_TYPE"<< i << " = "
+ << vertexAttribArrayTypes[i] << endl;
+ msg << " GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"<< i << " = "
+ << vertexAttribArrayNormalized[i] << endl;
+ msg << " GL_VERTEX_ATTRIB_ARRAY_STRIDE"<< i << " = "
+ << vertexAttribArrayStrides[i] << endl;
+ }
+ }
+}
+#endif
+
+void GLStateStore::restoreGLState()
+{
+#if !defined(QT_OPENGL_ES_2)
+ glBindFramebuffer(GL_READ_FRAMEBUFFER, m_readFramebuffer);
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_drawFramebuffer);
+#endif
+ glBindRenderbuffer(GL_RENDERBUFFER_BINDING, m_renderbuffer);
+
+ if (m_isScissorTestEnabled)
+ glEnable(GL_SCISSOR_TEST);
+ else
+ glDisable(GL_SCISSOR_TEST);
+
+ glScissor(m_scissorBox[0], m_scissorBox[1], m_scissorBox[2], m_scissorBox[3]);
+ glClearColor(m_clearColor[0], m_clearColor[1], m_clearColor[2], m_clearColor[3]);
+ glClearDepthf(m_clearDepth);
+ if (m_isBlendingEnabled)
+ glEnable(GL_BLEND);
+ else
+ glDisable(GL_BLEND);
+
+ if (m_isDepthTestEnabled)
+ glEnable(GL_DEPTH_TEST);
+ else
+ glDisable(GL_DEPTH_TEST);
+
+ if (m_isCullFaceEnabled)
+ glEnable(GL_CULL_FACE);
+ else
+ glDisable(GL_CULL_FACE);
+
+ glCullFace(m_cullFaceMode);
+
+ glBlendEquationSeparate(m_blendEquationRGB, m_blendEquationAlpha);
+ glBlendFuncSeparate(m_blendSrcRGB, m_blendDestRGB, m_blendSrcAlpha, m_blendDestAlpha);
+
+ glDepthMask(m_isDepthWriteEnabled);
+ glDepthFunc(m_depthFunc);
+ glFrontFace(m_frontFace);
+
+ if (m_polygonOffsetFillEnabled)
+ glEnable(GL_POLYGON_OFFSET_FILL);
+ else
+ glDisable(GL_POLYGON_OFFSET_FILL);
+
+ glPolygonOffset(m_polygonOffsetFactor, m_polygonOffsetUnits);
+
+ glUseProgram(m_currentProgram);
+
+ glActiveTexture(m_activeTexture);
+ glBindTexture(GL_TEXTURE_2D, m_texBinding2D);
+
+ // Restore bound element array buffer and array buffers
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_boundElementArrayBuffer);
+ for (int i = 0; i < m_maxVertexAttribs; i++) {
+ if (m_vertexAttribArrayEnabledStates[i])
+ glEnableVertexAttribArray(i);
+ else
+ glDisableVertexAttribArray(i);
+
+ glBindBuffer(GL_ARRAY_BUFFER, m_vertexAttribArrayBoundBuffers[i]);
+ glVertexAttribPointer(i, m_vertexAttribArraySizes[i],
+ m_vertexAttribArrayTypes[i],
+ m_vertexAttribArrayNormalized[i],
+ m_vertexAttribArrayStrides[i],
+ (void *) m_vertexAttribArrayOffsets[i]);
+ }
+
+ glBindBuffer(GL_ARRAY_BUFFER, m_boundArrayBuffer);
+
+#ifdef VERBOSE_STATE_STORE
+ printCurrentState(false);
+#endif
+}
+
+void GLStateStore::initGLDefaultState()
+{
+#if !defined(QT_OPENGL_ES_2)
+ m_drawFramebuffer = 0;
+ m_readFramebuffer = 0;
+#endif
+ m_renderbuffer = 0;
+ m_clearColor[0] = m_clearColor[1] = m_clearColor[2] = m_clearColor[3] = 1.0f;
+ m_clearDepth = 1.0f;
+ m_isBlendingEnabled = GL_FALSE;
+ m_isDepthTestEnabled = GL_FALSE;
+ m_depthFunc = GL_LESS;
+ m_isDepthWriteEnabled = GL_TRUE;
+ m_currentProgram = 0;
+ m_texBinding2D = 0;
+ for (int i = 0; i < m_maxVertexAttribs;i++) {
+ m_vertexAttribArrayEnabledStates[i] = GL_FALSE;
+ m_vertexAttribArrayBoundBuffers[i] = 0;
+ m_vertexAttribArraySizes[i] = 4;
+ m_vertexAttribArrayTypes[i] = GL_FLOAT;
+ m_vertexAttribArrayNormalized[i] = GL_FALSE;
+ m_vertexAttribArrayStrides[i] = 0;
+ m_vertexAttribArrayOffsets[i] = 0;
+ }
+ m_activeTexture = GL_TEXTURE0;
+ m_frontFace = GL_CCW;
+ m_isCullFaceEnabled = false;
+ m_cullFaceMode = GL_BACK;
+ m_blendEquationRGB = GL_FUNC_ADD;
+ m_blendEquationAlpha = GL_FUNC_ADD;
+ m_scissorBox[0] = 0;
+ m_scissorBox[1] = 0;
+ m_scissorBox[2] = 0;
+ m_scissorBox[3] = 0;
+ m_isScissorTestEnabled = GL_FALSE;
+
+ m_polygonOffsetFillEnabled = GL_FALSE;
+ m_polygonOffsetFactor = 0.0;
+ m_polygonOffsetUnits = 0.0;
+}
diff --git a/src/datavisualizationqml2/glstatestore_p.h b/src/datavisualizationqml2/glstatestore_p.h
new file mode 100644
index 00000000..14c46c43
--- /dev/null
+++ b/src/datavisualizationqml2/glstatestore_p.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the QtDataVisualization API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+
+#ifndef GLSTATESTORE_P_H
+#define GLSTATESTORE_P_H
+
+#include <QObject>
+#include <QtGui/QOpenGLFunctions>
+#include <QtGui/QOpenGLContext>
+#include "enumtostringmap_p.h"
+
+class GLStateStore : public QObject, protected QOpenGLFunctions
+{
+ Q_OBJECT
+public:
+ explicit GLStateStore(QOpenGLContext *context, QObject *parent = 0);
+ ~GLStateStore();
+
+ void storeGLState();
+ void restoreGLState();
+ void initGLDefaultState();
+
+#ifdef VERBOSE_STATE_STORE
+ void printCurrentState(bool in);
+ EnumToStringMap *m_map;
+#endif
+
+ GLint m_scissorBox[4];
+ GLboolean m_isScissorTestEnabled;
+
+#if !defined(QT_OPENGL_ES_2)
+ GLint m_drawFramebuffer;
+ GLint m_readFramebuffer;
+#endif
+ GLint m_renderbuffer;
+ GLfloat m_clearColor[4];
+ GLfloat m_clearDepth;
+ GLboolean m_isBlendingEnabled;
+ GLboolean m_isDepthTestEnabled;
+ GLint m_depthFunc;
+ GLboolean m_isDepthWriteEnabled;
+ GLint m_currentProgram;
+ GLint m_maxVertexAttribs;
+ GLint *m_vertexAttribArrayEnabledStates;
+ GLint *m_vertexAttribArrayBoundBuffers;
+ GLint *m_vertexAttribArraySizes;
+ GLint *m_vertexAttribArrayTypes;
+ GLint *m_vertexAttribArrayNormalized;
+ GLint *m_vertexAttribArrayStrides;
+ GLint *m_vertexAttribArrayOffsets;
+
+ GLint m_activeTexture;
+ GLint m_texBinding2D;
+ GLint m_frontFace;
+ GLboolean m_isCullFaceEnabled;
+ GLint m_cullFaceMode;
+ GLint m_blendEquationRGB;
+ GLint m_blendEquationAlpha;
+ GLint m_blendDestAlpha;
+ GLint m_blendDestRGB;
+ GLint m_blendSrcAlpha;
+ GLint m_blendSrcRGB;
+ GLint m_boundArrayBuffer;
+ GLint m_boundElementArrayBuffer;
+ GLboolean m_polygonOffsetFillEnabled;
+ GLfloat m_polygonOffsetFactor;
+ GLfloat m_polygonOffsetUnits;
+};
+
+#endif
diff --git a/src/datavisualizationqml2/plugins.qmltypes b/src/datavisualizationqml2/plugins.qmltypes
new file mode 100644
index 00000000..48a30665
--- /dev/null
+++ b/src/datavisualizationqml2/plugins.qmltypes
@@ -0,0 +1,1387 @@
+import QtQuick.tooling 1.1
+
+// This file describes the plugin-supplied types contained in the library.
+// It is used for QML tooling purposes only.
+//
+// This file was auto-generated by:
+// 'qmlplugindump -nonrelocatable QtDataVisualization 1.0'
+
+Module {
+ Component {
+ name: "QtDataVisualization::AbstractDeclarative"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtDataVisualization/AbstractGraph3D 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "SelectionFlag"
+ values: {
+ "SelectionNone": 0,
+ "SelectionItem": 1,
+ "SelectionRow": 2,
+ "SelectionItemAndRow": 3,
+ "SelectionColumn": 4,
+ "SelectionItemAndColumn": 5,
+ "SelectionRowAndColumn": 6,
+ "SelectionItemRowAndColumn": 7,
+ "SelectionSlice": 8,
+ "SelectionMultiSeries": 16
+ }
+ }
+ Enum {
+ name: "SelectionFlags"
+ values: {
+ "SelectionNone": 0,
+ "SelectionItem": 1,
+ "SelectionRow": 2,
+ "SelectionItemAndRow": 3,
+ "SelectionColumn": 4,
+ "SelectionItemAndColumn": 5,
+ "SelectionRowAndColumn": 6,
+ "SelectionItemRowAndColumn": 7,
+ "SelectionSlice": 8,
+ "SelectionMultiSeries": 16
+ }
+ }
+ Enum {
+ name: "ShadowQuality"
+ values: {
+ "ShadowQualityNone": 0,
+ "ShadowQualityLow": 1,
+ "ShadowQualityMedium": 2,
+ "ShadowQualityHigh": 3,
+ "ShadowQualitySoftLow": 4,
+ "ShadowQualitySoftMedium": 5,
+ "ShadowQualitySoftHigh": 6
+ }
+ }
+ Enum {
+ name: "RenderingMode"
+ values: {
+ "RenderDirectToBackground": 0,
+ "RenderDirectToBackground_NoClear": 1,
+ "RenderIndirect": 2
+ }
+ }
+ Property { name: "selectionMode"; type: "SelectionFlags" }
+ Property { name: "shadowQuality"; type: "ShadowQuality" }
+ Property { name: "msaaSamples"; type: "int" }
+ Property { name: "scene"; type: "Declarative3DScene"; isReadonly: true; isPointer: true }
+ Property { name: "inputHandler"; type: "QAbstract3DInputHandler"; isPointer: true }
+ Property { name: "theme"; type: "Q3DTheme"; isPointer: true }
+ Property { name: "renderingMode"; type: "RenderingMode" }
+ Signal {
+ name: "selectionModeChanged"
+ Parameter { name: "mode"; type: "SelectionFlags" }
+ }
+ Signal {
+ name: "shadowQualityChanged"
+ Parameter { name: "quality"; type: "ShadowQuality" }
+ }
+ Signal {
+ name: "msaaSamplesChanged"
+ Parameter { name: "samples"; type: "int" }
+ }
+ Signal {
+ name: "sceneChanged"
+ Parameter { name: "scene"; type: "Q3DScene"; isPointer: true }
+ }
+ Signal {
+ name: "inputHandlerChanged"
+ Parameter { name: "inputHandler"; type: "QAbstract3DInputHandler"; isPointer: true }
+ }
+ Signal {
+ name: "themeChanged"
+ Parameter { name: "theme"; type: "Q3DTheme"; isPointer: true }
+ }
+ Signal {
+ name: "renderingModeChanged"
+ Parameter { name: "mode"; type: "RenderingMode" }
+ }
+ Method {
+ name: "handleAxisXChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisYChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisZChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "windowDestroyed"
+ Parameter { name: "obj"; type: "QObject"; isPointer: true }
+ }
+ Method { name: "clearSelection" }
+ }
+ Component {
+ name: "QtDataVisualization::ColorGradient"
+ defaultProperty: "stops"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/ColorGradient 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "stops"; type: "ColorGradientStop"; isList: true; isReadonly: true }
+ Signal { name: "updated" }
+ }
+ Component {
+ name: "QtDataVisualization::ColorGradientStop"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/ColorGradientStop 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "position"; type: "double" }
+ Property { name: "color"; type: "QColor" }
+ Signal {
+ name: "positionChanged"
+ Parameter { name: "position"; type: "double" }
+ }
+ Signal {
+ name: "colorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::Declarative3DScene"
+ prototype: "QtDataVisualization::Q3DScene"
+ exports: ["QtDataVisualization/Scene3D 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "selectionQueryPosition"; type: "QPointF" }
+ Property { name: "invalidSelectionPoint"; type: "QPoint"; isReadonly: true }
+ Signal {
+ name: "selectionQueryPositionChanged"
+ Parameter { name: "position"; type: "QPointF" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeBar3DSeries"
+ defaultProperty: "seriesChildren"
+ prototype: "QtDataVisualization::QBar3DSeries"
+ exports: ["QtDataVisualization/Bar3DSeries 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "selectedBar"; type: "QPointF" }
+ Property { name: "invalidSelectionPosition"; type: "QPointF"; isReadonly: true }
+ Property { name: "baseGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Signal {
+ name: "selectedBarChanged"
+ Parameter { name: "position"; type: "QPointF" }
+ }
+ Signal {
+ name: "baseGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Signal {
+ name: "singleHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Signal {
+ name: "multiHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Method { name: "handleBaseGradientUpdate" }
+ Method { name: "handleSingleHighlightGradientUpdate" }
+ Method { name: "handleMultiHighlightGradientUpdate" }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeBars"
+ defaultProperty: "seriesList"
+ prototype: "QtDataVisualization::AbstractDeclarative"
+ exports: ["QtDataVisualization/Bars3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "rowAxis"; type: "QCategory3DAxis"; isPointer: true }
+ Property { name: "valueAxis"; type: "QValue3DAxis"; isPointer: true }
+ Property { name: "columnAxis"; type: "QCategory3DAxis"; isPointer: true }
+ Property { name: "multiSeriesUniform"; type: "bool" }
+ Property { name: "barThickness"; type: "double" }
+ Property { name: "barSpacing"; type: "QSizeF" }
+ Property { name: "barSpacingRelative"; type: "bool" }
+ Property { name: "seriesList"; type: "QBar3DSeries"; isList: true; isReadonly: true }
+ Property { name: "selectedSeries"; type: "QBar3DSeries"; isReadonly: true; isPointer: true }
+ Property { name: "primarySeries"; type: "QBar3DSeries"; isPointer: true }
+ Signal {
+ name: "rowAxisChanged"
+ Parameter { name: "axis"; type: "QCategory3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "valueAxisChanged"
+ Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "columnAxisChanged"
+ Parameter { name: "axis"; type: "QCategory3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "multiSeriesUniformChanged"
+ Parameter { name: "uniform"; type: "bool" }
+ }
+ Signal {
+ name: "barThicknessChanged"
+ Parameter { name: "thicknessRatio"; type: "double" }
+ }
+ Signal {
+ name: "barSpacingChanged"
+ Parameter { name: "spacing"; type: "QSizeF" }
+ }
+ Signal {
+ name: "barSpacingRelativeChanged"
+ Parameter { name: "relative"; type: "bool" }
+ }
+ Signal {
+ name: "meshFileNameChanged"
+ Parameter { name: "filename"; type: "string" }
+ }
+ Signal {
+ name: "primarySeriesChanged"
+ Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
+ }
+ Signal {
+ name: "selectedSeriesChanged"
+ Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisXChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisYChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisZChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "addSeries"
+ Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
+ }
+ Method {
+ name: "removeSeries"
+ Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
+ }
+ Method {
+ name: "insertSeries"
+ Parameter { name: "index"; type: "int" }
+ Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeColor"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/ThemeColor 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "color"; type: "QColor" }
+ Signal {
+ name: "colorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeScatter"
+ defaultProperty: "seriesList"
+ prototype: "QtDataVisualization::AbstractDeclarative"
+ exports: ["QtDataVisualization/Scatter3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "axisX"; type: "QValue3DAxis"; isPointer: true }
+ Property { name: "axisY"; type: "QValue3DAxis"; isPointer: true }
+ Property { name: "axisZ"; type: "QValue3DAxis"; isPointer: true }
+ Property { name: "selectedSeries"; type: "QScatter3DSeries"; isReadonly: true; isPointer: true }
+ Property { name: "seriesList"; type: "QScatter3DSeries"; isList: true; isReadonly: true }
+ Signal {
+ name: "axisXChanged"
+ Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "axisYChanged"
+ Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "axisZChanged"
+ Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "selectedSeriesChanged"
+ Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisXChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisYChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisZChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "addSeries"
+ Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
+ }
+ Method {
+ name: "removeSeries"
+ Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeScatter3DSeries"
+ defaultProperty: "seriesChildren"
+ prototype: "QtDataVisualization::QScatter3DSeries"
+ exports: ["QtDataVisualization/Scatter3DSeries 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "baseGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "invalidSelectionIndex"; type: "int"; isReadonly: true }
+ Signal {
+ name: "baseGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Signal {
+ name: "singleHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Signal {
+ name: "multiHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Method { name: "handleBaseGradientUpdate" }
+ Method { name: "handleSingleHighlightGradientUpdate" }
+ Method { name: "handleMultiHighlightGradientUpdate" }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeSurface"
+ defaultProperty: "seriesList"
+ prototype: "QtDataVisualization::AbstractDeclarative"
+ exports: ["QtDataVisualization/Surface3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "axisX"; type: "QValue3DAxis"; isPointer: true }
+ Property { name: "axisY"; type: "QValue3DAxis"; isPointer: true }
+ Property { name: "axisZ"; type: "QValue3DAxis"; isPointer: true }
+ Property { name: "selectedSeries"; type: "QSurface3DSeries"; isReadonly: true; isPointer: true }
+ Property { name: "seriesList"; type: "QSurface3DSeries"; isList: true; isReadonly: true }
+ Signal {
+ name: "axisXChanged"
+ Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "axisYChanged"
+ Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "axisZChanged"
+ Parameter { name: "axis"; type: "QValue3DAxis"; isPointer: true }
+ }
+ Signal {
+ name: "selectedSeriesChanged"
+ Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisXChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisYChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "handleAxisZChanged"
+ Parameter { name: "axis"; type: "QAbstract3DAxis"; isPointer: true }
+ }
+ Method {
+ name: "addSeries"
+ Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
+ }
+ Method {
+ name: "removeSeries"
+ Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeSurface3DSeries"
+ defaultProperty: "seriesChildren"
+ prototype: "QtDataVisualization::QSurface3DSeries"
+ exports: ["QtDataVisualization/Surface3DSeries 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "selectedPoint"; type: "QPointF" }
+ Property { name: "invalidSelectionPosition"; type: "QPointF"; isReadonly: true }
+ Property { name: "baseGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Signal {
+ name: "selectedPointChanged"
+ Parameter { name: "position"; type: "QPointF" }
+ }
+ Signal {
+ name: "baseGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Signal {
+ name: "singleHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Signal {
+ name: "multiHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Method { name: "handleBaseGradientUpdate" }
+ Method { name: "handleSingleHighlightGradientUpdate" }
+ Method { name: "handleMultiHighlightGradientUpdate" }
+ }
+ Component {
+ name: "QtDataVisualization::DeclarativeTheme3D"
+ defaultProperty: "seriesChildren"
+ prototype: "QtDataVisualization::Q3DTheme"
+ exports: ["QtDataVisualization/Theme3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "seriesChildren"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "baseColors"; type: "DeclarativeColor"; isList: true; isReadonly: true }
+ Property { name: "baseGradients"; type: "ColorGradient"; isList: true; isReadonly: true }
+ Property { name: "singleHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Property { name: "multiHighlightGradient"; type: "ColorGradient"; isPointer: true }
+ Signal {
+ name: "singleHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ Signal {
+ name: "multiHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "ColorGradient"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::Q3DCamera"
+ prototype: "QtDataVisualization::Q3DObject"
+ exports: ["QtDataVisualization/Camera3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "CameraPreset"
+ values: {
+ "CameraPresetNone": -1,
+ "CameraPresetFrontLow": 0,
+ "CameraPresetFront": 1,
+ "CameraPresetFrontHigh": 2,
+ "CameraPresetLeftLow": 3,
+ "CameraPresetLeft": 4,
+ "CameraPresetLeftHigh": 5,
+ "CameraPresetRightLow": 6,
+ "CameraPresetRight": 7,
+ "CameraPresetRightHigh": 8,
+ "CameraPresetBehindLow": 9,
+ "CameraPresetBehind": 10,
+ "CameraPresetBehindHigh": 11,
+ "CameraPresetIsometricLeft": 12,
+ "CameraPresetIsometricLeftHigh": 13,
+ "CameraPresetIsometricRight": 14,
+ "CameraPresetIsometricRightHigh": 15,
+ "CameraPresetDirectlyAbove": 16,
+ "CameraPresetDirectlyAboveCW45": 17,
+ "CameraPresetDirectlyAboveCCW45": 18,
+ "CameraPresetFrontBelow": 19,
+ "CameraPresetLeftBelow": 20,
+ "CameraPresetRightBelow": 21,
+ "CameraPresetBehindBelow": 22,
+ "CameraPresetDirectlyBelow": 23
+ }
+ }
+ Property { name: "xRotation"; type: "double" }
+ Property { name: "yRotation"; type: "double" }
+ Property { name: "zoomLevel"; type: "int" }
+ Property { name: "cameraPreset"; type: "CameraPreset" }
+ Property { name: "wrapXRotation"; type: "bool" }
+ Property { name: "wrapYRotation"; type: "bool" }
+ Signal {
+ name: "xRotationChanged"
+ Parameter { name: "rotation"; type: "double" }
+ }
+ Signal {
+ name: "yRotationChanged"
+ Parameter { name: "rotation"; type: "double" }
+ }
+ Signal {
+ name: "zoomLevelChanged"
+ Parameter { name: "zoomLevel"; type: "int" }
+ }
+ Signal {
+ name: "cameraPresetChanged"
+ Parameter { name: "preset"; type: "CameraPreset" }
+ }
+ Signal {
+ name: "wrapXRotationChanged"
+ Parameter { name: "isEnabled"; type: "bool" }
+ }
+ Signal {
+ name: "wrapYRotationChanged"
+ Parameter { name: "isEnabled"; type: "bool" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::Q3DInputHandler"
+ prototype: "QtDataVisualization::QAbstract3DInputHandler"
+ }
+ Component {
+ name: "QtDataVisualization::Q3DLight"
+ prototype: "QtDataVisualization::Q3DObject"
+ exports: ["QtDataVisualization/Light3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ }
+ Component {
+ name: "QtDataVisualization::Q3DObject"
+ prototype: "QObject"
+ Property { name: "parentScene"; type: "Q3DScene"; isReadonly: true; isPointer: true }
+ Property { name: "position"; type: "QVector3D" }
+ Signal {
+ name: "positionChanged"
+ Parameter { name: "position"; type: "QVector3D" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::Q3DScene"
+ prototype: "QObject"
+ Property { name: "viewport"; type: "QRect"; isReadonly: true }
+ Property { name: "primarySubViewport"; type: "QRect" }
+ Property { name: "secondarySubViewport"; type: "QRect" }
+ Property { name: "selectionQueryPosition"; type: "QPoint" }
+ Property { name: "secondarySubviewOnTop"; type: "bool" }
+ Property { name: "slicingActive"; type: "bool" }
+ Property { name: "activeCamera"; type: "Q3DCamera"; isPointer: true }
+ Property { name: "activeLight"; type: "Q3DLight"; isPointer: true }
+ Property { name: "devicePixelRatio"; type: "double" }
+ Signal {
+ name: "viewportChanged"
+ Parameter { name: "viewport"; type: "QRect" }
+ }
+ Signal {
+ name: "primarySubViewportChanged"
+ Parameter { name: "subViewport"; type: "QRect" }
+ }
+ Signal {
+ name: "secondarySubViewportChanged"
+ Parameter { name: "subViewport"; type: "QRect" }
+ }
+ Signal {
+ name: "secondarySubviewOnTopChanged"
+ Parameter { name: "isSecondaryOnTop"; type: "bool" }
+ }
+ Signal {
+ name: "slicingActiveChanged"
+ Parameter { name: "isSlicingActive"; type: "bool" }
+ }
+ Signal {
+ name: "activeCameraChanged"
+ Parameter { name: "camera"; type: "Q3DCamera"; isPointer: true }
+ }
+ Signal {
+ name: "activeLightChanged"
+ Parameter { name: "light"; type: "Q3DLight"; isPointer: true }
+ }
+ Signal {
+ name: "devicePixelRatioChanged"
+ Parameter { name: "pixelRatio"; type: "double" }
+ }
+ Signal {
+ name: "selectionQueryPositionChanged"
+ Parameter { name: "position"; type: "QPoint" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::Q3DTheme"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/Q3DTheme 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "ColorStyle"
+ values: {
+ "ColorStyleUniform": 0,
+ "ColorStyleObjectGradient": 1,
+ "ColorStyleRangeGradient": 2
+ }
+ }
+ Enum {
+ name: "Theme"
+ values: {
+ "ThemeQt": 0,
+ "ThemePrimaryColors": 1,
+ "ThemeDigia": 2,
+ "ThemeStoneMoss": 3,
+ "ThemeArmyBlue": 4,
+ "ThemeRetro": 5,
+ "ThemeEbony": 6,
+ "ThemeIsabelle": 7,
+ "ThemeUserDefined": 8
+ }
+ }
+ Property { name: "type"; type: "Theme" }
+ Property { name: "baseColors"; type: "QList<QColor>" }
+ Property { name: "backgroundColor"; type: "QColor" }
+ Property { name: "windowColor"; type: "QColor" }
+ Property { name: "labelTextColor"; type: "QColor" }
+ Property { name: "labelBackgroundColor"; type: "QColor" }
+ Property { name: "gridLineColor"; type: "QColor" }
+ Property { name: "singleHighlightColor"; type: "QColor" }
+ Property { name: "multiHighlightColor"; type: "QColor" }
+ Property { name: "lightColor"; type: "QColor" }
+ Property { name: "baseGradients"; type: "QList<QLinearGradient>" }
+ Property { name: "singleHighlightGradient"; type: "QLinearGradient" }
+ Property { name: "multiHighlightGradient"; type: "QLinearGradient" }
+ Property { name: "lightStrength"; type: "double" }
+ Property { name: "ambientLightStrength"; type: "double" }
+ Property { name: "highlightLightStrength"; type: "double" }
+ Property { name: "labelBorderEnabled"; type: "bool" }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "backgroundEnabled"; type: "bool" }
+ Property { name: "gridEnabled"; type: "bool" }
+ Property { name: "labelBackgroundEnabled"; type: "bool" }
+ Property { name: "colorStyle"; type: "ColorStyle" }
+ Signal {
+ name: "typeChanged"
+ Parameter { name: "themeType"; type: "Theme" }
+ }
+ Signal {
+ name: "baseColorsChanged"
+ Parameter { name: "colors"; type: "QList<QColor>" }
+ }
+ Signal {
+ name: "backgroundColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "windowColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "labelTextColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "labelBackgroundColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "gridLineColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "singleHighlightColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "multiHighlightColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "lightColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "baseGradientsChanged"
+ Parameter { name: "gradients"; type: "QList<QLinearGradient>" }
+ }
+ Signal {
+ name: "singleHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "QLinearGradient" }
+ }
+ Signal {
+ name: "multiHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "QLinearGradient" }
+ }
+ Signal {
+ name: "lightStrengthChanged"
+ Parameter { name: "strength"; type: "double" }
+ }
+ Signal {
+ name: "ambientLightStrengthChanged"
+ Parameter { name: "strength"; type: "double" }
+ }
+ Signal {
+ name: "highlightLightStrengthChanged"
+ Parameter { name: "strength"; type: "double" }
+ }
+ Signal {
+ name: "labelBorderEnabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "fontChanged"
+ Parameter { name: "font"; type: "QFont" }
+ }
+ Signal {
+ name: "backgroundEnabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "gridEnabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "labelBackgroundEnabledChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "colorStyleChanged"
+ Parameter { name: "style"; type: "ColorStyle" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QAbstract3DAxis"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/AbstractAxis3D 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "AxisOrientation"
+ values: {
+ "AxisOrientationNone": 0,
+ "AxisOrientationX": 1,
+ "AxisOrientationY": 2,
+ "AxisOrientationZ": 4
+ }
+ }
+ Enum {
+ name: "AxisType"
+ values: {
+ "AxisTypeNone": 0,
+ "AxisTypeCategory": 1,
+ "AxisTypeValue": 2
+ }
+ }
+ Property { name: "title"; type: "string" }
+ Property { name: "labels"; type: "QStringList" }
+ Property { name: "orientation"; type: "AxisOrientation"; isReadonly: true }
+ Property { name: "type"; type: "AxisType"; isReadonly: true }
+ Property { name: "min"; type: "double" }
+ Property { name: "max"; type: "double" }
+ Property { name: "autoAdjustRange"; type: "bool" }
+ Signal {
+ name: "titleChanged"
+ Parameter { name: "newTitle"; type: "string" }
+ }
+ Signal {
+ name: "orientationChanged"
+ Parameter { name: "orientation"; type: "AxisOrientation" }
+ }
+ Signal {
+ name: "minChanged"
+ Parameter { name: "value"; type: "double" }
+ }
+ Signal {
+ name: "maxChanged"
+ Parameter { name: "value"; type: "double" }
+ }
+ Signal {
+ name: "rangeChanged"
+ Parameter { name: "min"; type: "double" }
+ Parameter { name: "max"; type: "double" }
+ }
+ Signal {
+ name: "autoAdjustRangeChanged"
+ Parameter { name: "autoAdjust"; type: "bool" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QAbstract3DInputHandler"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/AbstractInputHandler3D 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "InputView"
+ values: {
+ "InputViewNone": 0,
+ "InputViewOnPrimary": 1,
+ "InputViewOnSecondary": 2
+ }
+ }
+ Property { name: "inputView"; type: "InputView" }
+ Property { name: "inputPosition"; type: "QPoint" }
+ Property { name: "scene"; type: "Q3DScene"; isPointer: true }
+ Signal {
+ name: "positionChanged"
+ Parameter { name: "position"; type: "QPoint" }
+ }
+ Signal {
+ name: "inputViewChanged"
+ Parameter { name: "view"; type: "InputView" }
+ }
+ Signal {
+ name: "sceneChanged"
+ Parameter { name: "scene"; type: "Q3DScene"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QAbstract3DSeries"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/Abstract3DSeries 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "SeriesType"
+ values: {
+ "SeriesTypeNone": 0,
+ "SeriesTypeBar": 1,
+ "SeriesTypeScatter": 2,
+ "SeriesTypeSurface": 4
+ }
+ }
+ Enum {
+ name: "Mesh"
+ values: {
+ "MeshUserDefined": 0,
+ "MeshBar": 1,
+ "MeshCube": 2,
+ "MeshPyramid": 3,
+ "MeshCone": 4,
+ "MeshCylinder": 5,
+ "MeshBevelBar": 6,
+ "MeshBevelCube": 7,
+ "MeshSphere": 8,
+ "MeshMinimal": 9,
+ "MeshArrow": 10,
+ "MeshPoint": 11
+ }
+ }
+ Property { name: "type"; type: "SeriesType"; isReadonly: true }
+ Property { name: "itemLabelFormat"; type: "string" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "mesh"; type: "Mesh" }
+ Property { name: "meshSmooth"; type: "bool" }
+ Property { name: "meshRotation"; type: "QQuaternion" }
+ Property { name: "userDefinedMesh"; type: "string" }
+ Property { name: "colorStyle"; type: "QtDataVisualization::Q3DTheme::ColorStyle" }
+ Property { name: "baseColor"; type: "QColor" }
+ Property { name: "baseGradient"; type: "QLinearGradient" }
+ Property { name: "singleHighlightColor"; type: "QColor" }
+ Property { name: "singleHighlightGradient"; type: "QLinearGradient" }
+ Property { name: "multiHighlightColor"; type: "QColor" }
+ Property { name: "multiHighlightGradient"; type: "QLinearGradient" }
+ Property { name: "name"; type: "string" }
+ Signal {
+ name: "itemLabelFormatChanged"
+ Parameter { name: "format"; type: "string" }
+ }
+ Signal {
+ name: "visibilityChanged"
+ Parameter { name: "visible"; type: "bool" }
+ }
+ Signal {
+ name: "meshChanged"
+ Parameter { name: "mesh"; type: "Mesh" }
+ }
+ Signal {
+ name: "meshSmoothChanged"
+ Parameter { name: "enabled"; type: "bool" }
+ }
+ Signal {
+ name: "meshRotationChanged"
+ Parameter { name: "rotation"; type: "QQuaternion" }
+ }
+ Signal {
+ name: "userDefinedMeshChanged"
+ Parameter { name: "fileName"; type: "string" }
+ }
+ Signal {
+ name: "colorStyleChanged"
+ Parameter { name: "style"; type: "Q3DTheme::ColorStyle" }
+ }
+ Signal {
+ name: "baseColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "baseGradientChanged"
+ Parameter { name: "gradient"; type: "QLinearGradient" }
+ }
+ Signal {
+ name: "singleHighlightColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "singleHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "QLinearGradient" }
+ }
+ Signal {
+ name: "multiHighlightColorChanged"
+ Parameter { name: "color"; type: "QColor" }
+ }
+ Signal {
+ name: "multiHighlightGradientChanged"
+ Parameter { name: "gradient"; type: "QLinearGradient" }
+ }
+ Signal {
+ name: "nameChanged"
+ Parameter { name: "name"; type: "string" }
+ }
+ Method {
+ name: "setMeshAxisAndAngle"
+ Parameter { name: "axis"; type: "QVector3D" }
+ Parameter { name: "angle"; type: "double" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QAbstractDataProxy"
+ prototype: "QObject"
+ exports: ["QtDataVisualization/AbstractDataProxy 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "DataType"
+ values: {
+ "DataTypeNone": 0,
+ "DataTypeBar": 1,
+ "DataTypeScatter": 2,
+ "DataTypeSurface": 4
+ }
+ }
+ Property { name: "type"; type: "DataType"; isReadonly: true }
+ }
+ Component {
+ name: "QtDataVisualization::QBar3DSeries"
+ prototype: "QtDataVisualization::QAbstract3DSeries"
+ exports: ["QtDataVisualization/QBar3DSeries 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "dataProxy"; type: "QBarDataProxy"; isPointer: true }
+ Property { name: "selectedBar"; type: "QPoint" }
+ Property { name: "meshAngle"; type: "double" }
+ Signal {
+ name: "dataProxyChanged"
+ Parameter { name: "proxy"; type: "QBarDataProxy"; isPointer: true }
+ }
+ Signal {
+ name: "selectedBarChanged"
+ Parameter { name: "position"; type: "QPoint" }
+ }
+ Signal {
+ name: "meshAngleChanged"
+ Parameter { name: "angle"; type: "double" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QBarDataProxy"
+ prototype: "QtDataVisualization::QAbstractDataProxy"
+ exports: ["QtDataVisualization/BarDataProxy 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "rowCount"; type: "int"; isReadonly: true }
+ Property { name: "rowLabels"; type: "QStringList" }
+ Property { name: "columnLabels"; type: "QStringList" }
+ Property { name: "series"; type: "QBar3DSeries"; isReadonly: true; isPointer: true }
+ Signal { name: "arrayReset" }
+ Signal {
+ name: "rowsAdded"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "rowsChanged"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "rowsRemoved"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "rowsInserted"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "itemChanged"
+ Parameter { name: "rowIndex"; type: "int" }
+ Parameter { name: "columnIndex"; type: "int" }
+ }
+ Signal {
+ name: "rowCountChanged"
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "seriesChanged"
+ Parameter { name: "series"; type: "QBar3DSeries"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QCategory3DAxis"
+ prototype: "QtDataVisualization::QAbstract3DAxis"
+ exports: ["QtDataVisualization/CategoryAxis3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "labels"; type: "QStringList" }
+ }
+ Component {
+ name: "QtDataVisualization::QHeightMapSurfaceDataProxy"
+ prototype: "QtDataVisualization::QSurfaceDataProxy"
+ exports: ["QtDataVisualization/HeightMapSurfaceDataProxy 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "heightMap"; type: "QImage" }
+ Property { name: "heightMapFile"; type: "string" }
+ Property { name: "minXValue"; type: "double" }
+ Property { name: "maxXValue"; type: "double" }
+ Property { name: "minZValue"; type: "double" }
+ Property { name: "maxZValue"; type: "double" }
+ Signal {
+ name: "heightMapChanged"
+ Parameter { name: "image"; type: "QImage" }
+ }
+ Signal {
+ name: "heightMapFileChanged"
+ Parameter { name: "filename"; type: "string" }
+ }
+ Signal {
+ name: "minXValueChanged"
+ Parameter { name: "value"; type: "double" }
+ }
+ Signal {
+ name: "maxXValueChanged"
+ Parameter { name: "value"; type: "double" }
+ }
+ Signal {
+ name: "minZValueChanged"
+ Parameter { name: "value"; type: "double" }
+ }
+ Signal {
+ name: "maxZValueChanged"
+ Parameter { name: "value"; type: "double" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QItemModelBarDataProxy"
+ prototype: "QtDataVisualization::QBarDataProxy"
+ exports: ["QtDataVisualization/ItemModelBarDataProxy 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
+ Property { name: "rowRole"; type: "string" }
+ Property { name: "columnRole"; type: "string" }
+ Property { name: "valueRole"; type: "string" }
+ Property { name: "rotationRole"; type: "string" }
+ Property { name: "rowCategories"; type: "QStringList" }
+ Property { name: "columnCategories"; type: "QStringList" }
+ Property { name: "useModelCategories"; type: "bool" }
+ Property { name: "autoRowCategories"; type: "bool" }
+ Property { name: "autoColumnCategories"; type: "bool" }
+ Signal {
+ name: "itemModelChanged"
+ Parameter { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
+ }
+ Signal {
+ name: "rowRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "columnRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "valueRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "rotationRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "useModelCategoriesChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Signal {
+ name: "autoRowCategoriesChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Signal {
+ name: "autoColumnCategoriesChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Method {
+ name: "rowCategoryIndex"
+ type: "int"
+ Parameter { name: "category"; type: "string" }
+ }
+ Method {
+ name: "columnCategoryIndex"
+ type: "int"
+ Parameter { name: "category"; type: "string" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QItemModelScatterDataProxy"
+ prototype: "QtDataVisualization::QScatterDataProxy"
+ exports: ["QtDataVisualization/ItemModelScatterDataProxy 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
+ Property { name: "xPosRole"; type: "string" }
+ Property { name: "yPosRole"; type: "string" }
+ Property { name: "zPosRole"; type: "string" }
+ Property { name: "rotationRole"; type: "string" }
+ Signal {
+ name: "itemModelChanged"
+ Parameter { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
+ }
+ Signal {
+ name: "xPosRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "yPosRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "zPosRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "rotationRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QItemModelSurfaceDataProxy"
+ prototype: "QtDataVisualization::QSurfaceDataProxy"
+ exports: ["QtDataVisualization/ItemModelSurfaceDataProxy 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
+ Property { name: "rowRole"; type: "string" }
+ Property { name: "columnRole"; type: "string" }
+ Property { name: "xPosRole"; type: "string" }
+ Property { name: "yPosRole"; type: "string" }
+ Property { name: "zPosRole"; type: "string" }
+ Property { name: "rowCategories"; type: "QStringList" }
+ Property { name: "columnCategories"; type: "QStringList" }
+ Property { name: "useModelCategories"; type: "bool" }
+ Property { name: "autoRowCategories"; type: "bool" }
+ Property { name: "autoColumnCategories"; type: "bool" }
+ Signal {
+ name: "itemModelChanged"
+ Parameter { name: "itemModel"; type: "const QAbstractItemModel"; isPointer: true }
+ }
+ Signal {
+ name: "rowRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "columnRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "xPosRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "yPosRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "zPosRoleChanged"
+ Parameter { name: "role"; type: "string" }
+ }
+ Signal {
+ name: "useModelCategoriesChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Signal {
+ name: "autoRowCategoriesChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Signal {
+ name: "autoColumnCategoriesChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Method {
+ name: "rowCategoryIndex"
+ type: "int"
+ Parameter { name: "category"; type: "string" }
+ }
+ Method {
+ name: "columnCategoryIndex"
+ type: "int"
+ Parameter { name: "category"; type: "string" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QScatter3DSeries"
+ prototype: "QtDataVisualization::QAbstract3DSeries"
+ exports: ["QtDataVisualization/QScatter3DSeries 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "dataProxy"; type: "QScatterDataProxy"; isPointer: true }
+ Property { name: "selectedItem"; type: "int" }
+ Property { name: "itemSize"; type: "double" }
+ Signal {
+ name: "dataProxyChanged"
+ Parameter { name: "proxy"; type: "QScatterDataProxy"; isPointer: true }
+ }
+ Signal {
+ name: "selectedItemChanged"
+ Parameter { name: "index"; type: "int" }
+ }
+ Signal {
+ name: "itemSizeChanged"
+ Parameter { name: "size"; type: "double" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QScatterDataProxy"
+ prototype: "QtDataVisualization::QAbstractDataProxy"
+ exports: ["QtDataVisualization/ScatterDataProxy 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "itemCount"; type: "int"; isReadonly: true }
+ Property { name: "series"; type: "QScatter3DSeries"; isReadonly: true; isPointer: true }
+ Signal { name: "arrayReset" }
+ Signal {
+ name: "itemsAdded"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "itemsChanged"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "itemsRemoved"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "itemsInserted"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "itemCountChanged"
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "seriesChanged"
+ Parameter { name: "series"; type: "QScatter3DSeries"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QSurface3DSeries"
+ prototype: "QtDataVisualization::QAbstract3DSeries"
+ exports: ["QtDataVisualization/QSurface3DSeries 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "DrawFlag"
+ values: {
+ "DrawWireframe": 1,
+ "DrawSurface": 2,
+ "DrawSurfaceAndWireframe": 3
+ }
+ }
+ Enum {
+ name: "DrawFlags"
+ values: {
+ "DrawWireframe": 1,
+ "DrawSurface": 2,
+ "DrawSurfaceAndWireframe": 3
+ }
+ }
+ Property { name: "dataProxy"; type: "QSurfaceDataProxy"; isPointer: true }
+ Property { name: "selectedPoint"; type: "QPoint" }
+ Property { name: "flatShadingEnabled"; type: "bool" }
+ Property { name: "flatShadingSupported"; type: "bool"; isReadonly: true }
+ Property { name: "drawMode"; type: "DrawFlags" }
+ Signal {
+ name: "dataProxyChanged"
+ Parameter { name: "proxy"; type: "QSurfaceDataProxy"; isPointer: true }
+ }
+ Signal {
+ name: "selectedPointChanged"
+ Parameter { name: "position"; type: "QPoint" }
+ }
+ Signal {
+ name: "flatShadingEnabledChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Signal {
+ name: "flatShadingSupportedChanged"
+ Parameter { name: "enable"; type: "bool" }
+ }
+ Signal {
+ name: "drawModeChanged"
+ Parameter { name: "mode"; type: "QSurface3DSeries::DrawFlags" }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QSurfaceDataProxy"
+ prototype: "QtDataVisualization::QAbstractDataProxy"
+ exports: ["QtDataVisualization/SurfaceDataProxy 1.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Property { name: "rowCount"; type: "int"; isReadonly: true }
+ Property { name: "columnCount"; type: "int"; isReadonly: true }
+ Property { name: "series"; type: "QSurface3DSeries"; isReadonly: true; isPointer: true }
+ Signal { name: "arrayReset" }
+ Signal {
+ name: "rowsAdded"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "rowsChanged"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "rowsRemoved"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "rowsInserted"
+ Parameter { name: "startIndex"; type: "int" }
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "itemChanged"
+ Parameter { name: "rowIndex"; type: "int" }
+ Parameter { name: "columnIndex"; type: "int" }
+ }
+ Signal {
+ name: "rowCountChanged"
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "columnCountChanged"
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "seriesChanged"
+ Parameter { name: "series"; type: "QSurface3DSeries"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QtDataVisualization::QTouch3DInputHandler"
+ prototype: "QtDataVisualization::Q3DInputHandler"
+ }
+ Component {
+ name: "QtDataVisualization::QValue3DAxis"
+ prototype: "QtDataVisualization::QAbstract3DAxis"
+ exports: ["QtDataVisualization/ValueAxis3D 1.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "segmentCount"; type: "int" }
+ Property { name: "subSegmentCount"; type: "int" }
+ Property { name: "labelFormat"; type: "string" }
+ Signal {
+ name: "segmentCountChanged"
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "subSegmentCountChanged"
+ Parameter { name: "count"; type: "int" }
+ }
+ Signal {
+ name: "labelFormatChanged"
+ Parameter { name: "format"; type: "string" }
+ }
+ }
+}
diff --git a/tests/kinectsurface/surfacedata.cpp b/tests/kinectsurface/surfacedata.cpp
index 14f37288..b1c173cd 100644
--- a/tests/kinectsurface/surfacedata.cpp
+++ b/tests/kinectsurface/surfacedata.cpp
@@ -90,7 +90,7 @@ SurfaceData::SurfaceData(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars
gradient.setColorAt(1.0, Qt::yellow);
m_surface->setSelectionMode(QAbstract3DGraph::SelectionNone);
m_surface->setShadowQuality(QAbstract3DGraph::ShadowQualityNone);
- m_surface->scene()->activeCamera()->setCameraPosition(0.0, 90.0, 150);
+ m_surface->scene()->activeCamera()->setCameraPosition(0.0, 90.0, 150.0);
m_surface->axisY()->setMax(255);
QSurface3DSeries *series1 = new QSurface3DSeries(new QHeightMapSurfaceDataProxy());
series1->setFlatShadingEnabled(true);
@@ -102,7 +102,7 @@ SurfaceData::SurfaceData(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars
m_scatter->setSelectionMode(QAbstract3DGraph::SelectionNone);
m_scatter->activeTheme()->setGridEnabled(false);
m_scatter->setShadowQuality(QAbstract3DGraph::ShadowQualityLow);
- m_scatter->scene()->activeCamera()->setCameraPosition(0.0, 60.0, 150);
+ m_scatter->scene()->activeCamera()->setCameraPosition(0.0, 60.0, 150.0);
QScatter3DSeries *series2 = new QScatter3DSeries;
#ifdef LOW_END_DEVICE
series2->setMesh(QAbstract3DSeries::MeshPoint);
@@ -138,7 +138,7 @@ SurfaceData::SurfaceData(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars
m_bars->setShadowQuality(QAbstract3DGraph::ShadowQualityLow);
#endif
m_bars->setBarSpacing(QSizeF(0.0, 0.0));
- m_bars->scene()->activeCamera()->setCameraPosition(0.0, 65.0, 130);
+ m_bars->scene()->activeCamera()->setCameraPosition(0.0, 65.0, 130.0);
QBar3DSeries *series3 = new QBar3DSeries;
series3->setMesh(QAbstract3DSeries::MeshBar);
m_bars->addSeries(series3);
diff --git a/tests/multigraphs/data.cpp b/tests/multigraphs/data.cpp
index 9fd27b96..dc736d46 100644
--- a/tests/multigraphs/data.cpp
+++ b/tests/multigraphs/data.cpp
@@ -56,7 +56,7 @@ Data::Data(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars,
m_surface->setSelectionMode(QAbstract3DGraph::SelectionNone);
m_surface->activeTheme()->setGridEnabled(false);
m_surface->activeTheme()->setBackgroundEnabled(false);
- m_surface->scene()->activeCamera()->setCameraPosition(0.0, 90.0, 150);
+ m_surface->scene()->activeCamera()->setCameraPosition(0.0, 90.0, 150.0);
QSurface3DSeries *series1 = new QSurface3DSeries(new QHeightMapSurfaceDataProxy());
series1->setFlatShadingEnabled(true);
series1->setDrawMode(QSurface3DSeries::DrawSurface);
@@ -69,7 +69,7 @@ Data::Data(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars,
m_scatter->setSelectionMode(QAbstract3DGraph::SelectionNone);
m_scatter->activeTheme()->setGridEnabled(false);
m_scatter->setShadowQuality(QAbstract3DGraph::ShadowQualitySoftLow);
- m_scatter->scene()->activeCamera()->setCameraPosition(0.0, 85.0, 150);
+ m_scatter->scene()->activeCamera()->setCameraPosition(0.0, 85.0, 150.0);
QScatter3DSeries *series2 = new QScatter3DSeries;
series2->setMesh(QAbstract3DSeries::MeshPoint);
m_scatter->addSeries(series2);
@@ -80,7 +80,7 @@ Data::Data(Q3DSurface *surface, Q3DScatter *scatter, Q3DBars *bars,
m_bars->activeTheme()->setGridEnabled(false);
m_bars->setShadowQuality(QAbstract3DGraph::ShadowQualityLow);
m_bars->setBarSpacing(QSizeF(0.0, 0.0));
- m_bars->scene()->activeCamera()->setCameraPosition(0.0, 75.0, 150);
+ m_bars->scene()->activeCamera()->setCameraPosition(0.0, 75.0, 150.0);
QBar3DSeries *series3 = new QBar3DSeries;
series3->setMesh(QAbstract3DSeries::MeshBar);
m_bars->addSeries(series3);
diff --git a/tests/qmlmultiwindow/main.cpp b/tests/qmlmultiwindow/main.cpp
new file mode 100644
index 00000000..33122641
--- /dev/null
+++ b/tests/qmlmultiwindow/main.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+#include <QtGui/QGuiApplication>
+#include <QtCore/QDir>
+#include <QtQuick/QQuickView>
+#include <QtQml/QQmlEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQuickView viewer;
+
+ // The following are needed to make examples run without having to install the module
+ // in desktop environments.
+#ifdef Q_OS_WIN
+ QString extraImportPath(QStringLiteral("%1/../../../%2"));
+#else
+ QString extraImportPath(QStringLiteral("%1/../../%2"));
+#endif
+ viewer.engine()->addImportPath(extraImportPath.arg(QGuiApplication::applicationDirPath(),
+ QString::fromLatin1("qml")));
+ QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QWindow::close);
+
+ viewer.setTitle(QStringLiteral("QML multiwindow example"));
+ viewer.setSource(QUrl("qrc:/qml/qmlmultiwindow/main.qml"));
+ viewer.setResizeMode(QQuickView::SizeRootObjectToView);
+ viewer.show();
+
+ return app.exec();
+}
diff --git a/tests/qmlmultiwindow/qml/qmlmultiwindow/Data.qml b/tests/qmlmultiwindow/qml/qmlmultiwindow/Data.qml
new file mode 100644
index 00000000..43152e50
--- /dev/null
+++ b/tests/qmlmultiwindow/qml/qmlmultiwindow/Data.qml
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.1
+
+Item {
+ property alias data: dataModel
+
+ ListModel {
+ id: dataModel
+ ListElement{ row: "0"; col: "0"; longitude: "20.0"; latitude: "10.0"; pop_density: "4.75"; }
+ ListElement{ row: "1"; col: "0"; longitude: "21.1"; latitude: "10.3"; pop_density: "3.00"; }
+ ListElement{ row: "2"; col: "0"; longitude: "22.5"; latitude: "10.7"; pop_density: "1.24"; }
+ ListElement{ row: "3"; col: "0"; longitude: "24.0"; latitude: "10.5"; pop_density: "2.53"; }
+ ListElement{ row: "0"; col: "1"; longitude: "20.2"; latitude: "11.2"; pop_density: "3.55"; }
+ ListElement{ row: "1"; col: "1"; longitude: "21.3"; latitude: "11.5"; pop_density: "3.03"; }
+ ListElement{ row: "2"; col: "1"; longitude: "22.6"; latitude: "11.7"; pop_density: "3.46"; }
+ ListElement{ row: "3"; col: "1"; longitude: "23.4"; latitude: "11.5"; pop_density: "4.12"; }
+ ListElement{ row: "0"; col: "2"; longitude: "20.2"; latitude: "12.3"; pop_density: "3.37"; }
+ ListElement{ row: "1"; col: "2"; longitude: "21.1"; latitude: "12.4"; pop_density: "2.98"; }
+ ListElement{ row: "2"; col: "2"; longitude: "22.5"; latitude: "12.1"; pop_density: "3.33"; }
+ ListElement{ row: "3"; col: "2"; longitude: "23.3"; latitude: "12.7"; pop_density: "3.23"; }
+ ListElement{ row: "0"; col: "3"; longitude: "20.7"; latitude: "13.3"; pop_density: "5.34"; }
+ ListElement{ row: "1"; col: "3"; longitude: "21.5"; latitude: "13.2"; pop_density: "4.54"; }
+ ListElement{ row: "2"; col: "3"; longitude: "22.4"; latitude: "13.6"; pop_density: "4.65"; }
+ ListElement{ row: "3"; col: "3"; longitude: "23.2"; latitude: "13.4"; pop_density: "6.67"; }
+ ListElement{ row: "0"; col: "4"; longitude: "20.6"; latitude: "15.0"; pop_density: "6.01"; }
+ ListElement{ row: "1"; col: "4"; longitude: "21.3"; latitude: "14.6"; pop_density: "5.83"; }
+ ListElement{ row: "2"; col: "4"; longitude: "22.5"; latitude: "14.8"; pop_density: "7.32"; }
+ ListElement{ row: "3"; col: "4"; longitude: "23.7"; latitude: "14.3"; pop_density: "6.90"; }
+ }
+}
+
diff --git a/tests/qmlmultiwindow/qml/qmlmultiwindow/NewButton.qml b/tests/qmlmultiwindow/qml/qmlmultiwindow/NewButton.qml
new file mode 100644
index 00000000..e4fb99d2
--- /dev/null
+++ b/tests/qmlmultiwindow/qml/qmlmultiwindow/NewButton.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Controls 1.0
+import QtQuick.Controls.Styles 1.0
+
+Item {
+ id: newbutton
+
+ property alias text: buttonText.text
+
+ signal clicked
+
+ implicitWidth: buttonText.implicitWidth + 5
+ implicitHeight: buttonText.implicitHeight + 10
+
+ Button {
+ id: buttonText
+ width: parent.width
+ height: parent.height
+
+ style: ButtonStyle {
+ label: Component {
+ Text {
+ text: buttonText.text
+ clip: true
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ anchors.fill: parent
+ }
+ }
+ }
+ onClicked: newbutton.clicked()
+ }
+}
diff --git a/tests/qmlmultiwindow/qml/qmlmultiwindow/main.qml b/tests/qmlmultiwindow/qml/qmlmultiwindow/main.qml
new file mode 100644
index 00000000..fc7626b3
--- /dev/null
+++ b/tests/qmlmultiwindow/qml/qmlmultiwindow/main.qml
@@ -0,0 +1,258 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use contact form at http://qt.digia.com
+**
+** This file is part of the QtDataVisualization module.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** contact form at http://qt.digia.com
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import QtQuick.Window 2.1
+import QtQuick.Layouts 1.0
+import QtDataVisualization 1.0
+import "."
+
+Rectangle {
+ id: mainView
+ width: 800
+ height: 600
+
+ Data {
+ id: data
+ }
+
+ Window {
+ id: firstWindow
+ x: 100
+ y: 100
+ width: 500
+ height: 500
+ visible: true
+ Rectangle {
+ id: firstRect
+ color: "red"
+ anchors.fill: parent
+ }
+ }
+
+ Window {
+ id: secondWindow
+ x: 100
+ y: 700
+ width: 500
+ height: 500
+ visible: true
+ Rectangle {
+ id: secondRect
+ color: "blue"
+ anchors.fill: parent
+ }
+ }
+
+ states: [
+ State {
+ name: "firstWindow"
+ ParentChange { target: surfaceGraph; parent: firstRect; x: 0; y: 0 }
+ },
+ State {
+ name: "secondWindow"
+ ParentChange { target: surfaceGraph; parent: secondRect; x: 0; y: 0 }
+ }
+ ]
+
+ state: "firstWindow"
+
+ //! [0]
+ GridLayout {
+ id: gridLayout
+ columns: 2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ anchors.top: mainView.top
+ anchors.bottom: mainView.bottom
+ anchors.left: mainView.left
+ anchors.right: mainView.right
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.color: surfaceGraph.theme.gridLineColor
+ border.width: 2
+
+ Surface3D {
+ id: surfaceGraph
+ anchors.fill: parent
+ anchors.margins: parent.border.width
+ theme: Theme3D {
+ type: Theme3D.ThemePrimaryColors
+ font.pointSize: 60
+ }
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
+
+ Surface3DSeries {
+ itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel"
+ ItemModelSurfaceDataProxy {
+ itemModel: data.data
+ // The surface data points are not neatly lined up in rows and columns,
+ // so we define explicit row and column roles.
+ rowRole: "row"
+ columnRole: "col"
+ xPosRole: "latitude"
+ zPosRole: "longitude"
+ yPosRole: "pop_density"
+ }
+ }
+ }
+ }
+
+ // We'll use one grid cell for buttons
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ GridLayout {
+ anchors.right: parent.right
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ columns: 2
+
+ NewButton {
+ Layout.minimumWidth: parent.width / 2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Move graph between windows"
+ onClicked: {
+ if (mainView.state === "firstWindow") {
+ mainView.state = "secondWindow"
+ } else {
+ mainView.state = "firstWindow"
+ }
+ }
+ }
+
+ NewButton {
+ Layout.minimumWidth: parent.width / 2
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Quit"
+ onClicked: Qt.quit(0);
+ }
+
+ NewButton {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Reset Cameras"
+ onClicked: resetCameras() // call a helper function to keep button itself simpler
+ }
+
+ NewButton {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ text: "Toggle Mesh Styles"
+ onClicked: toggleMeshStyle() // call a helper function to keep button itself simpler
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.color: scatterGraph.theme.gridLineColor
+ border.width: 2
+
+ Scatter3D {
+ id: scatterGraph
+ anchors.fill: parent
+ anchors.margins: parent.border.width
+ theme: Theme3D {
+ type: Theme3D.ThemeDigia
+ font.pointSize: 60
+ }
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
+
+ Scatter3DSeries {
+ itemLabelFormat: "Pop density at (@xLabel N, @zLabel E): @yLabel"
+ ItemModelScatterDataProxy {
+ itemModel: data.data
+ // Mapping model roles to scatter series item coordinates.
+ xPosRole: "latitude"
+ zPosRole: "longitude"
+ yPosRole: "pop_density"
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ border.color: barGraph.theme.gridLineColor
+ border.width: 2
+
+ Bars3D {
+ id: barGraph
+ anchors.fill: parent
+ anchors.margins: parent.border.width
+ theme: Theme3D {
+ type: Theme3D.ThemeQt
+ font.pointSize: 60
+ }
+ selectionMode: AbstractGraph3D.SelectionItemAndRow | AbstractGraph3D.SelectionSlice
+ scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeftHigh
+
+ Bar3DSeries {
+ itemLabelFormat: "@seriesName: @valueLabel"
+ name: "Population density"
+
+ ItemModelBarDataProxy {
+ itemModel: data.data
+ // Mapping model roles to bar series rows, columns, and values.
+ rowRole: "row"
+ columnRole: "col"
+ valueRole: "pop_density"
+ }
+ }
+ }
+ }
+ }
+ //! [0]
+
+ function clearSelections() {
+ barGraph.clearSelection()
+ scatterGraph.clearSelection()
+ surfaceGraph.clearSelection()
+ }
+
+ function resetCameras() {
+ surfaceGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
+ scatterGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
+ barGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetIsometricLeftHigh
+ surfaceGraph.scene.activeCamera.zoomLevel = 100.0
+ scatterGraph.scene.activeCamera.zoomLevel = 100.0
+ barGraph.scene.activeCamera.zoomLevel = 100.0
+ }
+
+ function toggleMeshStyle() {
+ if (barGraph.seriesList[0].meshSmooth === true) {
+ barGraph.seriesList[0].meshSmooth = false
+ if (surfaceGraph.seriesList[0].flatShadingSupported)
+ surfaceGraph.seriesList[0].flatShadingEnabled = true
+ scatterGraph.seriesList[0].meshSmooth = false
+ } else {
+ barGraph.seriesList[0].meshSmooth = true
+ surfaceGraph.seriesList[0].flatShadingEnabled = false
+ scatterGraph.seriesList[0].meshSmooth = true
+ }
+ }
+}
diff --git a/tests/qmlmultiwindow/qmlmultiwindow.pro b/tests/qmlmultiwindow/qmlmultiwindow.pro
new file mode 100644
index 00000000..c3e7d1bd
--- /dev/null
+++ b/tests/qmlmultiwindow/qmlmultiwindow.pro
@@ -0,0 +1,12 @@
+!include( ../tests.pri ) {
+ error( "Couldn't find the tests.pri file!" )
+}
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+RESOURCES += qmlmultiwindow.qrc
+
+OTHER_FILES += doc/src/* \
+ doc/images/* \
+ qml/qmlmultiwindow/*
diff --git a/tests/qmlmultiwindow/qmlmultiwindow.qrc b/tests/qmlmultiwindow/qmlmultiwindow.qrc
new file mode 100644
index 00000000..31a92b25
--- /dev/null
+++ b/tests/qmlmultiwindow/qmlmultiwindow.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qml/qmlmultiwindow/Data.qml</file>
+ <file>qml/qmlmultiwindow/main.qml</file>
+ <file>qml/qmlmultiwindow/NewButton.qml</file>
+ </qresource>
+</RCC>
diff --git a/tests/tests.pro b/tests/tests.pro
index ec28d997..613534e9 100644
--- a/tests/tests.pro
+++ b/tests/tests.pro
@@ -13,7 +13,8 @@ SUBDIRS += barstest \
qmlcamera \
qmldynamicdata \
multigraphs \
- directional
+ directional \
+ qmlmultiwindow
#SUBDIRS += kinectsurface