[Panorama Viewer] add Repeater

This commit is contained in:
Thomas Zorroche 2021-01-21 16:09:55 +01:00 committed by Fabien Castan
parent a33810f50d
commit fdfe5d9db4

View file

@ -44,21 +44,48 @@ AliceVision.PanoramaViewer {
acceptedButtons: Qt.NoButton acceptedButtons: Qt.NoButton
} }
Loader { property string sfmPath: ""
id: floatOneLoader
active: root.status function updateSfmPath() {
visible: (floatOneLoader.status === Loader.Ready) var activeNode = _reconstruction.activeNodes.get('sfm').node;
anchors.centerIn: parent
onActiveChanged: { if(!activeNode)
if(active) { {
setSource("FloatImage.qml", { root.sfmPath = "";
'source': Qt.binding(function() { return root.source; }), }
}) else
} else { {
// Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14 root.sfmPath = activeNode.attribute("outputViewsAndPoses").value;
setSource("", {}) }
root.setSfmPath(sfmPath);
}
Component {
id: imgPano
Loader {
id: floatOneLoader
active: root.status
visible: (floatOneLoader.status === Loader.Ready)
anchors.centerIn: parent
property string cSource: root.getImgSource()
onActiveChanged: {
if(active) {
setSource("FloatImage.qml", {
'source': Qt.binding(function() { return cSource; }),
})
} else {
// Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14
setSource("", {})
}
} }
} }
} }
Repeater {
id: repeater
model: 1
delegate: imgPano
}
} }