add widget files #12
No files matched your search
@@ -0,0 +1,101 @@
|
||||
# This file was automatically generated by generate_cli.py
|
||||
# type: ignore
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from bec_lib.logger import bec_logger
|
||||
|
||||
from bec_widgets.cli.rpc.rpc_base import RPCBase, rpc_call, rpc_timeout
|
||||
|
||||
logger = bec_logger.logger
|
||||
|
||||
# pylint: skip-file
|
||||
|
||||
|
||||
_Widgets = {
|
||||
"PxIActorConfigWidget": "PxIActorConfigWidget",
|
||||
"PxISampleQueueWidget": "PxISampleQueueWidget",
|
||||
"PxISpreadsheetDisplay": "PxISpreadsheetDisplay",
|
||||
"PxITaskPanel": "PxITaskPanel",
|
||||
"PxITaskQueueWidget": "PxITaskQueueWidget",
|
||||
}
|
||||
|
||||
|
||||
class PxIActorConfigWidget(RPCBase):
|
||||
_IMPORT_MODULE = "pxi_bec.bec_widgets.widgets.imported"
|
||||
|
||||
@rpc_call
|
||||
def refresh(self):
|
||||
"""
|
||||
Reset the layout for currently loaded actors
|
||||
"""
|
||||
|
||||
|
||||
class PxISampleQueueWidget(RPCBase):
|
||||
_IMPORT_MODULE = "pxi_bec.bec_widgets.widgets.imported"
|
||||
|
||||
@rpc_call
|
||||
def refresh(self):
|
||||
"""
|
||||
Reload the queued samples from Redis.
|
||||
"""
|
||||
|
||||
@rpc_call
|
||||
def clear_queue(self):
|
||||
"""
|
||||
Delete the queue contents
|
||||
"""
|
||||
|
||||
|
||||
class PxISpreadsheetDisplay(RPCBase):
|
||||
_IMPORT_MODULE = "pxi_bec.bec_widgets.widgets.imported"
|
||||
|
||||
@rpc_call
|
||||
def remove(self):
|
||||
"""
|
||||
Cleanup the BECConnector
|
||||
"""
|
||||
|
||||
@rpc_call
|
||||
def attach(self):
|
||||
"""
|
||||
None
|
||||
"""
|
||||
|
||||
@rpc_call
|
||||
def detach(self):
|
||||
"""
|
||||
Detach the widget from its parent dock widget (if widget is in the dock), making it a floating widget.
|
||||
"""
|
||||
|
||||
|
||||
class PxITaskPanel(RPCBase):
|
||||
_IMPORT_MODULE = "pxi_bec.bec_widgets.widgets.imported"
|
||||
|
||||
@rpc_call
|
||||
def request_task(self, name: "str", *args, **kwargs):
|
||||
"""
|
||||
Submit a task request to the AareBec service.
|
||||
"""
|
||||
|
||||
|
||||
class PxITaskQueueWidget(RPCBase):
|
||||
_IMPORT_MODULE = "pxi_bec.bec_widgets.widgets.imported"
|
||||
|
||||
@rpc_call
|
||||
def refresh(self):
|
||||
"""
|
||||
Reload the queued tasks from Redis.
|
||||
"""
|
||||
|
||||
@rpc_call
|
||||
def clear_queue(self):
|
||||
"""
|
||||
Delete the queue contents
|
||||
"""
|
||||
|
||||
@rpc_call
|
||||
def start_queue(self):
|
||||
"""
|
||||
Try to start the queue
|
||||
"""
|
||||
@@ -0,0 +1,21 @@
|
||||
# This file was automatically generated by generate_cli.py
|
||||
# type: ignore
|
||||
from __future__ import annotations
|
||||
|
||||
# pylint: skip-file
|
||||
|
||||
designer_plugins = {
|
||||
"PxIActorConfigWidget": ("pxi_bec.bec_widgets.widgets.imported", "PxIActorConfigWidget"),
|
||||
"PxISampleQueueWidget": ("pxi_bec.bec_widgets.widgets.imported", "PxISampleQueueWidget"),
|
||||
"PxISpreadsheetDisplay": ("pxi_bec.bec_widgets.widgets.imported", "PxISpreadsheetDisplay"),
|
||||
"PxITaskPanel": ("pxi_bec.bec_widgets.widgets.imported", "PxITaskPanel"),
|
||||
"PxITaskQueueWidget": ("pxi_bec.bec_widgets.widgets.imported", "PxITaskQueueWidget"),
|
||||
}
|
||||
|
||||
widget_icons = {
|
||||
"PxIActorConfigWidget": "format_list_bulleted",
|
||||
"PxISampleQueueWidget": "pending_actions",
|
||||
"PxISpreadsheetDisplay": "format_list_bulleted",
|
||||
"PxITaskPanel": "play_arrow",
|
||||
"PxITaskQueueWidget": "pending_actions",
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
from mx_bec.bec_widgets.widgets.aare_bec import (
|
||||
MxActorConfigWidget,
|
||||
MxTaskPanel,
|
||||
MxTaskQueueWidget,
|
||||
SampleQueueWidget,
|
||||
SampleSpreadsheetDisplay,
|
||||
)
|
||||
|
||||
|
||||
class PxIActorConfigWidget(MxActorConfigWidget): ...
|
||||
|
||||
|
||||
class PxITaskQueueWidget(MxTaskQueueWidget): ...
|
||||
|
||||
|
||||
class PxISampleQueueWidget(SampleQueueWidget): ...
|
||||
|
||||
|
||||
class PxITaskPanel(MxTaskPanel): ...
|
||||
|
||||
|
||||
class PxISpreadsheetDisplay(SampleSpreadsheetDisplay): ...
|
||||
@@ -0,0 +1 @@
|
||||
{'files': ['imported.py']}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtWidgets import QWidget
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from pxi_bec.bec_widgets.widgets.imported import PxIActorConfigWidget
|
||||
|
||||
DOM_XML = """
|
||||
<ui language='c++'>
|
||||
<widget class='PxIActorConfigWidget' name='px_i_actor_config_widget'>
|
||||
</widget>
|
||||
</ui>
|
||||
"""
|
||||
|
||||
|
||||
class PxIActorConfigWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._form_editor = None
|
||||
|
||||
def createWidget(self, parent):
|
||||
if parent is None:
|
||||
return QWidget()
|
||||
t = PxIActorConfigWidget(parent)
|
||||
return t
|
||||
|
||||
def domXml(self):
|
||||
return DOM_XML
|
||||
|
||||
def group(self):
|
||||
return ""
|
||||
|
||||
def icon(self):
|
||||
return designer_material_icon(PxIActorConfigWidget.ICON_NAME)
|
||||
|
||||
def includeFile(self):
|
||||
return "px_i_actor_config_widget"
|
||||
|
||||
def initialize(self, form_editor):
|
||||
self._form_editor = form_editor
|
||||
|
||||
def isContainer(self):
|
||||
return False
|
||||
|
||||
def isInitialized(self):
|
||||
return self._form_editor is not None
|
||||
|
||||
def name(self):
|
||||
return "PxIActorConfigWidget"
|
||||
|
||||
def toolTip(self):
|
||||
return "PxIActorConfigWidget"
|
||||
|
||||
def whatsThis(self):
|
||||
return self.toolTip()
|
||||
@@ -0,0 +1 @@
|
||||
{'files': ['imported.py']}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtWidgets import QWidget
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from pxi_bec.bec_widgets.widgets.imported import PxISampleQueueWidget
|
||||
|
||||
DOM_XML = """
|
||||
<ui language='c++'>
|
||||
<widget class='PxISampleQueueWidget' name='px_i_sample_queue_widget'>
|
||||
</widget>
|
||||
</ui>
|
||||
"""
|
||||
|
||||
|
||||
class PxISampleQueueWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._form_editor = None
|
||||
|
||||
def createWidget(self, parent):
|
||||
if parent is None:
|
||||
return QWidget()
|
||||
t = PxISampleQueueWidget(parent)
|
||||
return t
|
||||
|
||||
def domXml(self):
|
||||
return DOM_XML
|
||||
|
||||
def group(self):
|
||||
return ""
|
||||
|
||||
def icon(self):
|
||||
return designer_material_icon(PxISampleQueueWidget.ICON_NAME)
|
||||
|
||||
def includeFile(self):
|
||||
return "px_i_sample_queue_widget"
|
||||
|
||||
def initialize(self, form_editor):
|
||||
self._form_editor = form_editor
|
||||
|
||||
def isContainer(self):
|
||||
return False
|
||||
|
||||
def isInitialized(self):
|
||||
return self._form_editor is not None
|
||||
|
||||
def name(self):
|
||||
return "PxISampleQueueWidget"
|
||||
|
||||
def toolTip(self):
|
||||
return "PxISampleQueueWidget"
|
||||
|
||||
def whatsThis(self):
|
||||
return self.toolTip()
|
||||
@@ -0,0 +1 @@
|
||||
{'files': ['imported.py']}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtWidgets import QWidget
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from pxi_bec.bec_widgets.widgets.imported import PxISpreadsheetDisplay
|
||||
|
||||
DOM_XML = """
|
||||
<ui language='c++'>
|
||||
<widget class='PxISpreadsheetDisplay' name='px_i_spreadsheet_display'>
|
||||
</widget>
|
||||
</ui>
|
||||
"""
|
||||
|
||||
|
||||
class PxISpreadsheetDisplayPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._form_editor = None
|
||||
|
||||
def createWidget(self, parent):
|
||||
if parent is None:
|
||||
return QWidget()
|
||||
t = PxISpreadsheetDisplay(parent)
|
||||
return t
|
||||
|
||||
def domXml(self):
|
||||
return DOM_XML
|
||||
|
||||
def group(self):
|
||||
return ""
|
||||
|
||||
def icon(self):
|
||||
return designer_material_icon(PxISpreadsheetDisplay.ICON_NAME)
|
||||
|
||||
def includeFile(self):
|
||||
return "px_i_spreadsheet_display"
|
||||
|
||||
def initialize(self, form_editor):
|
||||
self._form_editor = form_editor
|
||||
|
||||
def isContainer(self):
|
||||
return False
|
||||
|
||||
def isInitialized(self):
|
||||
return self._form_editor is not None
|
||||
|
||||
def name(self):
|
||||
return "PxISpreadsheetDisplay"
|
||||
|
||||
def toolTip(self):
|
||||
return "PxISpreadsheetDisplay"
|
||||
|
||||
def whatsThis(self):
|
||||
return self.toolTip()
|
||||
@@ -0,0 +1 @@
|
||||
{'files': ['imported.py']}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtWidgets import QWidget
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from pxi_bec.bec_widgets.widgets.imported import PxITaskPanel
|
||||
|
||||
DOM_XML = """
|
||||
<ui language='c++'>
|
||||
<widget class='PxITaskPanel' name='px_i_task_panel'>
|
||||
</widget>
|
||||
</ui>
|
||||
"""
|
||||
|
||||
|
||||
class PxITaskPanelPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._form_editor = None
|
||||
|
||||
def createWidget(self, parent):
|
||||
if parent is None:
|
||||
return QWidget()
|
||||
t = PxITaskPanel(parent)
|
||||
return t
|
||||
|
||||
def domXml(self):
|
||||
return DOM_XML
|
||||
|
||||
def group(self):
|
||||
return ""
|
||||
|
||||
def icon(self):
|
||||
return designer_material_icon(PxITaskPanel.ICON_NAME)
|
||||
|
||||
def includeFile(self):
|
||||
return "px_i_task_panel"
|
||||
|
||||
def initialize(self, form_editor):
|
||||
self._form_editor = form_editor
|
||||
|
||||
def isContainer(self):
|
||||
return False
|
||||
|
||||
def isInitialized(self):
|
||||
return self._form_editor is not None
|
||||
|
||||
def name(self):
|
||||
return "PxITaskPanel"
|
||||
|
||||
def toolTip(self):
|
||||
return "PxITaskPanel"
|
||||
|
||||
def whatsThis(self):
|
||||
return self.toolTip()
|
||||
@@ -0,0 +1 @@
|
||||
{'files': ['imported.py']}
|
||||
@@ -0,0 +1,57 @@
|
||||
# Copyright (C) 2022 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
||||
from qtpy.QtWidgets import QWidget
|
||||
|
||||
from bec_widgets.utils.bec_designer import designer_material_icon
|
||||
from pxi_bec.bec_widgets.widgets.imported import PxITaskQueueWidget
|
||||
|
||||
DOM_XML = """
|
||||
<ui language='c++'>
|
||||
<widget class='PxITaskQueueWidget' name='px_i_task_queue_widget'>
|
||||
</widget>
|
||||
</ui>
|
||||
"""
|
||||
|
||||
|
||||
class PxITaskQueueWidgetPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._form_editor = None
|
||||
|
||||
def createWidget(self, parent):
|
||||
if parent is None:
|
||||
return QWidget()
|
||||
t = PxITaskQueueWidget(parent)
|
||||
return t
|
||||
|
||||
def domXml(self):
|
||||
return DOM_XML
|
||||
|
||||
def group(self):
|
||||
return ""
|
||||
|
||||
def icon(self):
|
||||
return designer_material_icon(PxITaskQueueWidget.ICON_NAME)
|
||||
|
||||
def includeFile(self):
|
||||
return "px_i_task_queue_widget"
|
||||
|
||||
def initialize(self, form_editor):
|
||||
self._form_editor = form_editor
|
||||
|
||||
def isContainer(self):
|
||||
return False
|
||||
|
||||
def isInitialized(self):
|
||||
return self._form_editor is not None
|
||||
|
||||
def name(self):
|
||||
return "PxITaskQueueWidget"
|
||||
|
||||
def toolTip(self):
|
||||
return "PxITaskQueueWidget"
|
||||
|
||||
def whatsThis(self):
|
||||
return self.toolTip()
|
||||
@@ -0,0 +1,15 @@
|
||||
def main(): # pragma: no cover
|
||||
from qtpy import PYSIDE6
|
||||
|
||||
if not PYSIDE6:
|
||||
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
||||
return
|
||||
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
||||
|
||||
from pxi_bec.bec_widgets.widgets.px_i_actor_config_widget_plugin import PxIActorConfigWidgetPlugin
|
||||
|
||||
QPyDesignerCustomWidgetCollection.addCustomWidget(PxIActorConfigWidgetPlugin())
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
main()
|
||||
@@ -0,0 +1,15 @@
|
||||
def main(): # pragma: no cover
|
||||
from qtpy import PYSIDE6
|
||||
|
||||
if not PYSIDE6:
|
||||
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
||||
return
|
||||
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
||||
|
||||
from pxi_bec.bec_widgets.widgets.px_i_sample_queue_widget_plugin import PxISampleQueueWidgetPlugin
|
||||
|
||||
QPyDesignerCustomWidgetCollection.addCustomWidget(PxISampleQueueWidgetPlugin())
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
main()
|
||||
@@ -0,0 +1,15 @@
|
||||
def main(): # pragma: no cover
|
||||
from qtpy import PYSIDE6
|
||||
|
||||
if not PYSIDE6:
|
||||
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
||||
return
|
||||
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
||||
|
||||
from pxi_bec.bec_widgets.widgets.px_i_spreadsheet_display_plugin import PxISpreadsheetDisplayPlugin
|
||||
|
||||
QPyDesignerCustomWidgetCollection.addCustomWidget(PxISpreadsheetDisplayPlugin())
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
main()
|
||||
@@ -0,0 +1,15 @@
|
||||
def main(): # pragma: no cover
|
||||
from qtpy import PYSIDE6
|
||||
|
||||
if not PYSIDE6:
|
||||
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
||||
return
|
||||
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
||||
|
||||
from pxi_bec.bec_widgets.widgets.px_i_task_panel_plugin import PxITaskPanelPlugin
|
||||
|
||||
QPyDesignerCustomWidgetCollection.addCustomWidget(PxITaskPanelPlugin())
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
main()
|
||||
@@ -0,0 +1,15 @@
|
||||
def main(): # pragma: no cover
|
||||
from qtpy import PYSIDE6
|
||||
|
||||
if not PYSIDE6:
|
||||
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
||||
return
|
||||
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
||||
|
||||
from pxi_bec.bec_widgets.widgets.px_i_task_queue_widget_plugin import PxITaskQueueWidgetPlugin
|
||||
|
||||
QPyDesignerCustomWidgetCollection.addCustomWidget(PxITaskQueueWidgetPlugin())
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
main()
|
||||
@@ -0,0 +1,18 @@
|
||||
"""Message types of the MX plugins, re-exported from mx_bec so that BEC's message decoder can
|
||||
find them through the `bec.messages` entry point registered by this package."""
|
||||
|
||||
from mx_bec.messages import (
|
||||
MXMeasurementSequenceMessage,
|
||||
MXQueueChangedMessage,
|
||||
MXSampleExecutionMessage,
|
||||
MXTaskExecutionMessage,
|
||||
OpticalPredictionMessage,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"MXMeasurementSequenceMessage",
|
||||
"MXTaskExecutionMessage",
|
||||
"MXSampleExecutionMessage",
|
||||
"MXQueueChangedMessage",
|
||||
"OpticalPredictionMessage",
|
||||
]
|
||||
Reference in new issue
Block a user