UI Layer

The ui package contains the PySide6 presentation layer. It is strictly decoupled from domain logic:

  • All business operations go through IGraphService or IWorkspaceService.
  • Cross-component communication uses typed Qt Signals on AppEventBus.
  • Each module's widget is created via ModuleDescriptor.create_widget()MainWindow never imports concrete widget classes.

Layer Diagram

graph TD
    MW["MainWindow"] -->|tab per module| OV["OutlineView (QWidget)"]
    OV --> OVM["OutlineViewModel (QObject)"]
    OVM --> GS["IGraphService"]
    MW --> EB["AppEventBus"]
    OV -->|emits signals| EB
    EB -->|connects| MW
    EB -->|connects| OV

Modules in this Layer

Module Purpose
ui.events AppEventBus — typed Qt signals for cross-component communication
ui.app create_application() — wires all services and returns the Qt app
ui.main_window MainWindow — top-level window, module tab container
ui.outline.view OutlineView — the Outline module's Qt widget
ui.outline.view_model OutlineViewModel + OutlineItemModel — MVVM ViewModel layer