Planning System (zentral_systems)
Central data layer and browser UI for project planning in PlantDesign.
Manages ProjectContainers with hierarchical ProjectItems, providing
CRUD, search, validation, version control integration, and a full
browser widget.
Sub-packages
| Directory |
Purpose |
models/ |
Dataclasses: ProjectContainer, ProjectItem, enums |
controllers/ |
PlanningController -- CRUD, search, validation for one project |
persistence/ |
ContainerSerializer (msgpack / msgpack.gz) |
validation/ |
ConsistencyChecker (5 rules + auto-repair) |
constants/ |
PlanningPaths, Stylesheets, schema versions |
widgets/ |
PlanningBrowserWidget and all bound subsystems |
Key Files (root level)
| File |
Purpose |
exceptions.py |
Domain exceptions (PlanningSystemError hierarchy) |
project_item.py |
Backward-compat re-export of models.project_item |
Architecture
- Flat dict storage for O(1) item access by
instance_id
- QAbstractItemModel for tree display (not QTreeWidget)
- Session-based undo/redo via version_control_system commands
- Bound subsystems pattern for browser UI components
- Library integration for drag-drop from library and export back
Data Flow
PlanningController (business logic, signals)
|
v
PlanningBrowserController (orchestration, session commands)
|
+-- CrudHandler (rename, delete, copy, paste)
+-- DragDropHandler (moves, reorder, library drops)
+-- ContextMenuHandler (FluentContextMenu building)
+-- SessionHandler (undo/redo, save, auto-persist)
+-- LibraryExportController (export subtree to user library)