jdxi_editor.ui.style.icons
Icon registry for JD-Xi Editor.
Provides centralized icon definitions and retrieval with fallback support.
Classes
Wave Icon |
|
Wave |
|
Centralized icon definitions and retrieval |
Module Contents
- class jdxi_editor.ui.style.icons.WaveSpec[source]
Wave
- Icon: WaveQTAIcon[source]
- class jdxi_editor.ui.style.icons.JDXiUIIconRegistry[source]
Centralized icon definitions and retrieval
- static get_icon(icon_name: str, color: str = None, size: int = None, fallback: str = None) PySide6.QtGui.QIcon[source]
Get icon with fallback support.
- Parameters:
icon_name – Icon identifier (e.g., “msc.run”)
color – Optional color string (e.g., “#FF0000” or JDXiStyle.FOREGROUND)
size – Optional size in pixels (defaults to JDXiStyle.ICON_SIZE)
fallback – Fallback icon if primary fails
- Returns:
QIcon or None if both fail
- static get_icon_from_resource(filename: str, size: int = None) PySide6.QtGui.QIcon | None[source]
Load an icon from the resources directory (e.g. cymbal-icon.png).
- Parameters:
filename – Basename of the file in resources/ (e.g. “cymbal-icon.png”)
size – Optional size to scale the pixmap (width and height)
- Returns:
QIcon or None if file not found or load fails
- static get_icon_pixmap(icon_name: str, color: str = None, size: int = None, fallback: str = None)[source]
Get icon as QPixmap with fallback support.
- Parameters:
icon_name – Icon identifier
color – Optional color string
size – Optional size in pixels (defaults to JDXiStyle.ICON_SIZE)
fallback – Fallback icon if primary fails
- Returns:
QPixmap or None if all fail
- static get_icon_safe(icon_name: str, color: str = None, size: int = None, fallback: str = None) PySide6.QtGui.QIcon[source]
Get icon with fallback support, returns empty QIcon if all fail.
This version always returns a QIcon object (may be empty).
- Parameters:
icon_name – Icon identifier
color – Optional color string
size – Optional size in pixels (unused, kept for compatibility)
fallback – Fallback icon if primary fails
- Returns:
QIcon (may be empty if all fail)
- static create_oscillator_icons_row() PySide6.QtWidgets.QHBoxLayout[source]
Create oscillator/waveform icons row for oscillator sections
- classmethod get_generated_icon(name: Literal['adsr', 'upsaw', 'square', 'pwsqu', 'triangle', 'sine', 'saw', 'spsaw', 'pcm', 'noise', 'lpf_filter', 'hpf_filter', 'bypass_filter', 'bpf_filter', 'filter_sine'])[source]
get generated icon