bec_widgets.utils.side_panel ============================ .. py:module:: bec_widgets.utils.side_panel Classes ------- .. autoapisummary:: bec_widgets.utils.side_panel.ExampleApp bec_widgets.utils.side_panel.SidePanel Module Contents --------------- .. py:class:: ExampleApp Bases: :py:obj:`qtpy.QtWidgets.QMainWindow` .. py:method:: add_side_menus() .. py:attribute:: layout .. py:attribute:: plot .. py:attribute:: side_panel .. py:class:: SidePanel(parent=None, orientation: Literal['left', 'right', 'top', 'bottom'] = 'left', panel_max_width: int = 200, animation_duration: int = 200, animations_enabled: bool = True, show_toolbar: bool = True) Bases: :py:obj:`qtpy.QtWidgets.QWidget` Side panel widget that can be placed on the left, right, top, or bottom of the main widget. .. py:method:: _init_ui() Initialize the UI elements. .. py:method:: add_menu(widget: qtpy.QtWidgets.QWidget, action_id: str | None = None, icon_name: str | None = None, tooltip: str | None = None, title: str | None = None) -> int Add a menu to the side panel. :param widget: The widget to add to the panel. :type widget: QWidget :param action_id: The ID of the action. Optional if no toolbar action is needed. :type action_id: str | None :param icon_name: The name of the icon. Optional if no toolbar action is needed. :type icon_name: str | None :param tooltip: The tooltip for the action. Optional if no toolbar action is needed. :type tooltip: str | None :param title: The title of the panel. :type title: str | None :returns: The index of the added panel, which can be used with show_panel() and switch_to(). :rtype: int .. py:method:: animation_duration() Get the duration of the animation. .. py:method:: animations_enabled() Get the status of the animations. .. py:method:: hide_panel() Hide the side panel with animation. .. py:method:: panel_height() Get the panel height. .. py:method:: panel_max_width() Get the maximum width of the panel. .. py:method:: panel_width() Get the panel width. .. py:method:: show_panel(idx: int) Show the side panel with animation and switch to idx. .. py:method:: switch_to(idx: int) Switch to the specified index without animation. .. py:attribute:: current_action :type: Optional[qtpy.QtGui.QAction] :value: None .. py:attribute:: current_index :type: Optional[int] :value: None .. py:attribute:: panel_visible :value: False .. py:attribute:: switching_actions :value: False