Commit 963ab22
committed
feat(toolbox, dialog): remove_data_source slot + WidgetData list-item colors
Two related ABI additions for the upcoming Filter Editor toolbox panel:
1. remove_data_source runtime-host slot
Add an optional tail slot remove_data_source(handle) to
PJ_toolbox_runtime_host_vtable_t so a toolbox can drop a data source
it created via create_data_source — closes the create/notify/remove
triangle on the toolbox runtime host. Currently the immediate driver
is the Mosaico Cancel path, which already flags the gap in
mosaico_dialog.cpp; the slot also unblocks toolbox_filter_editor's
Reset flow on the staged write path.
2. WidgetData setListItemColors / listItemColors
Add a per-item foreground-color channel to the WidgetData dialog
protocol so plugins (concretely the Filter Editor dialog) can color
source-list entries to match the curve colors in the plot. Mirrored
by the host in widget_data_view so the dialog engine can read it
back when rebuilding the Qt model.
ABI: both are tail-appended optional additions, no field reorder, no
struct shrink. ToolboxRuntimeHostView::removeDataSource() guards the
read with PJ_HAS_TAIL_SLOT; older hosts no-op for the new slot and
older plugins ignore it. WidgetData additions follow the same
backward-compatible pattern.
Test plan
- abidiff against baseline reports additions only.
- Existing toolbox_plugin_test builds and passes; the host vtable
initializer gains .remove_data_source = nullptr.
- Downstream plugin (Filter Editor) consumes both additions in
pj-official-plugins#141 + PlotJuggler/PJ4#160.1 parent 0c3aa51 commit 963ab22
5 files changed
Lines changed: 33 additions & 0 deletions
File tree
- pj_base/include/pj_base
- sdk
- pj_plugins
- dialog_protocol/include/pj_plugins
- host
- sdk
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
77 | 90 | | |
78 | 91 | | |
79 | 92 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
0 commit comments