Tweak qmlvolume manual test

Change-Id: I923804770321086f3e69ff8a3162d4f6856e5551
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
This commit is contained in:
Tomi Korpipaa 2023-02-21 09:58:46 +02:00
parent 5f5258a014
commit 0f2d0d7ac0
2 changed files with 23 additions and 3 deletions

View File

@ -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);

View File

@ -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 {