def __init__(self, com): super(Feedback, self).__init__() self.ui = Ui_FeedbackDialog() self.ui.setupUi(self) self.ui.sendButton.clicked.connect(self.send_mail) self.com = com self.com.mBox.connect(m_box_exec_success) self.com.mBoxEr.connect(m_box_exec) self.setWindowIcon(QIcon(get_file('animes.png')))
class Feedback(QDialog): """Send feedback""" def __init__(self, com): super(Feedback, self).__init__() self.ui = Ui_FeedbackDialog() self.ui.setupUi(self) self.ui.sendButton.clicked.connect(self.send_mail) self.com = com self.com.mBox.connect(m_box_exec_success) self.com.mBoxEr.connect(m_box_exec) self.setWindowIcon(QIcon(get_file('animes.png'))) def send_mail(self): """Calls EmailSender to send the feedback""" mail = EmailSender(self.ui.nameEdit.text(), 'Semard', self.ui.emailEdit.text(), self.ui.messageEdit.toPlainText(), self.com) mail.start() mail.join() self.close()