diff --git a/TinnitusAnalyse/.idea/TinnitusAnalyse.iml b/TinnitusAnalyse/.idea/TinnitusAnalyse.iml
index 85c7612..aa619a2 100644
--- a/TinnitusAnalyse/.idea/TinnitusAnalyse.iml
+++ b/TinnitusAnalyse/.idea/TinnitusAnalyse.iml
@@ -4,7 +4,7 @@
-
+
diff --git a/TinnitusAnalyse/.idea/dictionaries/Julian.xml b/TinnitusAnalyse/.idea/dictionaries/Julian.xml
index 6baa898..1023142 100644
--- a/TinnitusAnalyse/.idea/dictionaries/Julian.xml
+++ b/TinnitusAnalyse/.idea/dictionaries/Julian.xml
@@ -8,10 +8,12 @@
lautstärke
linkem
linkes
+ nachname
ohren
rauschen
rechtem
rechtes
+ vorname
\ No newline at end of file
diff --git a/TinnitusAnalyse/.idea/misc.xml b/TinnitusAnalyse/.idea/misc.xml
index d1b6639..6c993b7 100644
--- a/TinnitusAnalyse/.idea/misc.xml
+++ b/TinnitusAnalyse/.idea/misc.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/TinnitusAnalyse/.idea/workspace.xml b/TinnitusAnalyse/.idea/workspace.xml
index 5d76b25..052a5c0 100644
--- a/TinnitusAnalyse/.idea/workspace.xml
+++ b/TinnitusAnalyse/.idea/workspace.xml
@@ -1,7 +1,13 @@
-
+
+
+
+
+
+
+
@@ -9,21 +15,12 @@
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -32,8 +29,12 @@
-
-
+
+
+
+
+
+
@@ -46,6 +47,11 @@
+
+ ttk
+ mainFrame
+ linkerFrame
+
C:\Users\Julian\PycharmProjects\TinnitusAnalyse
@@ -60,7 +66,7 @@
-
+
@@ -71,24 +77,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -150,14 +144,15 @@
-
+
+
-
+
-
+
@@ -170,22 +165,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
-
-
+
+
diff --git a/TinnitusAnalyse/27130.png b/TinnitusAnalyse/27130.png
new file mode 100644
index 0000000..3ccf6fe
Binary files /dev/null and b/TinnitusAnalyse/27130.png differ
diff --git a/TinnitusAnalyse/Headphones Icon.ico b/TinnitusAnalyse/Headphones Icon.ico
new file mode 100644
index 0000000..5f3629a
Binary files /dev/null and b/TinnitusAnalyse/Headphones Icon.ico differ
diff --git a/TinnitusAnalyse/TinnitusAnalyse_GUI.py b/TinnitusAnalyse/TinnitusAnalyse_GUI.py
index 4fc874a..1d59999 100644
--- a/TinnitusAnalyse/TinnitusAnalyse_GUI.py
+++ b/TinnitusAnalyse/TinnitusAnalyse_GUI.py
@@ -1,12 +1,7 @@
from tkinter import * # all the classic tkinter stuff
-from tkinter import ttk # some newer additional widgets
-
-"""
-Background Funktionen
-"""
-
-
+from tkinter.ttk import Frame, Label, Button, LabelFrame, Combobox, Style, Checkbutton, Entry, Panedwindow
+# FUNKTIONEN DIE DURCH GUI KLICKS AUSGEFÜHRT WERDEN---------------------------------------------------------------------
def button_rauschen_minus_press():
print("Rauschen_Press_Plus pressed")
@@ -20,9 +15,11 @@ def button_rauschen_plus_press():
def button_linkes_ohr_press():
print("button linkes ohr pressed")
+
def button_beide_ohren_press():
print("button beide ohren pressed")
+
def button_rechtes_ohr_press():
print("button rechtes ohr pressed")
@@ -32,94 +29,108 @@ def scale_lautstärke_change(self):
lautstärke = float(scaleLautstärke.get())
print(lautstärke)
+def button_ohren_synchro():
+ auswahl = comboOhrenSynchro.get() # holt die momentane Auswahl aus combobox
+ print("Einstellungen von:" + auswahl + " auf alle anderen Ohren setzen")
+
+
+# AUFBAU DES ROOT WINDOWS ----------------------------------------------------------------------------------------------
root = Tk() # build the main window
root.title("Tinnitus Analyse")
+#root.iconbitmap('headphones.ico') #todo: fix icon
+root.minsize(width=800, height=600)
+root.resizable(True, True)
+#root.columnconfigure(0, weight=1)
+root.rowconfigure(0, weight=1) # extra platz nach unten wird automatisch von Frames eingenommen
-# MainFrame
-mainFrame = ttk.Frame(root, padding="3 3 30 30") # parent is root, padding is extra space at the edges
-mainFrame.grid(column=0, row=0, sticky=(N, W, E, S)) # the frame sticks to every side of the window when resized
-# Frequenz
-labelFrequenz = Label(mainFrame, text="Frequenz [kHz]")
-labelFrequenz.grid(row=0, column=0, sticky="w") # sticky = w(est) makes the text left aligned
+# DIE DREI OBEREN FRAMES AUFBAUEN---------------------------------------------------------------------------------------
+linkerFrame = LabelFrame(root, text="linkes Ohr", width=100, height = 100, padding="3 3 30 30") # parent is root, padding is extra space at the edges
+linkerFrame.grid(column=0, row=0, sticky=(N + W + E + S)) # the frame sticks to every side of the window when resized
-frequenz = StringVar() # Frequenz Variable [kHz]
-entryFrequenz = ttk.Entry(mainFrame, width=7, textvariable=frequenz) # create a field where u can enter text
-entryFrequenz.grid(column=1, row=0, sticky=(W, E)) # position the field
-# todo: Failproof the entry field to just numbers between a range!
-# todo: add function to entry change!
+mittlererFrame = LabelFrame(root, text="beide Ohren", width=100, height=100, padding="3 3 30 30")
+mittlererFrame.grid(column=1, row=0, sticky=(N + W + E + S))
-# Rauschen
-labelRauschen = Label(mainFrame, text="Rauschen [+/- kHz]", anchor="w")
-labelRauschen.grid(column=0, row=1, sticky="w")
+rechterFrame = LabelFrame(root, text="rechtes Ohr", width=100, height=100, padding="3 3 30 30")
+rechterFrame.grid(column=2, row=0, sticky=(N + W + E + S))
-buttonRauschenPlus = Button(mainFrame, text="+", command=button_rauschen_plus_press)
-buttonRauschenPlus.grid(column=1, row=1)
-buttonRauschenMinus = Button(mainFrame, text="-", command=button_rauschen_minus_press)
-buttonRauschenMinus.grid(column=2, row=1)
+# DIE DREI OBEREN FRAMES FÜLLEN-----------------------------------------------------------------------------------------
+labelFrames = [linkerFrame, mittlererFrame, rechterFrame]
+for aktLabelFrame in labelFrames:
+ # -------- FREQUENZ ------------------------
+ labelFrequenz = Label(aktLabelFrame, text="Frequenz [kHz]")
+ labelFrequenz.grid(row=0, column=0, sticky=W) # sticky = w(est) makes the text left aligned
+ frequenz = DoubleVar() # Frequenz Variable [kHz]
+ entryFrequenz = Entry(aktLabelFrame, textvariable=frequenz) # create a field where u can enter text
+ entryFrequenz.grid(column=1, row=0, sticky=W) # position the field
+ # todo: Failproof the entry field to just numbers between a range!
+ # todo: add function to entry change!
+ # ----------- RAUSCHEN --------------------
+ # todo: iwas überlegen ich brauch 3 verschiedene stringVars eigentlich für jedes Ohr!!!
+ # todo: add function to entry change
+ labelRauschen = Label(aktLabelFrame, text="Rauschen[+/- kHz]", anchor="w")
+ labelRauschen.grid(column=0, row=1, sticky=W)
+ buttonRauschenPlus = Button(aktLabelFrame, text="+", command=button_rauschen_plus_press)
+ buttonRauschenPlus.grid(column=2, row=1)
+ buttonRauschenMinus = Button(aktLabelFrame, text="-", command=button_rauschen_minus_press)
+ buttonRauschenMinus.grid(column=3, row=1)
+ rauschen = StringVar() # Rauschen Variable [+/- kHz]
+ entryRauschen = Entry(aktLabelFrame, textvariable=rauschen) # create a field where u can enter text
+ entryRauschen.grid(column=1, row=1, sticky=W) # position the field
+ # ------------------ LAUTSTÄRKE ------------------
+ labelLautstärke = Label(aktLabelFrame, text="Lautstärke [%]:")
+ labelLautstärke.grid(column=0, row=3, sticky="w")
+ scaleLautstärke = Scale(aktLabelFrame, from_=0, to=100, orient=HORIZONTAL, length=200, command=scale_lautstärke_change)
+ scaleLautstärke.grid(column=1, row=3, columnspan=2)
+ # ------------ KOMMENTAR ----------------
+ labelKommentar = Label(aktLabelFrame, text="weitere Kommentare:")
+ labelKommentar.grid(column=0, row=4)
+ kommentar = StringVar() # Rauschen Variable [+/- kHz]
+ entryKommentar = Entry(aktLabelFrame, textvariable=kommentar, width=33) # create a field where u can enter text
+ entryKommentar.grid(column=1, row=4, rowspan=4, columnspan=2, sticky=W)
-rauschen = StringVar() # Rauschen Variable [+/- kHz]
-entryRauschen = ttk.Entry(mainFrame, width=7, textvariable=rauschen) # create a field where u can enter text
-entryRauschen.grid(column=3, row=1) # position the field
-# todo: add function to entry change
-# Linkes / Rechts Ohr
-labelOhren = Label(mainFrame, text="Audioausgabe auf:")
-labelOhren.grid(column=0, row=2, sticky="w")
+# DEN UNTEREN FRAME BAUEN-----------------------------------------------------------------------------------------------
+untererFrame = LabelFrame(root, text="Generelles", width=300, height=100, padding="3 3 30 30")
+untererFrame.grid(column=0, row=1, columnspan=3, sticky=(N + W + E + S))
-buttonLinkesOhr = Button(mainFrame, text="linkem Ohr", command=button_linkes_ohr_press)
-buttonLinkesOhr.grid(column=1, row=2)
+# DEN UNTEREN FRAME FÜLLEN----------------------------------------------------------------------------------------------
+# ------------NAMENSEINGABE-------------
+labelNachname = Label(untererFrame, text="Nachname:")
+labelNachname.grid(column=0, row=0)
+nachname = StringVar()
+entryNachname = Entry(untererFrame, textvariable=nachname)
+entryNachname.grid(column=1, row=0)
+labelVorname = Label(untererFrame, text="Vorname:")
+labelVorname.grid(column=2, row=0)
+vorname = StringVar()
+entryVorname = Entry(untererFrame, textvariable=vorname)
+entryVorname.grid(column=3, row=0)
+# ------------------OHRENAUSWAHL-----------
+labelOhren = Label(untererFrame, text="Audioausgabe auf:")
+labelOhren.grid(column=0, row=1, sticky="w")
+buttonLinkesOhr = Button(untererFrame, text="linkem Ohr", command=button_linkes_ohr_press)
+buttonLinkesOhr.grid(column=1, row=1)
+buttonBeideOhren = Button(untererFrame, text="beiden Ohren", command=button_beide_ohren_press)
+buttonBeideOhren.grid(column=2, row=1)
+buttonRechtesOhr = Button(untererFrame, text="rechtem Ohr", command=button_rechtes_ohr_press)
+buttonRechtesOhr.grid(column=3, row=1)
+# --------- OHREN SYNCHRONISIEREN -----------------------
+labelOhrenSynchro = Label(untererFrame, text="Einstellungen von ")
+labelOhrenSynchro.grid(column=0, row=2)
+comboOhrenSynchro = Combobox(untererFrame, values=["Linkes Ohr", "Rechtes Ohr", "Beide Ohren"])
+comboOhrenSynchro.grid(column=1, row=2)
+labelOhrenSynchro2 = Label(untererFrame, text=" für alle anderen Ohren übernehmen")
+labelOhrenSynchro2.grid(column=2, row=2)
+buttonOhrenSynchro = Button(untererFrame, text="Bestätigen", command=button_ohren_synchro)
+buttonOhrenSynchro.grid(column=3, row=2)
-buttonBeideOhren = Button(mainFrame, text="beiden Ohren", command=button_beide_ohren_press)
-buttonBeideOhren.grid(column=2, row=2)
-
-buttonRechtesOhr = Button(mainFrame, text="rechtem Ohr", command=button_rechtes_ohr_press)
-buttonRechtesOhr.grid(column=3, row=2)
-
-# Lautstärke
-labelLautstärke = Label(mainFrame, text="Lautstärke [%]:")
-labelLautstärke.grid(column=0, row=3)
-
-scaleLautstärke = Scale(mainFrame, from_=0, to=100, orient=HORIZONTAL, length=200, command=scale_lautstärke_change)
-scaleLautstärke.grid(column=1, row=3, columnspan=2)
+# ----------- SPEICHERN --------------------
+buttonSpeichern = Button(untererFrame, text="SPEICHERN")
+buttonSpeichern.grid(column=6, row=3)
-# --------------EXAMPLE GUI----------------------
-# mainframe = ttk.Frame(root, padding="3 3 3 3") # parent is root, padding is extra space at the edges
-# mainframe.grid(column=0, row=0, sticky=(N, W, E, S)) # the frame sticks to every side of the window when resized
-# root.columnconfigure(0, weight=1) # if the main window is resized, the frame should expand to take up the extra space
-# root.rowconfigure(0, weight=1) # if the main window is resized, the frame should expand to take up the extra space
-#
-# frequency = StringVar() # a StringVar is meant to be used to edit Tkinter widget's texts
-# meters = StringVar()
-#
-# """
-# Frequency Entry
-# """
-# frequency_entry = ttk.Entry(mainframe, width=7, textvariable=frequency) # create a field where u can enter text
-# frequency_entry.grid(column=2, row=1, sticky=(W, E)) # position the field
-# ttk.Label(mainframe, text="Frequenz (kHz)").grid(column=1, row=1, sticky=W) # label the field
-#
-# """
-# Rauschen
-# """
-# frequency_entry = ttk.Entry(mainframe, width=7, textvariable=frequency) # create a field where u can enter text
-# frequency_entry.grid(column=2, row=1, sticky=(W, E)) # position the field
-# ttk.Label(mainframe, text="frequency (kHz)").grid(column=1, row=1, sticky=W) # label the field
-#
-# ttk.Label(mainframe, textvariable=meters).grid(column=2, row=2, sticky=(W, E))
-# ttk.Button(mainframe, text="Calculate", command=calculate).grid(column=3, row=3, sticky=W)
-#
-# #ttk.Label(mainframe, text="frequency (kHz)").grid(column=3, row=1, sticky=W)
-# ttk.Label(mainframe, text="is equivalent to").grid(column=1, row=2, sticky=E)
-# ttk.Label(mainframe, text="meters").grid(column=3, row=2, sticky=W)
-#
-# for child in mainframe.winfo_children(): child.grid_configure(padx=5, pady=5)
-#
-# frequency_entry.focus()
-# root.bind('', calculate)
-
-root.mainloop()
+root.mainloop()
\ No newline at end of file