Skip to content

Commit ef47df0

Browse files
Update README.md
1 parent b7d942e commit ef47df0

1 file changed

Lines changed: 50 additions & 36 deletions

File tree

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,59 @@
11
# 🛠️ Common UI Components
22

3-
This directory contains **shared interface widgets** that are used across multiple modes of the application (both Classification and Localization).
3+
This directory contains **shared interface widgets and layout containers** used across the application.
44

5-
The goal of this module is to adhere to the **DRY (Don't Repeat Yourself)** principle and ensure a consistent user experience regardless of the active task.
5+
The goal of this module is to adhere to the **DRY (Don't Repeat Yourself)** principle, ensuring a consistent user experience and architecture for both **Classification** and **Localization** tasks.
66

7-
## 📂 Files
7+
## 📂 Structural Components
88

9-
### 1. `dialogs.py`
9+
### 1. `main_window.py`
10+
* **Purpose:** The top-level UI container for the application.
11+
* **Key Class:** **`MainWindowUI`**
12+
* Uses a `QStackedLayout` to manage the high-level views.
13+
* **View 0:** `WelcomeWidget` (Entry screen).
14+
* **View 1:** `Classification` Interface (assembled via `UnifiedTaskPanel`).
15+
* **View 2:** `Localization` Interface (assembled via `UnifiedTaskPanel`).
1016

11-
* **Purpose:** Contains modal dialog windows used during project initialization and configuration.
12-
* **Key Classes:**
13-
* **`ProjectTypeDialog`**: A simple selection window asking the user to choose between "Classification" or "Localization" modes.
14-
* **`CreateProjectDialog`**: A comprehensive wizard for setting up new projects. It handles:
15-
* Task Name and Description input.
16-
* Modality selection (Video/Image/Audio).
17-
* **Dynamic Schema Creation**: Allows users to define Categories (Heads) and Labels interactively.
18-
* **`FolderPickerDialog`**: A specialized file tree widget that allows selecting multiple folders via checkboxes (solving the UX issue of requiring `Ctrl+Click` in standard dialogs).
17+
### 2. `workspace.py`
18+
* **Purpose:** Defines the generic layout skeleton used by specific tasks.
19+
* **Key Class:** **`UnifiedTaskPanel`**
20+
* Implements the standard **3-Column Layout** strategy:
21+
* **Left (Fixed):** `CommonProjectTreePanel` (Shared resource list).
22+
* **Center (Expandable):** Task-specific visualizer (e.g., Media Player).
23+
* **Right (Fixed):** Task-specific editor (e.g., Annotation Editor).
24+
* This ensures both modes look visually consistent while hosting different logic.
1925

2026
---
2127

22-
### 2. `project_controls.py`
23-
24-
This file contains widgets responsible for the control and navigation of the project workspace.
25-
26-
#### **Class: `UnifiedProjectControls`**
27-
* **Purpose:** Provides a standardized **Project Management Panel** to handle the application lifecycle.
28-
* **Layout:** A 3x2 Grid Layout containing the following essential buttons:
29-
* **Row 1:** `New Project`, `Load Project`
30-
* **Row 2:** `Add Data`, `Close Project`
31-
* **Row 3:** `Save`, `Export`
32-
* **Signal Interface:**
33-
* `createRequested`, `loadRequested`, `addVideoRequested`
34-
* `closeRequested`, `saveRequested`, `exportRequested`
35-
36-
#### **Class: `UnifiedClipExplorer`**
37-
* **Purpose:** A unified widget to display and manage the list of imported video clips/actions.
38-
* **Components:**
39-
* **Clip Tree:** Displays the file list with status icons (Done/Not Done).
40-
* **Filter:** A ComboBox to filter the list by status.
41-
* **Clear Button:** Allows removing all items from the workspace.
42-
* **Signal Interface:**
43-
* `requestRemoveItem(QTreeWidgetItem)`: Triggered via right-click context menu.
44-
* `filterChanged(int)`: Triggered when the filter combo box is changed.
45-
* `clearRequested()`: Triggered when the "Clear List" button is clicked.
28+
## 📂 Widget Components
29+
30+
### 3. `clip_explorer.py`
31+
* **Purpose:** The standardized **Left Sidebar** for resource management.
32+
* **Key Class:** **`CommonProjectTreePanel`**
33+
* **Composition:**
34+
* Embeds `UnifiedProjectControls` at the top.
35+
* Contains a `QTreeWidget` to display videos/clips.
36+
* Contains a bottom row with a **Filter ComboBox** and a **Clear Button**.
37+
* **Customization:** Accepts parameters for `tree_title` and `filter_items` to adapt text for Classification ("Actions") vs. Localization ("Clips").
38+
* **Signals:**
39+
* `request_remove_item(QTreeWidgetItem)`: Emitted via context menu.
40+
41+
### 4. `project_controls.py`
42+
* **Purpose:** A reusable button grid for project lifecycle management.
43+
* **Key Class:** **`UnifiedProjectControls`**
44+
* **Layout:** A 3x2 Grid containing 6 essential buttons:
45+
* `New Project`, `Load Project`
46+
* `Add Data`, `Close Project`
47+
* `Save`, `Export`
48+
* **Signals:** `createRequested`, `loadRequested`, `addVideoRequested`, `closeRequested`, `saveRequested`, `exportRequested`.
49+
50+
### 5. `dialogs.py`
51+
* **Purpose:** Modal dialogs for configuration and initialization.
52+
* **Key Classes:**
53+
* **`ProjectTypeDialog`**: Selection window for choosing between Classification/Localization modes.
54+
* **`CreateProjectDialog`**: A wizard for setting up new projects (Task Name, Modality, Description, and **Dynamic Schema Editor**).
55+
* **`FolderPickerDialog`**: A custom file tree allowing multi-folder selection via checkboxes (optimizing UX over standard OS dialogs).
56+
57+
### 6. `welcome_widget.py`
58+
* **Purpose:** The landing screen displayed when no project is open.
59+
* **Features:** Provides large, clear entry points to **"Create New Project"** or **"Import Existing Project"**.

0 commit comments

Comments
 (0)