from UIModell import * import UIViewTKinter as viewTkinter import UIViewPySide as viewPySide class Controller(): def __init__(self): self.model = Modell(self) self.view = viewTkinter.View(self) self.commands = { "copySpelling": self.commandoCopySpelling, "stop": self.commandStop, "freeSpelling": self.commandFreeSpelling, "test": self.test } self.view.mainloop() def actionPerformed(self, action): func = self.commands.get(action) if(func is not None): func() else: print("Kommado existiert nicht") def test(self): self.model.trainXDawn() def commandoCopySpelling(self): self.model.startCopySpelling() self.model.trainXDawn() self.model.rainClassifier() def commandFreeSpelling(self): self.model.freeSpelling() def commandStop(self): self.model.killProzess()