Bound Element Config Subsystem¶
Side panel for adding or editing bound elements (bound children) on a library item.
Displayed in the right-side QStackedWidget as page 1, replacing the detail panel
when active.
Structure¶
bound_element_config/
controller/ -- (reserved for future controller extraction)
view/ -- config widget and its UI skeleton
delegates/ -- delegate for the bound elements tree in the detail panel
View¶
bound_element_config_widget.py¶
BoundElementConfigWidget -- accepts drag-and-drop of library items from the
item tree. Two modes:
- Add mode: Empty drop frame, user drags a new item to bind
- Edit mode: Pre-populated with an existing
BoundChild's data (item, relationship type, quantity)
Validates against: - Circular references (item cannot bind itself) - Closed folder boundaries (items from different closed folders cannot be bound) - Duplicate bindings
Signals: confirmed(dict), cancelled(), navigate_to_referencing_item(str).
The widget also supports a self-bindings view showing all items that reference the current item as a bound child (reverse lookup).
delegates/bound_elements_delegate.py¶
BoundElementsDelegate (QStyledItemDelegate) -- paints bound element rows in the
detail panel's bound elements tree view. Each row shows: material icon + name +
relationship type label + quantity badge. Inherited nodes (from root item when
viewing a variant) are rendered with muted appearance and a fork indicator.
Controlled By¶
BoundElementController in library_browser/controller/ manages the open/close
lifecycle and confirmation handling for this panel. Signals are wired in
LibraryBrowserWidget._wire_signals().