bec-widgets 0.68.0__tar.gz → 0.70.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/CHANGELOG.md +32 -45
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/PKG-INFO +1 -1
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/client.py +4 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/generate_cli.py +3 -0
- bec_widgets-0.70.0/bec_widgets/examples/plugin_example_pyside/main.py +17 -0
- bec_widgets-0.70.0/bec_widgets/examples/plugin_example_pyside/registertictactoe.py +12 -0
- bec_widgets-0.70.0/bec_widgets/examples/plugin_example_pyside/taskmenuextension.pyproject +4 -0
- bec_widgets-0.70.0/bec_widgets/examples/plugin_example_pyside/tictactoe.py +135 -0
- bec_widgets-0.70.0/bec_widgets/examples/plugin_example_pyside/tictactoeplugin.py +68 -0
- bec_widgets-0.70.0/bec_widgets/examples/plugin_example_pyside/tictactoetaskmenu.py +67 -0
- bec_widgets-0.70.0/bec_widgets/utils/bec_designer.py +87 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/device_inputs/device_combobox/device_combobox.py +0 -11
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox/device_combobox.pyproject +4 -0
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox/device_combobox_plugin.py +54 -0
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox/launch_device_combobox.py +11 -0
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox/register_device_combobox.py +17 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/device_inputs/device_line_edit/device_line_edit.py +0 -11
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_line_edit/device_line_edit.pyproject +4 -0
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_line_edit/device_line_edit_plugin.py +54 -0
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_line_edit/launch_device_line_edit.py +11 -0
- bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_line_edit/register_device_line_edit.py +17 -0
- bec_widgets-0.70.0/bec_widgets/widgets/vscode/vscode.py +86 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/website/website.py +10 -1
- bec_widgets-0.70.0/docs/user/widgets/bec_status_box.md +30 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/pyproject.toml +2 -1
- bec_widgets-0.70.0/tests/unit_tests/__init__.py +0 -0
- bec_widgets-0.70.0/tests/unit_tests/test_msgs/__init__.py +0 -0
- bec_widgets-0.70.0/tests/unit_tests/test_vscode_widget.py +61 -0
- bec_widgets-0.68.0/docs/user/widgets/bec_status_box.md +0 -30
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.git_hooks/pre-commit +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.gitignore +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.gitlab/issue_templates/bug_report_template.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.gitlab/issue_templates/documentation_update_template.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.gitlab/issue_templates/feature_request_template.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.gitlab/merge_request_templates/default.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.gitlab-ci.yml +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.pylintrc +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/.readthedocs.yaml +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/LICENSE +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/README.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/assets/bec_widgets_icon.png +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/assets/terminal_icon.png +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/auto_updates.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/client_utils.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/rpc_register.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/rpc_wigdet_handler.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/cli/server.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/examples/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/examples/jupyter_console/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/examples/jupyter_console/jupyter_console_window.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/examples/jupyter_console/jupyter_console_window.ui +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/examples/motor_movement/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/examples/motor_movement/motor_control_compilations.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/examples/motor_movement/motor_controller.ui +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/bec_status_box → bec_widgets-0.70.0/bec_widgets/examples/plugin_example_pyside}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/bec_connector.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/bec_dispatcher.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/bec_table.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/colors.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/container_utils.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/crosshair.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/entry_validator.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/layout_manager.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/plugin_utils.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/rpc_decorator.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/thread_checker.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/ui_loader.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/validator_delegate.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/widget_io.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/utils/yaml_dialog.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/__init__.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/buttons/stop_button → bec_widgets-0.70.0/bec_widgets/widgets/bec_status_box}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/bec_status_box/bec_status_box.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/bec_status_box/status_item.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/buttons/__init__.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/device_inputs/device_combobox → bec_widgets-0.70.0/bec_widgets/widgets/buttons/stop_button}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/buttons/stop_button/stop_button.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/device_inputs/__init__.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/device_inputs/device_line_edit → bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/device_inputs/device_input_base.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/figure/plots → bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_line_edit}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/dock/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/dock/dock.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/dock/dock_area.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/figure.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/figure/plots/image → bec_widgets-0.70.0/bec_widgets/widgets/figure/plots}/__init__.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/figure/plots/motor_map → bec_widgets-0.70.0/bec_widgets/widgets/figure/plots/image}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/plots/image/image.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/plots/image/image_item.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/plots/image/image_processor.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/figure/plots/waveform → bec_widgets-0.70.0/bec_widgets/widgets/figure/plots/motor_map}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/plots/motor_map/motor_map.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/plots/plot_base.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/jupyter_console → bec_widgets-0.70.0/bec_widgets/widgets/figure/plots/waveform}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/plots/waveform/waveform.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/figure/plots/waveform/waveform_curve.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/motor_control → bec_widgets-0.70.0/bec_widgets/widgets/jupyter_console}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/jupyter_console/jupyter_console.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/motor_control/motor_table → bec_widgets-0.70.0/bec_widgets/widgets/motor_control}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/motor_control.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/motor_control/movement_absolute → bec_widgets-0.70.0/bec_widgets/widgets/motor_control/motor_table}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/motor_table/motor_table.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/motor_table/motor_table.ui +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/motor_control/movement_relative → bec_widgets-0.70.0/bec_widgets/widgets/motor_control/movement_absolute}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/movement_absolute/movement_absolute.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/movement_absolute/movement_absolute.ui +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/motor_control/selection → bec_widgets-0.70.0/bec_widgets/widgets/motor_control/movement_relative}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/movement_relative/movement_relative.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/movement_relative/movement_relative.ui +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/text_box → bec_widgets-0.70.0/bec_widgets/widgets/motor_control/selection}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/selection/selection.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/motor_control/selection/selection.ui +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/scan_control/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/scan_control/scan_control.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/spiral_progress_bar/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/spiral_progress_bar/ring.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/spiral_progress_bar/spiral_progress_bar.py +0 -0
- {bec_widgets-0.68.0/bec_widgets/widgets/website → bec_widgets-0.70.0/bec_widgets/widgets/text_box}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/text_box/text_box.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/toolbar/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/bec_widgets/widgets/toolbar/toolbar.py +0 -0
- {bec_widgets-0.68.0/tests → bec_widgets-0.70.0/bec_widgets/widgets/vscode}/__init__.py +0 -0
- {bec_widgets-0.68.0/tests/end-2-end → bec_widgets-0.70.0/bec_widgets/widgets/website}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/Makefile +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/_static/custom.css +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/_templates/custom-class-template.rst +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/_templates/custom-module-template.rst +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/api_reference/api_reference.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/assets/apps_48dp.svg +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/assets/display_settings_48dp.svg +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/assets/index_api.svg +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/assets/index_contribute.svg +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/assets/index_getting_started.svg +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/assets/index_user_guide.svg +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/assets/rocket_launch_48dp.svg +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/conf.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/developer/developer.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/developer/getting_started/development.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/developer/getting_started/getting_started.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/developer/widgets/widgets.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/index.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/introduction/introduction.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/make.bat +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/requirements.txt +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/api_reference/api_reference.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/applications/applications.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/customisation.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/getting_started/BECDockArea.png +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/getting_started/auto_updates.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/getting_started/getting_started.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/getting_started/gui_complex_gui.gif +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/getting_started/installation.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/getting_started/quick_start.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/user.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/BECFigure.png +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/bec_figure.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/bec_status_box.gif +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/buttons.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/image_plot.gif +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/motor.gif +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/progress_bar.gif +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/scatter_2D.gif +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/spiral_progress_bar.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/text_box.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/w1D.gif +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/website.md +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/docs/user/widgets/widgets.md +0 -0
- {bec_widgets-0.68.0/tests/unit_tests → bec_widgets-0.70.0/tests}/__init__.py +0 -0
- {bec_widgets-0.68.0/tests/unit_tests/test_msgs → bec_widgets-0.70.0/tests/end-2-end}/__init__.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/end-2-end/conftest.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/end-2-end/test_bec_dock_rpc_e2e.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/end-2-end/test_bec_figure_rpc_e2e.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/end-2-end/test_rpc_register_e2e.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/client_mocks.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/conftest.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_bec_connector.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_bec_dispatcher.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_bec_dock.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_bec_figure.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_bec_motor_map.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_bec_status_box.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_client_utils.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_color_validation.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_configs/config_device.yaml +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_configs/config_device_no_entry.yaml +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_configs/config_scan.yaml +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_crosshair.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_device_input_base.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_device_input_widgets.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_generate_cli_client.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_motor_control.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_msgs/available_scans_message.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_plot_base.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_plugin_utils.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_rpc_register.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_rpc_widget_handler.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_scan_control.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_spiral_progress_bar.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_stop_button.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_text_box_widget.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_waveform1d.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_website_widget.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_widget_io.py +0 -0
- {bec_widgets-0.68.0 → bec_widgets-0.70.0}/tests/unit_tests/test_yaml_dialog.py +0 -0
@@ -1,5 +1,37 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## v0.70.0 (2024-06-21)
|
4
|
+
|
5
|
+
### Documentation
|
6
|
+
|
7
|
+
* docs: fix typo in link ([`fdf11d8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fdf11d8147750e379af9b17792761a267b49ae53))
|
8
|
+
|
9
|
+
### Feature
|
10
|
+
|
11
|
+
* feat(bec-designer): automatic plugin discovery ([`4639eee`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/4639eee0b975ebd7a946e0e290449f5b88c372eb))
|
12
|
+
|
13
|
+
* feat(device_line_edit): plugin added to bec-designer ([`b4b27ae`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/b4b27aea3d8c08fa3d5d5514c69dbde32721d1dc))
|
14
|
+
|
15
|
+
* feat(device_combobox): plugin added to bec-designer ([`e483b28`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/e483b282db20a81182b87938ea172654092419b5))
|
16
|
+
|
17
|
+
* feat: added entry point for bec-designer ([`36391db`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/36391db60735d57b371211791ddf8d3d00cebcf1))
|
18
|
+
|
19
|
+
* feat(utils/bec-designer): added startup script to launched QtDesigner compatible with conda environments ([`5362334`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/5362334ff3b07fc83653323a084a4b6946bade96))
|
20
|
+
|
21
|
+
### Fix
|
22
|
+
|
23
|
+
* fix(bec-desiger+plugins): imports fixed, PYSIDE6 check to not enable run plugins with pyqt6 ([`50b3422`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/50b3422528d46d74317e8c903b6286e868ab7fe0))
|
24
|
+
|
25
|
+
## v0.69.0 (2024-06-21)
|
26
|
+
|
27
|
+
### Feature
|
28
|
+
|
29
|
+
* feat(widgets): added vscode widget ([`48ae950`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/48ae950d57b454307ce409e2511f7b7adf3cfc6b))
|
30
|
+
|
31
|
+
### Fix
|
32
|
+
|
33
|
+
* fix(generate_cli): fixed rpc generate for classes without user access; closes #226 ([`925c893`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/925c893f3ff4337fc8b4d237c8ffc19a597b0996))
|
34
|
+
|
3
35
|
## v0.68.0 (2024-06-21)
|
4
36
|
|
5
37
|
### Feature
|
@@ -133,48 +165,3 @@ in their parent process ([`ce37416`](https://gitlab.psi.ch/bec/bec_widgets/-/com
|
|
133
165
|
* fix: do not import "server" in client, prevents from having trouble with QApplication creation order
|
134
166
|
|
135
167
|
Like with QtWebEngine ([`6f96498`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6f96498de66358b89f3a2035627eed2e02dde5a1))
|
136
|
-
|
137
|
-
### Unknown
|
138
|
-
|
139
|
-
* Reapply "feat: implement non-polling, interruptible waiting of gui instruction response with timeout"
|
140
|
-
|
141
|
-
This reverts commit fe04dd80e59a0e74f7fdea603e0642707ecc7c2a. ([`836b6e6`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/836b6e64f694916d6b6f909dedf11a4a6d2c86a4))
|
142
|
-
|
143
|
-
## v0.63.1 (2024-06-13)
|
144
|
-
|
145
|
-
### Fix
|
146
|
-
|
147
|
-
* fix: just terminate the remote process in close() instead of communicating
|
148
|
-
|
149
|
-
The proper finalization sequence will be executed by the remote process
|
150
|
-
on SIGTERM ([`9263f8e`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/9263f8ef5c17ae7a007a1a564baf787b39061756))
|
151
|
-
|
152
|
-
## v0.63.0 (2024-06-13)
|
153
|
-
|
154
|
-
### Documentation
|
155
|
-
|
156
|
-
* docs: add documentation ([`bc709c4`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/bc709c4184c985d4e721f9ea7d1b3dad5e9153a7))
|
157
|
-
|
158
|
-
### Feature
|
159
|
-
|
160
|
-
* feat: add textbox widget ([`d9d4e3c`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/d9d4e3c9bf73ab2a5629c2867b50fc91e69489ec))
|
161
|
-
|
162
|
-
### Refactor
|
163
|
-
|
164
|
-
* refactor: add pydantic config, add change_theme ([`6b8432f`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/6b8432f5b20a71175a3537b5f6832b76e3b67d73))
|
165
|
-
|
166
|
-
### Test
|
167
|
-
|
168
|
-
* test: add test for text box ([`b49462a`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/b49462abeb186e56bac79d2ef0b0add1ef28a1a5))
|
169
|
-
|
170
|
-
### Unknown
|
171
|
-
|
172
|
-
* Revert "feat: implement non-polling, interruptible waiting of gui instruction response with timeout"
|
173
|
-
|
174
|
-
This reverts commit abc6caa2d0b6141dfbe1f3d025f78ae14deddcb3 ([`fe04dd8`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/fe04dd80e59a0e74f7fdea603e0642707ecc7c2a))
|
175
|
-
|
176
|
-
## v0.62.0 (2024-06-12)
|
177
|
-
|
178
|
-
### Unknown
|
179
|
-
|
180
|
-
* doc: add documentation about creating custom GUI applications embedding BEC Widgets ([`17a0068`](https://gitlab.psi.ch/bec/bec_widgets/-/commit/17a00687579f5efab1990cd83862ec0e78198633))
|
@@ -19,6 +19,7 @@ class Widgets(str, enum.Enum):
|
|
19
19
|
BECFigure = "BECFigure"
|
20
20
|
SpiralProgressBar = "SpiralProgressBar"
|
21
21
|
TextBox = "TextBox"
|
22
|
+
VSCodeEditor = "VSCodeEditor"
|
22
23
|
WebsiteWidget = "WebsiteWidget"
|
23
24
|
|
24
25
|
|
@@ -2049,6 +2050,9 @@ class TextBox(RPCBase):
|
|
2049
2050
|
"""
|
2050
2051
|
|
2051
2052
|
|
2053
|
+
class VSCodeEditor(RPCBase): ...
|
2054
|
+
|
2055
|
+
|
2052
2056
|
class WebsiteWidget(RPCBase):
|
2053
2057
|
@rpc_call
|
2054
2058
|
def set_url(self, url: str) -> None:
|
@@ -83,6 +83,9 @@ class {class_name}(RPCBase, BECGuiClientMixin):"""
|
|
83
83
|
else:
|
84
84
|
self.content += f"""
|
85
85
|
class {class_name}(RPCBase):"""
|
86
|
+
if not cls.USER_ACCESS:
|
87
|
+
self.content += """...
|
88
|
+
"""
|
86
89
|
for method in cls.USER_ACCESS:
|
87
90
|
obj = getattr(cls, method)
|
88
91
|
if isinstance(obj, property):
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
|
4
|
+
"""PySide6 port of the Qt Designer taskmenuextension example from Qt v6.x"""
|
5
|
+
|
6
|
+
import sys
|
7
|
+
|
8
|
+
from bec_ipython_client.main import BECIPythonClient
|
9
|
+
from qtpy.QtWidgets import QApplication
|
10
|
+
from tictactoe import TicTacToe
|
11
|
+
|
12
|
+
if __name__ == "__main__": # pragma: no cover
|
13
|
+
app = QApplication(sys.argv)
|
14
|
+
window = TicTacToe()
|
15
|
+
window.state = "-X-XO----"
|
16
|
+
window.show()
|
17
|
+
sys.exit(app.exec())
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
|
4
|
+
from qtpy.QtDesigner import QPyDesignerCustomWidgetCollection
|
5
|
+
from tictactoe import TicTacToe
|
6
|
+
from tictactoeplugin import TicTacToePlugin
|
7
|
+
|
8
|
+
# Set PYSIDE_DESIGNER_PLUGINS to point to this directory and load the plugin
|
9
|
+
|
10
|
+
|
11
|
+
if __name__ == "__main__": # pragma: no cover
|
12
|
+
QPyDesignerCustomWidgetCollection.addCustomWidget(TicTacToePlugin())
|
@@ -0,0 +1,135 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
|
4
|
+
from qtpy.QtCore import Property, QPoint, QRect, QSize, Qt, Slot
|
5
|
+
from qtpy.QtGui import QPainter, QPen
|
6
|
+
from qtpy.QtWidgets import QWidget
|
7
|
+
|
8
|
+
EMPTY = "-"
|
9
|
+
CROSS = "X"
|
10
|
+
NOUGHT = "O"
|
11
|
+
DEFAULT_STATE = "---------"
|
12
|
+
|
13
|
+
|
14
|
+
class TicTacToe(QWidget): # pragma: no cover
|
15
|
+
def __init__(self, parent=None):
|
16
|
+
super().__init__(parent)
|
17
|
+
self._state = DEFAULT_STATE
|
18
|
+
self._turn_number = 0
|
19
|
+
|
20
|
+
def minimumSizeHint(self):
|
21
|
+
return QSize(200, 200)
|
22
|
+
|
23
|
+
def sizeHint(self):
|
24
|
+
return QSize(200, 200)
|
25
|
+
|
26
|
+
def setState(self, new_state):
|
27
|
+
self._turn_number = 0
|
28
|
+
self._state = DEFAULT_STATE
|
29
|
+
for position in range(min(9, len(new_state))):
|
30
|
+
mark = new_state[position]
|
31
|
+
if mark == CROSS or mark == NOUGHT:
|
32
|
+
self._turn_number += 1
|
33
|
+
self._change_state_at(position, mark)
|
34
|
+
position += 1
|
35
|
+
self.update()
|
36
|
+
|
37
|
+
def state(self):
|
38
|
+
return self._state
|
39
|
+
|
40
|
+
@Slot()
|
41
|
+
def clear_board(self):
|
42
|
+
self._state = DEFAULT_STATE
|
43
|
+
self._turn_number = 0
|
44
|
+
self.update()
|
45
|
+
|
46
|
+
def _change_state_at(self, pos, new_state):
|
47
|
+
self._state = self._state[:pos] + new_state + self._state[pos + 1 :]
|
48
|
+
|
49
|
+
def mousePressEvent(self, event):
|
50
|
+
if self._turn_number == 9:
|
51
|
+
self.clear_board()
|
52
|
+
return
|
53
|
+
for position in range(9):
|
54
|
+
cell = self._cell_rect(position)
|
55
|
+
if cell.contains(event.position().toPoint()):
|
56
|
+
if self._state[position] == EMPTY:
|
57
|
+
new_state = CROSS if self._turn_number % 2 == 0 else NOUGHT
|
58
|
+
self._change_state_at(position, new_state)
|
59
|
+
self._turn_number += 1
|
60
|
+
self.update()
|
61
|
+
|
62
|
+
def paintEvent(self, event):
|
63
|
+
with QPainter(self) as painter:
|
64
|
+
painter.setRenderHint(QPainter.Antialiasing)
|
65
|
+
|
66
|
+
painter.setPen(QPen(Qt.darkGreen, 1))
|
67
|
+
painter.drawLine(self._cell_width(), 0, self._cell_width(), self.height())
|
68
|
+
painter.drawLine(2 * self._cell_width(), 0, 2 * self._cell_width(), self.height())
|
69
|
+
painter.drawLine(0, self._cell_height(), self.width(), self._cell_height())
|
70
|
+
painter.drawLine(0, 2 * self._cell_height(), self.width(), 2 * self._cell_height())
|
71
|
+
|
72
|
+
painter.setPen(QPen(Qt.darkBlue, 2))
|
73
|
+
|
74
|
+
for position in range(9):
|
75
|
+
cell = self._cell_rect(position)
|
76
|
+
if self._state[position] == CROSS:
|
77
|
+
painter.drawLine(cell.topLeft(), cell.bottomRight())
|
78
|
+
painter.drawLine(cell.topRight(), cell.bottomLeft())
|
79
|
+
elif self._state[position] == NOUGHT:
|
80
|
+
painter.drawEllipse(cell)
|
81
|
+
|
82
|
+
painter.setPen(QPen(Qt.yellow, 3))
|
83
|
+
|
84
|
+
for position in range(0, 8, 3):
|
85
|
+
if (
|
86
|
+
self._state[position] != EMPTY
|
87
|
+
and self._state[position + 1] == self._state[position]
|
88
|
+
and self._state[position + 2] == self._state[position]
|
89
|
+
):
|
90
|
+
y = self._cell_rect(position).center().y()
|
91
|
+
painter.drawLine(0, y, self.width(), y)
|
92
|
+
self._turn_number = 9
|
93
|
+
|
94
|
+
for position in range(3):
|
95
|
+
if (
|
96
|
+
self._state[position] != EMPTY
|
97
|
+
and self._state[position + 3] == self._state[position]
|
98
|
+
and self._state[position + 6] == self._state[position]
|
99
|
+
):
|
100
|
+
x = self._cell_rect(position).center().x()
|
101
|
+
painter.drawLine(x, 0, x, self.height())
|
102
|
+
self._turn_number = 9
|
103
|
+
|
104
|
+
if (
|
105
|
+
self._state[0] != EMPTY
|
106
|
+
and self._state[4] == self._state[0]
|
107
|
+
and self._state[8] == self._state[0]
|
108
|
+
):
|
109
|
+
painter.drawLine(0, 0, self.width(), self.height())
|
110
|
+
self._turn_number = 9
|
111
|
+
|
112
|
+
if (
|
113
|
+
self._state[2] != EMPTY
|
114
|
+
and self._state[4] == self._state[2]
|
115
|
+
and self._state[6] == self._state[2]
|
116
|
+
):
|
117
|
+
painter.drawLine(0, self.height(), self.width(), 0)
|
118
|
+
self._turn_number = 9
|
119
|
+
|
120
|
+
def _cell_rect(self, position):
|
121
|
+
h_margin = self.width() / 30
|
122
|
+
v_margin = self.height() / 30
|
123
|
+
row = int(position / 3)
|
124
|
+
column = position - 3 * row
|
125
|
+
pos = QPoint(column * self._cell_width() + h_margin, row * self._cell_height() + v_margin)
|
126
|
+
size = QSize(self._cell_width() - 2 * h_margin, self._cell_height() - 2 * v_margin)
|
127
|
+
return QRect(pos, size)
|
128
|
+
|
129
|
+
def _cell_width(self):
|
130
|
+
return self.width() / 3
|
131
|
+
|
132
|
+
def _cell_height(self):
|
133
|
+
return self.height() / 3
|
134
|
+
|
135
|
+
state = Property(str, state, setState)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
|
4
|
+
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
5
|
+
from qtpy.QtGui import QIcon
|
6
|
+
from tictactoe import TicTacToe
|
7
|
+
from tictactoetaskmenu import TicTacToeTaskMenuFactory
|
8
|
+
|
9
|
+
DOM_XML = """
|
10
|
+
<ui language='c++'>
|
11
|
+
<widget class='TicTacToe' name='ticTacToe'>
|
12
|
+
<property name='geometry'>
|
13
|
+
<rect>
|
14
|
+
<x>0</x>
|
15
|
+
<y>0</y>
|
16
|
+
<width>200</width>
|
17
|
+
<height>200</height>
|
18
|
+
</rect>
|
19
|
+
</property>
|
20
|
+
<property name='state'>
|
21
|
+
<string>-X-XO----</string>
|
22
|
+
</property>
|
23
|
+
</widget>
|
24
|
+
</ui>
|
25
|
+
"""
|
26
|
+
|
27
|
+
|
28
|
+
class TicTacToePlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
29
|
+
def __init__(self):
|
30
|
+
super().__init__()
|
31
|
+
self._form_editor = None
|
32
|
+
|
33
|
+
def createWidget(self, parent):
|
34
|
+
t = TicTacToe(parent)
|
35
|
+
return t
|
36
|
+
|
37
|
+
def domXml(self):
|
38
|
+
return DOM_XML
|
39
|
+
|
40
|
+
def group(self):
|
41
|
+
return ""
|
42
|
+
|
43
|
+
def icon(self):
|
44
|
+
return QIcon()
|
45
|
+
|
46
|
+
def includeFile(self):
|
47
|
+
return "tictactoe"
|
48
|
+
|
49
|
+
def initialize(self, form_editor):
|
50
|
+
self._form_editor = form_editor
|
51
|
+
manager = form_editor.extensionManager()
|
52
|
+
iid = TicTacToeTaskMenuFactory.task_menu_iid()
|
53
|
+
manager.registerExtensions(TicTacToeTaskMenuFactory(manager), iid)
|
54
|
+
|
55
|
+
def isContainer(self):
|
56
|
+
return False
|
57
|
+
|
58
|
+
def isInitialized(self):
|
59
|
+
return self._form_editor is not None
|
60
|
+
|
61
|
+
def name(self):
|
62
|
+
return "TicTacToe"
|
63
|
+
|
64
|
+
def toolTip(self):
|
65
|
+
return "Tic Tac Toe Example, demonstrating class QDesignerTaskMenuExtension (Python)"
|
66
|
+
|
67
|
+
def whatsThis(self):
|
68
|
+
return self.toolTip()
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
|
4
|
+
from qtpy.QtCore import Slot
|
5
|
+
from qtpy.QtDesigner import QExtensionFactory, QPyDesignerTaskMenuExtension
|
6
|
+
from qtpy.QtGui import QAction
|
7
|
+
from qtpy.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout
|
8
|
+
from tictactoe import TicTacToe
|
9
|
+
|
10
|
+
|
11
|
+
class TicTacToeDialog(QDialog): # pragma: no cover
|
12
|
+
def __init__(self, parent):
|
13
|
+
super().__init__(parent)
|
14
|
+
layout = QVBoxLayout(self)
|
15
|
+
self._ticTacToe = TicTacToe(self)
|
16
|
+
layout.addWidget(self._ticTacToe)
|
17
|
+
button_box = QDialogButtonBox(
|
18
|
+
QDialogButtonBox.Ok | QDialogButtonBox.Cancel | QDialogButtonBox.Reset
|
19
|
+
)
|
20
|
+
button_box.accepted.connect(self.accept)
|
21
|
+
button_box.rejected.connect(self.reject)
|
22
|
+
reset_button = button_box.button(QDialogButtonBox.Reset)
|
23
|
+
reset_button.clicked.connect(self._ticTacToe.clear_board)
|
24
|
+
layout.addWidget(button_box)
|
25
|
+
|
26
|
+
def set_state(self, new_state):
|
27
|
+
self._ticTacToe.setState(new_state)
|
28
|
+
|
29
|
+
def state(self):
|
30
|
+
return self._ticTacToe.state
|
31
|
+
|
32
|
+
|
33
|
+
class TicTacToeTaskMenu(QPyDesignerTaskMenuExtension):
|
34
|
+
def __init__(self, ticTacToe, parent):
|
35
|
+
super().__init__(parent)
|
36
|
+
self._ticTacToe = ticTacToe
|
37
|
+
self._edit_state_action = QAction("Edit State...", None)
|
38
|
+
self._edit_state_action.triggered.connect(self._edit_state)
|
39
|
+
|
40
|
+
def taskActions(self):
|
41
|
+
return [self._edit_state_action]
|
42
|
+
|
43
|
+
def preferredEditAction(self):
|
44
|
+
return self._edit_state_action
|
45
|
+
|
46
|
+
@Slot()
|
47
|
+
def _edit_state(self):
|
48
|
+
dialog = TicTacToeDialog(self._ticTacToe)
|
49
|
+
dialog.set_state(self._ticTacToe.state)
|
50
|
+
if dialog.exec() == QDialog.Accepted:
|
51
|
+
self._ticTacToe.state = dialog.state()
|
52
|
+
|
53
|
+
|
54
|
+
class TicTacToeTaskMenuFactory(QExtensionFactory):
|
55
|
+
def __init__(self, extension_manager):
|
56
|
+
super().__init__(extension_manager)
|
57
|
+
|
58
|
+
@staticmethod
|
59
|
+
def task_menu_iid():
|
60
|
+
return "org.qt-project.Qt.Designer.TaskMenu"
|
61
|
+
|
62
|
+
def createExtension(self, object, iid, parent):
|
63
|
+
if iid != TicTacToeTaskMenuFactory.task_menu_iid():
|
64
|
+
return None
|
65
|
+
if object.__class__.__name__ != "TicTacToe":
|
66
|
+
return None
|
67
|
+
return TicTacToeTaskMenu(object, parent)
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import os
|
2
|
+
import sys
|
3
|
+
import sysconfig
|
4
|
+
from pathlib import Path
|
5
|
+
|
6
|
+
from qtpy import PYSIDE6
|
7
|
+
|
8
|
+
if PYSIDE6:
|
9
|
+
from PySide6.scripts.pyside_tool import (
|
10
|
+
_extend_path_var,
|
11
|
+
init_virtual_env,
|
12
|
+
is_pyenv_python,
|
13
|
+
is_virtual_env,
|
14
|
+
qt_tool_wrapper,
|
15
|
+
ui_tool_binary,
|
16
|
+
)
|
17
|
+
|
18
|
+
import bec_widgets
|
19
|
+
|
20
|
+
|
21
|
+
def patch_designer(): # pragma: no cover
|
22
|
+
if not PYSIDE6:
|
23
|
+
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
24
|
+
return
|
25
|
+
|
26
|
+
init_virtual_env()
|
27
|
+
|
28
|
+
major_version = sys.version_info[0]
|
29
|
+
minor_version = sys.version_info[1]
|
30
|
+
os.environ["PY_MAJOR_VERSION"] = str(major_version)
|
31
|
+
os.environ["PY_MINOR_VERSION"] = str(minor_version)
|
32
|
+
|
33
|
+
if sys.platform == "linux":
|
34
|
+
version = f"{major_version}.{minor_version}"
|
35
|
+
library_name = f"libpython{version}{sys.abiflags}.so"
|
36
|
+
if is_pyenv_python():
|
37
|
+
library_name = str(Path(sysconfig.get_config_var("LIBDIR")) / library_name)
|
38
|
+
os.environ["LD_PRELOAD"] = library_name
|
39
|
+
elif sys.platform == "darwin":
|
40
|
+
library_name = f"libpython{major_version}.{minor_version}.dylib"
|
41
|
+
lib_path = str(Path(sysconfig.get_config_var("LIBDIR")) / library_name)
|
42
|
+
os.environ["DYLD_INSERT_LIBRARIES"] = lib_path
|
43
|
+
elif sys.platform == "win32":
|
44
|
+
if is_virtual_env():
|
45
|
+
_extend_path_var("PATH", os.fspath(Path(sys._base_executable).parent), True)
|
46
|
+
|
47
|
+
qt_tool_wrapper(ui_tool_binary("designer"), sys.argv[1:])
|
48
|
+
|
49
|
+
|
50
|
+
def find_plugin_paths(base_path: Path):
|
51
|
+
"""
|
52
|
+
Recursively find all directories containing a .pyproject file.
|
53
|
+
"""
|
54
|
+
plugin_paths = []
|
55
|
+
for path in base_path.rglob("*.pyproject"):
|
56
|
+
plugin_paths.append(str(path.parent))
|
57
|
+
return plugin_paths
|
58
|
+
|
59
|
+
|
60
|
+
def set_plugin_environment_variable(plugin_paths):
|
61
|
+
"""
|
62
|
+
Set the PYSIDE_DESIGNER_PLUGINS environment variable with the given plugin paths.
|
63
|
+
"""
|
64
|
+
current_paths = os.environ.get("PYSIDE_DESIGNER_PLUGINS", "")
|
65
|
+
if current_paths:
|
66
|
+
current_paths = current_paths.split(os.pathsep)
|
67
|
+
else:
|
68
|
+
current_paths = []
|
69
|
+
|
70
|
+
current_paths.extend(plugin_paths)
|
71
|
+
os.environ["PYSIDE_DESIGNER_PLUGINS"] = os.pathsep.join(current_paths)
|
72
|
+
|
73
|
+
|
74
|
+
# Patch the designer function
|
75
|
+
def main(): # pragma: no cover
|
76
|
+
if not PYSIDE6:
|
77
|
+
print("PYSIDE6 is not available in the environment. Exiting...")
|
78
|
+
return
|
79
|
+
base_dir = Path(os.path.dirname(bec_widgets.__file__)).resolve()
|
80
|
+
plugin_paths = find_plugin_paths(base_dir)
|
81
|
+
set_plugin_environment_variable(plugin_paths)
|
82
|
+
|
83
|
+
patch_designer()
|
84
|
+
|
85
|
+
|
86
|
+
if __name__ == "__main__": # pragma: no cover
|
87
|
+
main()
|
@@ -82,14 +82,3 @@ class DeviceComboBox(DeviceInputBase, QComboBox):
|
|
82
82
|
if device_obj is None:
|
83
83
|
raise ValueError(f"Device {device_name} is not found.")
|
84
84
|
return device_obj
|
85
|
-
|
86
|
-
|
87
|
-
if __name__ == "__main__": # pragma: no cover
|
88
|
-
import sys
|
89
|
-
|
90
|
-
from qtpy.QtWidgets import QApplication
|
91
|
-
|
92
|
-
app = QApplication(sys.argv)
|
93
|
-
w = DeviceComboBox(default_device="samx")
|
94
|
-
w.show()
|
95
|
-
sys.exit(app.exec_())
|
bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox/device_combobox_plugin.py
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Copyright (C) 2022 The Qt Company Ltd.
|
2
|
+
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
3
|
+
|
4
|
+
from qtpy.QtDesigner import QDesignerCustomWidgetInterface
|
5
|
+
from qtpy.QtGui import QIcon
|
6
|
+
|
7
|
+
from bec_widgets.widgets.device_inputs import DeviceComboBox
|
8
|
+
|
9
|
+
DOM_XML = """
|
10
|
+
<ui language='c++'>
|
11
|
+
<widget class='DeviceComboBox' name='device_combobox'>
|
12
|
+
</widget>
|
13
|
+
</ui>
|
14
|
+
"""
|
15
|
+
|
16
|
+
|
17
|
+
class DeviceComboBoxPlugin(QDesignerCustomWidgetInterface): # pragma: no cover
|
18
|
+
def __init__(self):
|
19
|
+
super().__init__()
|
20
|
+
self._form_editor = None
|
21
|
+
|
22
|
+
def createWidget(self, parent):
|
23
|
+
t = DeviceComboBox(parent)
|
24
|
+
return t
|
25
|
+
|
26
|
+
def domXml(self):
|
27
|
+
return DOM_XML
|
28
|
+
|
29
|
+
def group(self):
|
30
|
+
return ""
|
31
|
+
|
32
|
+
def icon(self):
|
33
|
+
return QIcon()
|
34
|
+
|
35
|
+
def includeFile(self):
|
36
|
+
return "device_combobox"
|
37
|
+
|
38
|
+
def initialize(self, form_editor):
|
39
|
+
self._form_editor = form_editor
|
40
|
+
|
41
|
+
def isContainer(self):
|
42
|
+
return False
|
43
|
+
|
44
|
+
def isInitialized(self):
|
45
|
+
return self._form_editor is not None
|
46
|
+
|
47
|
+
def name(self):
|
48
|
+
return "DeviceComboBox"
|
49
|
+
|
50
|
+
def toolTip(self):
|
51
|
+
return "Device ComboBox Example for BEC Widgets"
|
52
|
+
|
53
|
+
def whatsThis(self):
|
54
|
+
return self.toolTip()
|
bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox/launch_device_combobox.py
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
from bec_widgets.widgets.device_inputs import DeviceComboBox
|
2
|
+
|
3
|
+
if __name__ == "__main__": # pragma: no cover
|
4
|
+
import sys
|
5
|
+
|
6
|
+
from qtpy.QtWidgets import QApplication
|
7
|
+
|
8
|
+
app = QApplication(sys.argv)
|
9
|
+
w = DeviceComboBox()
|
10
|
+
w.show()
|
11
|
+
sys.exit(app.exec_())
|
bec_widgets-0.70.0/bec_widgets/widgets/device_inputs/device_combobox/register_device_combobox.py
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
def main(): # pragma: no cover
|
2
|
+
from qtpy import PYSIDE6
|
3
|
+
|
4
|
+
if not PYSIDE6:
|
5
|
+
print("PYSIDE6 is not available in the environment. Cannot patch designer.")
|
6
|
+
return
|
7
|
+
from PySide6.QtDesigner import QPyDesignerCustomWidgetCollection
|
8
|
+
|
9
|
+
from bec_widgets.widgets.device_inputs.device_combobox.device_combobox_plugin import (
|
10
|
+
DeviceComboBoxPlugin,
|
11
|
+
)
|
12
|
+
|
13
|
+
QPyDesignerCustomWidgetCollection.addCustomWidget(DeviceComboBoxPlugin())
|
14
|
+
|
15
|
+
|
16
|
+
if __name__ == "__main__": # pragma: no cover
|
17
|
+
main()
|
@@ -89,14 +89,3 @@ class DeviceLineEdit(DeviceInputBase, QLineEdit):
|
|
89
89
|
if device_obj is None:
|
90
90
|
raise ValueError(f"Device {device_name} is not found.")
|
91
91
|
return device_obj
|
92
|
-
|
93
|
-
|
94
|
-
if __name__ == "__main__": # pragma: no cover
|
95
|
-
import sys
|
96
|
-
|
97
|
-
from qtpy.QtWidgets import QApplication
|
98
|
-
|
99
|
-
app = QApplication(sys.argv)
|
100
|
-
w = DeviceLineEdit(default_device="samx")
|
101
|
-
w.show()
|
102
|
-
sys.exit(app.exec_())
|