feat: add file comparison, data splitting, and sensor modification functionality to SessionController

This commit is contained in:
jack
2026-07-06 11:58:26 -07:00
parent ecab3d81b1
commit 3cc10ea7fe
9 changed files with 1361 additions and 167 deletions
+11 -40
View File
@@ -22,6 +22,7 @@ Rectangle {
onSelectedTabIndexChanged: {
if (selectedTabIndex === 2) {
file_browser.refreshFiles();
streamController.unloadFile()
}
}
@@ -36,7 +37,9 @@ Rectangle {
function onParsedDataReady(result) {
if (result.success && result.csv_path) {
streamController.loadFile(result.csv_path)
if (root.selectedTabIndex === 0) {
root.selectedTabIndex = 2
}
}
}
}
@@ -74,6 +77,11 @@ Rectangle {
}
}
// ===== Split Dialog (Threshold Segmentation) =====
SplitDialog {
id: splitDialog
}
// ===== Settings Popup =====
Popup {
id: settingsPopup
@@ -300,7 +308,7 @@ Rectangle {
StackLayout {
Layout.fillWidth: true
Layout.fillHeight: true
currentIndex: root.selectedTabIndex
currentIndex: root.selectedTabIndex === 0 ? 0 : 1
// ── Status tab: Hardware Actions ────────────────
ColumnLayout {
@@ -320,7 +328,7 @@ Rectangle {
label: "DETECT WAFER"
iconSource: "../icons/detect.svg"
Layout.fillWidth: true
enabled: !deviceController.isDetecting
enabled: !deviceController.operationInProgress
onClicked: root._doDetect()
}
@@ -345,44 +353,6 @@ Rectangle {
Item { Layout.fillHeight: true }
}
// ── Data tab: Data Operations ───────────────────
ColumnLayout {
spacing: 6
Label {
text: "DATA OPERATIONS"
color: Theme.sideMutedText
font.family: Theme.uiFontFamily
font.pixelSize: Theme.fontSm
topPadding: 6
font.letterSpacing: 1.5
font.bold: true
}
RailActionButton {
label: "OPEN IN EXCEL"
iconSource: "../icons/excel.svg"
Layout.fillWidth: true
onClicked: deviceController.openCsvFile()
}
RailActionButton {
label: "COMPARE CSV"
iconSource: "../icons/compare.svg"
Layout.fillWidth: true
onClicked: console.log("[P3.1] Compare dialog not yet built")
}
RailActionButton {
label: "SPLIT DATA"
iconSource: "../icons/split.svg"
Layout.fillWidth: true
onClicked: console.log("[P3.2] Split dialog not yet built")
}
Item { Layout.fillHeight: true }
}
// ── Map tab: Source file browser ──────────────
SourcePanel {
Layout.fillWidth: true
@@ -637,6 +607,7 @@ Rectangle {
active: StackLayout.index === root.selectedTabIndex
}
Loader {
id: dataTabLoader
source: "Tabs/DataTab.qml"
active: StackLayout.index === root.selectedTabIndex
}