mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-25 20:47:39 +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
|
// paintedWidth / paintedHeight / status for compatibility with standard Image
|
||||||
property int paintedWidth: textureSize.width
|
property int paintedWidth: textureSize.width
|
||||||
property int paintedHeight: textureSize.height
|
property int paintedHeight: textureSize.height
|
||||||
property var status: {
|
property var status: Image.Null
|
||||||
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 int downscaleValue: 2
|
property int downscaleValue: 2
|
||||||
|
|
||||||
|
@ -59,8 +49,6 @@ AliceVision.PanoramaViewer {
|
||||||
|
|
||||||
clearBeforeLoad: true
|
clearBeforeLoad: true
|
||||||
|
|
||||||
channelMode : AliceVision.PanoramaViewer.EChannelMode.RGBA
|
|
||||||
|
|
||||||
property alias containsMouse: mouseAreaPano.containsMouse
|
property alias containsMouse: mouseAreaPano.containsMouse
|
||||||
|
|
||||||
property bool isRotating: false
|
property bool isRotating: false
|
||||||
|
@ -222,6 +210,7 @@ AliceVision.PanoramaViewer {
|
||||||
//Changing the repeater model (number of elements)
|
//Changing the repeater model (number of elements)
|
||||||
panoImages.updateRepeater()
|
panoImages.updateRepeater()
|
||||||
|
|
||||||
|
root.status = Image.Ready;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function updateRepeater() {
|
function updateRepeater() {
|
||||||
|
|
|
@ -262,7 +262,6 @@ FocusScope {
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
if(active) {
|
if(active) {
|
||||||
setSource("PanoramaViewer.qml", {
|
setSource("PanoramaViewer.qml", {
|
||||||
'source': Qt.binding(function() { return getImageFile(imageType.type); }),
|
|
||||||
'isEditable': Qt.binding(function(){ return panoramaViewerToolbar.enableEdit;}),
|
'isEditable': Qt.binding(function(){ return panoramaViewerToolbar.enableEdit;}),
|
||||||
'isHighlightable': Qt.binding(function(){ return panoramaViewerToolbar.enableHover;}),
|
'isHighlightable': Qt.binding(function(){ return panoramaViewerToolbar.enableHover;}),
|
||||||
'downscaleValue': Qt.binding(function(){return panoramaViewerToolbar.downscaleValue;}),
|
'downscaleValue': Qt.binding(function(){return panoramaViewerToolbar.downscaleValue;}),
|
||||||
|
@ -274,6 +273,9 @@ FocusScope {
|
||||||
setSource("", {})
|
setSource("", {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onLoaded: {
|
||||||
|
panoramaViewerLoader.item.updateSfmPath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simple QML Image Viewer (using Qt or qtOIIO to load images)
|
// Simple QML Image Viewer (using Qt or qtOIIO to load images)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue