summaryrefslogtreecommitdiff
path: root/ui/plot_builder.py
diff options
context:
space:
mode:
authorChristian Kolset <ckolset@colostate.edu>2026-07-29 13:10:35 -0600
committerChristian Kolset <ckolset@colostate.edu>2026-07-29 13:10:35 -0600
commit2c6b4b751ffdd1156254b31745597654b5f2e286 (patch)
tree3b26dec4f1fef6d1ee0f8dcf26e7f5ee919e247d /ui/plot_builder.py
parentb407a079000f6a4b04ecf38eca17c57719e7a7ec (diff)
Rework channel labeling and add source picker to virtual-channel creation
Relabel every channel picker/header to "NAME (DEVICE/SIGNAL)" instead of the previous "DEVICE/SIGNAL (NAME)" ordering, consistently across channels_window.py (_channel_combo, ChannelPickerDialog, ChannelPipelineBlock header), plot_builder.py, plot_config.py, control_editor.py, and plot_window.py. While touching each of those pickers, added the missing `.enabled` filter that _make_picker()/_x_cb/_build_channel_picker lacked (the default-layout builders already filtered disabled channels; these manual "add channel to pane" pickers didn't). Devices window Signals tab: removed the separate "Signal ID" column (folded into the existing non-editable Device column instead of the editable Name column, to avoid corrupting the in-place channel rename feature that column already supports). Channels window Virtual Channels pane: added a "Source" dropdown next to "+ Add Channel" — picking a source pre-seeds the new derived channel with it via DerivedBlock._add_src(); leaving it on the default "none" entry keeps today's behavior of creating an empty channel. Note: docs/ToDo.md's "Channels window UI" items referred to the *live* UI (this window's PipelineTab + the Devices window's Signals tab), not SignalsListTab in this same file, which its own module docstring flags as dead/unused code kept only for old-profile compatibility — verified by grepping for any instantiation of it (none exist). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'ui/plot_builder.py')
-rw-r--r--ui/plot_builder.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/plot_builder.py b/ui/plot_builder.py
index ad6d231..7445bda 100644
--- a/ui/plot_builder.py
+++ b/ui/plot_builder.py
@@ -298,10 +298,14 @@ class PlotBlock(QFrame):
cb.setPlaceholderText("Select channel…")
for dev in self.registry.all_instances():
for ch in dev.info.channels:
- cb.addItem(f"{dev.info.device_id} / {ch.channel_id} ({ch.name})",
+ if not ch.enabled:
+ continue
+ cb.addItem(f"{ch.name} ({dev.info.device_id}/{ch.channel_id})",
userData=(dev.info.device_id, ch.channel_id, ch.name, ch.color))
for dc in self.processor.get_derived():
- cb.addItem(f"[derived] {dc.channel_id} ({dc.name})",
+ if not dc.enabled:
+ continue
+ cb.addItem(f"{dc.name} ([derived]/{dc.channel_id})",
userData=("derived", dc.channel_id, dc.name, dc.color))
return cb