import QtQuick import QtQuick.Controls import ISC import ISC.Wafer Item { id: root property real blend: 0.0 property bool showLabels: true property alias showExtremes: map.showExtremes property alias showThickness: map.showThickness property alias hasThickness: map.hasThickness WaferMapItem { id: map anchors.fill: parent sensors: streamController.sensorLayout // [{label,x,y}] values: streamController.sensorValues // [float] bands: streamController.sensorBands // ["in_range"|"high"|"low"] shape: streamController.waferShape size: streamController.waferSize target: streamController.target margin: streamController.margin blend: root.blend showLabels: root.showLabels // Bind to Theme so colors update on dark/light mode switch ringColor: Theme.waferRingColor axisColor: Theme.waferAxisColor lowColor: Theme.sensorLow inRangeColor: Theme.sensorInRange highColor: Theme.sensorHigh textColor: Theme.headingColor // Grows the hovered marker smoothly; hoverScale setter triggers a repaint. hoverScale: 1.0 + 0.35 * hoverPulse property real hoverPulse: map.hoveredIndex >= 0 ? 1.0 : 0.0 Behavior on hoverPulse { NumberAnimation { duration: 150; easing.type: Easing.OutQuad } } HoverHandler { id: hoverHandler onPointChanged: { map.hoveredIndex = streamController.mode === "live" ? -1 : map.which_marker(hoverHandler.point.position.x, hoverHandler.point.position.y); } onHoveredChanged: if (!hoverHandler.hovered) map.hoveredIndex = -1 cursorShape: map.hoveredIndex >= 0 ? Qt.PointingHandCursor : Qt.ArrowCursor } TapHandler { onTapped: ev => { if (streamController.mode === "live") return; var idx = map.which_marker(ev.position.x, ev.position.y); if (idx >= 0) replaceDialog.openFor(idx); } } } ReplaceSensorDialog { id: replaceDialog } function exportImage(filePath, extra) { return map.export_image(filePath, extra || ""); } function loadThickness(filePath) { return map.loadThickness(filePath); } }