mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
refactor: adjust dimensions
This commit is contained in:
@ -489,7 +489,7 @@ class BECFigure(RPCBase):
|
||||
col: "int | None" = None,
|
||||
dap: "str | None" = None,
|
||||
config: "dict | None" = None,
|
||||
**axis_kwargs
|
||||
**axis_kwargs,
|
||||
) -> "BECWaveform":
|
||||
"""
|
||||
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,
|
||||
col: "int | None" = None,
|
||||
config: "dict | None" = None,
|
||||
**axis_kwargs
|
||||
**axis_kwargs,
|
||||
) -> "BECImageShow":
|
||||
"""
|
||||
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,
|
||||
col: "int | None" = None,
|
||||
config: "dict | None" = None,
|
||||
**axis_kwargs
|
||||
**axis_kwargs,
|
||||
) -> "BECMotorMap":
|
||||
"""
|
||||
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,
|
||||
opacity: "Optional[float]" = 1.0,
|
||||
vrange: "Optional[tuple[int, int]]" = None,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
) -> "BECImageItem":
|
||||
"""
|
||||
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,
|
||||
opacity: "Optional[float]" = 1.0,
|
||||
vrange: "Optional[tuple[int, int]]" = None,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
):
|
||||
"""
|
||||
None
|
||||
@ -1147,7 +1147,7 @@ class BECImageWidget(RPCBase):
|
||||
downsample: "Optional[bool]" = True,
|
||||
opacity: "Optional[float]" = 1.0,
|
||||
vrange: "Optional[tuple[int, int]]" = None,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
) -> "BECImageItem":
|
||||
"""
|
||||
None
|
||||
@ -1730,7 +1730,7 @@ class BECWaveform(RPCBase):
|
||||
label: "str | None" = None,
|
||||
validate: "bool" = True,
|
||||
dap: "str | None" = None,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
) -> "BECCurve":
|
||||
"""
|
||||
Plot a curve to the plot widget.
|
||||
@ -1769,7 +1769,7 @@ class BECWaveform(RPCBase):
|
||||
color: "Optional[str]" = None,
|
||||
dap: "str" = "GaussianModel",
|
||||
validate_bec: "bool" = True,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
) -> "BECCurve":
|
||||
"""
|
||||
Add LMFIT dap model curve to the plot widget.
|
||||
@ -2044,7 +2044,7 @@ class BECWaveformWidget(RPCBase):
|
||||
label: "str | None" = None,
|
||||
validate: "bool" = True,
|
||||
dap: "str | None" = None,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
) -> "BECCurve":
|
||||
"""
|
||||
Plot a curve to the plot widget.
|
||||
@ -2078,7 +2078,7 @@ class BECWaveformWidget(RPCBase):
|
||||
color: "str | None" = None,
|
||||
dap: "str" = "GaussianModel",
|
||||
validate_bec: "bool" = True,
|
||||
**kwargs
|
||||
**kwargs,
|
||||
) -> "BECCurve":
|
||||
"""
|
||||
Add LMFIT dap model curve to the plot widget.
|
||||
|
@ -7,7 +7,7 @@ class PositionerControlLine(PositionerBox):
|
||||
"""A widget that controls a single device."""
|
||||
|
||||
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):
|
||||
"""Initialize the DeviceControlLine.
|
||||
|
@ -60,13 +60,36 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<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>
|
||||
<widget class="QLabel" name="readback">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -88,7 +111,7 @@
|
||||
<widget class="QLineEdit" name="setpoint">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<width>80</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -171,22 +194,6 @@
|
||||
</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>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -126,5 +126,5 @@ def test_positioner_control_line(qtbot, mocked_client):
|
||||
db = PositionerControlLine(device="samx", client=mocked_client)
|
||||
qtbot.addWidget(db)
|
||||
|
||||
assert db.ui.device_box.height() == 70
|
||||
assert db.ui.device_box.width() == 800
|
||||
assert db.ui.device_box.height() == 60
|
||||
assert db.ui.device_box.width() == 600
|
||||
|
Reference in New Issue
Block a user