feat(ui): improve device session management, update data directory paths, and add session clearing functionality.

This commit is contained in:
jack
2026-06-15 11:28:28 -07:00
parent 7e584e08e8
commit 2e4763510d
7 changed files with 173 additions and 42 deletions
+27 -3
View File
@@ -24,6 +24,19 @@ Rectangle {
property int selectedTabIndex: 0
property int selectedSideActionIndex: -1 // nothing active on startup
Connections {
target: deviceController
function onParsedDataReady(result) {
if (result.success && result.csv_path) {
// Load the freshly read CSV into the player
streamController.loadFile(result.csv_path)
// Automatically switch to the "Wafer Map Tab" (index 3)
root.selectedTabIndex = 3
}
}
}
// ===== Main Two-Column Layout =====
RowLayout {
anchors.fill: parent
@@ -60,9 +73,19 @@ Rectangle {
onClicked: {
root.selectedSideActionIndex = index
root.selectedTabIndex = 0 // always jump to Status tab
if (index === 0) deviceController.detectWafer()
else if (index === 1) deviceController.readMemoryAsync()
else if (index === 2) deviceController.openCsvFile()
if (index === 0) {
streamController.setMode("review")
streamController.stopStream()
deviceController.detectWafer()
}
else if (index === 1) {
streamController.setMode("review")
streamController.stopStream()
deviceController.readMemoryAsync()
}
else if (index === 2) {
deviceController.openCsvFile()
}
}
background: Rectangle {
@@ -182,6 +205,7 @@ Rectangle {
color: Theme.tabBarBackground
border.color: Theme.workspaceBorder
border.width: Theme.borderThin
radius: Theme.radiusMd
RowLayout {
anchors.fill: parent