Add TreeNode parent navigation and a Qt model adapter
Description
Expose the existing DBC tree through Qt Model/View so FrameTap can browse frames and signals using standard Qt views. Add parent navigation to TreeNode and implement a separate Qt adapter while keeping the parser, metadata, tree builder, and decoder independent of Qt.
Scope
Add a non-owning parent pointer to TreeNode, with a null parent for the root.
Set the parent when a child is added; retain exclusive child ownership through std::unique_ptr.
Provide the child-position information needed to construct a Qt parent index reliably.
Implement a read-only QAbstractItemModel adapter for the root/frame/signal hierarchy.
Implement index(), parent(), rowCount(), columnCount(), data(), headerData(), and flags() with consistent handling of invalid indexes.
Treat the tree root as an invisible model root; top-level model rows represent frames and their children represent signals.
Display useful metadata such as name, CAN ID, payload length, signal bit layout, unit, and comments through documented columns and roles.
Expose VAL_ descriptions when available, using the shared signal metadata.
Define tree ownership and lifetime explicitly so indexes cannot reference destroyed nodes.
Support replacing the loaded tree using Qt model reset notifications.
Add optional Qt build integration without adding Qt dependencies to the existing core or standalone core tests.
Acceptance criteria
Root, frame, and signal nodes report correct parent relationships and sibling positions.
A Qt tree view can browse all frames and signals from a parsed DBC file.
index() and parent() remain consistent for all levels, columns, and invalid indexes.
Display columns and metadata roles are documented and return appropriate values for each node type.
Reloading or clearing the database resets the model safely.
Model behavior is verified with QAbstractItemModelTester and focused tests for parent navigation and tree replacement.
Existing core builds and parser/decoder tests continue to work without Qt.
README includes build instructions and a minimal adapter usage example.
Out of scope
Editing DBC files, live value updates, plotting, drag-and-drop subscriptions, selective decoding, and a complete FrameTap application UI.
Dependency
The VAL_ support issue provides value-description metadata. Basic tree browsing does not require it.
# Add TreeNode parent navigation and a Qt model adapter
## Description
Expose the existing DBC tree through Qt Model/View so FrameTap can browse frames and signals using standard Qt views. Add parent navigation to `TreeNode` and implement a separate Qt adapter while keeping the parser, metadata, tree builder, and decoder independent of Qt.
## Scope
- Add a non-owning parent pointer to `TreeNode`, with a null parent for the root.
- Set the parent when a child is added; retain exclusive child ownership through `std::unique_ptr`.
- Provide the child-position information needed to construct a Qt parent index reliably.
- Implement a read-only `QAbstractItemModel` adapter for the root/frame/signal hierarchy.
- Implement `index()`, `parent()`, `rowCount()`, `columnCount()`, `data()`, `headerData()`, and `flags()` with consistent handling of invalid indexes.
- Treat the tree root as an invisible model root; top-level model rows represent frames and their children represent signals.
- Display useful metadata such as name, CAN ID, payload length, signal bit layout, unit, and comments through documented columns and roles.
- Expose `VAL_` descriptions when available, using the shared signal metadata.
- Define tree ownership and lifetime explicitly so indexes cannot reference destroyed nodes.
- Support replacing the loaded tree using Qt model reset notifications.
- Add optional Qt build integration without adding Qt dependencies to the existing core or standalone core tests.
## Acceptance criteria
- [ ] Root, frame, and signal nodes report correct parent relationships and sibling positions.
- [ ] A Qt tree view can browse all frames and signals from a parsed DBC file.
- [ ] `index()` and `parent()` remain consistent for all levels, columns, and invalid indexes.
- [ ] Display columns and metadata roles are documented and return appropriate values for each node type.
- [ ] Reloading or clearing the database resets the model safely.
- [ ] Model behavior is verified with `QAbstractItemModelTester` and focused tests for parent navigation and tree replacement.
- [ ] Existing core builds and parser/decoder tests continue to work without Qt.
- [ ] README includes build instructions and a minimal adapter usage example.
## Out of scope
Editing DBC files, live value updates, plotting, drag-and-drop subscriptions, selective decoding, and a complete FrameTap application UI.
## Dependency
The `VAL_` support issue provides value-description metadata. Basic tree browsing does not require it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Add TreeNode parent navigation and a Qt model adapter
Description
Expose the existing DBC tree through Qt Model/View so FrameTap can browse frames and signals using standard Qt views. Add parent navigation to
TreeNodeand implement a separate Qt adapter while keeping the parser, metadata, tree builder, and decoder independent of Qt.Scope
TreeNode, with a null parent for the root.std::unique_ptr.QAbstractItemModeladapter for the root/frame/signal hierarchy.index(),parent(),rowCount(),columnCount(),data(),headerData(), andflags()with consistent handling of invalid indexes.VAL_descriptions when available, using the shared signal metadata.Acceptance criteria
index()andparent()remain consistent for all levels, columns, and invalid indexes.QAbstractItemModelTesterand focused tests for parent navigation and tree replacement.Out of scope
Editing DBC files, live value updates, plotting, drag-and-drop subscriptions, selective decoding, and a complete FrameTap application UI.
Dependency
The
VAL_support issue provides value-description metadata. Basic tree browsing does not require it.