From 2a1e6811fca76bcb4fd9d190edb9d28ca1de8464 Mon Sep 17 00:00:00 2001 From: Landrodie Date: Tue, 26 Jan 2021 11:39:29 +0100 Subject: [PATCH] [Panorama Viewer] add grid display button function --- meshroom/ui/qml/Viewer/PanoramaToolbar.qml | 1 + meshroom/ui/qml/Viewer/PanoramaViewer.qml | 3 +++ meshroom/ui/qml/Viewer/Viewer2D.qml | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/meshroom/ui/qml/Viewer/PanoramaToolbar.qml b/meshroom/ui/qml/Viewer/PanoramaToolbar.qml index c9834690..5ac5b682 100644 --- a/meshroom/ui/qml/Viewer/PanoramaToolbar.qml +++ b/meshroom/ui/qml/Viewer/PanoramaToolbar.qml @@ -13,6 +13,7 @@ FloatingPane { property bool enableEdit: enablePanoramaEdit.checked property bool enableHover: enableHover.checked + property bool displayGrid: displayGrid.checked property int downscaleValue: downscaleSpinBox.value property int downscaleDefaultValue: 2 diff --git a/meshroom/ui/qml/Viewer/PanoramaViewer.qml b/meshroom/ui/qml/Viewer/PanoramaViewer.qml index 604c18af..6b3bbfd4 100644 --- a/meshroom/ui/qml/Viewer/PanoramaViewer.qml +++ b/meshroom/ui/qml/Viewer/PanoramaViewer.qml @@ -37,6 +37,8 @@ AliceVision.PanoramaViewer { property bool isEditable: true property bool isHighlightable: true + property bool displayGridPano: true + onIsHighlightableChanged:{ for (var i = 0; i < repeater.model; i++) { repeater.itemAt(i).item.onChangedHighlightState(isHighlightable); @@ -114,6 +116,7 @@ AliceVision.PanoramaViewer { // Grid Panorama Viewer Canvas { id: gridPano + visible: displayGridPano anchors.fill : parent property int wgrid: 40 onPaint: { diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index f540cf62..792a59c2 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -266,7 +266,8 @@ FocusScope { 'isEditable': Qt.binding(function(){ return panoramaViewerToolbar.enableEdit;}), 'isHighlightable': Qt.binding(function(){ return panoramaViewerToolbar.enableHover;}), 'downscaleValue': Qt.binding(function(){return panoramaViewerToolbar.downscaleValue;}), - 'subdivisionsPano': Qt.binding(function(){ return panoramaViewerToolbar.subdivisionsValue;}) + 'subdivisionsPano': Qt.binding(function(){ return panoramaViewerToolbar.subdivisionsValue;}), + 'displayGridPano': Qt.binding(function(){ return panoramaViewerToolbar.displayGrid;}) }) } else { // Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14