Commit eb3daf3b authored by Matheus Müller's avatar Matheus Müller
Browse files

Melhorias no codigo e estrutura

parent fff04e14
...@@ -52,7 +52,7 @@ def elem_select(i, button): ...@@ -52,7 +52,7 @@ def elem_select(i, button):
############################################################################## ##############################################################################
# Init # Init
def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar): def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, Labelframe):
############################################################################## ##############################################################################
# Element addition # Element addition
...@@ -266,6 +266,15 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar): ...@@ -266,6 +266,15 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar):
RL['state']='disabled' RL['state']='disabled'
OFlabentries[9]['state']='disabled' OFlabentries[9]['state']='disabled'
OFlabentries[10]['state']='disabled' OFlabentries[10]['state']='disabled'
for i in arange(6, 12):
Labentrys[i]['state']='disabled'
but['state']='disabled'
butrmv['state']='disabled'
butPTE['state']='disabled'
BUpdate['state']='disabled'
for n in arange(0, len(Ebuttons)):
Ebuttons[n]['state'] = 'disabled'
elif str(distvar.get()) == 'drawing': elif str(distvar.get()) == 'drawing':
BLayer['state']='disabled' BLayer['state']='disabled'
BUpdateD['state']='normal' BUpdateD['state']='normal'
...@@ -273,6 +282,14 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar): ...@@ -273,6 +282,14 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar):
RL['state']='normal' RL['state']='normal'
OFlabentries[9]['state']='normal' OFlabentries[9]['state']='normal'
OFlabentries[10]['state']='normal' OFlabentries[10]['state']='normal'
for i in arange(6, 12):
Labentrys[i]['state']='normal'
but['state']='normal'
butrmv['state']='normal'
butPTE['state']='normal'
BUpdate['state']='normal'
for n in arange(0, len(Ebuttons)):
Ebuttons[n]['state'] = 'normal'
def call_layers(): def call_layers():
layers() layers()
...@@ -294,6 +311,33 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar): ...@@ -294,6 +311,33 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar):
RDra = tk.Radiobutton(Frames[7], text="Drawing", command=lambda i=int(Econtrol) :changestate(), variable=distvar, value='drawing') RDra = tk.Radiobutton(Frames[7], text="Drawing", command=lambda i=int(Econtrol) :changestate(), variable=distvar, value='drawing')
RDra.pack(side='right') RDra.pack(side='right')
##############################################################################
# Experiment variations
def changemode():
if str(modevar.get()) == 'IONS':
for n in range(len(Ebuttons)):
Ebuttons[n]['state']='normal'
but['state'] = 'normal'
butrmv['state'] = 'normal'
butPTE['state'] = 'normal'
RLay['state'] = 'normal'
elif str(modevar.get()) == 'RRNA':
RDra.invoke()
elem_select(0,Ebuttons)
but['state'] = 'disabled'
butrmv['state'] = 'disabled'
RLay['state'] = 'disabled'
for n in arange(1, len(Ebuttons)):
Ebuttons[n]['state'] = 'disabled'
Rions = tk.Radiobutton(Labelframe, text="Ion Scattering", command=lambda i=i :changemode(), variable=modevar, value='IONS', width=18)
Rions.pack()
Rrrna = tk.Radiobutton(Labelframe, text="Resonant RNA", command=lambda i=i :changemode(), variable=modevar, value='RRNA', width=18)
Rrrna.pack()
Rions.select()
############################################################################## ##############################################################################
# Init # Init
......
No preview for this file type
0 0 0 0
1.22580645161 0.308673469388 1.22580645161 0.308673469388
1.38461538462 0.188775510204 1.38461538462 0.188775510204
2.03970223325 0.234693877551
2.55583126551 0.135204081633
4.20347394541 0.614540816327
6.04962779156 0.454081632653
8.23325062035 0.262755102041
9.20595533499 0.108214285714
9.841191067 0.0463775510204
10.0 0 10.0 0
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.308673469388
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.188775510204
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.234693877551
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.135204081633
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.614540816327
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653
0.454081632653