atomiq.frontend.atomiq_dashboard ================================ .. py:module:: atomiq.frontend.atomiq_dashboard Attributes ---------- .. autoapisummary:: atomiq.frontend.atomiq_dashboard._OldArgumentEditor atomiq.frontend.atomiq_dashboard._OldExperimentDock atomiq.frontend.atomiq_dashboard._OldScanEntry atomiq.frontend.atomiq_dashboard._OldNoScan atomiq.frontend.atomiq_dashboard.cls_name Classes ------- .. autoapisummary:: atomiq.frontend.atomiq_dashboard._ArgumentEditor atomiq.frontend.atomiq_dashboard.ScanOrderList atomiq.frontend.atomiq_dashboard.SearchBar atomiq.frontend.atomiq_dashboard._ExperimentDock atomiq.frontend.atomiq_dashboard._NoScan atomiq.frontend.atomiq_dashboard.ScanEntry Functions --------- .. autoapisummary:: atomiq.frontend.atomiq_dashboard.main Module Contents --------------- .. py:data:: _OldArgumentEditor .. py:data:: _OldExperimentDock .. py:data:: _OldScanEntry .. py:data:: _OldNoScan .. py:data:: cls_name :value: '' .. py:class:: _ArgumentEditor(manager, dock, expurl) Bases: :py:obj:`_OldArgumentEditor` Patches the ARTIQ argument editor table (`artiq.dashboard.experiments._ArgumentEditor`) to add alternating row colors, reduce the mouse wheel scroll speed and implement an argument search. .. py:attribute:: argument_entry_reset .. py:method:: search(keyword) .. py:method:: _recompute_argument(name) :async: .. py:attribute:: manager .. py:attribute:: expurl .. py:attribute:: dock .. py:method:: reset_entry(key) .. py:method:: apply_color(color) .. py:method:: about_to_submit() .. py:method:: about_to_close() .. py:attribute:: quickStyleClicked .. py:attribute:: _groups .. py:attribute:: _arg_to_widgets .. py:attribute:: _arguments .. py:attribute:: gradient .. py:attribute:: bottom_item .. py:method:: set_background_color(color=None) .. py:method:: set_gradient_color(color=None) .. py:method:: set_group_color(color=None) .. py:method:: set_argument(key, argument) .. py:method:: _get_group(key) .. py:method:: _disable_other_scans(current_key) .. py:method:: update_argument(key, argument) .. py:method:: save_state() .. py:method:: restore_state(state) .. py:class:: ScanOrderList(sort = True, *args, **kwargs) Bases: :py:obj:`PyQt6.QtCore.QObject` Track scannable arguments and make a user-configurable sorting widget. .. py:attribute:: scan_order_changed .. py:attribute:: sort_changed .. py:attribute:: _scan_order :type: list[str] :value: [] .. py:attribute:: _sort :type: bool :value: True .. py:attribute:: _updating_from_state :value: False .. py:attribute:: _list_widget :type: PyQt6.QtWidgets.QWidget | None :value: None .. py:attribute:: _sort_checkbox :type: PyQt6.QtWidgets.QWidget | None :value: None .. py:attribute:: _widget :type: PyQt6.QtWidgets.QWidget | None .. py:method:: get_scan_order() .. py:method:: set_scan_order(value) .. py:attribute:: scan_order .. py:method:: get_sort() .. py:method:: set_sort(value) .. py:attribute:: sort .. py:method:: get_priority(item) Return the scan priority for an argument name. :param item: The argument name to get the priority for. :returns: The scan priority for the argument name. Items present in scan_order get their index (0..N-1). All others get priority 100. .. py:method:: add(item) Add an item to the scan order if it's not already present. :param item: The item to add to the scan order. .. py:method:: remove(item) Remove an item from the scan order. :param item: The item to remove from the scan order. .. py:method:: sort_scan_order() Sort the scan order in-place (lexicographically). .. py:method:: _render_widget_from_scan_order() Renders the widget from the current scan order. This method updates the list widget with items from the scan order. .. py:method:: _update_scan_order_from_widget(*_args) Updates the scan order from the widget. This method is triggered when the list widget content changes. It updates the scan_order attribute with the current order of items in the widget. .. py:method:: _apply_sort_mode() Applies the sort mode to the list widget by enabling or disabling drag/drop functionality. If sorting is active, this method disables drag and drop operations and greys out the widget. If sorting is inactive, this method enables internal move drag and drop functionality. .. py:method:: _on_sort_changed(value) .. py:method:: _build_widget() Builds the search bar widget. This method creates a search bar (QLineEdit) and wraps it in a QGroupBox. .. py:property:: widget :type: PyQt6.QtWidgets.QWidget Return the scan order widget. .. py:class:: SearchBar(sort = True, *args, **kwargs) Bases: :py:obj:`PyQt6.QtCore.QObject` Argument search bar. .. py:attribute:: _searchbar_widget :type: PyQt6.QtWidgets.QWidget | None :value: None .. py:attribute:: _widget :type: PyQt6.QtWidgets.QWidget | None .. py:method:: _build_widget() Builds the search bar widget. This method creates a search bar (QLineEdit) and wraps it in a QGroupBox. .. py:property:: widget :type: PyQt6.QtWidgets.QWidget Return the scan order widget. .. py:property:: text_changed_signal :type: PyQt6.QtCore.pyqtSignal Return the scan order widget. .. py:class:: _ExperimentDock(*args, **kwargs) Bases: :py:obj:`_OldExperimentDock` Patches the experiment dock (`artiq.dashboard._ExperimentDock`) to add a search bar and a list to choose the scan order. .. py:attribute:: argument_entry_reset .. py:attribute:: search_bar .. py:attribute:: scan_order_editor .. py:method:: _connect_search_bar() .. py:method:: _connect_scan_entries() Connects all ScanEntry widgets to the scan entry changed handler. This method re-imports the scan entry module to avoid monkey patching issues, then finds all ScanEntry widgets in the UI and connects their scan_entry_changed signals to the on_scan_entry_changed handler method. .. py:method:: on_scan_entry_changed() Handle changes to scan entries in the submission arguments. The method checks each argument in the submission and determines whether it should be included in the scan order based on: - Whether the argument type is "Scannable" - Whether the NoScan repetition count is greater than 1 - Whether the current argument type is not "NoScan" .. py:method:: _connect_and_reload_scan_entries() .. py:method:: childEvent(event) Handle child events for the dashboard. This method overrides the default childEvent handling to connect scan entry changed signals to the on_scan_entry_changed handler when new ScanEntry objects are added to the dashboard. :param event: The child event that was triggered .. py:method:: _apply_scan_priorities_from_model() Apply scan_priority for all arguments of this experiment based on ScanOrderList.scan_order. In-order items get scan_priority = 0..N-1. All others get scan_priority = 100. .. py:method:: _recompute_arguments_task(*args, **kwargs) :async: .. py:attribute:: sigClosed .. py:attribute:: layout .. py:attribute:: manager .. py:attribute:: expurl .. py:attribute:: argeditor .. py:attribute:: pipeline_name .. py:attribute:: priority .. py:attribute:: flush .. py:attribute:: devarg_override .. py:attribute:: log_level .. py:attribute:: hdf5_load_directory .. py:method:: submit_clicked() .. py:method:: reqterm_clicked() .. py:method:: _recompute_arguments_clicked() .. py:method:: contextMenuEvent(event) .. py:method:: select_color(key) .. py:method:: apply_title_bar_color() .. py:method:: apply_window_color() .. py:method:: modify_palette(colors) .. py:method:: reset_colors() .. py:method:: _recompute_sched_options_task() :async: .. py:method:: _load_hdf5_clicked() .. py:method:: _load_hdf5_task() :async: .. py:method:: closeEvent(event) .. py:method:: save_state() .. py:method:: restore_state(state) .. py:class:: _NoScan(*args, **kwargs) Bases: :py:obj:`_OldNoScan` Patches the no scan dialog (`artiq.gui.entries._NoScan`) to take up less space in the arguments table. .. py:attribute:: value .. py:attribute:: repetitions .. py:attribute:: layout .. py:method:: addWidget(item, row=0, col=0, rowspan=1, colspan=1) .. py:class:: ScanEntry(*args, **kwargs) Bases: :py:obj:`_OldScanEntry` Patches the scan entry argument widget (`artiq.gui.entries.ScanEntry`) to add automatic resizing when switching between the scan modes. .. py:attribute:: scan_entry_changed .. py:method:: _scan_type_toggled() .. py:method:: _notify_scan_entry_changed() .. py:method:: _delegate_size_change() .. py:method:: changeEvent(e) .. py:attribute:: argument .. py:attribute:: stack .. py:attribute:: widgets .. py:attribute:: radiobuttons .. py:method:: disable() .. py:method:: state_to_value(state) :staticmethod: .. py:method:: default_state(procdesc) :staticmethod: .. py:attribute:: layout .. py:method:: addWidget(item, row=0, col=0, rowspan=1, colspan=1) .. py:function:: main()