[Viewer] Clean-up: Harmonize syntax across all the files

This commit is contained in:
Candice Bentéjac 2023-10-17 12:46:57 +02:00
parent 9d2974d282
commit 13b8266d14
15 changed files with 488 additions and 562 deletions

View file

@ -38,17 +38,14 @@ FloatingPane {
// note: We need to use csvData.getNbColumns() slot instead of the csvData.nbColumns property to avoid a crash on linux. // note: We need to use csvData.getNbColumns() slot instead of the csvData.nbColumns property to avoid a crash on linux.
property bool crfReady: csvData && csvData.ready && (csvData.getNbColumns() >= 4) property bool crfReady: csvData && csvData.ready && (csvData.getNbColumns() >= 4)
onCrfReadyChanged: { onCrfReadyChanged: {
if(crfReady) if (crfReady) {
{
redCurve.clear() redCurve.clear()
greenCurve.clear() greenCurve.clear()
blueCurve.clear() blueCurve.clear()
csvData.getColumn(1).fillChartSerie(redCurve) csvData.getColumn(1).fillChartSerie(redCurve)
csvData.getColumn(2).fillChartSerie(greenCurve) csvData.getColumn(2).fillChartSerie(greenCurve)
csvData.getColumn(3).fillChartSerie(blueCurve) csvData.getColumn(3).fillChartSerie(blueCurve)
} } else {
else
{
redCurve.clear() redCurve.clear()
greenCurve.clear() greenCurve.clear()
blueCurve.clear() blueCurve.clear()
@ -125,7 +122,7 @@ FloatingPane {
checkState: legend.buttonGroup.checkState checkState: legend.buttonGroup.checkState
onClicked: { onClicked: {
const _checked = checked const _checked = checked
for(let i = 0; i < responseChart.count; ++i) { for (let i = 0; i < responseChart.count; ++i) {
responseChart.series(i).visible = _checked responseChart.series(i).visible = _checked
} }
} }

View file

@ -51,27 +51,27 @@ Item {
property bool controlModifierEnabled: false property bool controlModifierEnabled: false
onPositionChanged: { onPositionChanged: {
mArea.controlModifierEnabled = (mouse.modifiers & Qt.ControlModifier) mArea.controlModifierEnabled = (mouse.modifiers & Qt.ControlModifier)
mouse.accepted = false; mouse.accepted = false
} }
acceptedButtons: Qt.LeftButton acceptedButtons: Qt.LeftButton
hoverEnabled: true hoverEnabled: true
drag.target: circle drag.target: circle
drag.onActiveChanged: { drag.onActiveChanged: {
if(!drag.active) { if (!drag.active) {
root.moved(circle.x - (root.width - circle.width) / 2, circle.y - (root.height - circle.height) / 2); root.moved(circle.x - (root.width - circle.width) / 2, circle.y - (root.height - circle.height) / 2)
} }
} }
onPressed: { onPressed: {
forceActiveFocus(); forceActiveFocus()
} }
onWheel: { onWheel: {
mArea.controlModifierEnabled = (wheel.modifiers & Qt.ControlModifier) mArea.controlModifierEnabled = (wheel.modifiers & Qt.ControlModifier)
if (wheel.modifiers & Qt.ControlModifier) { if (wheel.modifiers & Qt.ControlModifier) {
root.incrementRadius(wheel.angleDelta.y / 120.0); root.incrementRadius(wheel.angleDelta.y / 120.0)
wheel.accepted = true; wheel.accepted = true
} else { } else {
wheel.accepted = false; wheel.accepted = false
} }
} }
} }

View file

@ -36,7 +36,7 @@ Item {
m[0][0], m[0][1], 0, m[0][2], m[0][0], m[0][1], 0, m[0][2],
m[1][0], m[1][1], 0, m[1][2], m[1][0], m[1][1], 0, m[1][2],
0, 0, 1, 0, 0, 0, 1, 0,
m[2][0], m[2][1], 0, m[2][2] ) m[2][0], m[2][1], 0, m[2][2])
} }
} }

View file

@ -30,8 +30,8 @@ FloatingPane {
Rectangle { Rectangle {
id: cell id: cell
width: root.width / grid.columns - grid.spacing * (grid.columns+1) / grid.columns width: root.width / grid.columns - grid.spacing * (grid.columns + 1) / grid.columns
height: root.height / grid.rows - grid.spacing * (grid.rows+1) / grid.rows height: root.height / grid.rows - grid.spacing * (grid.rows + 1) / grid.rows
color: Qt.rgba(modelData.r, modelData.g, modelData.b, 1.0) color: Qt.rgba(modelData.r, modelData.g, modelData.b, 1.0)
} }

View file

@ -17,60 +17,60 @@ Item {
property var ccheckers: [] property var ccheckers: []
property int selectedCChecker: -1 property int selectedCChecker: -1
Component.onCompleted: { readSourceFile(); } Component.onCompleted: { readSourceFile() }
onSourceChanged: { readSourceFile(); } onSourceChanged: { readSourceFile() }
onViewpointChanged: { loadCCheckers(); } onViewpointChanged: { loadCCheckers() }
property var updatePane: null property var updatePane: null
function getColors() { function getColors() {
if (ccheckers[selectedCChecker] === undefined) if (ccheckers[selectedCChecker] === undefined)
return null; return null
if (ccheckers[selectedCChecker].colors === undefined) if (ccheckers[selectedCChecker].colors === undefined)
return null; return null
return ccheckers[selectedCChecker].colors; return ccheckers[selectedCChecker].colors
} }
function readSourceFile() { function readSourceFile() {
var xhr = new XMLHttpRequest; var xhr = new XMLHttpRequest
// console.warn("readSourceFile: " + root.source) // console.warn("readSourceFile: " + root.source)
xhr.open("GET", root.source); xhr.open("GET", root.source)
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE && xhr.status == 200) { if (xhr.readyState === XMLHttpRequest.DONE && xhr.status == 200) {
try { try {
root.json = null; root.json = null
// console.warn("readSourceFile: update json from " + root.source) // console.warn("readSourceFile: update json from " + root.source)
root.json = JSON.parse(xhr.responseText); root.json = JSON.parse(xhr.responseText)
// console.warn("readSourceFile: root.json.checkers.length=" + root.json.checkers.length) // console.warn("readSourceFile: root.json.checkers.length=" + root.json.checkers.length)
} } catch(exc) {
catch(exc) console.warn("Failed to parse ColorCheckerDetection JSON file: " + source)
{ return
console.warn("Failed to parse ColorCheckerDetection JSON file: " + source);
return;
} }
} }
loadCCheckers(); loadCCheckers()
}; }
xhr.send(); xhr.send()
} }
function loadCCheckers() { function loadCCheckers() {
emptyCCheckers(); emptyCCheckers()
if (root.json === null) if (root.json === null) {
{ return
return;
} }
var currentImagePath = (root.viewpoint && root.viewpoint.attribute && root.viewpoint.attribute.childAttribute("path")) ? root.viewpoint.attribute.childAttribute("path").value : null var currentImagePath = (root.viewpoint && root.viewpoint.attribute && root.viewpoint.attribute.childAttribute("path"))
var viewId = (root.viewpoint && root.viewpoint.attribute && root.viewpoint.attribute.childAttribute("viewId")) ? root.viewpoint.attribute.childAttribute("viewId").value : null ? root.viewpoint.attribute.childAttribute("path").value : null
var viewId = (root.viewpoint && root.viewpoint.attribute && root.viewpoint.attribute.childAttribute("viewId"))
? root.viewpoint.attribute.childAttribute("viewId").value : null
for (var i = 0; i < root.json.checkers.length; i++) { for (var i = 0; i < root.json.checkers.length; i++) {
// Only load ccheckers for the current view // Only load ccheckers for the current view
var checker = root.json.checkers[i] var checker = root.json.checkers[i]
if (checker.viewId === viewId || if (checker.viewId === viewId ||
checker.imagePath === currentImagePath) { checker.imagePath === currentImagePath) {
var cpt = Qt.createComponent("ColorCheckerEntity.qml"); var cpt = Qt.createComponent("ColorCheckerEntity.qml")
var obj = cpt.createObject(root, { var obj = cpt.createObject(root, {
x: ccheckerSizeX / 2, x: ccheckerSizeX / 2,
@ -78,20 +78,20 @@ Item {
sizeX: root.ccheckerSizeX, sizeX: root.ccheckerSizeX,
sizeY: root.ccheckerSizeY, sizeY: root.ccheckerSizeY,
colors: root.json.checkers[i].colors colors: root.json.checkers[i].colors
}); })
obj.applyTransform(root.json.checkers[i].transform); obj.applyTransform(root.json.checkers[i].transform)
ccheckers.push(obj); ccheckers.push(obj)
selectedCChecker = ccheckers.length-1; selectedCChecker = ccheckers.length - 1
break; break
} }
} }
updatePane(); updatePane()
} }
function emptyCCheckers() { function emptyCCheckers() {
for (var i = 0; i < ccheckers.length; i++) for (var i = 0; i < ccheckers.length; i++)
ccheckers[i].destroy(); ccheckers[i].destroy()
ccheckers = []; ccheckers = []
selectedCChecker = -1; selectedCChecker = -1
} }
} }

View file

@ -52,9 +52,9 @@ FloatingPane {
from: 0 from: 0
to: 1 to: 1
first.value: 0 first.value: 0
first.onMoved: { root.featuresViewer.featureMinScaleFilter = Math.pow(first.value,4); } first.onMoved: { root.featuresViewer.featureMinScaleFilter = Math.pow(first.value,4) }
second.value: 1 second.value: 1
second.onMoved: { root.featuresViewer.featureMaxScaleFilter = Math.pow(second.value,4); } second.onMoved: { root.featuresViewer.featureMaxScaleFilter = Math.pow(second.value,4) }
stepSize: 0.01 stepSize: 0.01
} }
} }
@ -120,7 +120,7 @@ FloatingPane {
} }
RowLayout { RowLayout {
Label { Label {
text: "Display 3d Tracks:" text: "Display 3D Tracks:"
} }
CheckBox { CheckBox {
id: display3dTracksCB id: display3dTracksCB
@ -163,20 +163,20 @@ FloatingPane {
editable: true editable: true
textFromValue: function(value, locale) { textFromValue: function(value, locale) {
if (value === -1) return "No Limit"; if (value === -1) return "No Limit"
if (value === 0) return "Disable"; if (value === 0) return "Disable"
return value; return value
} }
valueFromText: function(text, locale) { valueFromText: function(text, locale) {
if (text === "No Limit") return -1; if (text === "No Limit") return -1
if (text === "Disable") return 0; if (text === "Disable") return 0
return Number.fromLocaleString(locale, text); return Number.fromLocaleString(locale, text)
} }
onValueChanged: { onValueChanged: {
if (root.featuresViewer) if (root.featuresViewer)
root.featuresViewer.timeWindow = timeWindowSB.value; root.featuresViewer.timeWindow = timeWindowSB.value
} }
} }
} }
@ -212,7 +212,7 @@ FloatingPane {
text: MaterialIcons.center_focus_strong text: MaterialIcons.center_focus_strong
ToolTip.text: "Display Extracted Features" ToolTip.text: "Display Extracted Features"
onClicked: { onClicked: {
featureType.viewer.displayFeatures = featuresVisibilityButton.checked; featureType.viewer.displayFeatures = featuresVisibilityButton.checked
} }
font.pointSize: 10 font.pointSize: 10
opacity: featureType.viewer.visible ? 1.0 : 0.6 opacity: featureType.viewer.visible ? 1.0 : 0.6
@ -225,8 +225,8 @@ FloatingPane {
text: MaterialIcons.timeline text: MaterialIcons.timeline
ToolTip.text: "Display Tracks" ToolTip.text: "Display Tracks"
onClicked: { onClicked: {
featureType.viewer.displayTracks = tracksVisibilityButton.checked; featureType.viewer.displayTracks = tracksVisibilityButton.checked
root.featuresViewer.enableTimeWindow = tracksVisibilityButton.checked; root.featuresViewer.enableTimeWindow = tracksVisibilityButton.checked
} }
font.pointSize: 10 font.pointSize: 10
} }
@ -238,7 +238,7 @@ FloatingPane {
text: MaterialIcons.sync text: MaterialIcons.sync
ToolTip.text: "Display Matches" ToolTip.text: "Display Matches"
onClicked: { onClicked: {
featureType.viewer.displayMatches = matchesVisibilityButton.checked; featureType.viewer.displayMatches = matchesVisibilityButton.checked
} }
font.pointSize: 10 font.pointSize: 10
} }
@ -250,7 +250,7 @@ FloatingPane {
text: MaterialIcons.fiber_manual_record text: MaterialIcons.fiber_manual_record
ToolTip.text: "Display Landmarks" ToolTip.text: "Display Landmarks"
onClicked: { onClicked: {
featureType.viewer.displayLandmarks = landmarksVisibilityButton.checked; featureType.viewer.displayLandmarks = landmarksVisibilityButton.checked
} }
font.pointSize: 10 font.pointSize: 10
} }

View file

@ -19,27 +19,26 @@ AliceVision.FloatImageViewer {
property int paintedWidth: sourceSize.width property int paintedWidth: sourceSize.width
property int paintedHeight: sourceSize.height property int paintedHeight: sourceSize.height
property var status: { property var status: {
if(root.loading) if (root.loading)
return Image.Loading; return Image.Loading;
else if((root.source === "") || else if ((root.source === "") ||
(root.sourceSize.height <= 0) || (root.sourceSize.height <= 0) ||
(root.sourceSize.width <= 0)) (root.sourceSize.width <= 0))
return Image.Null; return Image.Null
return Image.Ready; return Image.Ready
} }
onStatusChanged: { onStatusChanged: {
if (viewerTypeString === "panorama") { if (viewerTypeString === "panorama") {
var activeNode = _reconstruction.activeNodes.get('SfMTransform').node; var activeNode = _reconstruction.activeNodes.get('SfMTransform').node
} }
root.surface.setIdView(idView); root.surface.setIdView(idView);
} }
property string channelModeString : "rgba" property string channelModeString : "rgba"
channelMode: { channelMode: {
switch(channelModeString) switch (channelModeString) {
{
case "rgb": return AliceVision.FloatImageViewer.EChannelMode.RGB case "rgb": return AliceVision.FloatImageViewer.EChannelMode.RGB
case "r": return AliceVision.FloatImageViewer.EChannelMode.R case "r": return AliceVision.FloatImageViewer.EChannelMode.R
case "g": return AliceVision.FloatImageViewer.EChannelMode.G case "g": return AliceVision.FloatImageViewer.EChannelMode.G
@ -51,8 +50,7 @@ AliceVision.FloatImageViewer {
property string viewerTypeString : "hdr" property string viewerTypeString : "hdr"
surface.viewerType: { surface.viewerType: {
switch(viewerTypeString) switch (viewerTypeString) {
{
case "hdr": return AliceVision.Surface.EViewerType.HDR; case "hdr": return AliceVision.Surface.EViewerType.HDR;
case "distortion": return AliceVision.Surface.EViewerType.DISTORTION; case "distortion": return AliceVision.Surface.EViewerType.DISTORTION;
case "panorama": return AliceVision.Surface.EViewerType.PANORAMA; case "panorama": return AliceVision.Surface.EViewerType.PANORAMA;
@ -60,7 +58,7 @@ AliceVision.FloatImageViewer {
} }
} }
property int pointsNumber: (surface.subdivisions + 1) * (surface.subdivisions + 1); property int pointsNumber: (surface.subdivisions + 1) * (surface.subdivisions + 1)
property int idView: 0; property int idView: 0;
@ -78,20 +76,20 @@ AliceVision.FloatImageViewer {
} }
function isMouseOver(mx, my) { function isMouseOver(mx, my) {
return root.surface.isMouseInside(mx, my); return root.surface.isMouseInside(mx, my)
} }
function getMouseCoordinates(mx, my) { function getMouseCoordinates(mx, my) {
if (isMouseOver(mx, my)) { if (isMouseOver(mx, my)) {
root.surface.mouseOver = true root.surface.mouseOver = true
return true; return true
} else { } else {
root.surface.mouseOver = false root.surface.mouseOver = false
return false; return false
} }
} }
function onChangedHighlightState(isHighlightable){ function onChangedHighlightState(isHighlightable) {
if (!isHighlightable) root.surface.mouseOver = false if (!isHighlightable) root.surface.mouseOver = false
} }
@ -101,12 +99,12 @@ AliceVision.FloatImageViewer {
*/ */
function updatePrincipalPoint() { function updatePrincipalPoint() {
var pp = root.surface.getPrincipalPoint(); var pp = root.surface.getPrincipalPoint()
ppRect.x = pp.x; ppRect.x = pp.x
ppRect.y = pp.y; ppRect.y = pp.y
} }
property bool isPrincipalPointsDisplayed : false; property bool isPrincipalPointsDisplayed : false
Item { Item {
id: principalPoint id: principalPoint

View file

@ -13,9 +13,9 @@ FloatingPane {
property real gainDefaultValue: 1.0 property real gainDefaultValue: 1.0
property real gammaDefaultValue: 1.0 property real gammaDefaultValue: 1.0
function resetDefaultValues(){ function resetDefaultValues() {
gainCtrl.value = root.gainDefaultValue; gainCtrl.value = root.gainDefaultValue
gammaCtrl.value = root.gammaDefaultValue; gammaCtrl.value = root.gammaDefaultValue
} }
property real slidersPowerValue: 4.0 property real slidersPowerValue: 4.0
@ -65,7 +65,7 @@ FloatingPane {
ToolTip.text: "Reset Gain" ToolTip.text: "Reset Gain"
onClicked: { onClicked: {
gainCtrl.value = gainDefaultValue; gainCtrl.value = gainDefaultValue
} }
} }
TextField { TextField {
@ -80,7 +80,7 @@ FloatingPane {
selectByMouse: true selectByMouse: true
validator: doubleValidator validator: doubleValidator
onAccepted: { onAccepted: {
gainCtrl.value = Math.pow(Number(gainLabel.text), 1.0/slidersPowerValue) gainCtrl.value = Math.pow(Number(gainLabel.text), 1.0 / slidersPowerValue)
} }
} }
Slider { Slider {
@ -120,7 +120,7 @@ FloatingPane {
selectByMouse: true selectByMouse: true
validator: doubleValidator validator: doubleValidator
onAccepted: { onAccepted: {
gammaCtrl.value = Math.pow(Number(gammaLabel.text), 1.0/slidersPowerValue) gammaCtrl.value = Math.pow(Number(gammaLabel.text), 1.0 / slidersPowerValue)
} }
} }
Slider { Slider {
@ -148,7 +148,7 @@ FloatingPane {
TextField { TextField {
id: red id: red
property real value: root.colorRGBA ? root.colorRGBA.x : 0.0 property real value: root.colorRGBA ? root.colorRGBA.x : 0.0
property real value_gamma: Math.pow(value, 1.0/2.2) property real value_gamma: Math.pow(value, 1.0 / 2.2)
text: root.colorRGBA ? value.toFixed(6) : "--" text: root.colorRGBA ? value.toFixed(6) : "--"
Layout.preferredWidth: textMetrics_colorValue.width Layout.preferredWidth: textMetrics_colorValue.width
@ -192,7 +192,7 @@ FloatingPane {
TextField { TextField {
id: blue id: blue
property real value: root.colorRGBA ? root.colorRGBA.z : 0.0 property real value: root.colorRGBA ? root.colorRGBA.z : 0.0
property real value_gamma: Math.pow(value, 1.0/2.2) property real value_gamma: Math.pow(value, 1.0 / 2.2)
text: root.colorRGBA ? value.toFixed(6) : "--" text: root.colorRGBA ? value.toFixed(6) : "--"
Layout.preferredWidth: textMetrics_colorValue.width Layout.preferredWidth: textMetrics_colorValue.width
@ -214,7 +214,7 @@ FloatingPane {
TextField { TextField {
id: alpha id: alpha
property real value: root.colorRGBA ? root.colorRGBA.w : 0.0 property real value: root.colorRGBA ? root.colorRGBA.w : 0.0
property real value_gamma: Math.pow(value, 1.0/2.2) property real value_gamma: Math.pow(value, 1.0 / 2.2)
text: root.colorRGBA ? value.toFixed(6) : "--" text: root.colorRGBA ? value.toFixed(6) : "--"
Layout.preferredWidth: textMetrics_colorValue.width Layout.preferredWidth: textMetrics_colorValue.width

View file

@ -9,7 +9,7 @@ import Controls 1.0
import Utils 1.0 import Utils 1.0
/** /**
* ImageMetadataView displays a JSON model representing an image"s metadata as a ListView. * ImageMetadataView displays a JSON model representing an image's metadata as a ListView.
*/ */
FloatingPane { FloatingPane {
id: root id: root
@ -27,12 +27,10 @@ FloatingPane {
* GPS coordinates in metadata can be store in 3 forms: * GPS coordinates in metadata can be store in 3 forms:
* (degrees), (degrees, minutes), (degrees, minutes, seconds) * (degrees), (degrees, minutes), (degrees, minutes, seconds)
*/ */
function gpsMetadataToCoordinates(value, ref) function gpsMetadataToCoordinates(value, ref) {
{
var values = value.split(",") var values = value.split(",")
var result = 0 var result = 0
for(var i=0; i < values.length; ++i) for (var i = 0; i < values.length; ++i) {
{
// divide each component by the corresponding power of 60 // divide each component by the corresponding power of 60
// 1 for degree, 60 for minutes, 3600 for seconds // 1 for degree, 60 for minutes, 3600 for seconds
result += Number(values[i]) / Math.pow(60, i) result += Number(values[i]) / Math.pow(60, i)
@ -42,19 +40,14 @@ FloatingPane {
} }
/// Try to get GPS coordinates from metadata /// Try to get GPS coordinates from metadata
function getGPSCoordinates(metadata) function getGPSCoordinates(metadata) {
{
// GPS data available // GPS data available
if(metadata && metadata["GPS:Longitude"] !== undefined && metadata["GPS:Latitude"] !== undefined) if (metadata && metadata["GPS:Longitude"] !== undefined && metadata["GPS:Latitude"] !== undefined) {
{
var latitude = gpsMetadataToCoordinates(metadata["GPS:Latitude"], metadata["GPS:LatitudeRef"]) var latitude = gpsMetadataToCoordinates(metadata["GPS:Latitude"], metadata["GPS:LatitudeRef"])
var longitude = gpsMetadataToCoordinates(metadata["GPS:Longitude"], metadata["GPS:LongitudeRef"]) var longitude = gpsMetadataToCoordinates(metadata["GPS:Longitude"], metadata["GPS:LongitudeRef"])
var altitude = metadata["GPS:Altitude"] || 0 var altitude = metadata["GPS:Altitude"] || 0
return QtPositioning.coordinate(latitude, longitude, altitude) return QtPositioning.coordinate(latitude, longitude, altitude)
} } else { // GPS data unavailable: reset coordinates to default value
// GPS data unavailable: reset coordinates to default value
else
{
return QtPositioning.coordinate() return QtPositioning.coordinate()
} }
} }
@ -74,22 +67,18 @@ FloatingPane {
metadataModel.clear() metadataModel.clear()
var entries = [] var entries = []
// prepare data to populate the model from the input metadata object // prepare data to populate the model from the input metadata object
for(var key in metadata) for (var key in metadata) {
{
var entry = {} var entry = {}
// split on ":" to get group and key // split on ":" to get group and key
var i = key.lastIndexOf(":") var i = key.lastIndexOf(":")
if(i === -1) if (i === -1) {
{
i = key.lastIndexOf("/") i = key.lastIndexOf("/")
} }
if(i !== -1)
{ if (i !== -1) {
entry["group"] = key.substr(0, i) entry["group"] = key.substr(0, i)
entry["key"] = key.substr(i+1) entry["key"] = key.substr(i+1)
} } else {
else
{
// set default group to something convenient for sorting // set default group to something convenient for sorting
entry["group"] = "-" entry["group"] = "-"
entry["key"] = key entry["key"] = key
@ -110,15 +99,6 @@ FloatingPane {
} }
} }
// Button {
// onClicked: {
// if(sortedMetadataModel.sortOrder == Qt.DescendingOrder)
// sortedMetadataModel.sortOrder = Qt.AscendingOrder
// else
// sortedMetadataModel.sortOrder = Qt.DescendingOrder
// }
// }
// Background WheelEvent grabber // Background WheelEvent grabber
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -126,7 +106,6 @@ FloatingPane {
onWheel: wheel.accepted = true onWheel: wheel.accepted = true
} }
// Main Layout // Main Layout
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
@ -144,16 +123,15 @@ FloatingPane {
Label { Label {
id: exposureLabel id: exposureLabel
text: { text: {
if(metadata["ExposureTime"] === undefined) if (metadata["ExposureTime"] === undefined)
return ""; return ""
var expStr = metadata["ExposureTime"]; var expStr = metadata["ExposureTime"]
var exp = parseFloat(expStr); var exp = parseFloat(expStr)
if(exp < 1.0) if (exp < 1.0) {
{ var invExp = 1.0 / exp
var invExp = 1.0 / exp; return "1/" + invExp.toFixed(0)
return "1/" + invExp.toFixed(0);
} }
return expStr; return expStr
} }
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Text.AlignHLeft horizontalAlignment: Text.AlignHLeft

View file

@ -77,7 +77,7 @@ FloatingPane {
ToolTip.text: "Reset Opacity" ToolTip.text: "Reset Opacity"
onClicked: { onClicked: {
opacityCtrl.value = opacityDefaultValue; opacityCtrl.value = opacityDefaultValue
} }
} }
TextField { TextField {
@ -118,7 +118,7 @@ FloatingPane {
ToolTip.text: "Reset Subdivisions" ToolTip.text: "Reset Subdivisions"
onClicked: { onClicked: {
subdivisionsCtrl.value = subdivisionsDefaultValue; subdivisionsCtrl.value = subdivisionsDefaultValue
} }
} }
TextField { TextField {

View file

@ -26,7 +26,7 @@ FloatingPane {
background: Rectangle { color: root.palette.window } background: Rectangle { color: root.palette.window }
function updateDownscaleValue(level) { function updateDownscaleValue(level) {
downscaleSpinBox.value = level; downscaleSpinBox.value = level
} }
DoubleValidator { DoubleValidator {
@ -79,7 +79,7 @@ FloatingPane {
ToolTip.text: "Reset Subdivisions" ToolTip.text: "Reset Subdivisions"
onClicked: { onClicked: {
subdivisionsCtrl.value = subdivisionsDefaultValue; subdivisionsCtrl.value = subdivisionsDefaultValue
} }
} }
TextField { TextField {
@ -119,7 +119,7 @@ FloatingPane {
ToolTip.text: "Reset the mouse multiplier" ToolTip.text: "Reset the mouse multiplier"
onClicked: { onClicked: {
speedSpinBox.value = 1; speedSpinBox.value = 1
} }
} }
SpinBox { SpinBox {
@ -134,7 +134,7 @@ FloatingPane {
validator: DoubleValidator { validator: DoubleValidator {
bottom: Math.min(speedSpinBox.from, speedSpinBox.to) bottom: Math.min(speedSpinBox.from, speedSpinBox.to)
top: Math.max(speedSpinBox.from, speedSpinBox.to) top: Math.max(speedSpinBox.from, speedSpinBox.to)
} }
textFromValue: function(value, locale) { textFromValue: function(value, locale) {
@ -152,7 +152,7 @@ FloatingPane {
ToolTip.text: "Reset the downscale" ToolTip.text: "Reset the downscale"
onClicked: { onClicked: {
downscaleSpinBox.value = downscaleDefaultValue; downscaleSpinBox.value = downscaleDefaultValue
} }
} }
SpinBox { SpinBox {
@ -167,17 +167,15 @@ FloatingPane {
validator: DoubleValidator { validator: DoubleValidator {
bottom: Math.min(downscaleSpinBox.from, downscaleSpinBox.to) bottom: Math.min(downscaleSpinBox.from, downscaleSpinBox.to)
top: Math.max(downscaleSpinBox.from, downscaleSpinBox.to) top: Math.max(downscaleSpinBox.from, downscaleSpinBox.to)
} }
textFromValue: function(value, locale) { textFromValue: function(value, locale) {
if(value === 0){ if (value === 0){
return 1 return 1
} else {
return "1/" + Math.pow(2, value).toString()
} }
else{
return "1/" + Math.pow(2,value).toString()
}
} }
} }
} }
@ -188,5 +186,4 @@ FloatingPane {
font: subdivisionsLabel.font font: subdivisionsLabel.font
text: "100.00" text: "100.00"
} }
} }

View file

@ -21,10 +21,9 @@ AliceVision.PanoramaViewer {
property int paintedHeight: sourceSize.height property int paintedHeight: sourceSize.height
property var status: { property var status: {
if (readyToLoad === Image.Ready) { if (readyToLoad === Image.Ready) {
return Image.Ready; return Image.Ready
} } else {
else { return Image.Null
return Image.Null;
} }
} }
@ -44,9 +43,9 @@ AliceVision.PanoramaViewer {
property int idSelected : -1 property int idSelected : -1
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)
} }
} }
@ -67,44 +66,43 @@ AliceVision.PanoramaViewer {
property double pitch: 0; property double pitch: 0;
property double roll: 0; property double roll: 0;
property var activeNode: _reconstruction.activeNodes.get('SfMTransform').node; property var activeNode: _reconstruction.activeNodes.get('SfMTransform').node
// Yaw and Pitch in Degrees from SfMTransform node sliders // Yaw and Pitch in Degrees from SfMTransform node sliders
property double yawNode: activeNode ? activeNode.attribute("manualTransform.manualRotation.y").value : 0; property double yawNode: activeNode ? activeNode.attribute("manualTransform.manualRotation.y").value : 0
property double pitchNode: activeNode ? activeNode.attribute("manualTransform.manualRotation.x").value : 0; property double pitchNode: activeNode ? activeNode.attribute("manualTransform.manualRotation.x").value : 0
property double rollNode: activeNode ? activeNode.attribute("manualTransform.manualRotation.z").value : 0; property double rollNode: activeNode ? activeNode.attribute("manualTransform.manualRotation.z").value : 0
//Convert angle functions //Convert angle functions
function toDegrees(radians){ function toDegrees(radians) {
return radians * (180/Math.PI) return radians * (180 / Math.PI)
} }
function toRadians(degrees){ function toRadians(degrees) {
return degrees * (Math.PI/180) return degrees * (Math.PI / 180)
} }
function fmod(a,b) { return Number((a - (Math.floor(a / b) * b)).toPrecision(8)); } function fmod(a,b) { return Number((a - (Math.floor(a / b) * b)).toPrecision(8)) }
// Limit angle between -180 and 180 // Limit angle between -180 and 180
function limitAngle(angle){ function limitAngle(angle) {
if (angle > 180) angle = -180.0 + (angle - 180.0); if (angle > 180) angle = -180.0 + (angle - 180.0)
if (angle < -180) angle = 180.0 - (Math.abs(angle) - 180); if (angle < -180) angle = 180.0 - (Math.abs(angle) - 180)
return angle; return angle
} }
function limitPitch(angle) function limitPitch(angle) {
{ return (angle > 180 || angle < -180) ? root.pitch : angle
return (angle > 180 || angle < -180) ? root.pitch : angle;
} }
onYawNodeChanged: { onYawNodeChanged: {
root.yaw = yawNode; root.yaw = yawNode
} }
onPitchNodeChanged: { onPitchNodeChanged: {
root.pitch = pitchNode; root.pitch = pitchNode
} }
onRollNodeChanged: { onRollNodeChanged: {
root.roll = rollNode; root.roll = rollNode
} }
Item { Item {
@ -125,26 +123,24 @@ AliceVision.PanoramaViewer {
} }
onPositionChanged: { onPositionChanged: {
// Send Mouse Coordinates to Float Images Viewers // Send Mouse Coordinates to Float Images Viewers
idSelected = -1; idSelected = -1
for (var i = 0; i < repeater.model && isHighlightable; ++i) { for (var i = 0; i < repeater.model && isHighlightable; ++i) {
var highlight = repeater.itemAt(i).item.getMouseCoordinates(mouse.x, mouse.y); var highlight = repeater.itemAt(i).item.getMouseCoordinates(mouse.x, mouse.y)
repeater.itemAt(i).z = highlight ? 2 : 0 repeater.itemAt(i).z = highlight ? 2 : 0
if(highlight){ if (highlight) {
idSelected = root.msfmData.viewsIds[i] idSelected = root.msfmData.viewsIds[i]
} }
} }
// Rotate Panorama // Rotate Panorama
if (isRotating && isEditable) { if (isRotating && isEditable) {
var nx = Math.min(width - 1, mouse.x) var nx = Math.min(width - 1, mouse.x)
var ny = Math.min(height - 1, mouse.y) var ny = Math.min(height - 1, mouse.y)
var xoffset = nx - lastX; var xoffset = nx - lastX;
var yoffset = ny - lastY; var yoffset = ny - lastY;
if (xoffset != 0 || yoffset !=0) if (xoffset != 0 || yoffset !=0) {
{
var latitude_start = (yStart / height) * Math.PI - (Math.PI / 2); var latitude_start = (yStart / height) * Math.PI - (Math.PI / 2);
var longitude_start = ((xStart / width) * 2 * Math.PI) - Math.PI; var longitude_start = ((xStart / width) * 2 * Math.PI) - Math.PI;
var latitude_end = (ny / height) * Math.PI - ( Math.PI / 2); var latitude_end = (ny / height) * Math.PI - ( Math.PI / 2);
@ -156,56 +152,49 @@ AliceVision.PanoramaViewer {
var previous_euler = Qt.vector3d(previous_yaw, previous_pitch, previous_roll) var previous_euler = Qt.vector3d(previous_yaw, previous_pitch, previous_roll)
var result var result
if (mouse.modifiers & Qt.ControlModifier) if (mouse.modifiers & Qt.ControlModifier) {
{
result = Transformations3DHelper.updatePanoramaInPlane(previous_euler, start_pt, end_pt) result = Transformations3DHelper.updatePanoramaInPlane(previous_euler, start_pt, end_pt)
root.pitch = result.x root.pitch = result.x
root.yaw = result.y root.yaw = result.y
root.roll = result.z root.roll = result.z
} } else {
else
{
result = Transformations3DHelper.updatePanorama(previous_euler, start_pt, end_pt) result = Transformations3DHelper.updatePanorama(previous_euler, start_pt, end_pt)
root.pitch = result.x root.pitch = result.x
root.yaw = result.y root.yaw = result.y
root.roll = result.z root.roll = result.z
} }
} }
_reconstruction.setAttribute(activeNode.attribute("manualTransform.manualRotation.x"), Math.round(root.pitch)); _reconstruction.setAttribute(activeNode.attribute("manualTransform.manualRotation.x"), Math.round(root.pitch))
_reconstruction.setAttribute(activeNode.attribute("manualTransform.manualRotation.y"), Math.round(root.yaw)); _reconstruction.setAttribute(activeNode.attribute("manualTransform.manualRotation.y"), Math.round(root.yaw))
_reconstruction.setAttribute(activeNode.attribute("manualTransform.manualRotation.z"), Math.round(root.roll)); _reconstruction.setAttribute(activeNode.attribute("manualTransform.manualRotation.z"), Math.round(root.roll))
} }
} }
onPressed:{ onPressed:{
_reconstruction.beginModification("Panorama Manual Rotation"); _reconstruction.beginModification("Panorama Manual Rotation")
isRotating = true; isRotating = true
lastX = mouse.x; lastX = mouse.x
lastY = mouse.y; lastY = mouse.y
xStart = mouse.x; xStart = mouse.x
yStart = mouse.y; yStart = mouse.y
previous_yaw = yaw; previous_yaw = yaw
previous_pitch = pitch; previous_pitch = pitch
previous_roll = roll; previous_roll = roll
} }
onReleased: { onReleased: {
_reconstruction.endModification(); _reconstruction.endModification()
isRotating = false; isRotating = false
lastX = 0 lastX = 0
lastY = 0 lastY = 0
//Select the image in the image gallery if clicked // Select the image in the image gallery if clicked
if(xStart == mouse.x && yStart == mouse.y && idSelected != -1){ if (xStart == mouse.x && yStart == mouse.y && idSelected != -1) {
_reconstruction.selectedViewId = idSelected _reconstruction.selectedViewId = idSelected
} }
} }
} }
@ -220,16 +209,16 @@ AliceVision.PanoramaViewer {
ctx.lineWidth = 1.0 ctx.lineWidth = 1.0
ctx.shadowBlur = 0 ctx.shadowBlur = 0
ctx.strokeStyle = "grey" ctx.strokeStyle = "grey"
var nrows = height/wgrid; var nrows = height / wgrid
for(var i=0; i < nrows+1; ++i){ for (var i = 0; i < nrows + 1; ++i) {
ctx.moveTo(0, wgrid*i); ctx.moveTo(0, wgrid * i)
ctx.lineTo(width, wgrid*i); ctx.lineTo(width, wgrid * i)
} }
var ncols = width/wgrid var ncols = width / wgrid
for(var j=0; j < ncols+1; ++j){ for (var j = 0; j < ncols + 1; ++j) {
ctx.moveTo(wgrid*j, 0); ctx.moveTo(wgrid * j, 0)
ctx.lineTo(wgrid*j, height); ctx.lineTo(wgrid * j, height)
} }
ctx.closePath() ctx.closePath()
@ -242,15 +231,13 @@ AliceVision.PanoramaViewer {
property int imagesLoaded: 0 property int imagesLoaded: 0
property bool allImagesLoaded: false property bool allImagesLoaded: false
function loadRepeaterImages(index) function loadRepeaterImages(index) {
{
if (index < repeater.model) if (index < repeater.model)
repeater.itemAt(index).loadItem(); repeater.itemAt(index).loadItem()
else else
allImagesLoaded = true; allImagesLoaded = true
} }
Item { Item {
id: panoImages id: panoImages
width: root.width width: root.width
@ -262,25 +249,25 @@ AliceVision.PanoramaViewer {
id: floatOneLoader id: floatOneLoader
active: root.readyToLoad active: root.readyToLoad
visible: (floatOneLoader.status === Loader.Ready) visible: (floatOneLoader.status === Loader.Ready)
z:0 z: 0
property bool imageLoaded: false property bool imageLoaded: false
property bool loading: false property bool loading: false
onImageLoadedChanged: { onImageLoadedChanged: {
imagesLoaded++; imagesLoaded++
loadRepeaterImages(imagesLoaded); loadRepeaterImages(imagesLoaded)
} }
function loadItem() { function loadItem() {
if(!active) if (!active)
return; return
if (loading) { if (loading) {
loadRepeaterImages(index + 1) loadRepeaterImages(index + 1)
return; return
} }
loading = true; loading = true
var idViewItem = msfmData.viewsIds[index] var idViewItem = msfmData.viewsIds[index]
var sourceItem = Filepath.stringToUrl(msfmData.getUrlFromViewId(idViewItem)) var sourceItem = Filepath.stringToUrl(msfmData.getUrlFromViewId(idViewItem))
@ -288,22 +275,22 @@ AliceVision.PanoramaViewer {
setSource("FloatImage.qml", { setSource("FloatImage.qml", {
'surface.viewerType': AliceVision.Surface.EViewerType.PANORAMA, 'surface.viewerType': AliceVision.Surface.EViewerType.PANORAMA,
'viewerTypeString': 'panorama', 'viewerTypeString': 'panorama',
'surface.subdivisions': Qt.binding(function() { return subdivisionsPano; }), 'surface.subdivisions': Qt.binding(function() { return subdivisionsPano }),
'cropFisheye' : Qt.binding(function(){ return cropFisheyePano; }), 'cropFisheye' : Qt.binding(function(){ return cropFisheyePano }),
'surface.pitch': Qt.binding(function() { return root.pitch; }), 'surface.pitch': Qt.binding(function() { return root.pitch }),
'surface.yaw': Qt.binding(function() { return root.yaw; }), 'surface.yaw': Qt.binding(function() { return root.yaw }),
'surface.roll': Qt.binding(function() { return root.roll; }), 'surface.roll': Qt.binding(function() { return root.roll }),
'idView': Qt.binding(function() { return idViewItem; }), 'idView': Qt.binding(function() { return idViewItem }),
'gamma': Qt.binding(function() { return hdrImageToolbar.gammaValue; }), 'gamma': Qt.binding(function() { return hdrImageToolbar.gammaValue }),
'gain': Qt.binding(function() { return hdrImageToolbar.gainValue; }), 'gain': Qt.binding(function() { return hdrImageToolbar.gainValue }),
'channelModeString': Qt.binding(function() { return hdrImageToolbar.channelModeValue; }), 'channelModeString': Qt.binding(function() { return hdrImageToolbar.channelModeValue }),
'downscaleLevel' : Qt.binding(function() { return downscale; }), 'downscaleLevel' : Qt.binding(function() { return downscale }),
'source': Qt.binding(function() { return sourceItem; }), 'source': Qt.binding(function() { return sourceItem }),
'surface.msfmData': Qt.binding(function() { return root.msfmData }), 'surface.msfmData': Qt.binding(function() { return root.msfmData }),
'canBeHovered': true, 'canBeHovered': true,
'useSequence': false 'useSequence': false
}) })
imageLoaded = Qt.binding(function() { return repeater.itemAt(index).item.status === Image.Ready ? true : false; }) imageLoaded = Qt.binding(function() { return repeater.itemAt(index).item.status === Image.Ready ? true : false })
} }
} }
@ -317,7 +304,7 @@ AliceVision.PanoramaViewer {
Connections { Connections {
target: root target: root
function onDownscaleReady() { function onDownscaleReady() {
root.imagesLoaded = 0; root.imagesLoaded = 0
// Retrieve downscale value from C++ // Retrieve downscale value from C++
panoramaViewerToolbar.updateDownscaleValue(root.downscale) panoramaViewerToolbar.updateDownscaleValue(root.downscale)
@ -325,22 +312,19 @@ AliceVision.PanoramaViewer {
//Changing the repeater model (number of elements) //Changing the repeater model (number of elements)
panoImages.updateRepeater() panoImages.updateRepeater()
root.readyToLoad = Image.Ready; root.readyToLoad = Image.Ready
// Load images two by two // Load images two by two
loadRepeaterImages(0); loadRepeaterImages(0)
loadRepeaterImages(1); loadRepeaterImages(1)
} }
} }
function updateRepeater() { function updateRepeater() {
if(repeater.model !== root.msfmData.viewsIds.length){ if (repeater.model !== root.msfmData.viewsIds.length) {
repeater.model = 0; repeater.model = 0
} }
repeater.model = root.msfmData.viewsIds.length; repeater.model = root.msfmData.viewsIds.length
} }
} }
} }

View file

@ -115,9 +115,8 @@ FloatingPane {
checkState: residualsPerViewLegend.buttonGroup.checkState checkState: residualsPerViewLegend.buttonGroup.checkState
onClicked: { onClicked: {
var _checked = checked; var _checked = checked;
for(var i = 0; i < residualsPerViewChart.count; ++i) for (var i = 0; i < residualsPerViewChart.count; ++i) {
{ residualsPerViewChart.series(i).visible = _checked
residualsPerViewChart.series(i).visible = _checked;
} }
} }
} }
@ -214,9 +213,8 @@ FloatingPane {
checkState: observationsLengthsPerViewLegend.buttonGroup.checkState checkState: observationsLengthsPerViewLegend.buttonGroup.checkState
onClicked: { onClicked: {
var _checked = checked; var _checked = checked;
for(var i = 0; i < observationsLengthsPerViewChart.count; ++i) for (var i = 0; i < observationsLengthsPerViewChart.count; ++i) {
{ observationsLengthsPerViewChart.series(i).visible = _checked
observationsLengthsPerViewChart.series(i).visible = _checked;
} }
} }
} }
@ -225,7 +223,6 @@ FloatingPane {
id: observationsLengthsPerViewLegend id: observationsLengthsPerViewLegend
chartView: observationsLengthsPerViewChart chartView: observationsLengthsPerViewChart
} }
} }
} }
@ -278,7 +275,6 @@ FloatingPane {
anchors.leftMargin: landmarksPerViewChart.width * 0.25 anchors.leftMargin: landmarksPerViewChart.width * 0.25
RowLayout { RowLayout {
ChartViewCheckBox { ChartViewCheckBox {
id: allFeatures id: allFeatures
text: "ALL" text: "ALL"
@ -286,9 +282,8 @@ FloatingPane {
checkState: landmarksFeatTracksPerViewLegend.buttonGroup.checkState checkState: landmarksFeatTracksPerViewLegend.buttonGroup.checkState
onClicked: { onClicked: {
var _checked = checked; var _checked = checked;
for(var i = 0; i < landmarksPerViewChart.count; ++i) for (var i = 0; i < landmarksPerViewChart.count; ++i) {
{ landmarksPerViewChart.series(i).visible = _checked
landmarksPerViewChart.series(i).visible = _checked;
} }
} }
} }
@ -297,7 +292,6 @@ FloatingPane {
id: landmarksFeatTracksPerViewLegend id: landmarksFeatTracksPerViewLegend
chartView: landmarksPerViewChart chartView: landmarksPerViewChart
} }
} }
} }
@ -308,20 +302,20 @@ FloatingPane {
mTracks: root.mTracks mTracks: root.mTracks
onAxisChanged: { onAxisChanged: {
fillLandmarksPerViewSerie(landmarksPerViewLineSerie); fillLandmarksPerViewSerie(landmarksPerViewLineSerie)
fillTracksPerViewSerie(tracksPerViewLineSerie); fillTracksPerViewSerie(tracksPerViewLineSerie)
fillResidualsMinPerViewSerie(residualsMinPerViewLineSerie); fillResidualsMinPerViewSerie(residualsMinPerViewLineSerie)
fillResidualsMaxPerViewSerie(residualsMaxPerViewLineSerie); fillResidualsMaxPerViewSerie(residualsMaxPerViewLineSerie)
fillResidualsMeanPerViewSerie(residualsMeanPerViewLineSerie); fillResidualsMeanPerViewSerie(residualsMeanPerViewLineSerie)
fillResidualsMedianPerViewSerie(residualsMedianPerViewLineSerie); fillResidualsMedianPerViewSerie(residualsMedianPerViewLineSerie)
fillResidualsFirstQuartilePerViewSerie(residualsFirstQuartilePerViewLineSerie); fillResidualsFirstQuartilePerViewSerie(residualsFirstQuartilePerViewLineSerie)
fillResidualsThirdQuartilePerViewSerie(residualsThirdQuartilePerViewLineSerie); fillResidualsThirdQuartilePerViewSerie(residualsThirdQuartilePerViewLineSerie)
fillObservationsLengthsMinPerViewSerie(observationsLengthsMinPerViewLineSerie); fillObservationsLengthsMinPerViewSerie(observationsLengthsMinPerViewLineSerie)
fillObservationsLengthsMaxPerViewSerie(observationsLengthsMaxPerViewLineSerie); fillObservationsLengthsMaxPerViewSerie(observationsLengthsMaxPerViewLineSerie)
fillObservationsLengthsMeanPerViewSerie(observationsLengthsMeanPerViewLineSerie); fillObservationsLengthsMeanPerViewSerie(observationsLengthsMeanPerViewLineSerie)
fillObservationsLengthsMedianPerViewSerie(observationsLengthsMedianPerViewLineSerie); fillObservationsLengthsMedianPerViewSerie(observationsLengthsMedianPerViewLineSerie)
fillObservationsLengthsFirstQuartilePerViewSerie(observationsLengthsFirstQuartilePerViewLineSerie); fillObservationsLengthsFirstQuartilePerViewSerie(observationsLengthsFirstQuartilePerViewLineSerie)
fillObservationsLengthsThirdQuartilePerViewSerie(observationsLengthsThirdQuartilePerViewLineSerie); fillObservationsLengthsThirdQuartilePerViewSerie(observationsLengthsThirdQuartilePerViewLineSerie)
} }
} }
} }

View file

@ -88,9 +88,8 @@ FloatingPane {
checkState: residualLegend.buttonGroup.checkState checkState: residualLegend.buttonGroup.checkState
onClicked: { onClicked: {
var _checked = checked; var _checked = checked;
for(var i = 0; i < residualChart.count; ++i) for (var i = 0; i < residualChart.count; ++i) {
{ residualChart.series(i).visible = _checked
residualChart.series(i).visible = _checked;
} }
} }
} }
@ -141,8 +140,7 @@ FloatingPane {
axisY: observationsLengthsvalueAxisY axisY: observationsLengthsvalueAxisY
name: "Current" name: "Current"
} }
}
}
Item { Item {
id: observationsLengthsBtnContainer id: observationsLengthsBtnContainer
@ -162,9 +160,8 @@ FloatingPane {
checkState: observationsLengthsLegend.buttonGroup.checkState checkState: observationsLengthsLegend.buttonGroup.checkState
onClicked: { onClicked: {
var _checked = checked; var _checked = checked;
for(var i = 0; i < observationsLengthsChart.count; ++i) for (var i = 0; i < observationsLengthsChart.count; ++i) {
{ observationsLengthsChart.series(i).visible = _checked
observationsLengthsChart.series(i).visible = _checked;
} }
} }
} }
@ -173,7 +170,6 @@ FloatingPane {
id: observationsLengthsLegend id: observationsLengthsLegend
chartView: observationsLengthsChart chartView: observationsLengthsChart
} }
} }
} }
@ -232,9 +228,8 @@ FloatingPane {
checkState: observationsScaleLegend.buttonGroup.checkState checkState: observationsScaleLegend.buttonGroup.checkState
onClicked: { onClicked: {
var _checked = checked; var _checked = checked;
for(var i = 0; i < observationsScaleChart.count; ++i) for (var i = 0; i < observationsScaleChart.count; ++i) {
{ observationsScaleChart.series(i).visible = _checked
observationsScaleChart.series(i).visible = _checked;
} }
} }
} }
@ -252,12 +247,12 @@ FloatingPane {
msfmData: (root.visible && root.msfmData && root.msfmData.status === AliceVision.MSfMData.Ready) ? root.msfmData : null msfmData: (root.visible && root.msfmData && root.msfmData.status === AliceVision.MSfMData.Ready) ? root.msfmData : null
viewId: root.viewId viewId: root.viewId
onViewStatsChanged: { onViewStatsChanged: {
fillResidualFullSerie(residualFullLineSerie); fillResidualFullSerie(residualFullLineSerie)
fillResidualViewSerie(residualViewLineSerie); fillResidualViewSerie(residualViewLineSerie)
fillObservationsLengthsFullSerie(observationsLengthsFullLineSerie); fillObservationsLengthsFullSerie(observationsLengthsFullLineSerie)
fillObservationsLengthsViewSerie(observationsLengthsViewLineSerie); fillObservationsLengthsViewSerie(observationsLengthsViewLineSerie)
fillObservationsScaleFullSerie(observationsScaleFullLineSerie); fillObservationsScaleFullSerie(observationsScaleFullLineSerie)
fillObservationsScaleViewSerie(observationsScaleViewLineSerie); fillObservationsScaleViewSerie(observationsScaleViewLineSerie)
} }
} }
} }

File diff suppressed because it is too large Load diff