ALICE 1.3  1.3.14
Developer documentation
my_test_functions.py
Go to the documentation of this file.
1 
3  global ColorScreenStatus, FrameBG, SWRev, RevDate, ColorWindow
4  global COLORtext, COLORcanvas, COLORtrigger, COLORsignalband, COLORframes, COLORgrid
5  global COLORtrace1, COLORtraceR1, COLORtrace2, COLORtraceR2, COLORtrace3, COLORtraceR3, COLORtrace4, COLORtraceR4
6  global COLORtrace5, COLORtraceR5, COLORtrace6, COLORtraceR6, COLORtrace7, COLORtraceR7
7 
8  if ColorScreenStatus.get() == 0:
9  ColorScreenStatus.set(1)
10  #
11  ColorWindow = Toplevel()
12  ColorWindow.title("Color Selector " + SWRev + RevDate)
13  ColorWindow.resizable(FALSE,FALSE)
14  ColorWindow.protocol("WM_DELETE_WINDOW", DestroyColorScreen)
15  ColorWindow.configure(background=FrameBG)
16 
17  Colorframe1 = LabelFrame(ColorWindow, text="Trace Colors", style="A10T5.TLabelframe") #"A10T5.TLabelframe")
18  #Mframe2 = LabelFrame(MathWindow, text="Math Trace", style="A10T5.TLabelframe")
19  #Mframe3 = LabelFrame(MathWindow, text="X Math Trace", style="A10T6.TLabelframe")
20  #Mframe4 = LabelFrame(MathWindow, text="Y Math Trace", style="A10T7.TLabelframe")
21  # Color value = "#rrggbb" rr=red gg=green bb=blue, Hexadecimal values 00 - ff
22  trace1bt = Button(Colorframe1, text="COLORtrace1", command=SetColorT1 ) #COLORtrace1 = "#00ff00" # 100% green
23  trace1bt.grid(row=0, column=0, columnspan=1, sticky=W)
24  #
25  trace2bt = Button(Colorframe1, text="COLORtrace2", command=SetColorT2 ) #COLORtrace2 = "#ff8000" # 100% orange
26  trace2bt.grid(row=0, column=1, columnspan=1, sticky=W)
27  #
28  trace3bt = Button(Colorframe1, text="COLORtrace3", command=SetColorT3 ) #COLORtrace3 = "#00ffff" # 100% cyan
29  trace3bt.grid(row=0, column=2, columnspan=1, sticky=W)
30  #
31  trace4bt = Button(Colorframe1, text="COLORtrace4", command=SetColorT4 ) #COLORtrace4 = "#ffff00" # 100% yellow
32  trace4bt.grid(row=0, column=3, columnspan=1, sticky=W)
33  #
34  trace5bt = Button(Colorframe1, text="COLORtrace5", command=SetColorT5 ) #COLORtrace5 = "#ff00ff" # 100% magenta
35  trace5bt.grid(row=1, column=0, columnspan=1, sticky=W)
36  #
37  trace6bt = Button(Colorframe1, text="COLORtrace6", command=SetColorT6 ) #COLORtrace6 = "#C80000" # 90% red
38  trace6bt.grid(row=1, column=1, columnspan=1, sticky=W)
39  #
40  trace7bt = Button(Colorframe1, text="COLORtrace7", command=SetColorT7 ) #COLORtrace7 = "#8080ff" # 100% purple
41  trace7bt.grid(row=1, column=2, columnspan=1, sticky=W)
42  #
43  tracer1bt = Button(Colorframe1, text="COLORtraceR1", command=SetColorTR1 ) #COLORtraceR1 = "#008000" # 50% green
44  tracer1bt.grid(row=2, column=0, columnspan=1, sticky=W)
45  #
46  tracer2rbt = Button(Colorframe1, text="COLORtraceR2", command=SetColorTR2 ) #COLORtraceR2 = "#905000" # 50% orange
47  tracer2rbt.grid(row=2, column=1, columnspan=1, sticky=W)
48  #
49  tracer3bt = Button(Colorframe1, text="COLORtraceR3", command=SetColorTR3 ) #COLORtraceR3 = "#008080" # 50% cyan
50  tracer3bt.grid(row=2, column=2, columnspan=1, sticky=W)
51  #
52  tracer4bt = Button(Colorframe1, text="COLORtraceR4", command=SetColorTR4 ) #COLORtraceR4 = "#808000" # 50% yellow
53  tracer4bt.grid(row=2, column=3, columnspan=1, sticky=W)
54  #
55  tracer5bt = Button(Colorframe1, text="COLORtraceR5", command=SetColorTR5 ) #COLORtraceR5 = "#800080" # 50% magenta
56  tracer5bt.grid(row=3, column=0, columnspan=1, sticky=W)
57  #
58  tracer6bt = Button(Colorframe1, text="COLORtraceR6", command=SetColorTR6 ) #COLORtraceR6 = "#800000" # 80% red
59  tracer6bt.grid(row=3, column=1, columnspan=1, sticky=W)
60  #
61  tracer7bt = Button(Colorframe1, text="COLORtraceR7", command=SetColorTR7 ) #COLORtraceR7 = "#4040a0" # 80% purple
62  tracer7bt.grid(row=3, column=2, columnspan=1, sticky=W)
63  #
64  gridbt = Button(Colorframe1, text="COLORgrid", command=SetColorGrid ) #COLORgrid = "#808080" # 50% Gray
65  gridbt.grid(row=4, column=0, columnspan=1, sticky=W)
66  zerolinebt = Button(Colorframe1, text="COLORzeroline", command=SetColorZLine ) #COLORzeroline = "#0000ff" # 100% blue
67  zerolinebt.grid(row=4, column=1, columnspan=1, sticky=W)
68  ctriggerbt = Button(Colorframe1, text="COLORtrigger", command=SetColorTrig ) #COLORtrigger = "#ff0000" # 100% red
69  ctriggerbt.grid(row=4, column=2, columnspan=1, sticky=W)
70  #COLORsignalband = "#ff0000" # 100% red
71  ctextbt = Button(Colorframe1, text="COLORtext", command=SetColorText ) #COLORtext = "#ffffff" # 100% white
72  ctextbt.grid(row=4, column=3, columnspan=1, sticky=W)
73  #COLORframes = "#000080"
74  #COLORcanvas = "#000000" # 100% black
75 
77  global ColorScreenStatus, ColorWindow
78 
79  if ColorScreenStatus.get() == 1:
80  ColorScreenStatus.set(0)
81  ColorWindow.destroy()
82 
83 def SetColorT1():
84  global COLORtrace1
85 
86  tempwindow = Tk()
87  tempwindow.state("withdrawn")
88  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrace1")
89  tempwindow.destroy()
90  COLORtrace1 = str(hexcolor) # hexcolor
91  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
92 
93 def SetColorT2():
94  global COLORtrace2
95 
96  tempwindow = Tk()
97  tempwindow.state("withdrawn")
98  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrace2")
99  tempwindow.destroy()
100  COLORtrace2 = str(hexcolor) # hexcolor
101  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
102 
104  global COLORtrace3
105 
106  tempwindow = Tk()
107  tempwindow.state("withdrawn")
108  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrace3")
109  tempwindow.destroy()
110  COLORtrace3 = str(hexcolor) # hexcolor
111  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
112 
114  global COLORtrace4
115 
116  tempwindow = Tk()
117  tempwindow.state("withdrawn")
118  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrace4")
119  tempwindow.destroy()
120  COLORtrace4 = str(hexcolor) # hexcolor
121  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
122 
124  global COLORtrace5
125 
126  tempwindow = Tk()
127  tempwindow.state("withdrawn")
128  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrace5")
129  tempwindow.destroy()
130  COLORtrace5 = str(hexcolor) # hexcolor
131  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
132 
134  global COLORtrace6
135 
136  tempwindow = Tk()
137  tempwindow.state("withdrawn")
138  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrace6")
139  tempwindow.destroy()
140  COLORtrace6 = str(hexcolor) # hexcolor
141  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
142 
144  global COLORtrace7
145 
146  tempwindow = Tk()
147  tempwindow.state("withdrawn")
148  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrace7")
149  tempwindow.destroy()
150  COLORtrace7 = str(hexcolor) # hexcolor
151  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
152 
154  global COLORtraceR1
155 
156  tempwindow = Tk()
157  tempwindow.state("withdrawn")
158  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtraceR1")
159  tempwindow.destroy()
160  COLORtraceR1 = str(hexcolor) # hexcolor
161  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
162 
164  global COLORtraceR2
165 
166  tempwindow = Tk()
167  tempwindow.state("withdrawn")
168  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtraceR2")
169  tempwindow.destroy()
170  COLORtraceR2 = str(hexcolor) # hexcolor
171  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
172 
174  global COLORtraceR3
175 
176  tempwindow = Tk()
177  tempwindow.state("withdrawn")
178  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtraceR3")
179  tempwindow.destroy()
180  COLORtraceR3 = str(hexcolor) # hexcolor
181  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
182 
184  global COLORtraceR4
185 
186  tempwindow = Tk()
187  tempwindow.state("withdrawn")
188  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtraceR4")
189  tempwindow.destroy()
190  COLORtraceR4 = str(hexcolor) # hexcolor
191  # print("you picked the following color for "+str(text)+": "+str(hexcolor))
192 
194  global COLORtraceR5
195 
196  tempwindow = Tk()
197  tempwindow.state("withdrawn")
198  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtraceR5")
199  tempwindow.destroy()
200  COLORtraceR5 = str(hexcolor) # hexcolor
201  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
202 
204  global COLORtraceR6
205 
206  tempwindow = Tk()
207  tempwindow.state("withdrawn")
208  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtraceR6")
209  tempwindow.destroy()
210  COLORtraceR6 = str(hexcolor) # hexcolor
211  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
212 
214  global COLORtraceR7
215 
216  tempwindow = Tk()
217  tempwindow.state("withdrawn")
218  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtraceR7")
219  tempwindow.destroy()
220  COLORtraceR7 = str(hexcolor) # hexcolor
221  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
222 
224  global COLORgrid
225 
226  tempwindow = Tk()
227  tempwindow.state("withdrawn")
228  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORgrid")
229  tempwindow.destroy()
230  COLORgrid = str(hexcolor) # hexcolor
231  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
232 
234  global COLORtext
235 
236  tempwindow = Tk()
237  tempwindow.state("withdrawn")
238  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtext")
239  tempwindow.destroy()
240  COLORtext = str(hexcolor) # hexcolor
241  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
242 
244  global COLORtrigger
245 
246  tempwindow = Tk()
247  tempwindow.state("withdrawn")
248  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORtrigger")
249  tempwindow.destroy()
250  COLORtrigger = str(hexcolor) # hexcolor
251  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
252 
254  global COLORzeroline
255 
256  tempwindow = Tk()
257  tempwindow.state("withdrawn")
258  rgb,hexcolor = askcolor(parent=tempwindow, title="Choose color for COLORzeroline")
259  tempwindow.destroy()
260  COLORzeroline = str(hexcolor) # hexcolor
261  # print("you picked the following color for "+str(text)+": "+str(hexcolor)
262 #
my_test_functions.SetColorTR2
def SetColorTR2()
Definition: my_test_functions.py:163
my_test_functions.SetColorT1
def SetColorT1()
Definition: my_test_functions.py:83
my_test_functions.SetColorT4
def SetColorT4()
Definition: my_test_functions.py:113
my_test_functions.DestroyColorScreen
def DestroyColorScreen()
Definition: my_test_functions.py:76
my_test_functions.ColorSelector
def ColorSelector()
Color Selector / Editor.
Definition: my_test_functions.py:2
my_test_functions.SetColorT2
def SetColorT2()
Definition: my_test_functions.py:93
my_test_functions.SetColorT7
def SetColorT7()
Definition: my_test_functions.py:143
my_test_functions.SetColorText
def SetColorText()
Definition: my_test_functions.py:233
my_test_functions.SetColorTR3
def SetColorTR3()
Definition: my_test_functions.py:173
my_test_functions.SetColorTR4
def SetColorTR4()
Definition: my_test_functions.py:183
my_test_functions.SetColorT6
def SetColorT6()
Definition: my_test_functions.py:133
my_test_functions.SetColorTR6
def SetColorTR6()
Definition: my_test_functions.py:203
my_test_functions.SetColorT5
def SetColorT5()
Definition: my_test_functions.py:123
my_test_functions.SetColorTR1
def SetColorTR1()
Definition: my_test_functions.py:153
my_test_functions.SetColorTrig
def SetColorTrig()
Definition: my_test_functions.py:243
my_test_functions.SetColorTR7
def SetColorTR7()
Definition: my_test_functions.py:213
my_test_functions.SetColorZLine
def SetColorZLine()
Definition: my_test_functions.py:253
my_test_functions.SetColorT3
def SetColorT3()
Definition: my_test_functions.py:103
color-chooser-test.askcolor
def askcolor(text)
Definition: color-chooser-test.py:31
my_test_functions.SetColorGrid
def SetColorGrid()
Definition: my_test_functions.py:223
my_test_functions.SetColorTR5
def SetColorTR5()
Definition: my_test_functions.py:193