diff --git a/README.md b/README.md index 11c930a..a396105 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ built with **PyQt6** on the Qt **QGraphicsView** framework. - Editing UX: drag, multi-select, snap-to-grid, undo/redo, copy/paste, save/open (JSON), export to PNG/SVG, configurable grid & color schemes. +![Pipeline editor sample network](docs/screenshot.png) + ## Requirements - Python 3.11+ diff --git a/docs/plan/README.md b/docs/plan/README.md index 81085dd..e78a99c 100644 --- a/docs/plan/README.md +++ b/docs/plan/README.md @@ -23,69 +23,69 @@ Sources: --- ## Phase 0 — Project scaffolding -- [ ] Repo layout, `requirements.txt`, `README.md`, `.gitignore` -- [ ] `pipeline_editor` package skeleton + `__main__` entry point -- [ ] pytest config + headless conftest (QApplication fixture) +- [x] Repo layout, `requirements.txt`, `README.md`, `.gitignore` +- [x] `pipeline_editor` package skeleton + `__main__` entry point +- [x] pytest config + headless conftest (QApplication fixture) ## Phase 1 — Domain model (no UI) -- [ ] `PropertyType` enum: string, int, float, bool, enum, color, catalogue_item, catalogue_items, value_list -- [ ] `Property` + `PropertyGroup` (grouped, editable/readonly, validation) -- [ ] `Catalogue` / `CatalogueItem` registry -- [ ] `PortRelation` registry (water/power/gas...) with color schemes + compatibility rules -- [ ] `Port` (id, name, relation, side/offset, direction) -- [ ] `NodeModel`, `EdgeModel` (ids, geometry, style, property groups) -- [ ] `DiagramDocument` — holds nodes/edges, emits change signals -- [ ] JSON serialization / deserialization (round-trip) +- [x] `PropertyType` enum: string, int, float, bool, enum, color, catalogue_item, catalogue_items, value_list +- [x] `Property` + `PropertyGroup` (grouped, editable/readonly, validation) +- [x] `Catalogue` / `CatalogueItem` registry +- [x] `PortRelation` registry (water/power/gas...) with color schemes + compatibility rules +- [x] `Port` (id, name, relation, side/offset, direction) +- [x] `NodeModel`, `EdgeModel` (ids, geometry, style, property groups) +- [x] `DiagramDocument` — holds nodes/edges, emits change signals +- [x] JSON serialization / deserialization (round-trip) ## Phase 2 — Node library (feature #1) -- [ ] Bundled SVG node graphics (pump, tank, valve, junction, source, sink, transformer…) -- [ ] `NodeTemplate` = SVG + port configuration, organized into groups -- [ ] Left dock `NodePanel`: grouped tree with vector previews -- [ ] Drag-and-drop node template → canvas creates a node +- [x] Bundled SVG node graphics (pump, tank, valve, junction, source, sink, transformer…) +- [x] `NodeTemplate` = SVG + port configuration, organized into groups +- [x] Left dock `NodePanel`: grouped tree with vector previews +- [x] Drag-and-drop node template → canvas creates a node ## Phase 3 — Canvas, scene & nodes -- [ ] `CanvasView`: zoom (wheel), pan, fit-to-view, rubber-band select -- [ ] Grid background (dots/lines), configurable size, snap-to-grid -- [ ] `NodeItem`: renders SVG, movable, selectable, edges follow on move -- [ ] Multi-select move, delete +- [x] `CanvasView`: zoom (wheel), pan, fit-to-view, rubber-band select +- [x] Grid background (dots/lines), configurable size, snap-to-grid +- [x] `NodeItem`: renders SVG, movable, selectable, edges follow on move +- [x] Multi-select move, delete ## Phase 4 — Ports & edges (features #2, #3, #5) -- [ ] Focused node reveals `PortItem` handles -- [ ] Port relation coloring + connection-compatibility feedback -- [ ] Drag from port → other node's port (or self) creates an edge -- [ ] Orthogonal routing along rectangular grid -- [ ] Config option: draw **arc** at line intersections/crossings -- [ ] `EdgeItem` styles: line style, head/tail decorations (arrow, circle, diamond, none) +- [x] Focused node reveals `PortItem` handles +- [x] Port relation coloring + connection-compatibility feedback +- [x] Drag from port → other node's port (or self) creates an edge +- [x] Orthogonal routing along rectangular grid +- [x] Config option: draw **arc** at line intersections/crossings +- [x] `EdgeItem` styles: line style, head/tail decorations (arrow, circle, diamond, none) ## Phase 5 — Property panel (feature #4) -- [ ] Right dock `PropertyPanel`: grouped property editors -- [ ] Editor widgets per type (string/int/float/bool/enum/color/catalogue/list) -- [ ] Two-way binding: edit → model → view refresh -- [ ] Geometry/title (presentation) group + physics group (length, diameter, flow rate, flow type) +- [x] Right dock `PropertyPanel`: grouped property editors +- [x] Editor widgets per type (string/int/float/bool/enum/color/catalogue/list) +- [x] Two-way binding: edit → model → view refresh +- [x] Geometry/title (presentation) group + physics group (length, diameter, flow rate, flow type) ## Phase 6 — Mock calculation & flow animation -- [ ] `FlowSolver`: mock flow distribution across edges (conservation-ish heuristic) -- [ ] Per-edge flow value + direction -- [ ] `FlowAnimator`: animate direction (marching dashes) and volume (speed/width) -- [ ] Play/pause/stop controls +- [x] `FlowSolver`: mock flow distribution across edges (conservation-ish heuristic) +- [x] Per-edge flow value + direction +- [x] `FlowAnimator`: animate direction (marching dashes) and volume (speed/width) +- [x] Play/pause/stop controls ## Phase 7 — Editing UX & configuration (added features) -- [ ] Undo/redo via `QUndoStack` (add/move/delete/connect/edit) -- [ ] Copy / paste / duplicate / delete -- [ ] Save / Open / New document (JSON) -- [ ] Export canvas to PNG / SVG -- [ ] Config dialog: grid size, snap, arc-on-crossing, color scheme, animation speed -- [ ] Multiple color schemes (light/dark + relation palettes) -- [ ] Toolbar + menus + status bar + keyboard shortcuts +- [x] Undo/redo via `QUndoStack` (add/move/delete/connect/edit) +- [x] Copy / paste / duplicate / delete +- [x] Save / Open / New document (JSON) +- [x] Export canvas to PNG / SVG +- [x] Config dialog: grid size, snap, arc-on-crossing, color scheme, animation speed +- [x] Multiple color schemes (light/dark + relation palettes) +- [x] Toolbar + menus + status bar + keyboard shortcuts ## Phase 8 — Tests (typical scenarios) -- [ ] Model: properties, catalogue, relations, serialization round-trip -- [ ] Routing: orthogonal path + arc-crossing generation -- [ ] Flow solver: conservation & direction on a small network -- [ ] Scene: create node via drop, connect ports, move node moves edge, delete cascades -- [ ] Property panel: edit propagates to model -- [ ] Undo/redo of add/move/connect/delete +- [x] Model: properties, catalogue, relations, serialization round-trip +- [x] Routing: orthogonal path + arc-crossing generation +- [x] Flow solver: conservation & direction on a small network +- [x] Scene: create node via drop, connect ports, move node moves edge, delete cascades +- [x] Property panel: edit propagates to model +- [x] Undo/redo of add/move/connect/delete ## Phase 9 — Polish -- [ ] README with run/test instructions and screenshots -- [ ] Final pass: lint, docstrings, sample document +- [x] README with run/test instructions and screenshots +- [x] Final pass: lint, docstrings, sample document