1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-05 00:12:49 +01:00

fix(dock_area, waveform): update widget names and allow additional kwargs in Waveform initialization

This commit is contained in:
2025-03-06 16:11:34 +01:00
parent 925639d5d5
commit d90a383e29
2 changed files with 7 additions and 4 deletions

View File

@@ -502,9 +502,9 @@ if __name__ == "__main__": # pragma: no cover
app = QApplication([])
set_theme("auto")
dock_area = BECDockArea()
dock_1 = dock_area.new(name="dock_0", widget="BECWaveformWidget")
dock_1 = dock_area.new(name="dock_0", widget="BECWaveformWidget")
dock_1.new(widget="BECWaveformWidget")
dock_1 = dock_area.new(name="dock_0", widget="Waveform")
# dock_1 = dock_area.new(name="dock_0", widget="Waveform")
dock_area.new(widget="Waveform")
dock_area.show()
app.topLevelWidgets()
app.exec_()

View File

@@ -117,10 +117,13 @@ class Waveform(PlotBase):
client=None,
gui_id: str | None = None,
popups: bool = True,
**kwargs,
):
if config is None:
config = WaveformConfig(widget_class=self.__class__.__name__)
super().__init__(parent=parent, config=config, client=client, gui_id=gui_id, popups=popups)
super().__init__(
parent=parent, config=config, client=client, gui_id=gui_id, popups=popups, **kwargs
)
# For PropertyManager identification
self.setObjectName("Waveform")