[Panorama Viewer] add grid display button function

This commit is contained in:
Landrodie 2021-01-26 11:39:29 +01:00 committed by Fabien Castan
parent fcdc6cc873
commit 2a1e6811fc
3 changed files with 6 additions and 1 deletions

View file

@ -13,6 +13,7 @@ FloatingPane {
property bool enableEdit: enablePanoramaEdit.checked property bool enableEdit: enablePanoramaEdit.checked
property bool enableHover: enableHover.checked property bool enableHover: enableHover.checked
property bool displayGrid: displayGrid.checked
property int downscaleValue: downscaleSpinBox.value property int downscaleValue: downscaleSpinBox.value
property int downscaleDefaultValue: 2 property int downscaleDefaultValue: 2

View file

@ -37,6 +37,8 @@ AliceVision.PanoramaViewer {
property bool isEditable: true property bool isEditable: true
property bool isHighlightable: true property bool isHighlightable: true
property bool displayGridPano: true
onIsHighlightableChanged:{ onIsHighlightableChanged:{
for (var i = 0; i < repeater.model; i++) { for (var i = 0; i < repeater.model; i++) {
repeater.itemAt(i).item.onChangedHighlightState(isHighlightable); repeater.itemAt(i).item.onChangedHighlightState(isHighlightable);
@ -114,6 +116,7 @@ AliceVision.PanoramaViewer {
// Grid Panorama Viewer // Grid Panorama Viewer
Canvas { Canvas {
id: gridPano id: gridPano
visible: displayGridPano
anchors.fill : parent anchors.fill : parent
property int wgrid: 40 property int wgrid: 40
onPaint: { onPaint: {

View file

@ -266,7 +266,8 @@ FocusScope {
'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;}),
'subdivisionsPano': Qt.binding(function(){ return panoramaViewerToolbar.subdivisionsValue;}) 'subdivisionsPano': Qt.binding(function(){ return panoramaViewerToolbar.subdivisionsValue;}),
'displayGridPano': Qt.binding(function(){ return panoramaViewerToolbar.displayGrid;})
}) })
} else { } else {
// Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14 // Force the unload (instead of using Component.onCompleted to load it once and for all) is necessary since Qt 5.14