/[lohnrechner]/trunk/lohnrechner2006.py
ViewVC logotype

Diff of /trunk/lohnrechner2006.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 28 by wilde, Thu Jan 27 10:08:27 2005 UTC revision 29 by wilde, Mon Jan 31 08:55:33 2005 UTC
# Line 46  class Lohnrechner(LST2005.LStRechner2005 Line 46  class Lohnrechner(LST2005.LStRechner2005
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)
# Line 79  class Lohnrechner(LST2005.LStRechner2005 Line 86  class Lohnrechner(LST2005.LStRechner2005
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)
# Line 99  class Lohnrechner(LST2005.LStRechner2005 Line 107  class Lohnrechner(LST2005.LStRechner2005
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)
# Line 119  class Lohnrechner(LST2005.LStRechner2005 Line 124  class Lohnrechner(LST2005.LStRechner2005
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,
# Line 146  class Lohnrechner(LST2005.LStRechner2005 Line 150  class Lohnrechner(LST2005.LStRechner2005
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)
# Line 203  if __name__ == "__main__": Line 208  if __name__ == "__main__":
208      root = Tk()      root = Tk()
209      lr = Lohnrechner(root)      lr = Lohnrechner(root)
210      root.mainloop()      root.mainloop()
   

Legend:
Removed from v.28  
changed lines
  Added in v.29

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26