From a11b5d51aabf1307283d9539f9b275acc074d6b2 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Thu, 31 Dec 2020 14:10:05 +0100 Subject: [PATCH] [ui] Viewer2D: add a summary to the image metadata tab --- meshroom/ui/qml/Viewer/ImageMetadataView.qml | 47 +++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/meshroom/ui/qml/Viewer/ImageMetadataView.qml b/meshroom/ui/qml/Viewer/ImageMetadataView.qml index d35ef2d0..7c86767f 100644 --- a/meshroom/ui/qml/Viewer/ImageMetadataView.qml +++ b/meshroom/ui/qml/Viewer/ImageMetadataView.qml @@ -129,7 +129,52 @@ FloatingPane { id: searchBar Layout.fillWidth: true } - + RowLayout { + Layout.alignment: Qt.AlignHCenter + Label { + font.family: MaterialIcons.fontFamily + text: MaterialIcons.shutter_speed + } + Label { + id: exposureLabel + text: { + if(metadata["ExposureTime"] === undefined) + return ""; + var expStr = metadata["ExposureTime"]; + var exp = parseFloat(expStr); + if(exp < 1.0) + { + var invExp = 1.0 / exp; + return "1/" + invExp.toFixed(0); + } + return expStr; + } + elide: Text.ElideRight + horizontalAlignment: Text.AlignHLeft + } + Item { width: 4 } + Label { + font.family: MaterialIcons.fontFamily + text: MaterialIcons.camera + } + Label { + id: fnumberLabel + text: (metadata["FNumber"] !== undefined) ? ("f/" + metadata["FNumber"]) : "" + elide: Text.ElideRight + horizontalAlignment: Text.AlignHLeft + } + Item { width: 4 } + Label { + font.family: MaterialIcons.fontFamily + text: MaterialIcons.iso + } + Label { + id: isoLabel + text: metadata["Exif:ISOSpeedRatings"] || "" + elide: Text.ElideRight + horizontalAlignment: Text.AlignHLeft + } + } // Metadata ListView ListView { id: metadataView