diff options
author | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-02-21 09:58:46 +0200 |
---|---|---|
committer | Tomi Korpipaa <tomi.korpipaa@qt.io> | 2023-02-21 09:59:12 +0200 |
commit | 0f2d0d7ac09687cb77cb497c715eb864ccb45dd6 (patch) | |
tree | af89117ced1afa6229c46b24d086f35c2981bfd6 /tests/manual | |
parent | 5f5258a0145141b77f9a0a7fc116281010e8ec65 (diff) |
Tweak qmlvolume manual test
Change-Id: I923804770321086f3e69ff8a3162d4f6856e5551
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/qmlvolume/datasource.cpp | 2 | ||||
-rw-r--r-- | tests/manual/qmlvolume/qml/qmlvolume/main.qml | 24 |
2 files changed, 23 insertions, 3 deletions
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 { |