0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 11:11:49 +02:00

refactor: cleanup and renaming of slot/signals

This commit is contained in:
2024-09-04 14:20:32 +02:00
committed by wyzula_j
parent cc691d4039
commit 0fd5cee776
3 changed files with 55 additions and 46 deletions

View File

@ -4,12 +4,12 @@
````{tab} Overview
The [`DAP ComboBox`](/api_reference/_autosummary/bec_widgets.widgets.dap_combo_box.dap_combo_box.DAPComboBox) is a widget that extends the functionality of a standard `QComboBox` to allow the user to select a DAP process from a list of DAP processes.
The widget provides a set of signals and slots to allow the user to interact with the selection of a DAP process, including a signal to send a signal that can be hooked up to the `add_dap(str, str, str)` slot of the [`add_dap`](/api_reference/_autosummary/bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget.rst#bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget.add_dap) from the BECWaveformWidget to add a DAP process.
The [`DAPComboBox`](/api_reference/_autosummary/bec_widgets.widgets.dap_combo_box.dap_combo_box.DAPComboBox) is a widget that extends the functionality of a standard `QComboBox` to allow the user to select a DAP process from all available DAP models.
One of its signals `new_dap_config` is designed to be connected to the [`add_dap(str, str, str)`](/api_reference/_autosummary/bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget.rst#bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget.add_dap) slot from the BECWaveformWidget to add a DAP process.
## Key Features:
- **Select DAP model**: Selection of all active DAP models from BEC.
- **Signal/Slot Interaction**: Signals to add DAP process to BECWaveformWidget.
- **Select DAP model**: Select one of the available DAP models.
- **Signal/Slot Interaction**: Signal and slots to configure the fit_model, x_axis, and y_axis, and to add a DAP model to the BECWaveformWidget.
```{figure} /assets/widget_screenshots/dap_combo_box.png
---
name: lmfit_dialog
@ -19,16 +19,16 @@ LMFit Dialog
````
````{tab} Summary of Signals
The following signals are emitted by the `DAP ComboBox` widget:
- `add_dap_model(str, str, str)` : Signal to add a DAP model to the BECWaveformWidget
- `update_x_axis(str)` : Signal to emit the current x axis
- `update_y_axis(str)` : Signal to emit the current y axis
- `update_fit_model(str)` : Signal to emit the current fit model
- `new_dap_config(str, str, str)` : Signal to add a DAP model to the BECWaveformWidget
- `x_axis_updated(str)` : Signal to emit the current x axis
- `y_axis_updated(str)` : Signal to emit the current y axis
- `fit_model_updated(str)` : Signal to emit the current fit model
````
````{tab} Summary of Slots
The following slots are available for the `DAP ComboBox` widget:
- `select_x_axis(str)` : Slot to select the current x axis, emits the `update_x_axis` signal
- `select_y_axis(str)` : Slot to select the current y axis, emits the `update_y_axis` signal
- `select_fit(str)` : Slot to select the current fit model, emits the `update_fit_model` signal. If x and y axis are set, it will also emit the `add_dap_model` signal.
- `select_x_axis(str)` : Slot to select the current x axis, emits the `x_axis_updated` signal
- `select_y_axis(str)` : Slot to select the current y axis, emits the `x_axis_updated` signal
- `select_fit_model(str)` : Slot to select the current fit model, emits the `fit_model_updated` signal. If x and y axis are set, it will also emit the `new_dap_config` signal.
````
````{tab} API
```{eval-rst}