Browse Source

update

windowsdev
weberni69795 3 years ago
parent
commit
838abd4625

+ 8
- 5
Masterarbeit/UIController.py View File

"freeSpelling": "WorkingPageVisuell", "freeSpelling": "WorkingPageVisuell",
"test": "WorkingPageVisuell" "test": "WorkingPageVisuell"
} }

self.model = None
self.view.mainloop() self.view.mainloop()
def actionPerformed(self, action): def actionPerformed(self, action):
self.model.start() self.model.start()


def commandStop(self): def commandStop(self):
self.setInfos("Action: STOP-Command")
self.model.stop()
self.model.join()
self.model.killProzess()
self.mode = None
if(self.model is not None):
self.setInfos("Action: STOP-Command")
self.model.stop()
self.model.join()
self.model.killProzess()
self.mode = None




def stop(self, next=None): def stop(self, next=None):

+ 21
- 11
Masterarbeit/UIViewTKinter.py View File

self.h = 800 self.h = 800
self.w = 1000 self.w = 1000
self.geometry('{}x{}'.format(self.w,self.h)) self.geometry('{}x{}'.format(self.w,self.h))
self.faktor = [(0.0675),(0.6825), (0.25)]
self.faktor = [(0.0675),(0.7325), (0.2)]
#self.resizable(height=False, width= False) #self.resizable(height=False, width= False)
self.layout = { self.layout = {
"background": "#00001E", "background": "#00001E",
"backgroundBtn": "#1C86EE", "backgroundBtn": "#1C86EE",
"fontColor": "#FFFFFF", "fontColor": "#FFFFFF",
"backgroundBar": "#00002E", "backgroundBar": "#00002E",
"font": ('times', 25, 'bold'),
"fontSmall": ('times', 10, 'bold')
"font": ('Calibri', 25, 'bold'),
"fontSmall": ('Calibri', 10, 'bold'),
"fontInfo": ('Calibri', 25)
} }


self.createTopFrame() self.createTopFrame()


def onClosing(self): def onClosing(self):
print("closing") print("closing")
self.controller.commandStop()
print("destroy")
self.destroy() self.destroy()
def createTopFrame(self): def createTopFrame(self):
self.topFrame = Frame(self, bg=self.layout["backgroundBar"], height=50, width=500) self.topFrame = Frame(self, bg=self.layout["backgroundBar"], height=50, width=500)
self.changeBtn = Button(self.topFrame, text="Wechsel zu taktilen BCI", command=lambda: self.controller.actionPerformed("wechsel"), height=3, width = 25, font=self.layout["fontSmall"], bg=self.layout["backgroundBtn"], fg=self.layout["fontColor"])
self.saveBtn = Button(self.topFrame, text="Änderung des Speicherorts", command=lambda: self.controller.actionPerformed("speicherort"), height=3, width = 25, font=self.layout["fontSmall"], bg=self.layout["backgroundBtn"], fg=self.layout["fontColor"])
self.toplabel = Label(self.topFrame, text="visuelles Buchstabieren", font=self.layout["font"], bg=self.layout["backgroundBar"], fg=self.layout["fontColor"])
self.changeBtn = Button(self.topFrame, text="Wechsel zu taktilen BCI", command=lambda: self.controller.actionPerformed("wechsel"), height=2, width = 25, font=self.layout["fontSmall"], bg=self.layout["backgroundBtn"], fg=self.layout["fontColor"])
self.saveBtn = Button(self.topFrame, text="Änderung des Speicherorts", command=lambda: self.controller.actionPerformed("speicherort"), height=2, width = 25, font=self.layout["fontSmall"], bg=self.layout["backgroundBtn"], fg=self.layout["fontColor"])
self.toplabel = Label(self.topFrame, text="visuelles Buchstabieren", font=self.layout["font"], bg=self.layout["backgroundBar"], fg=self.layout["fontColor"], )


self.topFrame.grid(column=0, row=0) self.topFrame.grid(column=0, row=0)
self.topFrame.grid_propagate(0) self.topFrame.grid_propagate(0)
def createBottomFrame(self): def createBottomFrame(self):
self.bottomFrame = Frame(self, bg=self.layout["backgroundBar"], height=100, width=500) self.bottomFrame = Frame(self, bg=self.layout["backgroundBar"], height=100, width=500)
self.bottomlabel = Label(self.bottomFrame, text="Hier stehen Infos\nGanz viele", justify='left', font=self.layout["font"], bg=self.layout["backgroundBar"], fg=self.layout["fontColor"])
self.bottomlabel = Label(self.bottomFrame, text="Hier stehen Infos\nGanz viele", justify='left', font=self.layout["fontInfo"], bg=self.layout["backgroundBar"], fg=self.layout["fontColor"])


self.bottomFrame.grid(column=0, row=2) self.bottomFrame.grid(column=0, row=2)
self.bottomFrame.pack_propagate(0) self.bottomFrame.pack_propagate(0)


Frame.__init__(self, parent, height=250, width=500, bg=self.layout["background"]) Frame.__init__(self, parent, height=250, width=500, bg=self.layout["background"])
self.controller = controller self.controller = controller
self.grid_propagate(0)
self.pack_propagate(0)


self.windowFrame = Frame(self, height=200, width=500, bg=self.layout["background"])
self.windowFrame.grid(column=0, row=0)


self.columnconfigure(0, weight=1) # Set weight to row and
self.rowconfigure(0, weight=1) # column where the widget is
self.buttonFrame = Frame(self, height=200, width=500, bg=self.layout["background"])
self.buttonFrame.grid(column=0, row=1)
self.buttonFrame.columnconfigure(0, weight=1) # Set weight to row and
self.buttonFrame.rowconfigure(0, weight=1) # column where the widget is


stopBtn = Button(self, text="stop", command=lambda: self.controller.actionPerformed("stop"), height=4, width = 15, font=self.layout["font"], bg=self.layout["backgroundBtn"], fg=self.layout["fontColor"])
stopBtn = Button(self.buttonFrame, text="stop", command=lambda: self.controller.actionPerformed("stop"), height=1, width = 15, font=self.layout["font"], bg=self.layout["backgroundBtn"], fg=self.layout["fontColor"])
stopBtn.grid() stopBtn.grid()


def adjustSize(self, height, width): def adjustSize(self, height, width):
pass
self.windowFrame.configure(height=(height*4)/5, width= width)
self.buttonFrame.configure(height=(height)/10, width= width)

BIN
Masterarbeit/__pycache__/UIController.cpython-39.pyc View File


BIN
Masterarbeit/__pycache__/UIViewTKinter.cpython-39.pyc View File


Loading…
Cancel
Save