26 lines
876 B
Python
26 lines
876 B
Python
#!/usr/bin/python3
|
|
|
|
from PyQt6.QtCore import Qt
|
|
from PyQt6.QtGui import QIcon
|
|
from PyQt6.QtWidgets import QToolBar, QSlider, QStyle
|
|
|
|
|
|
class TrackControl(QToolBar):
|
|
def __init__(self, parent=None):
|
|
super().__init__(parent)
|
|
|
|
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaSkipBackward)
|
|
self.previous_button = self.addAction(icon, "Previous")
|
|
|
|
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackStart)
|
|
self.toggle_play_button = self.addAction(icon, "Play/Pause")
|
|
|
|
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaPlaybackStop)
|
|
self.stop_button = self.addAction(icon, "Stop")
|
|
|
|
icon = QIcon.fromTheme(QIcon.ThemeIcon.MediaSkipForward)
|
|
self.next_button = self.addAction(icon, "Next")
|
|
|
|
self.play_position_slider = QSlider(Qt.Orientation.Horizontal, self)
|
|
self.addWidget(self.play_position_slider)
|
|
|