[Panorama Viewer] refactoring panorama viewer

This commit is contained in:
Thomas Zorroche 2021-01-26 15:22:51 +01:00 committed by Fabien Castan
parent 8216fdd225
commit 5b5f725f3e
2 changed files with 5 additions and 14 deletions

View file

@ -18,17 +18,7 @@ AliceVision.PanoramaViewer {
// paintedWidth / paintedHeight / status for compatibility with standard Image
property int paintedWidth: textureSize.width
property int paintedHeight: textureSize.height
property var status: {
if(root.loading)
return Image.Loading;
else if((root.source === "") ||
(root.sourceSize.height <= 0) ||
(root.sourceSize.width <= 0))
return Image.Null;
root.defaultControlPoints();
updateSfmPath();
return Image.Ready;
}
property var status: Image.Null
property int downscaleValue: 2
@ -59,8 +49,6 @@ AliceVision.PanoramaViewer {
clearBeforeLoad: true
channelMode : AliceVision.PanoramaViewer.EChannelMode.RGBA
property alias containsMouse: mouseAreaPano.containsMouse
property bool isRotating: false
@ -222,6 +210,7 @@ AliceVision.PanoramaViewer {
//Changing the repeater model (number of elements)
panoImages.updateRepeater()
root.status = Image.Ready;
}
}
function updateRepeater() {

View file

@ -262,7 +262,6 @@ FocusScope {
onActiveChanged: {
if(active) {
setSource("PanoramaViewer.qml", {
'source': Qt.binding(function() { return getImageFile(imageType.type); }),
'isEditable': Qt.binding(function(){ return panoramaViewerToolbar.enableEdit;}),
'isHighlightable': Qt.binding(function(){ return panoramaViewerToolbar.enableHover;}),
'downscaleValue': Qt.binding(function(){return panoramaViewerToolbar.downscaleValue;}),
@ -274,6 +273,9 @@ FocusScope {
setSource("", {})
}
}
onLoaded: {
panoramaViewerLoader.item.updateSfmPath();
}
}
// Simple QML Image Viewer (using Qt or qtOIIO to load images)