jdxi_editor.ui.widgets.editor
Editor Widgets
This package provides common widgets for Editor Windows.
Submodules
Classes
Base widget that provides common layout structure for all Editor Windows. |
|
Icon row types for sections |
|
Helper class for standardizing simple editor setup. |
Package Contents
- class jdxi_editor.ui.widgets.editor.EditorBaseWidget(parent: jdxi_editor.ui.common.QWidget | None = None, analog: bool = False)[source]
Bases:
jdxi_editor.ui.common.QWidgetBase 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.
- analog = False
- setup_main_layout() jdxi_editor.ui.common.QVBoxLayout[source]
Set up the main vertical layout for the widget.
- Returns:
The main layout
- 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][source]
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.
- Parameters:
spacing – Spacing for the container layout
margins – Contents margins (left, top, right, bottom) for container layout
- Returns:
Tuple of (scroll_area, container, container_layout)
- create_tab_widget() PySide6.QtWidgets.QTabWidget[source]
Create and style a tab widget for organizing content.
- Returns:
The created and styled QTabWidget
- add_tab_section(title: str, widget: jdxi_editor.ui.common.QWidget) int[source]
Add a widget as a tab section.
- Parameters:
title – Tab title
widget – Widget to add as tab content
- Returns:
Index of the added tab
- add_content_section(widget: jdxi_editor.ui.common.QWidget) None[source]
Add a widget directly to the container layout (not as a tab).
- Parameters:
widget – Widget to add
- add_stretch() None[source]
Add stretch to the container layout for spacing.
Useful for vertical centering or pushing content to top.
- insert_content_section(index: int, widget: jdxi_editor.ui.common.QWidget) None[source]
Insert a widget at a specific position in the container layout.
- Parameters:
index – Position to insert at
widget – Widget to insert
- add_centered_content(widget: jdxi_editor.ui.common.QWidget) None[source]
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).
- Parameters:
widget – Widget to add centered
- get_scroll_area() PySide6.QtWidgets.QScrollArea | None[source]
Get the scroll area widget.
- Returns:
The scroll area, or None if not yet created
- get_container() jdxi_editor.ui.common.QWidget | None[source]
Get the container widget.
- Returns:
The container widget, or None if not yet created
- class jdxi_editor.ui.widgets.editor.IconType[source]
-
Icon row types for sections
- ADSR = 'adsr'
- OSCILLATOR = 'oscillator'
- GENERIC = 'generic'
- NONE = 'none'
- class jdxi_editor.ui.widgets.editor.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')[source]
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.
- editor
- base_widget
- title_text
- image_folder
- default_image
- layout_mode = 'tabs'
- title_label: jdxi_editor.ui.widgets.digital.title.DigitalTitle | None = None
- _setup_content_layout() None[source]
Setup centered content with title/image and tab or grid widget
- get_grid_layout() PySide6.QtWidgets.QGridLayout | None[source]
Get the grid layout when layout_mode is “grid”.
- Returns:
QGridLayout or None if in tabs mode
- get_tab_widget() PySide6.QtWidgets.QTabWidget | None[source]
Get the tab widget for adding tabs (when layout_mode is “tabs”).
- Returns:
The QTabWidget instance or None if in grid mode
- get_rows_layout() jdxi_editor.ui.common.QVBoxLayout[source]
Get the rows layout (contains title group and tab widget).
- Returns:
The QVBoxLayout instance
- get_title_label() jdxi_editor.ui.widgets.digital.title.DigitalTitle[source]
Get the title label.
- Returns:
The DigitalTitle instance