Added library template.

This commit is contained in:
The Wobbler 2024-12-22 20:52:49 +01:00
parent 8811ba7ab4
commit 2f0c01601d
3 changed files with 44 additions and 3 deletions

20
wobuzz/ui/library.py Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/python3
from PyQt6.QtWidgets import QToolBox, QLabel
class Library(QToolBox):
def __init__(self, parent=None):
super().__init__(parent)
label = QLabel()
self.addItem(label, "Playlists")
label = QLabel()
self.addItem(label, "Genres")
label = QLabel()
self.addItem(label, "Albums")
label = QLabel()
self.addItem(label, "Artists")
label = QLabel()
self.addItem(label, "Tracks")

13
wobuzz/ui/library_dock.py Normal file
View file

@ -0,0 +1,13 @@
#!/usr/bin/python3
from PyQt6.QtWidgets import QDockWidget, QHBoxLayout
from.library import Library
class LibraryDock(QDockWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.library = Library(self)
self.setWidget(self.library)

View file

@ -1,7 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/python3
from PyQt6.QtWidgets import QWidget, QGridLayout from PyQt6.QtWidgets import QWidget, QFrame, QGridLayout
from ui.track_control import TrackControl from .track_control import TrackControl
from .library_dock import LibraryDock
class MainContainer(QWidget): class MainContainer(QWidget):
@ -9,9 +10,16 @@ class MainContainer(QWidget):
super().__init__(parent) super().__init__(parent)
self.layout = QGridLayout() self.layout = QGridLayout()
self.setLayout(self.layout)
self.track_control = TrackControl(self) self.track_control = TrackControl(self)
self.layout.addWidget(self.track_control) self.layout.addWidget(self.track_control)
self.setLayout(self.layout) self.track_control_separator_line = QFrame()
self.track_control_separator_line.setFrameShape(QFrame.Shape.HLine)
self.track_control_separator_line.setFrameShadow(QFrame.Shadow.Sunken)
self.layout.addWidget(self.track_control_separator_line)
self.library_dock = LibraryDock(self)
self.layout.addWidget(self.library_dock)