diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-09-23 13:57:47 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-09-24 09:50:51 +0300 |
commit | f842e21c7fa44d806c06a1463c723632b10e6172 (patch) | |
tree | 544b03ec20521c203a884cf74809972410532730 /examples/qmlsurface | |
parent | ac789c99ad04e5e907365d408d5f94df1685a668 (diff) |
Made surface axis ranges adjustable.
If the surface is partially off the visible range, only grids
that are fully within the visible range will be drawn.
If only one row or column is within visible range, surface is
not drawn.
Task-number: QTRD-2320
Change-Id: If2691577cde61dfd270d79c32b9d6f69984966ba
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/qmlsurface')
-rw-r--r-- | examples/qmlsurface/qml/qmlsurface/data.qml | 7 | ||||
-rw-r--r-- | examples/qmlsurface/qml/qmlsurface/main.qml | 10 |
2 files changed, 9 insertions, 8 deletions
diff --git a/examples/qmlsurface/qml/qmlsurface/data.qml b/examples/qmlsurface/qml/qmlsurface/data.qml index ccafc5d2..2c6849eb 100644 --- a/examples/qmlsurface/qml/qmlsurface/data.qml +++ b/examples/qmlsurface/qml/qmlsurface/data.qml @@ -28,6 +28,13 @@ Item { HeightMapSurfaceDataProxy { id: heightMapProxy heightMapFile: ":/heightmaps/image" + onArrayReset: { + // We don't want the default data values set by heightmap proxy. + minValueRows = 30 + maxValueRows = 60 + minValueColumns = 67 + maxValueColumns = 97 + } } SurfaceDataMapping { diff --git a/examples/qmlsurface/qml/qmlsurface/main.qml b/examples/qmlsurface/qml/qmlsurface/main.qml index b8c09b35..7d83c1a0 100644 --- a/examples/qmlsurface/qml/qmlsurface/main.qml +++ b/examples/qmlsurface/qml/qmlsurface/main.qml @@ -50,9 +50,7 @@ Item { cameraPreset: Surface3D.PresetIsometricLeft dataProxy: surfaceData.heightProxy axisY.min: 0.0 - axisY.max: 255.0 - axisX.max: 40.0 - axisZ.max: 40.0 + axisY.max: 250.0 axisX.segmentCount: 10 axisX.subSegmentCount: 2 axisX.labelFormat: "%i" @@ -141,14 +139,10 @@ Item { onClicked: { if (surfaceplot.dataProxy === surfaceData.heightProxy) { surfaceplot.axisY.max = 500.0 - surfaceplot.axisX.max = 99.0 - surfaceplot.axisZ.max = 99.0 surfaceplot.dataProxy = surfaceData.proxy text = "Switch to Height Map Proxy" } else { - surfaceplot.axisY.max = 255.0 - surfaceplot.axisX.max = 40.0 - surfaceplot.axisZ.max = 40.0 + surfaceplot.axisY.max = 250.0 surfaceplot.dataProxy = surfaceData.heightProxy text = "Switch to Item Model Proxy" } |