Set up PyQt6 + QGraphicsView pipeline-editor skeleton, requirements, pytest headless config, and the actionable implementation plan under docs/plan. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Pipeline Network Diagram Editor
A desktop editor for drawing pipeline networks — water lines, power lines, gas, etc. — built with PyQt6 on the Qt QGraphicsView framework.
Features
- Node library with grouped, draggable vector (SVG) symbols (pump, tank, valve, source, sink, junction…).
- Typed ports with relation semantics (water / power / gas / …) and per-relation color schemes; connection compatibility is validated and highlighted.
- Orthogonal edge routing along a rectangular grid, with an optional arc at line crossings.
- Edge styles: line styles plus head/tail decorations (arrow, circle, diamond, none).
- Grouped property panel for the selected node/edge — presentation (geometry, title, color) and physics (length, diameter, flow rate, flow type). Property types: string, int, float, bool, enum, color, catalogue item, catalogue items, value list.
- Mock flow calculation distributing flow across edges, with animated direction and volume.
- Editing UX: drag, multi-select, snap-to-grid, undo/redo, copy/paste, save/open (JSON), export to PNG/SVG, configurable grid & color schemes.
Requirements
- Python 3.11+
- PyQt6 (with QtSvg)
On Debian/Ubuntu: sudo apt install python3-pyqt6 python3-pyqt6.qtsvg
or pip install -r requirements.txt.
Run
python -m pipeline_editor
Test
Tests run headless:
QT_QPA_PLATFORM=offscreen python -m pytest
Layout
pipeline_editor/
model/ domain: properties, catalogue, relations, ports, nodes, edges, document
view/ QGraphicsView canvas, scene, node/port/edge items, routing
panels/ node library dock, property editor dock
calc/ mock flow solver + animation
resources/ SVG node symbols, color schemes
docs/plan/ actionable implementation plan
tests/ pytest suites for typical scenarios