chore: remove legacy GraphTab.qml component

This commit is contained in:
jack
2026-07-06 12:48:12 -07:00
parent 6996df73f8
commit 0f813b2376
3 changed files with 1 additions and 244 deletions
-222
View File
@@ -1,222 +0,0 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import ISC
import ISC.Wafer
// ===== Graph Tab =====
// Displays sensor temperature line charts using GraphQuickItem.
// Gets data from deviceController.getChartData() (parsed CSV, batch read)
// or from streamController.trendData (live streaming trend).
Item {
id: root
anchors.fill: parent
property var _chartData: null // cached result from getChartData()
ColumnLayout {
anchors.fill: parent
anchors.margins: Theme.panelPadding
spacing: Theme.rightPaneGap
// ── Toolbar ───────────────────────────────────────────────────────────
RowLayout {
Layout.fillWidth: true
spacing: 10
Label {
text: "Line Chart"
color: Theme.headingColor
font.pixelSize: Theme.fontSm
font.bold: true
Layout.alignment: Qt.AlignVCenter
}
Item {
Layout.fillWidth: true
}
// Refresh button — pulls data from deviceController
Button {
id: refreshBtn
text: "REFRESH"
font.pixelSize: Theme.fontXs
font.weight: Font.Medium
implicitHeight: 26
implicitWidth: 72
hoverEnabled: true
background: Rectangle {
color: parent.hovered ? Theme.buttonNeutralHover : Theme.buttonNeutralBackground
border.color: Theme.cardBorder
border.width: 1
radius: Theme.radiusSm
}
contentItem: Text {
text: parent.text
color: Theme.headingColor
font: parent.font
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
onClicked: reloadData()
}
}
// ── Mode selector (Trend / Full chart) ─────────────────────────────
RowLayout {
Layout.fillWidth: true
spacing: 8
Label {
text: "Source:"
color: Theme.bodyColor
font.pixelSize: Theme.fontXs
Layout.alignment: Qt.AlignVCenter
}
ComboBox {
id: sourceSelector
model: ["Parsed Data", "Live Trend"]
currentIndex: 0
implicitHeight: 26
font.pixelSize: Theme.fontXs
background: Rectangle {
color: Theme.fieldBackground
border.color: Theme.fieldBorder
border.width: 1
radius: Theme.radiusSm
}
contentItem: Text {
text: sourceSelector.displayText
color: Theme.fieldText
font: sourceSelector.font
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
leftPadding: 8
}
onCurrentIndexChanged: reloadData()
}
Item {
Layout.fillWidth: true
}
Label {
id: statusLabel
text: "Ready"
color: Theme.bodyColor
font.pixelSize: Theme.fontXs
font.italic: true
Layout.alignment: Qt.AlignVCenter
}
}
// ── Chart Area ─────────────────────────────────────────────────────────
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
color: Theme.cardBackground
border.color: Theme.cardBorder
border.width: 1
radius: Theme.radiusMd
clip: true
GraphQuickItem {
id: graph
anchors.fill: parent
anchors.margins: 2
backgroundColor: Theme.cardBackground
gridColor: Theme.softBorder
axisColor: Theme.bodyColor
textColor: Theme.headingColor
seriesColors: [Theme.sensorLow, Theme.sensorHigh, Theme.sensorInRange, "#FFA726", "#AB47BC", "#00BCD4"]
showLegend: true
}
}
}
// ── Data Loading ────────────────────────────────────────────────────────────
function reloadData() {
if (sourceSelector.currentIndex === 0) {
// Parsed data from DeviceController
loadParsedData();
} else {
// Live trend from SessionController
loadLiveTrend();
}
}
function loadParsedData() {
statusLabel.text = "Loading...";
var result = deviceController.getChartData();
if (!result || !result.success) {
graph.seriesData = [];
graph.sensorNames = [];
graph.title = "Sensor Temperature Over Time";
statusLabel.text = "No data — read a wafer first";
return;
}
graph.seriesData = result.series || [];
graph.sensorNames = result.sensor_names || [];
graph.title = "Sensor Temperature Over Time";
statusLabel.text = (result.series ? result.series.length : 0) + " sensors loaded";
}
function loadLiveTrend() {
// Live trend: connects to streamController.trendData
// The trend data comes as a JSON array of per-frame averages
statusLabel.text = "Connecting to live trend...";
// We need at least one data point
if (streamController.stats && streamController.stats.avg !== undefined) {
// Build a single-series graph from the trend buffer
// For now show a placeholder — the trendData signal handles updates
graph.title = "Live Average Temperature";
graph.yLabel = "Avg Temperature (°C)";
graph.xLabel = "Time (s)";
statusLabel.text = "Live trend — waiting for data...";
} else {
statusLabel.text = "No live data — start a stream on the Wafer Map tab";
}
}
// ── Connections ─────────────────────────────────────────────────────────────
Connections {
target: deviceController
function onParsedDataReady(result) {
if (sourceSelector.currentIndex === 0) {
root.reloadData();
}
}
}
Connections {
target: streamController
function onTrendData(avgsJson) {
if (sourceSelector.currentIndex === 1) {
try {
var avgs = JSON.parse(avgsJson);
if (avgs && avgs.length > 0) {
graph.seriesData = [avgs];
graph.sensorNames = ["Average"];
graph.title = "Live Average Temperature";
graph.yLabel = "Avg Temperature (°C)";
graph.xLabel = "Frame";
statusLabel.text = "Live: " + avgs.length + " data points";
}
} catch (e) {
// ignore parse errors
}
}
}
}
// On startup, try to load parsed data if available
Component.onCompleted: {
if (deviceController.dataRowCount > 0) {
reloadData();
}
}
}
-1
View File
@@ -1,7 +1,6 @@
# ===== ISC Tabs Module ===== # ===== ISC Tabs Module =====
module ISC.Tabs module ISC.Tabs
GraphTab 1.0 GraphTab.qml
WaferMapTab 1.0 WaferMapTab.qml WaferMapTab 1.0 WaferMapTab.qml
DataTab 1.0 DataTab.qml DataTab 1.0 DataTab.qml
SettingsTab 1.0 SettingsTab.qml SettingsTab 1.0 SettingsTab.qml
+1 -21
View File
@@ -44,9 +44,6 @@ QtObject {
readonly property int fontWeightMedium: 500 readonly property int fontWeightMedium: 500
readonly property int fontWeightBold: 700 readonly property int fontWeightBold: 700
// Legacy shim
readonly property int tabFontSize: fontSm
// ── 3. Motion ────────────────────────────────────────────────────────── // ── 3. Motion ──────────────────────────────────────────────────────────
readonly property int durationFast: 120 // micro-interactions (focus ring, hover flash) readonly property int durationFast: 120 // micro-interactions (focus ring, hover flash)
readonly property int durationBase: 180 // standard transitions (pill switch, row select) readonly property int durationBase: 180 // standard transitions (pill switch, row select)
@@ -118,14 +115,8 @@ QtObject {
// ── 7. Tracks (pill toggle, scrollbar thumb) ───────────────────────────── // ── 7. Tracks (pill toggle, scrollbar thumb) ─────────────────────────────
readonly property color trackBackground: isDarkMode ? "#25252B" : "#E2E2DE" readonly property color trackBackground: isDarkMode ? "#25252B" : "#E2E2DE"
// ── 8. Tabs (footer tab bar) ───────────────────────────────────────────── // ── 8. Tabs (mode toggle pills) ──────────────────────────────────────────
readonly property color tabBarBackground: tone200
readonly property color tabBackground: "transparent"
readonly property color tabActiveBackground: isDarkMode ? "#25252B" : "#FFFFFF" readonly property color tabActiveBackground: isDarkMode ? "#25252B" : "#FFFFFF"
readonly property color tabHoverBackground: tone250
readonly property color tabBorder: "transparent"
readonly property color tabText: toneMute
readonly property color tabActiveText: toneText
// ── 9. Side rail ───────────────────────────────────────────────────────── // ── 9. Side rail ─────────────────────────────────────────────────────────
readonly property color sideRailBackground: tone150 readonly property color sideRailBackground: tone150
@@ -133,12 +124,8 @@ QtObject {
readonly property color sideActiveBackground: isDarkMode ? "#25252B" : "#FFFFFF" readonly property color sideActiveBackground: isDarkMode ? "#25252B" : "#FFFFFF"
readonly property color sideBorder: toneBorder readonly property color sideBorder: toneBorder
readonly property color sideMutedText: toneMute readonly property color sideMutedText: toneMute
readonly property color sideAccent: themeAccent
readonly property color sideRowHover: tone250
readonly property color sideFieldBackground: isDarkMode ? "#101014" : "#FFFFFF"
// ── 10a. Transport / toolbar surfaces ──────────────────────────────────── // ── 10a. Transport / toolbar surfaces ────────────────────────────────────
readonly property color transportBackground: isDarkMode ? "#101014" : "#EFEFED"
readonly property color transportButtonBg: tone250 readonly property color transportButtonBg: tone250
readonly property color transportButtonHover: tone300 readonly property color transportButtonHover: tone300
readonly property color liveColor: themeAdded readonly property color liveColor: themeAdded
@@ -179,14 +166,7 @@ QtObject {
readonly property int sidePanelRadius: 10 readonly property int sidePanelRadius: 10
readonly property int sideFooterConnection: 100 readonly property int sideFooterConnection: 100
readonly property int sideFooterUtility: 46 readonly property int sideFooterUtility: 46
// Tab bar layout
readonly property int tabBarHeight: 34
readonly property int sidePillHeight: 54 readonly property int sidePillHeight: 54
readonly property int sidePillButtonHeight: 36
readonly property int tabBarPadding: 6
readonly property int tabSpacing: 2
readonly property int tabRadius: 8
readonly property int tabButtonMinWidth: 80
// Settings page layout // Settings page layout
readonly property int settingsPanelMaxWidth: 760 readonly property int settingsPanelMaxWidth: 760
readonly property int settingsOuterMargin: 40 readonly property int settingsOuterMargin: 40