jdxi_editor.ui.widgets.editor ============================= .. py:module:: jdxi_editor.ui.widgets.editor .. autoapi-nested-parse:: Editor Widgets This package provides common widgets for Editor Windows. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/jdxi_editor/ui/widgets/editor/base/index /autoapi/jdxi_editor/ui/widgets/editor/helper/index /autoapi/jdxi_editor/ui/widgets/editor/icon_type/index /autoapi/jdxi_editor/ui/widgets/editor/mode_button_group/index /autoapi/jdxi_editor/ui/widgets/editor/section_base/index /autoapi/jdxi_editor/ui/widgets/editor/simple_editor_helper/index Classes ------- .. autoapisummary:: jdxi_editor.ui.widgets.editor.EditorBaseWidget jdxi_editor.ui.widgets.editor.IconType jdxi_editor.ui.widgets.editor.SimpleEditorHelper Package Contents ---------------- .. py:class:: EditorBaseWidget(parent: Optional[jdxi_editor.ui.common.QWidget] = None, analog: bool = False) Bases: :py:obj:`jdxi_editor.ui.common.QWidget` Base widget that provides common layout structure for all Editor Windows. This widget standardizes the scrollable content area and tab structure used across all editors, reducing boilerplate and ensuring consistency. .. py:attribute:: analog :value: False .. py:attribute:: scroll_area :type: Optional[PySide6.QtWidgets.QScrollArea] :value: None .. py:attribute:: container :type: Optional[jdxi_editor.ui.common.QWidget] :value: None .. py:attribute:: container_layout :type: Optional[jdxi_editor.ui.common.QVBoxLayout] :value: None .. py:attribute:: tab_widget :type: Optional[PySide6.QtWidgets.QTabWidget] :value: None .. py:attribute:: main_layout :type: Optional[jdxi_editor.ui.common.QVBoxLayout] :value: None .. py:attribute:: centered_wrapper :type: Optional[jdxi_editor.ui.common.QWidget] :value: None .. py:method:: setup_main_layout() -> jdxi_editor.ui.common.QVBoxLayout Set up the main vertical layout for the widget. :return: The main layout .. py:method:: setup_scrollable_content(spacing: int = 5, margins: tuple[int, int, int, int] = (5, 5, 5, 5)) -> tuple[PySide6.QtWidgets.QScrollArea, jdxi_editor.ui.common.QVBoxLayout] Set up the standard scrollable content area. Creates a scroll area with a container widget and layout, following the common pattern used across all editors. The container is wrapped in an HBoxLayout with stretches on both sides for horizontal centering. :param spacing: Spacing for the container layout :param margins: Contents margins (left, top, right, bottom) for container layout :return: Tuple of (scroll_area, container, container_layout) .. py:method:: create_tab_widget() -> PySide6.QtWidgets.QTabWidget Create and style a tab widget for organizing content. :return: The created and styled QTabWidget .. py:method:: add_tab_section(title: str, widget: jdxi_editor.ui.common.QWidget) -> int Add a widget as a tab section. :param title: Tab title :param widget: Widget to add as tab content :return: Index of the added tab .. py:method:: add_content_section(widget: jdxi_editor.ui.common.QWidget) -> None Add a widget directly to the container layout (not as a tab). :param widget: Widget to add .. py:method:: add_stretch() -> None Add stretch to the container layout for spacing. Useful for vertical centering or pushing content to top. .. py:method:: insert_content_section(index: int, widget: jdxi_editor.ui.common.QWidget) -> None Insert a widget at a specific position in the container layout. :param index: Position to insert at :param widget: Widget to insert .. py:method:: add_centered_content(widget: jdxi_editor.ui.common.QWidget) -> None Add a widget centered horizontally in the container. This method wraps the widget in a horizontal layout with stretch on both sides, creating a centered appearance. Useful for editors that use centered layouts (like Arpeggiator and Effects editors). :param widget: Widget to add centered .. py:method:: get_scroll_area() -> Optional[PySide6.QtWidgets.QScrollArea] Get the scroll area widget. :return: The scroll area, or None if not yet created .. py:method:: get_container() -> Optional[jdxi_editor.ui.common.QWidget] Get the container widget. :return: The container widget, or None if not yet created .. py:method:: get_container_layout() -> Optional[jdxi_editor.ui.common.QVBoxLayout] Get the container layout. :return: The container layout, or None if not yet created .. py:method:: get_tab_widget() -> Optional[PySide6.QtWidgets.QTabWidget] Get the tab widget. :return: The tab widget, or None if not yet created .. py:class:: IconType Bases: :py:obj:`str`, :py:obj:`enum.Enum` Icon row types for sections .. py:attribute:: ADSR :value: 'adsr' .. py:attribute:: OSCILLATOR :value: 'oscillator' .. py:attribute:: GENERIC :value: 'generic' .. py:attribute:: NONE :value: 'none' .. py:class:: SimpleEditorHelper(editor: jdxi_editor.ui.widgets.editor.base.EditorBaseWidget, base_widget: jdxi_editor.ui.widgets.editor.base.EditorBaseWidget, title: str, image_folder: str, default_image: str, layout_mode: Literal['tabs', 'grid'] = 'tabs') Helper class for standardizing simple editor setup. Provides methods to setup title/image headers and tabbed content in a consistent way across Effects, Vocal Effects, and Arpeggio editors. .. py:attribute:: editor .. py:attribute:: base_widget .. py:attribute:: title_text .. py:attribute:: image_folder .. py:attribute:: default_image .. py:attribute:: layout_mode :value: 'tabs' .. py:attribute:: title_label :type: Optional[jdxi_editor.ui.widgets.digital.title.DigitalTitle] :value: None .. py:attribute:: image_label :type: Optional[PySide6.QtWidgets.QLabel] :value: None .. py:attribute:: tab_widget :type: Optional[PySide6.QtWidgets.QTabWidget] :value: None .. py:attribute:: grid_layout :type: Optional[PySide6.QtWidgets.QGridLayout] :value: None .. py:attribute:: rows_layout :type: Optional[jdxi_editor.ui.common.QVBoxLayout] :value: None .. py:method:: _setup_title_and_image() -> None Setup title label and image label .. py:method:: _setup_content_layout() -> None Setup centered content with title/image and tab or grid widget .. py:method:: get_grid_layout() -> Optional[PySide6.QtWidgets.QGridLayout] Get the grid layout when layout_mode is "grid". :return: QGridLayout or None if in tabs mode .. py:method:: get_tab_widget() -> Optional[PySide6.QtWidgets.QTabWidget] Get the tab widget for adding tabs (when layout_mode is "tabs"). :return: The QTabWidget instance or None if in grid mode .. py:method:: get_rows_layout() -> jdxi_editor.ui.common.QVBoxLayout Get the rows layout (contains title group and tab widget). :return: The QVBoxLayout instance .. py:method:: get_title_label() -> jdxi_editor.ui.widgets.digital.title.DigitalTitle Get the title label. :return: The DigitalTitle instance .. py:method:: get_image_label() -> PySide6.QtWidgets.QLabel Get the image label. :return: The QLabel instance for the image