feat: add ToolboxSession with non-modal dialog support#44
Merged
Conversation
Introduces ToolboxSession, which encapsulates the lifecycle of a single toolbox plugin instance inside pj_proto_app. Contents: - toolbox_session.hpp / toolbox_session.cpp: new ToolboxSession QObject that binds toolbox host, runtime host and config, and exposes runDialog() - runDialog() reads kToolboxCapabilityNonModalDialog from the plugin's capability flags and sets DialogEngineConfig::non_modal accordingly, so plugins that declared non-modal capability get a non-blocking dialog automatically - Runtime host vtable wired via captureless static lambdas; dataChanged() signal emitted when the plugin calls notify_data_changed
3 tasks
ToolboxSession::runDialog calls library_.resolveDialogVtable() but the method was missing from ToolboxLibrary, causing a compile error. DataSourceLibrary and MessageParserLibrary already had this method with the same dlsym/GetProcAddress pattern — add the same to ToolboxLibrary for consistency.
…solveDialogVtable to ToolboxLibrary ToolboxSession::runDialog calls library_.resolveDialogVtable() but the method was missing from ToolboxLibrary, causing a compile error. Rather than copy-pasting the same dlsym/GetProcAddress block a third time, extract a generic detail::resolveSymbol(handle, name) helper into library_loader.hpp and refactor all three library classes (DataSourceLibrary, MessageParserLibrary, ToolboxLibrary) to use it. This removes ~90 lines of duplicated platform-specific code while adding resolveDialogVtable to ToolboxLibrary.
toolbox_library.hpp includes pj_plugins/dialog_protocol.h for resolveDialogVtable, but pj_toolbox_host was missing the pj_dialog_protocol dependency so the include path was not set up.
pabloinigoblasco
added a commit
that referenced
this pull request
Apr 14, 2026
toolbox_session.cpp was added by PR #44 but not listed in the CMakeLists.txt sources, causing undefined reference errors at link time.
pabloinigoblasco
added a commit
that referenced
this pull request
Apr 14, 2026
…#55) * feat(proto-app): add Tools menu with dynamic toolbox plugin discovery Add a Tools menu to MainWindow that dynamically discovers and lists all loaded Toolbox plugins. Each plugin appears as a menu action that opens its dialog via ToolboxSession::runDialog(). After the dialog closes, the chart and series tree are refreshed. This is the minimum wiring needed to open toolbox plugins (FFT, Quaternion, ColorMap, etc.) from the application UI. * fix(build): add toolbox_session.cpp to pj_proto_app sources toolbox_session.cpp was added by PR #44 but not listed in the CMakeLists.txt sources, causing undefined reference errors at link time.
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.
Summary
ToolboxSession— aQObjectthat encapsulates the full lifecycle of a toolbox plugin instance insidepj_proto_apprunDialog()for the app layerrunDialog()readskToolboxCapabilityNonModalDialogfrom the plugin capability flags and passesDialogEngineConfig::non_modal = trueautomatically — no per-plugin branching in app codedataChanged()signal emitted when the plugin callsnotify_data_changed, enabling reactive UI updatesTest plan
pj_proto_app— no compile errorskToolboxCapabilityNonModalDialogstill opens a modal dialog (unchanged behaviour)🤖 Generated with Claude Code