Enhance UI and add file selection functionality

- Updated  to include new files for the project.
- Modified  to improve layout and navigation, including new properties for tab and action management.
- Introduced  for file selection with metadata editing capabilities.
- Created  for managing application settings and integrating the file selection dialog.
This commit is contained in:
Jack.Le
2026-04-27 13:56:36 -07:00
parent e43bf258e3
commit 9f8c6e1a4c
4 changed files with 1057 additions and 15 deletions
+67 -14
View File
@@ -3,24 +3,33 @@ import QtQuick.Controls
import QtQuick.Layouts
import ISC
// ===== Home Workspace Shell =====
Rectangle {
id: root
anchors.fill: parent
color: Theme.pageBackground
clip: true
border.color: Theme.outerFrameBorder
border.width: Theme.borderStrong
// ===== Navigation Model =====
// Primary navigation shown in the left rail.
property var sideActions: ["DETECT WAFER", "READ MEMORY", "OPEN CSV IN EXCEL", "ERASE MEMORY", "IMPORT DATA", "STORED DATA"]
// ===== Footer Tab Model =====
// Footer tabs drive the active workspace section.
property var bottomTabs: ["Status", "Graph", "Data", "Wafer Map", "Compare", "Split", "Settings", "About"]
// ===== View State =====
property int selectedTabIndex: 0
property int selectedSideActionIndex: 0
// ===== Main Two-Column Layout =====
RowLayout {
anchors.fill: parent
spacing: 0
// ===== Left Action Rail =====
// Left control rail.
Rectangle {
id: sideRail
@@ -28,7 +37,7 @@ Rectangle {
Layout.fillHeight: true
color: Theme.sideRailBackground
border.color: Theme.workspaceBorder
border.width: 1
border.width: Theme.borderThin
readonly property int actionCount: root.sideActions.length
readonly property real computedButtonHeight: Math.min(Theme.sideButtonHeight, (height - (Theme.panelPadding * 2) - (Theme.sideRailSpacing * Math.max(0, actionCount - 1))) / Math.max(1, actionCount))
@@ -44,20 +53,41 @@ Rectangle {
Button {
id: control
text: modelData
property bool isActive: index === root.selectedSideActionIndex
Layout.fillWidth: true
Layout.preferredHeight: Math.max(Theme.sideButtonMinHeight, sideRail.computedButtonHeight)
hoverEnabled: true
onClicked: root.selectedSideActionIndex = index
background: Rectangle {
color: control.down ? Theme.buttonPressed : Theme.cardBackground
border.color: Theme.cardBorder
color: {
if (control.down) {
return Theme.buttonPressed;
}
if (control.isActive) {
return Theme.sideActiveBackground;
}
return "transparent";
}
border.color: control.isActive ? Theme.cardBorder : "transparent"
border.width: 1
radius: 4
radius: Theme.radiusSm
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 3
visible: control.isActive
color: Theme.primaryAccent
radius: Theme.radiusXs
}
}
contentItem: Text {
text: control.text
color: Theme.headingColor
font.bold: true
color: control.isActive ? Theme.headingColor : Theme.bodyColor
font.bold: control.isActive
font.pixelSize: 18
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
@@ -74,13 +104,14 @@ Rectangle {
Layout.fillHeight: true
color: Theme.workspaceBackground
border.color: Theme.workspaceBorder
border.width: 1
border.width: Theme.borderThin
ColumnLayout {
anchors.fill: parent
anchors.margins: Theme.mainAreaPadding
spacing: Theme.rightPaneGap
// ===== Active Tab Content Area =====
Rectangle {
Layout.fillWidth: true
Layout.fillHeight: true
@@ -88,23 +119,45 @@ Rectangle {
color: Theme.responseBackground
border.color: Theme.responseBorder
border.width: 1
radius: 8
radius: Theme.radiusMd
Label {
anchors.centerIn: parent
text: "Main content area"
color: Theme.bodyColor
font.pixelSize: 20
StackLayout {
anchors.fill: parent
currentIndex: root.selectedTabIndex
// ===== Tab Content Routing =====
Repeater {
model: root.bottomTabs
Item {
property string tabName: modelData
Loader {
anchors.fill: parent
active: parent.tabName === "Settings"
source: parent.tabName === "Settings" ? "Tabs/SettingsTab.qml" : ""
}
Label {
anchors.centerIn: parent
visible: parent.tabName !== "Settings"
text: parent.tabName + " content"
color: Theme.bodyColor
font.pixelSize: 20
}
}
}
}
}
// Keep the tab strip evenly distributed across the footer.
// ===== Footer Tab Strip =====
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: Theme.tabBarHeight + (Theme.tabBarPadding * 2)
color: Theme.tabBarBackground
border.color: Theme.workspaceBorder
border.width: 1
border.width: Theme.borderThin
RowLayout {
anchors.fill: parent