jdxi_editor.ui.widgets.editor.helper ==================================== .. py:module:: jdxi_editor.ui.widgets.editor.helper .. autoapi-nested-parse:: Helpers to create HBox and VBoxes. Layout and group helpers are provided by picoui.helpers; this module adds JD-Xi-specific helpers (filter buttons, icons, ADSR styling, etc.) and re-exports picoui helpers under the names used by the rest of the app. Attributes ---------- .. autoapisummary:: jdxi_editor.ui.widgets.editor.helper.create_group jdxi_editor.ui.widgets.editor.helper.create_group_with_layout jdxi_editor.ui.widgets.editor.helper.create_group_from_definition Functions --------- .. autoapisummary:: jdxi_editor.ui.widgets.editor.helper.create_filter_button jdxi_editor.ui.widgets.editor.helper.create_icon_from_qta jdxi_editor.ui.widgets.editor.helper.create_button_with_icon jdxi_editor.ui.widgets.editor.helper.create_widget_with_layout jdxi_editor.ui.widgets.editor.helper.create_icon_and_label jdxi_editor.ui.widgets.editor.helper.create_checkbox_from_spec jdxi_editor.ui.widgets.editor.helper.create_layout_with_inner_layout_and_widgets jdxi_editor.ui.widgets.editor.helper.create_icon_label_with_pixmap jdxi_editor.ui.widgets.editor.helper.create_icons_layout jdxi_editor.ui.widgets.editor.helper.create_adsr_icon_pixmap jdxi_editor.ui.widgets.editor.helper.create_adsr_icon_label jdxi_editor.ui.widgets.editor.helper.create_adsr_icon jdxi_editor.ui.widgets.editor.helper.create_centered_adsr_icon_layout jdxi_editor.ui.widgets.editor.helper.create_group_adsr_with_hlayout jdxi_editor.ui.widgets.editor.helper.create_envelope_group jdxi_editor.ui.widgets.editor.helper.create_button_with_tooltip jdxi_editor.ui.widgets.editor.helper.create_scrolled_area_with_layout jdxi_editor.ui.widgets.editor.helper.create_form_layout_with_widgets jdxi_editor.ui.widgets.editor.helper.create_group_and_grid_layout jdxi_editor.ui.widgets.editor.helper.create_group_with_form_layout jdxi_editor.ui.widgets.editor.helper.create_centered_layout_with_child jdxi_editor.ui.widgets.editor.helper.create_scroll_area jdxi_editor.ui.widgets.editor.helper.create_scroll_container jdxi_editor.ui.widgets.editor.helper.create_layout_with_child jdxi_editor.ui.widgets.editor.helper.transfer_layout_items jdxi_editor.ui.widgets.editor.helper.create_group_with_widgets_in_hlayout jdxi_editor.ui.widgets.editor.helper.create_group_with_widgets jdxi_editor.ui.widgets.editor.helper.set_button_style_and_dimensions jdxi_editor.ui.widgets.editor.helper.create_icon_from_name jdxi_editor.ui.widgets.editor.helper.add_sublayout_to_layout jdxi_editor.ui.widgets.editor.helper.add_widgets_to_layout jdxi_editor.ui.widgets.editor.helper.create_centered_layout jdxi_editor.ui.widgets.editor.helper.create_centered_layout_with_widgets Module Contents --------------- .. py:data:: create_group .. py:data:: create_group_with_layout .. py:data:: create_group_from_definition .. py:function:: create_filter_button(icon_type: str, mode: jdxi_editor.midi.data.digital.filter.DigitalFilterMode) -> PySide6.QtWidgets.QPushButton create filter button .. py:function:: create_icon_from_qta(icon_name: str) -> PySide6.QtGui.QIcon create qta icon .. py:function:: create_button_with_icon(icon_name: str, icon: PySide6.QtGui.QIcon, button_dimensions: jdxi_editor.ui.style.dimensions.Dimensions, icon_dimensions: jdxi_editor.ui.style.dimensions.Dimensions) create button with icon .. py:function:: create_widget_with_layout(inner_layout: PySide6.QtWidgets.QHBoxLayout) -> jdxi_editor.ui.common.QWidget create widget with given inner layout .. py:function:: create_icon_and_label(label: str = '', icon: str = '') -> tuple[PySide6.QtWidgets.QHBoxLayout, PySide6.QtWidgets.QLabel] create icon and label .. py:function:: create_checkbox_from_spec(spec: picoui.specs.widgets.CheckBoxSpec) -> PySide6.QtWidgets.QCheckBox create checkbox from spec .. py:function:: create_layout_with_inner_layout_and_widgets(inner_layout: PySide6.QtWidgets.QHBoxLayout | jdxi_editor.ui.common.QVBoxLayout | None = None, widgets: list = None, vertical: bool = True) -> jdxi_editor.ui.common.QVBoxLayout create vbox layout with horizontal layout and widgets below it .. py:function:: create_icon_label_with_pixmap(pixmap: PySide6.QtGui.QPixmap) -> PySide6.QtWidgets.QLabel create icon label .. py:function:: create_icons_layout() -> PySide6.QtWidgets.QHBoxLayout Create icons layout .. py:function:: create_adsr_icon_pixmap() -> PySide6.QtGui.QPixmap Generate the ADSR waveform pixmap .. py:function:: create_adsr_icon_label() -> PySide6.QtWidgets.QLabel Generate the ADSR waveform icon (centered) .. py:function:: create_adsr_icon() -> PySide6.QtGui.QIcon create adsr icon .. py:function:: create_centered_adsr_icon_layout() -> PySide6.QtWidgets.QHBoxLayout Create a centered ADSR icon layout (for consistent centering in envelope groups) .. py:function:: create_group_adsr_with_hlayout(name: str, hlayout: PySide6.QtWidgets.QHBoxLayout, analog: bool = False) -> PySide6.QtWidgets.QGroupBox create ADSR Group with an hlayout (harmonized for Digital and Analog) .. py:function:: create_envelope_group(name: str = 'Envelope', icon_layout: PySide6.QtWidgets.QHBoxLayout = None, adsr_widget: jdxi_editor.ui.common.QWidget = None, analog: bool = False) -> PySide6.QtWidgets.QGroupBox Create a standardized envelope group with icon and ADSR widget. The icon is centered horizontally using stretches in an HBoxLayout, and the ADSR widget is placed below it in a VBoxLayout. :param name: Group box title (default: "Envelope") :param icon_layout: Optional icon layout (if None, creates centered ADSR icon) :param adsr_widget: ADSR widget to add below the icon :param analog: Whether to apply analog styling :return: QGroupBox with envelope layout .. py:function:: create_button_with_tooltip(tooltip: str) -> PySide6.QtWidgets.QPushButton create button with tooltip .. py:function:: create_scrolled_area_with_layout() -> tuple[PySide6.QtWidgets.QScrollArea, jdxi_editor.ui.common.QVBoxLayout] create scrolled area with layout .. py:function:: create_form_layout_with_widgets(widgets: list) -> PySide6.QtWidgets.QFormLayout create form layout with widgets .. py:function:: create_group_and_grid_layout(group_name: str) -> tuple[PySide6.QtWidgets.QGroupBox, PySide6.QtWidgets.QGridLayout] A named group box with grid layout .. py:function:: create_group_with_form_layout(widgets: list, label: str = None) -> tuple[PySide6.QtWidgets.QGroupBox, PySide6.QtWidgets.QFormLayout] Create a group box with form layout and add widgets in one call. This combines create_group_with_layout() and create_form_layout_with_widgets() for convenience when creating form-based groups. :param widgets: List of widgets to add as rows to the form layout :param label: Optional name for the group box :return: Tuple of (QGroupBox, QFormLayout) .. py:function:: create_centered_layout_with_child(layout: PySide6.QtWidgets.QFormLayout | PySide6.QtWidgets.QHBoxLayout) -> PySide6.QtWidgets.QHBoxLayout create centered layout with a child layout .. py:function:: create_scroll_area() -> PySide6.QtWidgets.QScrollArea setup scroll area .. py:function:: create_scroll_container() -> tuple[jdxi_editor.ui.common.QWidget, jdxi_editor.ui.common.QVBoxLayout] create scroll container .. py:function:: create_layout_with_child(widget_layout: PySide6.QtWidgets.QHBoxLayout) -> PySide6.QtWidgets.QHBoxLayout create layout with child layout .. py:function:: transfer_layout_items(source_layout: PySide6.QtWidgets.QLayout, target_layout: PySide6.QtWidgets.QHBoxLayout | jdxi_editor.ui.common.QVBoxLayout) -> None Transfer all items from a source layout to a target layout. This is useful for avoiding "already has a parent" errors when reusing layouts. All widgets, spacer items, and nested layouts are transferred to the target. :param source_layout: The layout to take items from :param target_layout: The layout to add items to .. py:function:: create_group_with_widgets_in_hlayout(label: str, widgets: list, vertical: bool = False) -> PySide6.QtWidgets.QGroupBox create group with widgets .. py:function:: create_group_with_widgets(label: str, widgets: list, vertical: bool = False) -> PySide6.QtWidgets.QGroupBox create group with widgets .. py:function:: set_button_style_and_dimensions(btn: PySide6.QtWidgets.QPushButton, dimensions: jdxi_editor.ui.style.dimensions.Dimensions, *, analog: bool = False) Set button styling (Theme API) and dimensions. Used by Filter mode buttons etc. .. py:function:: create_icon_from_name(icon_name: str) -> Any .. py:function:: add_sublayout_to_layout(layout: jdxi_editor.ui.common.QVBoxLayout | PySide6.QtWidgets.QHBoxLayout, sub_layouts: list[PySide6.QtWidgets.QHBoxLayout | jdxi_editor.ui.common.QVBoxLayout]) .. py:function:: add_widgets_to_layout(layout: jdxi_editor.ui.common.QVBoxLayout | PySide6.QtWidgets.QHBoxLayout, widgets: list[jdxi_editor.ui.common.QWidget | None]) .. py:function:: create_centered_layout(spacing: int = None) -> PySide6.QtWidgets.QHBoxLayout Hlayout to squish the slides of the widget together .. py:function:: create_centered_layout_with_widgets(widgets: list[jdxi_editor.ui.common.QWidget]) -> PySide6.QtWidgets.QHBoxLayout create centered layout with stretch either side to squish in widgets