Browse Source

update

windowsdev
weberni69795 2 years ago
parent
commit
838abd4625

+ 8
- 5
Masterarbeit/UIController.py View File

@@ -36,6 +36,8 @@ class Controller():
"freeSpelling": "WorkingPageVisuell",
"test": "WorkingPageVisuell"
}

self.model = None
self.view.mainloop()
def actionPerformed(self, action):
@@ -113,11 +115,12 @@ class Controller():
self.model.start()

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):

+ 21
- 11
Masterarbeit/UIViewTKinter.py View File

@@ -16,15 +16,16 @@ class View(Tk):
self.h = 800
self.w = 1000
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.layout = {
"background": "#00001E",
"backgroundBtn": "#1C86EE",
"fontColor": "#FFFFFF",
"backgroundBar": "#00002E",
"font": ('times', 25, 'bold'),
"fontSmall": ('times', 10, 'bold')
"font": ('Calibri', 25, 'bold'),
"fontSmall": ('Calibri', 10, 'bold'),
"fontInfo": ('Calibri', 25)
}

self.createTopFrame()
@@ -54,14 +55,16 @@ class View(Tk):

def onClosing(self):
print("closing")
self.controller.commandStop()
print("destroy")
self.destroy()
def createTopFrame(self):
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_propagate(0)
@@ -93,7 +96,7 @@ class View(Tk):
def createBottomFrame(self):
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.pack_propagate(0)
@@ -165,13 +168,20 @@ class WorkingPageVisuell(Frame):

Frame.__init__(self, parent, height=250, width=500, bg=self.layout["background"])
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()

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