mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-24 12:07:19 +02:00
[Panorama Viewer] refactoring panorama viewer
This commit is contained in:
parent
8216fdd225
commit
5b5f725f3e
2 changed files with 5 additions and 14 deletions
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue