bec_widgets.utils.collapsible_panel_manager =========================================== .. py:module:: bec_widgets.utils.collapsible_panel_manager Classes ------- .. autoapisummary:: bec_widgets.utils.collapsible_panel_manager.CollapsiblePanelManager bec_widgets.utils.collapsible_panel_manager.DimensionAnimator bec_widgets.utils.collapsible_panel_manager.MainWindow Module Contents --------------- .. py:class:: CollapsiblePanelManager(layout_manager: bec_widgets.widgets.containers.layout_manager.layout_manager.LayoutManagerWidget, reference_widget: qtpy.QtWidgets.QWidget, parent=None) Bases: :py:obj:`qtpy.QtCore.QObject` Manager class to handle collapsible panels from a main widget using LayoutManagerWidget. .. py:method:: _after_hide_reset(panel_widget: qtpy.QtWidgets.QWidget, direction: Literal['left', 'right', 'top', 'bottom']) Reset the panel widget after hiding it in ensure_max mode. :param panel_widget: The panel widget to reset. :type panel_widget: QWidget :param direction: The direction of the panel. :type direction: Literal["left", "right", "top", "bottom"] .. py:method:: add_panel(direction: Literal['left', 'right', 'top', 'bottom'], panel_widget: qtpy.QtWidgets.QWidget, target_size: int | None = None, duration: int = 300) Add a panel widget to the layout manager. :param direction: Direction of the panel. :type direction: Literal["left", "right", "top", "bottom"] :param panel_widget: The panel widget to add. :type panel_widget: QWidget :param target_size: The target size of the panel. Defaults to None. :type target_size: int, optional :param duration: The duration of the animation in milliseconds. Defaults to 300. :type duration: int .. py:method:: toggle_panel(direction: Literal['left', 'right', 'top', 'bottom'], target_size: int | None = None, duration: int | None = None, easing_curve: qtpy.QtCore.QEasingCurve = QEasingCurve.InOutQuad, ensure_max: bool = False, scale: float | None = None, animation: bool = True) Toggle the specified panel. :param direction: Direction of the panel to toggle. :type direction: Literal["left", "right", "top", "bottom"] :param target_size: Override target size for this toggle. :type target_size: int, optional :param duration: Override the animation duration. :type duration: int, optional :param easing_curve: Animation easing curve. :type easing_curve: QEasingCurve :param ensure_max: If True, animate as a fixed-size panel. :type ensure_max: bool :param scale: If provided, calculate target_size from main widget size. :type scale: float, optional :param animation: If False, no animation is performed; panel instantly toggles. :type animation: bool .. py:attribute:: animations .. py:attribute:: direction_settings .. py:attribute:: layout_manager .. py:attribute:: panels .. py:attribute:: reference_widget .. py:class:: DimensionAnimator(panel_widget: qtpy.QtWidgets.QWidget, direction: str) Bases: :py:obj:`qtpy.QtCore.QObject` Helper class to animate the size of a panel widget. .. py:method:: panel_height() Returns the current height of the panel widget. .. py:method:: panel_width() Returns the current width of the panel widget. .. py:attribute:: direction .. py:attribute:: panel_widget .. py:class:: MainWindow Bases: :py:obj:`qtpy.QtWidgets.QMainWindow` .. py:attribute:: bottom_panel .. py:attribute:: btn_bottom .. py:attribute:: btn_left .. py:attribute:: btn_right .. py:attribute:: btn_top .. py:attribute:: layout_manager .. py:attribute:: left_panel .. py:attribute:: main_plot .. py:attribute:: panel_manager .. py:attribute:: right_panel .. py:attribute:: top_panel