From 0f2d0d7ac09687cb77cb497c715eb864ccb45dd6 Mon Sep 17 00:00:00 2001 From: Tomi Korpipaa Date: Tue, 21 Feb 2023 09:58:46 +0200 Subject: Tweak qmlvolume manual test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I923804770321086f3e69ff8a3162d4f6856e5551 Reviewed-by: Tomi Korpipää --- tests/manual/qmlvolume/datasource.cpp | 2 +- tests/manual/qmlvolume/qml/qmlvolume/main.qml | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'tests/manual') diff --git a/tests/manual/qmlvolume/datasource.cpp b/tests/manual/qmlvolume/datasource.cpp index bb38f7a4..6a16278e 100644 --- a/tests/manual/qmlvolume/datasource.cpp +++ b/tests/manual/qmlvolume/datasource.cpp @@ -24,7 +24,7 @@ void DataSource::fillVolume(QCustom3DVolume *volumeItem) // This can take a while if the dimensions are large, so we support incremental data generation. int index = 0; - int textureSize = 256; + int textureSize = 1024; QVector3D midPoint(float(textureSize) / 2.0f, float(textureSize) / 2.0f, float(textureSize) / 2.0f); diff --git a/tests/manual/qmlvolume/qml/qmlvolume/main.qml b/tests/manual/qmlvolume/qml/qmlvolume/main.qml index 631a72a3..da061483 100644 --- a/tests/manual/qmlvolume/qml/qmlvolume/main.qml +++ b/tests/manual/qmlvolume/qml/qmlvolume/main.qml @@ -34,7 +34,7 @@ Item { itemLabelVisible: false onItemLabelChanged: { - if (surfaceSeries.selectedPoint === surfaceSeries.invalidSelectionPosition) + if (surfaceSeries.selectedPoint == surfaceSeries.invalidSelectionPosition) selectionText.text = "No selection" else selectionText.text = surfaceSeries.itemLabel @@ -101,7 +101,7 @@ Item { text: "Slice" onClicked: { - if (volumeItem.sliceIndexZ == -1) { + if (volumeItem.sliceIndexZ === -1) { volumeItem.sliceIndexZ = 128 volumeItem.drawSlices = true volumeItem.drawSliceFrames = true @@ -123,7 +123,27 @@ Item { } } } + } + + SequentialAnimation { + running: volumeItem.drawSlices + loops: Animation.Infinite + PropertyAnimation { + target: volumeItem + property: "sliceIndexZ" + from: 0 + to: 1024 + duration: 5000 + } + + PropertyAnimation { + target: volumeItem + property: "sliceIndexZ" + from: 1024 + to: 0 + duration: 5000 + } } Custom3DVolume { -- cgit v1.2.3