mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 11:41:49 +02:00
refactor(waveform_widget): removed PYSIDE6 check
This commit is contained in:
@ -1,7 +1,5 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import datetime
|
|
||||||
import time
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Any, Literal, Optional
|
from typing import Any, Literal, Optional
|
||||||
|
|
||||||
@ -1200,7 +1198,6 @@ class BECWaveform(BECPlotBase):
|
|||||||
timestamps = self.scan_item.data[y_name][y_entry].timestamps
|
timestamps = self.scan_item.data[y_name][y_entry].timestamps
|
||||||
|
|
||||||
x_data = timestamps
|
x_data = timestamps
|
||||||
print(x_data)
|
|
||||||
return x_data
|
return x_data
|
||||||
if self._x_axis_mode["name"] == "index":
|
if self._x_axis_mode["name"] == "index":
|
||||||
x_data = None
|
x_data = None
|
||||||
|
@ -4,7 +4,6 @@ import sys
|
|||||||
from typing import Literal
|
from typing import Literal
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from qtpy import PYSIDE6
|
|
||||||
from qtpy.QtWidgets import QVBoxLayout, QWidget
|
from qtpy.QtWidgets import QVBoxLayout, QWidget
|
||||||
|
|
||||||
from bec_widgets.qt_utils.settings_dialog import SettingsDialog
|
from bec_widgets.qt_utils.settings_dialog import SettingsDialog
|
||||||
@ -52,10 +51,6 @@ class BECWaveformWidget(BECConnector, QWidget):
|
|||||||
client=None,
|
client=None,
|
||||||
gui_id: str | None = None,
|
gui_id: str | None = 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:
|
if config is None:
|
||||||
config = Waveform1DConfig(widget_class=self.__class__.__name__)
|
config = Waveform1DConfig(widget_class=self.__class__.__name__)
|
||||||
else:
|
else:
|
||||||
@ -493,12 +488,6 @@ class BECWaveformWidget(BECConnector, QWidget):
|
|||||||
|
|
||||||
def main(): # pragma: no cover
|
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
|
from qtpy.QtWidgets import QApplication
|
||||||
|
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
Reference in New Issue
Block a user