jdxi_editor.ui.editors.program.user_programs_widget

User Programs Widget Module

This module defines the UserProgramsWidget class, a widget for managing user programs in a sortable, searchable table with database integration.

Classes:
UserProgramsWidget(QWidget)

A widget for displaying and managing user programs.

Classes

UserProgramsWidget

Widget for managing user programs in a database table.

Module Contents

class jdxi_editor.ui.editors.program.user_programs_widget.UserProgramsWidget(midi_helper: jdxi_editor.midi.io.helper.MidiIOHelper | None = None, channel: int = 16, parent: jdxi_editor.ui.common.QWidget | None = None, on_program_loaded: Callable[[jdxi_editor.midi.program.program.JDXiProgram], None] | None = None)[source]

Bases: jdxi_editor.ui.common.QWidget

Widget for managing user programs in a database table.

program_loaded[source]
midi_helper = None[source]
channel = 16[source]
on_program_loaded_callback = None[source]
user_programs_table: PySide6.QtWidgets.QTableWidget | None = None[source]
save_user_programs_button: PySide6.QtWidgets.QPushButton | None = None[source]
setup_ui() None[source]

Setup the user programs UI.

_add_round_action_button(icon_enum: Any, text: str, slot: Any, layout: PySide6.QtWidgets.QHBoxLayout, *, name: str | None = None, checkable: bool = False) PySide6.QtWidgets.QPushButton[source]

Create a round button with icon + text label (same style as Transport).

_get_table_style() str[source]

Get custom styling for tables with rounded corners and charcoal embossed cells.

Returns:

str CSS style string

populate_table(search_text: str = '') None[source]

Populate the user programs table from SQLite database.

Parameters:

search_text – Optional search text to filter programs

save_changes() None[source]

Save changes made to the user programs table (e.g., genre edits) to the database.

_on_user_program_selected(item: PySide6.QtWidgets.QTableWidgetItem) None[source]

Handle double-click on a program in the user programs table. Loads the program via MIDI Program Change.

Parameters:

item – The table item that was double-clicked

_on_user_program_selection_changed() None[source]

Handle selection change in the user programs table. Loads the program via MIDI Program Change when a row is selected.

_play_user_program(index) None[source]

Callback for Play button delegate - loads and plays the program.

Parameters:

index – QModelIndex from the delegate

_load_program_from_table(row: int) None[source]

Load a program from the table and send MIDI Program Change.

Parameters:

row – Row index in the table