bec_widgets.applications.views.developer_view.developer_widget#
Classes#
Lightweight dock area that exposes the core Qt ADS docking helpers without any |
Functions#
|
Convert Markdown with syntax highlighting to HTML (Qt-compatible). |
Module Contents#
- class DeveloperWidget(parent=None, **kwargs)#
Bases:
bec_widgets.widgets.containers.dock_area.basic_dock_area.DockAreaWidgetLightweight dock area that exposes the core Qt ADS docking helpers without any of the toolbar or workspace management features that the advanced variant offers.
Base class for all BEC widgets. This class should be used as a mixin class for all BEC widgets, e.g.:
>>> class MyWidget(BECWidget, QWidget): >>> def __init__(self, parent=None, client=None, config=None, gui_id=None): >>> super().__init__(parent=parent, client=client, config=config, gui_id=gui_id)
- Parameters:
client (BECClient, optional) – The BEC client.
config (ConnectionConfig, optional) – The connection configuration.
gui_id (str, optional) – The GUI ID.
theme_update (bool, optional) – Whether to subscribe to theme updates. Defaults to False. When set to True, the widget’s apply_theme method will be called when the theme changes.
- _initialize_layout() None#
Create the default dock arrangement for the developer workspace.
- _on_focused_editor_changed(tab_widget: bec_widgets.widgets.containers.qt_ads.CDockWidget)#
Disable the run / stop buttons if the focused editor is a macro file. :param tab_widget: The currently focused tab widget in the Monaco editor.
- _on_save_enabled_update(enabled: bool)#
- _open_new_file(file_name: str, scope: str)#
- _update_subscription(new_script_id: str | None, old_script_id: str | None)#
- cleanup()#
Clean up resources used by the developer widget.
- init_developer_toolbar()#
Initialize the developer toolbar with necessary actions and widgets.
- on_execute()#
Upload and run the currently focused script in the Monaco editor.
- on_save()#
Save the currently focused file in the Monaco editor.
- on_save_as()#
Save the currently focused file in the Monaco editor with a ‘Save As’ dialog.
- on_script_execution_info(content: dict, metadata: dict)#
Handle script execution info messages to update the editor highlights. :param content: The content of the message containing execution info. :type content: dict :param metadata: Additional metadata for the message. :type metadata: dict
- on_stop()#
Stop the execution of the currently running script
- on_vim_triggered()#
Toggle Vim mode in the Monaco editor.
- PLUGIN = False#
- RPC = False#
- console#
- property current_script_id#
Get the ID of the currently running script.
- explorer#
- monaco#
- plotting_ads#
- script_editor_tab = None#
- signature_help#
- terminal#
- toolbar#
- markdown_to_html(md_text: str) str#
Convert Markdown with syntax highlighting to HTML (Qt-compatible).