class Button_Play_MM(): """ Concrete class of the "Play" button from the Main Menu Audio Widget. """ def __init__(self): """ Constructor of the Button_Play_MM Class. """ self.audioController = AudioController() self.audioObject = self.audioController.getAudioObject() def onClick(self, isLongClick = False): """ OnClick method. Describes the behaviour of the button when is pressed. In this case, it resumes the reproduction. """ if (self.audioObject.getStatus() != AudioStatus.NOFILE): self.audioController.resume() def createButton(self, sizeX, sizeY): """ This method is a factory of a PicButton object. Creates a button with the described size. :param sizeX: X size of the button. :param sizeY: Y size of the button. :return: Created button object. """ button = PicButton(QPixmap("themes/default/img/play_pam.png"), QPixmap("themes/default/img/play_pam_pressed.png"), sizeX, sizeY, "", self.onClick) return button
def onClick(self, isLongClick=False): """ OnClick method. Describes the behaviour of the button when is pressed. In this case, it resumes the reproduction. """ audioController = AudioController() audioController.resume()