46 |
("Schleswig-Holstein", 9), |
("Schleswig-Holstein", 9), |
47 |
("Th�ringen", 9)] |
("Th�ringen", 9)] |
48 |
|
|
|
root.title("Lohnrechner 2005 - v%s" % _release_version) |
|
|
root.resizable(NO, NO) |
|
49 |
self.root = root |
self.root = root |
50 |
|
|
51 |
|
self.root.title("Lohnrechner 2005 - v%s" % _release_version) |
52 |
|
|
53 |
|
self.SetupUI() |
54 |
|
self.ResetInput() |
55 |
|
|
56 |
|
def SetupUI(self): |
57 |
|
self.root.resizable(NO, NO) |
58 |
|
|
59 |
frame = Frame(root) |
frame = Frame(root) |
60 |
frame.grid(padx=10, pady=10) |
frame.grid(padx=10, pady=10) |
61 |
|
|
62 |
|
# Steuern Ein/Ausgabe |
63 |
Label(frame, text="Lohn:").grid(row=0, sticky=E) |
Label(frame, text="Lohn:").grid(row=0, sticky=E) |
64 |
self.lohn = Entry(frame) |
self.lohn = Entry(frame) |
65 |
self.lohn.bind("<Return>", self.NewInput) |
self.lohn.bind("<Return>", self.NewInput) |
86 |
self.kirche = IntVar() |
self.kirche = IntVar() |
87 |
kircheradio = Checkbutton(frame, onvalue=1, offvalue=0, |
kircheradio = Checkbutton(frame, onvalue=1, offvalue=0, |
88 |
command=self.NewInput, |
command=self.NewInput, |
89 |
variable=self.kirche).grid(row=2, column=1, sticky=W) |
variable=self.kirche).grid(row=2, column=1, |
90 |
|
sticky=W) |
91 |
|
|
92 |
Label(frame, text="Kinderfreibetrag:").grid(row=3, sticky=E) |
Label(frame, text="Kinderfreibetrag:").grid(row=3, sticky=E) |
93 |
self.kfb = Entry(frame) |
self.kfb = Entry(frame) |
107 |
scrollbar.config(command=self.landbox.yview) |
scrollbar.config(command=self.landbox.yview) |
108 |
scrollbar.pack(side=LEFT, fill=BOTH, expand=1) |
scrollbar.pack(side=LEFT, fill=BOTH, expand=1) |
109 |
landframe.grid(row=4, column=1, sticky=W) |
landframe.grid(row=4, column=1, sticky=W) |
|
self.UpdateLand() |
|
110 |
|
|
|
self.ResetInput() |
|
|
|
|
111 |
Label(frame, text="Lohnsteuer:").grid(row=0, column=2, sticky=E) |
Label(frame, text="Lohnsteuer:").grid(row=0, column=2, sticky=E) |
112 |
self.lst = Entry(frame) |
self.lst = Entry(frame) |
113 |
self.lst.grid(row=0, column=3, sticky=W) |
self.lst.grid(row=0, column=3, sticky=W) |
124 |
self.netto = Entry(frame) |
self.netto = Entry(frame) |
125 |
self.netto.grid(row=3, column=3, sticky=W) |
self.netto.grid(row=3, column=3, sticky=W) |
126 |
|
|
127 |
|
# Allgemeine UI Elemente |
128 |
buttons = Frame(frame) |
buttons = Frame(frame) |
129 |
buttons.grid(row=4, column=2, columnspan=2) |
buttons.grid(row=4, column=2, columnspan=2) |
130 |
Button(buttons, text="Quit", command=root.quit).pack(side=LEFT) |
Button(buttons, text="Quit", command=root.quit).pack(side=LEFT) |
131 |
Button(buttons, text="Info", command=self.Info).pack(side=LEFT) |
Button(buttons, text="Info", command=self.Info).pack(side=LEFT) |
132 |
Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) |
Button(buttons, text="Berechnen", command=self.CalcOutput).pack(side=LEFT) |
|
|
|
|
self.NewInput() |
|
133 |
|
|
134 |
def NewInput(self, event=0): |
def NewInput(self, event=0): |
135 |
# Es ist m�glich alle Eintr�ge in der Listbox zu deselektieren, |
# Es ist m�glich alle Eintr�ge in der Listbox zu deselektieren, |
150 |
def ResetInput(self): |
def ResetInput(self): |
151 |
self.ResetInputLohn() |
self.ResetInputLohn() |
152 |
self.ResetInputKfb() |
self.ResetInputKfb() |
153 |
|
self.NewLandSel() |
154 |
|
|
155 |
def ResetInputLohn(self): |
def ResetInputLohn(self): |
156 |
self.lohn.delete(0, END) |
self.lohn.delete(0, END) |
208 |
root = Tk() |
root = Tk() |
209 |
lr = Lohnrechner(root) |
lr = Lohnrechner(root) |
210 |
root.mainloop() |
root.mainloop() |
|
|
|