mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 11:41:49 +02:00
refactor: adjust dimensions
This commit is contained in:
@ -489,7 +489,7 @@ class BECFigure(RPCBase):
|
|||||||
col: "int | None" = None,
|
col: "int | None" = None,
|
||||||
dap: "str | None" = None,
|
dap: "str | None" = None,
|
||||||
config: "dict | None" = None,
|
config: "dict | None" = None,
|
||||||
**axis_kwargs
|
**axis_kwargs,
|
||||||
) -> "BECWaveform":
|
) -> "BECWaveform":
|
||||||
"""
|
"""
|
||||||
Add a 1D waveform plot to the figure. Always access the first waveform widget in the figure.
|
Add a 1D waveform plot to the figure. Always access the first waveform widget in the figure.
|
||||||
@ -531,7 +531,7 @@ class BECFigure(RPCBase):
|
|||||||
row: "int | None" = None,
|
row: "int | None" = None,
|
||||||
col: "int | None" = None,
|
col: "int | None" = None,
|
||||||
config: "dict | None" = None,
|
config: "dict | None" = None,
|
||||||
**axis_kwargs
|
**axis_kwargs,
|
||||||
) -> "BECImageShow":
|
) -> "BECImageShow":
|
||||||
"""
|
"""
|
||||||
Add an image to the figure. Always access the first image widget in the figure.
|
Add an image to the figure. Always access the first image widget in the figure.
|
||||||
@ -561,7 +561,7 @@ class BECFigure(RPCBase):
|
|||||||
row: "int | None" = None,
|
row: "int | None" = None,
|
||||||
col: "int | None" = None,
|
col: "int | None" = None,
|
||||||
config: "dict | None" = None,
|
config: "dict | None" = None,
|
||||||
**axis_kwargs
|
**axis_kwargs,
|
||||||
) -> "BECMotorMap":
|
) -> "BECMotorMap":
|
||||||
"""
|
"""
|
||||||
Add a motor map to the figure. Always access the first motor map widget in the figure.
|
Add a motor map to the figure. Always access the first motor map widget in the figure.
|
||||||
@ -832,7 +832,7 @@ class BECImageShow(RPCBase):
|
|||||||
downsample: "Optional[bool]" = True,
|
downsample: "Optional[bool]" = True,
|
||||||
opacity: "Optional[float]" = 1.0,
|
opacity: "Optional[float]" = 1.0,
|
||||||
vrange: "Optional[tuple[int, int]]" = None,
|
vrange: "Optional[tuple[int, int]]" = None,
|
||||||
**kwargs
|
**kwargs,
|
||||||
) -> "BECImageItem":
|
) -> "BECImageItem":
|
||||||
"""
|
"""
|
||||||
Add an image to the figure. Always access the first image widget in the figure.
|
Add an image to the figure. Always access the first image widget in the figure.
|
||||||
@ -858,7 +858,7 @@ class BECImageShow(RPCBase):
|
|||||||
downsample: "Optional[bool]" = True,
|
downsample: "Optional[bool]" = True,
|
||||||
opacity: "Optional[float]" = 1.0,
|
opacity: "Optional[float]" = 1.0,
|
||||||
vrange: "Optional[tuple[int, int]]" = None,
|
vrange: "Optional[tuple[int, int]]" = None,
|
||||||
**kwargs
|
**kwargs,
|
||||||
):
|
):
|
||||||
"""
|
"""
|
||||||
None
|
None
|
||||||
@ -1147,7 +1147,7 @@ class BECImageWidget(RPCBase):
|
|||||||
downsample: "Optional[bool]" = True,
|
downsample: "Optional[bool]" = True,
|
||||||
opacity: "Optional[float]" = 1.0,
|
opacity: "Optional[float]" = 1.0,
|
||||||
vrange: "Optional[tuple[int, int]]" = None,
|
vrange: "Optional[tuple[int, int]]" = None,
|
||||||
**kwargs
|
**kwargs,
|
||||||
) -> "BECImageItem":
|
) -> "BECImageItem":
|
||||||
"""
|
"""
|
||||||
None
|
None
|
||||||
@ -1730,7 +1730,7 @@ class BECWaveform(RPCBase):
|
|||||||
label: "str | None" = None,
|
label: "str | None" = None,
|
||||||
validate: "bool" = True,
|
validate: "bool" = True,
|
||||||
dap: "str | None" = None,
|
dap: "str | None" = None,
|
||||||
**kwargs
|
**kwargs,
|
||||||
) -> "BECCurve":
|
) -> "BECCurve":
|
||||||
"""
|
"""
|
||||||
Plot a curve to the plot widget.
|
Plot a curve to the plot widget.
|
||||||
@ -1769,7 +1769,7 @@ class BECWaveform(RPCBase):
|
|||||||
color: "Optional[str]" = None,
|
color: "Optional[str]" = None,
|
||||||
dap: "str" = "GaussianModel",
|
dap: "str" = "GaussianModel",
|
||||||
validate_bec: "bool" = True,
|
validate_bec: "bool" = True,
|
||||||
**kwargs
|
**kwargs,
|
||||||
) -> "BECCurve":
|
) -> "BECCurve":
|
||||||
"""
|
"""
|
||||||
Add LMFIT dap model curve to the plot widget.
|
Add LMFIT dap model curve to the plot widget.
|
||||||
@ -2044,7 +2044,7 @@ class BECWaveformWidget(RPCBase):
|
|||||||
label: "str | None" = None,
|
label: "str | None" = None,
|
||||||
validate: "bool" = True,
|
validate: "bool" = True,
|
||||||
dap: "str | None" = None,
|
dap: "str | None" = None,
|
||||||
**kwargs
|
**kwargs,
|
||||||
) -> "BECCurve":
|
) -> "BECCurve":
|
||||||
"""
|
"""
|
||||||
Plot a curve to the plot widget.
|
Plot a curve to the plot widget.
|
||||||
@ -2078,7 +2078,7 @@ class BECWaveformWidget(RPCBase):
|
|||||||
color: "str | None" = None,
|
color: "str | None" = None,
|
||||||
dap: "str" = "GaussianModel",
|
dap: "str" = "GaussianModel",
|
||||||
validate_bec: "bool" = True,
|
validate_bec: "bool" = True,
|
||||||
**kwargs
|
**kwargs,
|
||||||
) -> "BECCurve":
|
) -> "BECCurve":
|
||||||
"""
|
"""
|
||||||
Add LMFIT dap model curve to the plot widget.
|
Add LMFIT dap model curve to the plot widget.
|
||||||
|
@ -7,7 +7,7 @@ class PositionerControlLine(PositionerBox):
|
|||||||
"""A widget that controls a single device."""
|
"""A widget that controls a single device."""
|
||||||
|
|
||||||
ui_file = "positioner_control_line.ui"
|
ui_file = "positioner_control_line.ui"
|
||||||
dimensions = (70, 800) # height, width
|
dimensions = (60, 600) # height, width
|
||||||
|
|
||||||
def __init__(self, parent=None, device: Positioner = None, *args, **kwargs):
|
def __init__(self, parent=None, device: Positioner = None, *args, **kwargs):
|
||||||
"""Initialize the DeviceControlLine.
|
"""Initialize the DeviceControlLine.
|
||||||
|
@ -60,13 +60,36 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="PositionIndicator" name="position_indicator"/>
|
<widget class="PositionIndicator" name="position_indicator">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>80</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="SpinnerWidget" name="spinner_widget">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>25</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>25</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="readback">
|
<widget class="QLabel" name="readback">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>80</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -88,7 +111,7 @@
|
|||||||
<widget class="QLineEdit" name="setpoint">
|
<widget class="QLineEdit" name="setpoint">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>80</width>
|
||||||
<height>24</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -171,22 +194,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="SpinnerWidget" name="spinner_widget">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>25</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>25</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -126,5 +126,5 @@ def test_positioner_control_line(qtbot, mocked_client):
|
|||||||
db = PositionerControlLine(device="samx", client=mocked_client)
|
db = PositionerControlLine(device="samx", client=mocked_client)
|
||||||
qtbot.addWidget(db)
|
qtbot.addWidget(db)
|
||||||
|
|
||||||
assert db.ui.device_box.height() == 70
|
assert db.ui.device_box.height() == 60
|
||||||
assert db.ui.device_box.width() == 800
|
assert db.ui.device_box.width() == 600
|
||||||
|
Reference in New Issue
Block a user