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

refactor(motor_map_widget): removed restriction of only PySide6 for widget

This commit is contained in:
2024-07-06 20:36:45 +02:00
parent fa1e86ff07
commit db1cdf4280
2 changed files with 1 additions and 13 deletions

View File

@ -36,7 +36,7 @@ class MotorMapSettings(QWidget):
precision = WidgetIO.get_value(self.ui.precision)
scatter_size = WidgetIO.get_value(self.ui.scatter_size)
background_intensity = int(WidgetIO.get_value(self.ui.background_value) * 0.01 * 255)
color = self.ui.color.color().toTuple()
color = self.ui.color.get_color("RGBA")
if self.target_widget is not None:
self.target_widget.set_max_points(max_points)

View File

@ -2,7 +2,6 @@ from __future__ import annotations
import sys
from qtpy import PYSIDE6
from qtpy.QtWidgets import QVBoxLayout, QWidget
from bec_widgets.utils import BECConnector
@ -37,10 +36,6 @@ class BECMotorMapWidget(BECConnector, QWidget):
client=None,
gui_id: str | None = None,
) -> None:
if not PYSIDE6:
raise RuntimeError(
"PYSIDE6 is not available in the environment. This widget is compatible only with PySide6."
)
if config is None:
config = MotorMapConfig(widget_class=self.__class__.__name__)
else:
@ -216,13 +211,6 @@ class BECMotorMapWidget(BECConnector, QWidget):
def main(): # pragma: no cover
if not PYSIDE6:
print(
"PYSIDE6 is not available in the environment. UI files with BEC custom widgets are runnable only with PySide6."
)
return
from qtpy.QtWidgets import QApplication
app = QApplication(sys.argv)