Milestone 3

This commit is contained in:
Joey Yakimowich-Payne 2026-01-30 05:59:40 -07:00
commit 282136632e
3 changed files with 62 additions and 19 deletions

View file

@ -57,22 +57,22 @@ A Qt6-based node editor GUI for warppipe using the QtNodes (nodeeditor) library.
- [x] Keep connections visible with faded style
- [x] Verify: Application nodes appear vibrant when active, fade when inactive, never disappear
- [ ] Milestone 3 - Link Visualization and Drag-Connect
- [ ] Implement connection mapping:
- [ ] Call `Client::ListLinks()` to get existing PipeWire links
- [ ] For each Link, find corresponding NodeId and PortIndex for output/input
- [ ] Create QtNodes::ConnectionId from (outNodeId, outPortType, outPortIndex, inNodeId, inPortType, inPortIndex)
- [ ] Store in model's m_connections set
- [ ] Implement `addConnection(ConnectionId)`:
- [ ] Extract output port and input port from ConnectionId
- [ ] Call `Client::CreateLink(outputPortId, inputPortId, LinkOptions{})`
- [ ] If successful, add connection to m_connections
- [ ] If failed, emit error and do NOT add to graph
- [ ] Implement `deleteConnection(ConnectionId)`:
- [ ] Find corresponding warppipe LinkId from connection
- [ ] Call `Client::RemoveLink(linkId)`
- [ ] Remove from m_connections
- [ ] Verify: Drag connection from output port to input port creates PipeWire link; delete removes it
- [x] Milestone 3 - Link Visualization and Drag-Connect
- [x] Implement connection mapping:
- [x] Call `Client::ListLinks()` to get existing PipeWire links
- [x] For each Link, find corresponding NodeId and PortIndex for output/input
- [x] Create QtNodes::ConnectionId from (outNodeId, outPortType, outPortIndex, inNodeId, inPortType, inPortIndex)
- [x] Store in model's m_connections set
- [x] Implement `addConnection(ConnectionId)`:
- [x] Extract output port and input port from ConnectionId
- [x] Call `Client::CreateLink(outputPortId, inputPortId, LinkOptions{})`
- [x] If successful, add connection to m_connections
- [x] If failed, emit error and do NOT add to graph
- [x] Implement `deleteConnection(ConnectionId)`:
- [x] Find corresponding warppipe LinkId from connection
- [x] Call `Client::RemoveLink(linkId)`
- [x] Remove from m_connections
- [x] Verify: Drag connection from output port to input port creates PipeWire link; delete removes it
- [ ] Milestone 4 - Context Menu and Virtual Node Creation
- [ ] Add context menu to GraphEditorWidget:
@ -203,10 +203,10 @@ warppipe/
## Design Notes
### Node Title Synthesis
warppipe::NodeInfo does not have a `description` field. Derive display title:
Display title priority: `description` > `application_name` > `name`
- **Hardware/Virtual nodes**: Use `description` (PW_KEY_NODE_DESCRIPTION), e.g., "Speakers", "Headphones"
- **Application nodes**: Use `application_name` if non-empty (e.g., "Firefox", "Spotify")
- **Hardware/Virtual nodes**: Use `name` field (e.g., "alsa_output.pci-0000_00_1f.3.analog-stereo")
- Fallback to `name` if `application_name` is empty
- Fallback to `name` if both are empty
### Port Orientation
- **Input ports** (is_input=true): LEFT side of node (QtNodes::PortType::In)