-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNPDataFrame.py
109 lines (100 loc) · 5.04 KB
/
NPDataFrame.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.6.8 on Sat Oct 12 14:20:36 2013
#
import wx
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class NPDataFrame(wx.Frame):
""" The Current Sample Display Frame of the NinjaPBR Interface.
Holds only static text showing the last sample's parameters.
"""
def __init__(self, *args, **kwds):
# begin wxGlade: NPDataFrame.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.label_2 = wx.StaticText(self, wx.ID_ANY, _("NinjaPBR Sample Data"))
self.label_1 = wx.StaticText(self, wx.ID_ANY, _("Sample Time"))
self.time_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.label_1_copy_1 = wx.StaticText(self, wx.ID_ANY, _("Sample Temperature"))
self.temp_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.label_1_copy_2 = wx.StaticText(self, wx.ID_ANY, _("Brightness"))
self.bgt_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.Background = wx.StaticText(self, wx.ID_ANY, _("Background"))
self.background_od_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.num_chambers_label = wx.StaticText(self, wx.ID_ANY, _("Reactor Chambers"))
self.num_chambers_value = wx.StaticText(self, wx.ID_ANY, _("-"))
self.num_leds_label = wx.StaticText(self, wx.ID_ANY, _("OD Channels"))
self.num_leds_value = wx.StaticText(self, wx.ID_ANY, _("-"))
self.ref_values_measured_label = wx.StaticText(self, wx.ID_ANY, _("Reference Values Measured"))
self.ref_values_measured_value = wx.StaticText(self, wx.ID_ANY, _("-"))
self.OD_led1_label = wx.StaticText(self, wx.ID_ANY, _("OD Led1"))
self.OD_value_led1_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.OD_led2_label = wx.StaticText(self, wx.ID_ANY, _("OD Led2"))
self.OD_value_led2_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.OD_led3_label = wx.StaticText(self, wx.ID_ANY, _("OD Led3"))
self.OD_value_led3_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.OD_led4_label = wx.StaticText(self, wx.ID_ANY, _("OD Led4"))
self.OD_value_led4_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.OD_led5_label = wx.StaticText(self, wx.ID_ANY, _("OD Led5"))
self.OD_value_led5_label = wx.StaticText(self, wx.ID_ANY, _("-"))
self.__set_properties()
self.__do_layout()
# end wxGlade
self.__attach_events()
self.mainFrame = None
def __set_properties(self):
# begin wxGlade: NPDataFrame.__set_properties
self.SetTitle(_("NinjaPBR Sample Data"))
self.SetSize((732, 231))
self.label_2.SetFont(wx.Font(40, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Lucida Grande"))
# end wxGlade
def __do_layout(self):
# begin wxGlade: NPDataFrame.__do_layout
sizer_3 = wx.BoxSizer(wx.VERTICAL)
sizer_4 = wx.BoxSizer(wx.VERTICAL)
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
grid_sizer_3 = wx.GridSizer(5, 2, 0, 0)
grid_sizer_1 = wx.GridSizer(7, 2, 0, 0)
sizer_4.Add(self.label_2, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
grid_sizer_1.Add(self.label_1, 0, 0, 0)
grid_sizer_1.Add(self.time_label, 0, 0, 0)
grid_sizer_1.Add(self.label_1_copy_1, 0, 0, 0)
grid_sizer_1.Add(self.temp_label, 0, 0, 0)
grid_sizer_1.Add(self.label_1_copy_2, 0, 0, 0)
grid_sizer_1.Add(self.bgt_label, 0, 0, 0)
grid_sizer_1.Add(self.Background, 0, 0, 0)
grid_sizer_1.Add(self.background_od_label, 0, 0, 0)
grid_sizer_1.Add(self.num_chambers_label, 0, 0, 0)
grid_sizer_1.Add(self.num_chambers_value, 0, 0, 0)
grid_sizer_1.Add(self.num_leds_label, 0, 0, 0)
grid_sizer_1.Add(self.num_leds_value, 0, 0, 0)
grid_sizer_1.Add(self.ref_values_measured_label, 0, 0, 0)
grid_sizer_1.Add(self.ref_values_measured_value, 0, 0, 0)
sizer_2.Add(grid_sizer_1, 1, wx.EXPAND, 0)
grid_sizer_3.Add(self.OD_led1_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_value_led1_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_led2_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_value_led2_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_led3_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_value_led3_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_led4_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_value_led4_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_led5_label, 0, 0, 0)
grid_sizer_3.Add(self.OD_value_led5_label, 0, 0, 0)
sizer_2.Add(grid_sizer_3, 1, wx.EXPAND, 0)
sizer_4.Add(sizer_2, 1, wx.EXPAND, 0)
sizer_3.Add(sizer_4, 1, wx.EXPAND, 0)
self.SetSizer(sizer_3)
self.Layout()
# end wxGlade
def __attach_events(self):
#register events at the controls
self.Bind(wx.EVT_CLOSE, self.OnClose)
def OnClose(self, event):
"""Called on frame close."""
self.mainFrame.dataFrame = None # tell mainframe that window is closed
self.Destroy()
# end of class NPDataFrame