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

feat: add dap_combobox

This commit is contained in:
2024-09-02 17:09:58 +02:00
committed by wyzula_j
parent 3a5d7d0796
commit cc691d4039
12 changed files with 407 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,46 @@
(user.widgets.dap_combo_box)=
# DAP Combobox
````{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.
## Key Features:
- **Select DAP model**: Selection of all active DAP models from BEC.
- **Signal/Slot Interaction**: Signals to add DAP process to BECWaveformWidget.
```{figure} /assets/widget_screenshots/dap_combo_box.png
---
name: lmfit_dialog
---
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
````
````{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.
````
````{tab} API
```{eval-rst}
.. include:: /api_reference/_autosummary/bec_widgets.widgets.dap_combo_box.dap_combo_box.DAPCombobox.rst
```
````

View File

@ -4,7 +4,7 @@
````{tab} Overview
The [`LMFit Dialog`](/api_reference/_autosummary/bec_widgets.widgets.lmfit_dialog.lmfit_dialog.LMFitDialog) is a widget that is developed to be used togther with the [`BECWaveformWidget`](/api_reference/_autosummary/bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget). The `BECWaveformWidget` allows user to submit a fit request to BEC's [DAP server](https://bec.readthedocs.io/en/latest/developer/getting_started/architecture.html) choosing from a selection of [LMFit models](https://lmfit.github.io/lmfit-py/builtin_models.html#) to fit monitored data sources. The `LMFit Dialog` provides an interface to monitor these fits, including statistics and fit parameters in real time.
The [`LMFit Dialog`](/api_reference/_autosummary/bec_widgets.widgets.lmfit_dialog.lmfit_dialog.LMFitDialog) is a widget that is developed to be used together with the [`BECWaveformWidget`](/api_reference/_autosummary/bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget). The `BECWaveformWidget` allows user to submit a fit request to BEC's [DAP server](https://bec.readthedocs.io/en/latest/developer/getting_started/architecture.html) choosing from a selection of [LMFit models](https://lmfit.github.io/lmfit-py/builtin_models.html#) to fit monitored data sources. The `LMFit Dialog` provides an interface to monitor these fits, including statistics and fit parameters in real time.
Within the `BECWaveformWidget`, the dialog is accessible via the toolbar and will be automatically linked to the current waveform widget. For a more customised use, we can embed the `LMFit Dialog` in a larger GUI using the *BEC Designer*. In this case, one has to connect the [`update_summary_tree`](/api_reference/_autosummary/bec_widgets.widgets.lmfit_dialog.lmfit_dialog.LMFitDialog.rst#bec_widgets.widgets.lmfit_dialog.lmfit_dialog.LMFitDialog.update_summary_tree) slot of the LMFit Dialog to the [`dap_summary_update`](/api_reference/_autosummary/bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget.rst#bec_widgets.widgets.waveform.waveform_widget.BECWaveformWidget.dap_summary_update) signal of the BECWaveformWidget to ensure its functionality.

View File

@ -206,6 +206,14 @@ Display position of motor withing its limits.
Display DAP summaries of LMFit models in a window.
```
```{grid-item-card} DAP ComboBox
:link: user.widgets.dap_combo_box
:link-type: ref
:img-top: /assets/widget_screenshots/dap_combo_box.png
Select DAP model from a list of DAP processes.
```
````
```{toctree}
@ -234,5 +242,6 @@ spinner/spinner.md
device_input/device_input.md
position_indicator/position_indicator.md
lmfit_dialog/lmfit_dialog.md
dap_combo_box/dap_combo_box.md
```