Rename methods

This commit is contained in:
Wiktor Zykubek 2023-06-18 16:34:19 +02:00
parent 0b63621532
commit e01edba7f3
No known key found for this signature in database
GPG Key ID: 0DAA9DC01449FCA2

View File

@ -34,9 +34,9 @@ class MainWindow(QMainWindow):
self.__audio = QAudioOutput() self.__audio = QAudioOutput()
self.__player.setAudioOutput(self.__audio) self.__player.setAudioOutput(self.__audio)
self.setVolume(DEFAULT_VOLUME) self.setVolume(DEFAULT_VOLUME)
self.printGroups() self.printRadioGroups()
self.ui.radioGroupsListWidget.itemClicked.connect(self.printStations) self.ui.radioGroupsListWidget.itemClicked.connect(self.printRadioStations)
self.ui.stationsListWidget.itemClicked.connect(self.playRadio) self.ui.stationsListWidget.itemClicked.connect(self.playRadio)
self.ui.playbackToolButton.clicked.connect(self.togglePlayer) self.ui.playbackToolButton.clicked.connect(self.togglePlayer)
self.ui.volumeHorizontalSlider.valueChanged.connect(self.setVolume) self.ui.volumeHorizontalSlider.valueChanged.connect(self.setVolume)
@ -56,13 +56,13 @@ class MainWindow(QMainWindow):
else: else:
return json.loads(resp.text) return json.loads(resp.text)
def printGroups(self) -> None: def printRadioGroups(self) -> None:
"""Print groups (categories) in radioGroupsListWidget.""" """Print groups (categories) in radioGroupsListWidget."""
self.ui.radioGroupsListWidget.addItems( self.ui.radioGroupsListWidget.addItems(
[e["name"] for e in self.__stations["groups"]] [e["name"] for e in self.__stations["groups"]]
) )
def printStations(self) -> None: def printRadioStations(self) -> None:
"""Print stations (channels) in stationsListWidget.""" """Print stations (channels) in stationsListWidget."""
group = self.ui.radioGroupsListWidget.selectedItems()[0].text() group = self.ui.radioGroupsListWidget.selectedItems()[0].text()
group_id = None group_id = None