0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

fix(position_indicator): fixed user access

This commit is contained in:
2024-09-16 16:35:16 +02:00
parent d3c1a1b2ed
commit dd932dd8f3
2 changed files with 43 additions and 0 deletions

View File

@ -1,5 +1,7 @@
# This file was automatically generated by generate_cli.py
from __future__ import annotations
import enum
from typing import Literal, Optional, overload
@ -29,6 +31,7 @@ class Widgets(str, enum.Enum):
DeviceComboBox = "DeviceComboBox"
DeviceLineEdit = "DeviceLineEdit"
LMFitDialog = "LMFitDialog"
PositionIndicator = "PositionIndicator"
PositionerBox = "PositionerBox"
PositionerControlLine = "PositionerControlLine"
ResetButton = "ResetButton"
@ -2539,6 +2542,45 @@ class LMFitDialog(RPCBase):
"""
class PositionIndicator(RPCBase):
@rpc_call
def set_value(self, position: float):
"""
None
"""
@rpc_call
def set_range(self, min_value: float, max_value: float):
"""
Set the range of the position indicator
Args:
min_value(float): Minimum value of the range
max_value(float): Maximum value of the range
"""
@property
@rpc_call
def vertical(self):
"""
Property to determine the orientation of the position indicator
"""
@property
@rpc_call
def indicator_width(self):
"""
Property to get the width of the indicator
"""
@property
@rpc_call
def rounded_corners(self):
"""
Property to get the rounded corners of the position indicator
"""
class PositionerBox(RPCBase):
@rpc_call
def set_positioner(self, positioner: "str | Positioner"):

View File

@ -8,6 +8,7 @@ from bec_widgets.utils.colors import get_accent_colors, get_theme_palette
class PositionIndicator(BECWidget, QWidget):
USER_ACCESS = ["set_value", "set_range", "vertical", "indicator_width", "rounded_corners"]
ICON_NAME = "horizontal_distribute"