Skip to content

Library Browser

Main widget for browsing and editing library containers (master and user libraries).

Architecture

The browser follows an MVC + bound subsystems pattern:

  • controller/ -- Orchestration controller with sub-controllers for specialized flows
  • view/ -- Top-level widget assembly and signal wiring
  • bound_subsystems/ -- Self-contained UI subsystems (detail panel, navigation, item browser, etc.)

Layout Structure

+------------------------------------------------------------------+
| LibraryBrowserWidget                                             |
| +------------+---------------------------------------------------+
| | FolderTree | BrowserSplitter                                   |
| |            | +-----------+-----------+                         |
| |  (Quick    | | ItemTree  | RightStack|                         |
| |   Access)  | |           | (Detail / |                         |
| |  --------  | |           |  Config)  |                         |
| |  (Folders) | |           |           |                         |
| +------------+-+-----------+-----------+                         |
| | FooterBar (Edit / Save / Lock / Upload / Discard)              |
+------------------------------------------------------------------+

The outer splitter separates FolderTree from the rest. The inner splitter separates ItemTree from a QStackedWidget that switches between DetailPanel (page 0) and BoundElementConfigWidget (page 1). The detail panel side is wrapped in a DetachableWidget for pop-out support.

Data Flow

  1. load_data(controller, user_settings) receives a LibraryController and user settings
  2. The browser controller distributes data to all sub-widgets (folder tree, item tree, detail panel)
  3. User interactions (folder click, item click, edit/save) flow through the controller
  4. Changes are persisted via LibraryController and optionally uploaded via R2MasterLibraryManager

Edit Modes

  • View mode (default): All fields readonly, browse-only
  • Local edit mode: Footer "Edit" button, modifies the local container file
  • Master edit mode: Footer "Lock" acquires R2 write-lock, then edit + upload cycle