diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-01-19 09:20:48 +0200 |
---|---|---|
committer | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-01-20 08:13:02 +0200 |
commit | ca19446c01dfaca1c25dd35ad28e78d15385432b (patch) | |
tree | a705b133bb9e66ae34166552ca6c00fb113ad3c0 /examples/datavisualization/qmlsurface/qml | |
parent | 5d117efa1a137b5b22b6b72cd028fa574dd5b5cb (diff) |
Bundle application resources in QML examples
Pick-to: 6.5
Task-number: QTBUG-110329
Change-Id: I91dc271398464336e4fda1279554ce899f6319b2
Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'examples/datavisualization/qmlsurface/qml')
-rw-r--r-- | examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml | 2 | ||||
-rw-r--r-- | examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml | 50 |
2 files changed, 25 insertions, 27 deletions
diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml index 413c6888..24151c06 100644 --- a/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml +++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/Data.qml @@ -2,8 +2,6 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only import QtQuick -import QtQml -import QtQml.Models Item { property alias model: dataModel diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml index e6f228f1..15994568 100644 --- a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml +++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml @@ -90,7 +90,7 @@ Rectangle { visible: false HeightMapSurfaceDataProxy { - heightMapFile: ":/heightmaps/image" + heightMapFile: ":/heightmap.png" // We don't want the default data values set by heightmap proxy. minZValue: 30 maxZValue: 60 @@ -144,14 +144,14 @@ Rectangle { onClicked: { if (Qt.colorEqual(surfaceSeries.wireframeColor, "#000000") && Qt.colorEqual(heightSeries.wireframeColor, "#000000")) { - surfaceSeries.wireframeColor = "red" - heightSeries.wireframeColor = "red" - text = "Black surface\ngrid color" + surfaceSeries.wireframeColor = "red"; + heightSeries.wireframeColor = "red"; + text = "Black surface\ngrid color"; } else { - surfaceSeries.wireframeColor = "black" - heightSeries.wireframeColor = "black" - text = "Red surface\ngrid color" + surfaceSeries.wireframeColor = "black"; + heightSeries.wireframeColor = "black"; + text = "Red surface\ngrid color"; } } } @@ -209,10 +209,10 @@ Rectangle { onClicked: { if (surfacePlot.theme.backgroundEnabled === true) { surfacePlot.theme.backgroundEnabled = false; - text = "Show\nBackground" + text = "Show\nBackground"; } else { surfacePlot.theme.backgroundEnabled = true; - text = "Hide\nBackground" + text = "Hide\nBackground"; } } } @@ -227,10 +227,10 @@ Rectangle { onClicked: { if (surfacePlot.theme.gridEnabled === true) { surfacePlot.theme.gridEnabled = false; - text = "Show\nGrid" + text = "Show\nGrid"; } else { surfacePlot.theme.gridEnabled = true; - text = "Hide\nGrid" + text = "Hide\nGrid"; } } } @@ -245,17 +245,17 @@ Rectangle { //! [3] onClicked: { if (surfaceSeries.visible === false) { - surfacePlot.axisY.max = 500.0 - surfaceSeries.visible = true - heightSeries.visible = false - middleGradient.position = 0.25 - text = "Switch to Height Map Series" + surfacePlot.axisY.max = 500.0; + surfaceSeries.visible = true; + heightSeries.visible = false; + middleGradient.position = 0.25; + text = "Switch to Height Map Series"; } else { - surfacePlot.axisY.max = 250.0 - surfaceSeries.visible = false - heightSeries.visible = true - middleGradient.position = 0.50 - text = "Switch to Item Model Series" + surfacePlot.axisY.max = 250.0; + surfaceSeries.visible = false; + heightSeries.visible = true; + middleGradient.position = 0.50; + text = "Switch to Item Model Series"; } } //! [3] @@ -264,13 +264,13 @@ Rectangle { function checkState() { if (surfaceSeries.drawMode & Surface3DSeries.DrawSurface) - surfaceToggle.text = "Hide\nSurface" + surfaceToggle.text = "Hide\nSurface"; else - surfaceToggle.text = "Show\nSurface" + surfaceToggle.text = "Show\nSurface"; if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe) - surfaceGridToggle.text = "Hide Surface\nGrid" + surfaceGridToggle.text = "Hide Surface\nGrid"; else - surfaceGridToggle.text = "Show Surface\nGrid" + surfaceGridToggle.text = "Show Surface\nGrid"; } } |