WebAccess: expose Virtual Console widget hierarchy and parent relationships#1897
Open
mccartyp wants to merge 2 commits intomcallegari:masterfrom
Open
WebAccess: expose Virtual Console widget hierarchy and parent relationships#1897mccartyp wants to merge 2 commits intomcallegari:masterfrom
mccartyp wants to merge 2 commits intomcallegari:masterfrom
Conversation
…nships
Add new WebAccess WebSocket API commands to expose the containment hierarchy
of Virtual Console widgets.
This change introduces two additive API calls:
- QLC+API|getWidgetParent|<widgetId>
Returns the immediate Virtual Console parent container for a widget,
or the Virtual Console root if the widget is top-level.
- QLC+API|getWidgetHierarchy
Returns a flat edge list describing the full parent-child relationships
of all Virtual Console widgets, including widget IDs, types, and captions.
The hierarchy is derived by walking the Qt QWidget parent chain and selecting
the nearest VCWidget ancestor, making the implementation depth-agnostic and
supporting arbitrarily nested frames and solo frames.
Root-level widgets are represented with a parent ID of 0 and a parent type of
"VirtualConsole". Widgets without a valid VC parent or that cannot be resolved
are handled gracefully.
The output is returned in a deterministic order to ensure stable client-side
presentation and minimize UI jitter for external integrations.
These APIs are strictly additive and do not modify any existing WebAccess
commands or response formats. They enable external controllers and automation
software to accurately mirror the Virtual Console layout and resolve widget
grouping and context without requiring workspace parsing.
….html Extend the WebAccess test page with UI entries for the new getWidgetParent and getWidgetHierarchy WebSocket commands. This allows developers and integrators to manually verify Virtual Console widget parent relationships and full widget hierarchy data using the standard Test_Web_API.html interface. No changes to existing APIs or test behaviors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary of Changes:
This pull request introduces two new additive WebAccess WebSocket API commands that expose the containment hierarchy of Virtual Console widgets:
These APIs allow external integrations to determine how Virtual Console widgets are grouped within frames and nested frames, mirroring the actual VC layout.
Until now, WebAccess exposed widget IDs, captions, and types, but not parent-child relationships. As a result, external controllers and automation software had no reliable way to group widgets by frame, resolve widget context, or reflect the Virtual Console structure accurately.
The new endpoints address this gap by exposing immediate parent relationships and the full widget hierarchy in a deterministic, depth-agnostic way.
New API Commands:
QLC+API|getWidgetParent|
Returns the immediate Virtual Console parent container for a widget.
Response format:
QLC+API|getWidgetParent|||
A parentId of 0 with type VirtualConsole indicates a top-level widget.
QLC+API|getWidgetHierarchy
Returns a flat edge list describing all parent-child relationships between Virtual Console widgets, including widget IDs, types, and captions. This allows clients to reconstruct the full nested frame hierarchy with arbitrary depth.
Both APIs derive hierarchy by walking the Qt QWidget parent chain and selecting the nearest VCWidget ancestor, making the implementation depth-agnostic and robust to nested frames.
These changes are strictly additive and do not modify any existing WebAccess commands or response formats.
Related Issues:
This change was motivated by external integration requirements and does not correspond to an existing tracked issue.
Checklist
Testing
Test Cases:
Test Results:
Additional Notes