summaryrefslogtreecommitdiff
path: root/ui/windows/plot_window.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/windows/plot_window.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/windows/plot_window.py')
-rw-r--r--ui/windows/plot_window.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/ui/windows/plot_window.py b/ui/windows/plot_window.py
index 9edf046..f311e9e 100644
--- a/ui/windows/plot_window.py
+++ b/ui/windows/plot_window.py
@@ -355,10 +355,14 @@ class PaneBlock(QFrame):
self._x_cb.addItem("⏱ Time (elapsed s)", userData="time")
for dev in self.registry.all_instances():
for ch in dev.info.channels:
- self._x_cb.addItem(f"{dev.info.device_id}/{ch.channel_id} ({ch.name})",
+ if not ch.enabled:
+ continue
+ self._x_cb.addItem(f"{ch.name} ({dev.info.device_id}/{ch.channel_id})",
userData=f"{dev.info.device_id}/{ch.channel_id}")
for dc in self.processor.get_derived():
- self._x_cb.addItem(f"[virtual] {dc.channel_id}",
+ if not dc.enabled:
+ continue
+ self._x_cb.addItem(f"{dc.name} ([virtual]/{dc.channel_id})",
userData=f"derived/{dc.channel_id}")
for i in range(self._x_cb.count()):
if self._x_cb.itemData(i) == self.spec.x_source:
@@ -417,10 +421,14 @@ class PaneBlock(QFrame):
cb = QComboBox(); cb.setObjectName("channelPickerCb")
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"[virtual] {dc.channel_id} ({dc.name})",
+ if not dc.enabled:
+ continue
+ cb.addItem(f"{dc.name} ([virtual]/{dc.channel_id})",
userData=("derived", dc.channel_id, dc.name, dc.color))
return cb