feat: Add Wafer Map tab and associated components

- Introduced a new Wafer Map tab in the HomePage.qml, which loads WaferMapTab.qml when selected.
- Created WaferMapTab.qml to display wafer map with live data and controls.
- Added ReadoutPanel.qml for displaying sensor statistics and thresholds.
- Implemented SourcePanel.qml for file selection and filtering.
- Developed TransportBar.qml for playback controls.
- Added WaferMapView.qml to visualize wafer data with interactive features.
- Created ReplaceSensorDialog.qml for sensor value overrides.
- Updated Theme.qml for new color schemes and UI adjustments.
- Modified qmldir files to include new components in the ISC.Tabs and ISC.Tabs.components modules.
This commit is contained in:
jack
2026-06-11 11:57:24 -07:00
parent b52b983bb2
commit 97ca58bfc2
10 changed files with 1080 additions and 13 deletions
@@ -0,0 +1,229 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import ISC
ColumnLayout {
spacing: 6
// ── Section label ─────────────────────────────────────────────────────
Label {
text: "SOURCE"
color: Theme.bodyColor
font.pixelSize: 10
font.letterSpacing: 1.8
font.weight: Font.Medium
}
// ── Directory button ──────────────────────────────────────────────────
Button {
id: dirBtn
Layout.fillWidth: true
hoverEnabled: true
implicitHeight: 32
leftPadding: 8
rightPadding: 8
background: Rectangle {
radius: Theme.radiusSm
color: dirBtn.pressed ? Theme.buttonNeutralPressed
: dirBtn.hovered ? Theme.buttonNeutralHover
: Theme.buttonNeutralBackground
border.width: Theme.borderThin
border.color: Theme.fieldBorder
}
contentItem: RowLayout {
spacing: 6
Label {
text: "▤"
color: Theme.bodyColor
font.pixelSize: 12
}
Label {
text: file_browser.currentDirectory.split("/").pop() || file_browser.currentDirectory
color: Theme.headingColor
font.pixelSize: 11
elide: Text.ElideMiddle
Layout.fillWidth: true
}
}
onClicked: file_browser.chooseDirectory()
}
// ── Filter ────────────────────────────────────────────────────────────
TextField {
id: filter
Layout.fillWidth: true
placeholderText: "Filter…"
font.pixelSize: 11
color: Theme.fieldText
placeholderTextColor: Theme.fieldPlaceholder
selectedTextColor: Theme.fieldBackground
selectionColor: Theme.fieldText
background: Rectangle {
radius: Theme.radiusXs
color: Theme.fieldBackground
border.width: filter.activeFocus ? Theme.borderStrong : Theme.borderThin
border.color: filter.activeFocus ? Theme.fieldBorderFocus : Theme.fieldBorder
}
}
// ── File list ─────────────────────────────────────────────────────────
ListView {
id: fileList
Layout.fillWidth: true
Layout.fillHeight: true
clip: true
spacing: 2
highlight: null
highlightFollowsCurrentItem: false
model: file_browser.files
delegate: ItemDelegate {
id: fileItem
width: ListView.view.width
padding: 0
highlighted: false
focusPolicy: Qt.NoFocus
readonly property bool matchesFilter: {
if (filter.text === "") return true
var q = filter.text.toLowerCase()
return (modelData.baseName + modelData.waferType + modelData.date)
.toLowerCase().indexOf(q) >= 0
}
// Active only in review mode; no highlight during live streaming
readonly property bool isActive:
streamController.mode === "review" &&
streamController.loadedFile !== "" &&
modelData.fileName === streamController.loadedFile
visible: matchesFilter
height: matchesFilter ? implicitHeight : 0
onClicked: streamController.loadFile(modelData.fileName)
background: Rectangle {
color: fileItem.isActive
? Qt.rgba(1, 1, 1, 0.06)
: fileItem.hovered ? Qt.rgba(1, 1, 1, 0.04) : "transparent"
radius: Theme.radiusSm
// Left accent bar — shown only when active
Rectangle {
visible: fileItem.isActive
width: 3
radius: 1.5
anchors {
top: parent.top; bottom: parent.bottom; left: parent.left
topMargin: 5; bottomMargin: 5
}
color: {
var t = modelData.waferType
if (t === "A" || t === "E" || t === "P") return "#3B82F6"
if (t === "B" || t === "C" || t === "D") return "#10B981"
if (t === "Z") return "#8B5CF6"
return Theme.headingColor
}
}
}
contentItem: RowLayout {
spacing: 8
anchors.margins: 8
// Wafer-type avatar (circle)
Rectangle {
width: 28; height: 28
radius: 14
color: {
var t = modelData.waferType
if (t === "A" || t === "E" || t === "P") return "#1D4ED8"
if (t === "B" || t === "C" || t === "D") return "#065F46"
if (t === "Z") return "#7C3AED"
return "#374151"
}
Label {
anchors.centerIn: parent
text: modelData.waferType || "?"
font.pixelSize: 12
font.weight: Font.Bold
color: "#FFFFFF"
}
}
// Typography hierarchy
ColumnLayout {
spacing: 1
Layout.fillWidth: true
// Primary: serial number
Label {
text: modelData.serialNumber || modelData.baseName
color: Theme.headingColor
font.pixelSize: 13
font.weight: Font.Bold
elide: Text.ElideRight
Layout.fillWidth: true
}
// Secondary: date · time
RowLayout {
spacing: 3
Layout.fillWidth: true
Label {
text: {
var d = modelData.date || ""
return d.length >= 10 ? d.substring(0, 10) : (d || "—")
}
color: Theme.bodyColor
font.pixelSize: 10
}
Label {
visible: (modelData.timeStr || "") !== ""
text: "·"
color: Theme.bodyColor
font.pixelSize: 10
opacity: 0.45
}
Label {
visible: (modelData.timeStr || "") !== ""
text: modelData.timeStr || ""
color: Theme.bodyColor
font.pixelSize: 10
opacity: 0.65
}
}
// Tertiary: edited metadata (chamber · notes) if any
Label {
visible: {
var c = modelData.chamber || ""
var n = modelData.notes || ""
return c !== "" || n !== ""
}
text: {
var parts = []
if (modelData.chamber) parts.push(modelData.chamber)
if (modelData.notes) parts.push(modelData.notes)
return parts.join(" · ")
}
color: Theme.bodyColor
font.pixelSize: 9
opacity: 0.7
elide: Text.ElideRight
Layout.fillWidth: true
}
}
}
}
}
// ── Footer ────────────────────────────────────────────────────────────
Label {
text: file_browser.files.length + " files · CSV only"
color: Theme.bodyColor
font.pixelSize: 10
}
}