feat(map): add peak highlights and live metrics to PNG export

- Draw rings around hottest and coldest sensors on export.
- Extend export_image to support second line for live metrics.
- Format detailed sensor stats in export footer.
- Add test coverage for footer rows, overlays, and stats.
This commit is contained in:
jack
2026-07-10 15:39:30 -07:00
parent 69753e35f9
commit 034f13b717
6 changed files with 128 additions and 24 deletions
@@ -15,7 +15,7 @@ ColumnLayout {
property alias heatmapBlend: heatmapSlider.value
property alias showThickness: thicknessToggle.checked
signal exportRequested(string filePath)
signal exportRequested(string filePath, string extra)
component PanelCheckBox: CheckBox {
id: toggle
@@ -80,8 +80,8 @@ ColumnLayout {
StreamControlPanel {
Layout.fillWidth: true
onExportRequested: function(filePath) {
root.exportRequested(filePath);
onExportRequested: function(filePath, extra) {
root.exportRequested(filePath, extra);
}
}
@@ -15,7 +15,7 @@ Rectangle {
border.color: Theme.sideBorder
border.width: 1
signal exportRequested(string filePath)
signal exportRequested(string filePath, string extra)
property int _liveSecs: 0
Connections {
@@ -310,7 +310,14 @@ Rectangle {
nameFilters: ["PNG files (*.png)"]
onAccepted: {
var path = String(selectedFile).replace(/^file:\/\//, "");
root.exportRequested(path);
var extra = "";
if (streamController.mode === "live") {
extra = "Frames: " + streamController.receivedCount
+ " Errors: " + streamController.errorCount
+ " Resyncs: " + streamController.resyncCount
+ " Elapsed: " + root.fmtTime(root._liveSecs);
}
root.exportRequested(path, extra);
}
}
}
@@ -58,7 +58,7 @@ Item {
id: replaceDialog
}
function exportImage(filePath) {
return map.export_image(filePath);
function exportImage(filePath, extra) {
return map.export_image(filePath, extra || "");
}
}