Ejemplo n.º 1
0
 def play_current_note(self):
     """Set up the training or play current chord."""
     if 'Set up' in self.btn_play_chord.text():
         from set_up_training import Ui_Form
         Dialog = Ui_Form()
         Dialog.exec_()
         if Dialog.get_prepared() != 0:
             print Dialog.get_prepared()
             self.btn_play_chord.setText("Play again")
             events.set_up_training(Dialog.get_prepared())
     else:
         events.play_note(events.current_note)
Ejemplo n.º 2
0
        Form.setWindowTitle(_translate("Form", "Ear Training", None))
        self.btn_play_chord.setText(
            _translate("Form", "Set up training", None))
        self.btn_shortcuts.setText(_translate("Form", "Shorcuts", None))

    def play_current_note(self):
        """Set up the training or play current chord."""
        if 'Set up' in self.btn_play_chord.text():
            from set_up_training import Ui_Form
            Dialog = Ui_Form()
            Dialog.exec_()
            if Dialog.get_prepared() != 0:
                print Dialog.get_prepared()
                self.btn_play_chord.setText("Play again")
                events.set_up_training(Dialog.get_prepared())
        else:
            events.play_note(events.current_note)

    def open_shortcuts(self):
        """Open Shorcuts Form."""
        from shortcuts import Ui_frm_shortcuts
        Dialog = Ui_frm_shortcuts()
        Dialog.exec_()

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    Form = Ui_Form()
    Form.setupUi(Form)
    Form.show()
    sys.exit(app.exec_())