jdxi_editor.ui.editors.playlist.table

Playlist Widget Module

This module defines the PlaylistWidget class, a widget for managing playlists in a sortable, editable table with database integration.

Classes:
PlaylistWidget(QWidget)

A widget for displaying and managing playlists.

Classes

PlaylistTable

Widget for managing playlists in a database table.

Module Contents

class jdxi_editor.ui.editors.playlist.table.PlaylistTable(parent: jdxi_editor.ui.common.QWidget | None = None, on_playlist_changed: Callable[[], None] | None = None)[source]

Bases: jdxi_editor.ui.common.QWidget

Widget for managing playlists in a database table.

playlist_changed[source]
on_playlist_changed_callback = None[source]
create_playlist_button: PySide6.QtWidgets.QPushButton | None = None[source]
delete_playlist_button: PySide6.QtWidgets.QPushButton | None = None[source]
refresh_playlist_button: PySide6.QtWidgets.QPushButton | None = None[source]
playlist_table: PySide6.QtWidgets.QTableWidget | None = None[source]
setup_ui() None[source]

Setup the playlist 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() None[source]

Populate the playlist table from SQLite database.

create_new_playlist() None[source]

Create a new playlist.

refresh_playlists() None[source]

Refresh the playlist table.

delete_selected_playlist() None[source]

Delete the selected playlist.

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

Handle changes to playlist name or description.

Parameters:

item – The table item that was changed

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

Handle double-click on a playlist. Could open playlist editor or show playlist programs.

Parameters:

item – The table item that was double-clicked

_notify_playlist_changed(playlist_id: int | None = None) None[source]

Notify that a playlist has changed (created, deleted, or updated).

Parameters:

playlist_id – Optional playlist ID that was deleted (for clearing editor table)